Lightweight container arrangement and deployment method, intelligent equipment and storage medium

By employing a lightweight container orchestration and deployment approach, and utilizing pre-configured orchestration files and deployment packages, the complexity and resource consumption issues of Kubernetes in private deployment scenarios are resolved, enabling a fast and simplified deployment process suitable for small projects.

CN121255221APending Publication Date: 2026-01-02GUANGZHOU YUNCONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511420170.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing container orchestration tools such as Kubernetes suffer from complex deployment, high resource consumption, and high learning costs in private deployment scenarios, making them unsuitable for small and simple projects.

Method used

This provides a lightweight container orchestration and deployment method that uses pre-configured orchestration files and deployment packages, employs a bootloader for environment detection and automatic installation, and deploys middleware and applications sequentially, simplifying deployment logic and reducing learning costs.

Benefits of technology

It enables rapid and simplified private deployment in small and simple projects, reducing resource consumption and user learning costs, and is suitable for private deployment scenarios of small and simple projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255221A_ABST
    Figure CN121255221A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, particularly provides a lightweight container arrangement and deployment method, intelligent equipment and a storage medium, and aims to solve the problem that a container arrangement and deployment tool is complex in deployment and is not suitable for a privatized deployment scene. In order to achieve the purpose, the lightweight container arrangement and deployment method comprises the steps that an arrangement file and a deployment package which are configured in advance and an executive program used for starting deployment are obtained; and in response to the execution program started by the user, obtaining target node information and arrangement information from the arrangement file, and deploying the software to the target node according to the arrangement information, the bootstrap program in the deployment package and the mirror image file. The deployment package and the arrangement file are configured in advance, and the arrangement file and the deployment package can be quickly called through the execution program for automatic deployment. The number of deployed components is simplified, the learning cost of the user is reduced, and the method is very suitable for a private deployment scene of a small and simple project.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and specifically provides a lightweight container orchestration and deployment method, an intelligent device and a storage medium. BACKGROUND

[0002] A container orchestration and deployment tool is a set of tools and platforms for automating, coordinating and managing container applications, responsible for deploying containers into clusters and ensuring that they run in a consistent manner. Kubernetes (K8s) is a mainstream open-source container orchestration tool, which has a wide range of applications and support. However, it has the disadvantages of complex deployment, large resource consumption, high learning cost, etc., and is not suitable for private deployment scenarios of small and simple projects.

[0003] Correspondingly, there is a need for a new lightweight container orchestration and deployment scheme to solve the above problems. SUMMARY

[0004] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem that the container orchestration and deployment tool is complex to deploy and is not suitable for private deployment scenarios.

[0005] In a first aspect, the present application provides a lightweight container orchestration and deployment method, comprising: obtaining a pre-configured orchestration file and deployment package and an execution program for starting deployment; in response to a user starting the execution program, obtaining target node information and orchestration information from the orchestration file, and deploying software to the target node according to the orchestration information, a boot program and an image file in the deployment package.

[0006] In one technical solution of the above-mentioned lightweight container orchestration and deployment method, before the software is deployed to the target node according to the orchestration information, the boot program and the image file in the deployment package, the method further comprises: performing environment detection on the target node according to the boot program in the deployment package; and if the environment does not meet the installation requirements, automatically installing the required environment.

[0007] In one technical solution of the above-mentioned lightweight container orchestration and deployment method, the orchestration information includes middleware, applications and dependency relationships, the image file includes middleware images and application images, and the software is deployed to the target node according to the orchestration information, the boot program and the image file in the deployment package, comprising: sequentially deploying middleware and applications to the target node according to the middleware, the applications and the dependency relationships, and the middleware images and the application images.

[0008] In one technical solution of the above-mentioned lightweight container orchestration and deployment method, the method further comprises: initializing and configuring the middleware according to an initialization script in the deployment package.

[0009] In one of the technical solutions of the above lightweight container orchestration and deployment method, the orchestration file includes a local orchestration file for single-machine deployment and / or a cluster orchestration file for cluster deployment.

[0010] In one of the technical solutions of the above lightweight container orchestration and deployment method, the middleware includes an image repository, a web server, and a visual container management tool, wherein the image repository is used to store and manage image files, the web server is used to process requests and return responses, and the visual container management tool is used to provide a visual operation interface for users to monitor and maintain containers.

[0011] In one of the technical solutions of the above lightweight container orchestration and deployment method, after the deployment of the image repository is completed, the method further includes: configuring the image naming rule in the image repository as: docker-registry.easy:5000 / {name}:{version}.

[0012] In one of the technical solutions of the above lightweight container orchestration and deployment method, the method further includes: loading the image file from the local storage of the deployment package; and if the local storage does not exist, pulling from the image repository.

[0013] In a second aspect, an intelligent device is provided, which includes at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores a computer program, and the computer program is executed by the at least one processor to implement the method of any one of the technical solutions of the above lightweight container orchestration and deployment method.

[0014] In a third aspect, a computer-readable storage medium is provided, which stores a plurality of program codes therein, and the program codes are adapted to be loaded and run by a processor to execute the method of any one of the technical solutions of the above lightweight container orchestration and deployment method.

[0015] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:

[0016] In the implementation of the technical solutions of the present application, by configuring and packaging the required images and script files in advance, the user only needs to prepare a simple orchestration file to quickly call the deployment package for deployment through the execution program. This greatly simplifies the number of components for deployment, and the deployment logic and process are fixed in the boot program, which reduces the learning cost of the user, consumes less resources, and is very suitable for private deployment scenarios of small and simple projects. BRIEF DESCRIPTION OF DRAWINGS

[0017] The disclosure of the present application will become more readily understood from the following description of the drawings. It will be readily apparent to those skilled in the art that the drawings are not intended to limit the scope of the present application, and that the present application can be practiced with the except of the instruments shown. Among other things:

[0018] Figure 1 is a main step flow diagram of a lightweight container orchestration and deployment method according to an embodiment of the present application;

[0019] Figure 2 is a structure tree diagram of a deployment package according to an embodiment of the present application;

[0020] Figure 3 is a diagram of a local orchestration file according to an embodiment of the present application;

[0021] Figure 4 is a whole structure block diagram of a lightweight container orchestration and deployment method according to an embodiment of the present application;

[0022] Figure 5 is a command help document diagram of a container orchestration and deployment tool according to an embodiment of the present application;

[0023] Figure 6 is a diagram of installation steps according to an embodiment of the present application;

[0024] Figure 7 is a main structure diagram of a smart device according to an embodiment of the present application.

[0025] Reference Signs:

[0026] 11: memory; 12: processor. DETAILED DESCRIPTION

[0027] Some embodiments of the present application will be described below with reference to the accompanying drawings. It will be readily apparent to those skilled in the art that the embodiments are merely intended for explaining the technical principles of the present application, and are not intended to limit the scope of the present application.

[0028] In the description of the application, the terms "first", "second", etc. are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The terms "mount", "connect", "connect" should be understood broadly, for example, it can be a fixed connection, or a detachable connection, or an integral connection; it can be a mechanical connection, or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal communication of two elements, it can be wireless connection, or wired connection.

[0029] In addition, "module" and "processor" can include hardware, software or a combination of both. A module can include hardware circuitry, various suitable sensors, communication ports, memory, and can also include a software part such as program code, and can be a combination of software and hardware. The processor can be a central processor, a microprocessor, a graphics processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor can be implemented in software, hardware or a combination of both. The computer-readable storage medium includes any suitable medium that can store program code, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc.

[0030] In addition, if "and / or" appears in the application, it includes three parallel solutions, for example, "A and / or B" includes A solution, or B solution, or A and B solution. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection claimed by the application. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", which can include only A, only B or A and B. The singular form of the term "one", "this" can also include plural.

[0031] Container orchestration deployment tool is a set of tools and platforms for automating, coordinating and managing container applications. It is responsible for deploying containers into clusters and ensuring that they run in a consistent manner. K8s is an open source container orchestration tool that has a wide range of applications and support. However, it has the following disadvantages: heavyweight, high learning curve, large resource consumption, complex deployment, not suitable for simple and hardware resource scarce private deployment scenarios.

[0032] To solve the above problems, the embodiment provides a lightweight container orchestration and deployment method. Referring to the accompanying Figure 1 , Figure 1 is the main step flow diagram of the lightweight container orchestration and deployment method according to an embodiment of the application. As shown in Figure 1 , the lightweight container orchestration and deployment method in the embodiment mainly includes the following steps S2 and S4:

[0033] Step S2, obtaining pre-configured orchestration file and deployment package and execution program for starting deployment.

[0034] In the embodiment, the orchestration file mainly includes the target node information of the deployment, such as the host, ip, port and other related information of the target node; the deployment package mainly includes the bootstrap program and the software image, wherein the bootstrap program contains the deployment logic and process, and the software image includes the image file of the middleware and application required by the project. It should be noted that the contents of the deployment package and the orchestration file can be configured according to the project requirements, and the embodiment does not make specific limitations. The execution program is a compiled binary file, which provides a command line tool, and the user only needs to input a specific command to realize automatic deployment according to the orchestration file and the deployment package.

[0035] In one embodiment, Figure 2 is a structure tree diagram of the deployment package according to an embodiment of the application. As shown in Figure 2 , the deployment package includes three core parts: application (app), bootstrap and middleware. In the embodiment, the application directory contains specific business applications to be deployed, such as Figure 2The demo directory includes the application configuration file application.yml, the application orchestration file docker-compose.yaml, the container image images storing the application, and the reserved log directory logs. Optionally, the application configuration file contains the parameters required for the application to run, such as the database connection address, the log level, the service port, etc.; the application orchestration file is used to be called by the bootstrap program to realize one-key deployment; the container image storing the application includes the image file demo.tar of the demo application itself, which is a necessary file for deploying the application; and the reserved log directory is used to store the log files generated during the running of the application, facilitating viewing and management.

[0036] The bootstrap program directory mainly includes the offline installation package docker.tar.gz of the Docker engine and the detection script install.sh. Optionally, docker.tar.gz can be used to install Docker when the target node cannot connect to the Internet; install.sh can check whether Docker is installed, and if not, it can decompress docker.tar.gz, install the decompressed Docker software package according to the current operating system type, start the Docker service, and perform some basic configurations.

[0037] The middleware directory mainly includes some public infrastructures supporting the running and operation of the application, such as the image repository docker-registry. The image repository directory includes the orchestration file docker-compose.yml for starting the image repository, the container image images storing the image repository related information, and the brief description README.md. Optionally, images includes the saved file docker-registry.tar of the Registry image and the saved file docker-registry-ui.tar of the Registry Web management interface; docker-compose.yml defines how to run the docker-registry service (backend API) and the docker-registry-ui service (frontend management interface), and configures the connection between them; and README.md contains a brief description of how to use the image repository, the default access address, and the login credentials, etc.

[0038] In an optional implementation, after the above step S2, a step S3 can be further included, specifically including the following step S32 and step S34:

[0039] Step S32, performing environment detection on the target node according to the bootstrap program in the deployment package.

[0040] Step S34, if the environment does not meet the installation requirements, automatically install the required environment.

[0041] In this embodiment, the target node is detected by the bootstrap program in the deployment package, such as checking whether the target node is installed with Docker, whether the disk space is sufficient, and whether the dependencies are complete. If it is detected that Docker is not installed or a certain dependency is missing, the required environment is automatically installed according to the detection script.

[0042] Step S4, in response to the user starting the execution program, obtaining the target node information and the orchestration information from the orchestration file, and deploying the software to the target node according to the orchestration information, the bootstrap program in the deployment package, and the image file.

[0043] In this embodiment, when the user starts the execution program such as inputting an automatic deployment command, the target node information (such as IP address) and the orchestration information (such as software to be deployed) are parsed from the orchestration file, and the software is deployed to the target node according to the bootstrap program in the deployment package, that is, the target node is monitored, the application image is pulled from the deployment package, and the software is run.

[0044] In one embodiment, the orchestration information includes middleware, applications, and dependency relationships, such as order dependency relationships between applications and applications, and applications and middleware. When deploying the software, the middleware and applications are installed in a certain order according to the above-mentioned dependency relationships.

[0045] In one embodiment, the deployment package can also include an initialization script for initializing and configuring the middleware after the middleware is deployed. As an example, assuming that the initialization script includes a database initialization script, after the database is installed, the database, user account, and table structure are automatically created according to the database initialization script.

[0046] In one embodiment, after the image repository is deployed, the image naming rule is automatically configured as docker-registry.easy:5000 / {name}:{version}. Where {name} is a variable representing the name of the image; :5000 is the port number; and docker-registry.easy is the hostname of the image repository server. Based on this rule, the execution program can explicitly and unambiguously pull the images of the middleware and the applications, avoiding environment deployment errors caused by image name confusion, and facilitating the setting of security boundaries and the prevention of image leakage.

[0047] In one embodiment, the image repository is used to store and manage image files, and the image files are loaded from the local storage of the deployment package during software deployment; if the required image file does not exist in the local storage, it is pulled from the image repository.

[0048] In one optional implementation, the orchestration file includes a local orchestration file `local.yaml` for single-machine deployment and / or a cluster orchestration file `batch.yaml` for cluster deployment. Optionally, Figure 3 This is a schematic diagram of a local arrangement file according to an embodiment of this application. Figure 3 As shown, the local orchestration file includes local nodes (target node information) and orchestration services (orchestration information). Specifically, the target node information includes the node's address (IP) and name; the orchestration information includes the middleware and application to be deployed. In this embodiment, the middleware includes the Docker registry, the visual container management tool Portailer, the lightweight web server Nginx, the open-source distributed key-value store system etcd, the service discovery and configuration management tool Consul, the relational database MySQL, and the log management and analysis tool ELK; the application includes a custom application demo. It can be understood that by modifying the orchestration file, a pre-configured deployment package can be used as a unique template for rapid and consistent deployment to multiple different target environments.

[0049] In one implementation, the orchestration file may also include an infrastructure configuration file, main.yaml, which includes specific parameters describing the target environment, thereby enabling the same software to adapt to different deployment environments by modifying the configuration.

[0050] Another aspect of this application provides a lightweight container orchestration and deployment tool. (Reference) Figure 5 The command help documentation shown indicates that the deployment tool is named easy devops. The syntax is easy[global options]command[command options][arguments...], which is the standard CLI command structure: program name[global options]subcommand[subcommand options][arguments]. The current version of the deployment tool is 1.0.0. Core functions / available operations include: automatically deploying local nodes using the deploy(dpy) command, removing local programs using the remove(rm) command, managing images using the images(img) command, performing batch operations using the batch command, and displaying a list of commands or command help information using the help(h) command, i.e., the current command help documentation. In the global options, --help(-h) is used to display help information, and --version(-v) is used to print version information.

[0051] In one implementation, Figure 4 This demonstrates the overall workflow of the deployment tool. For example... Figure 4As shown, after receiving the user instruction, the target node in the arrangement file is subjected to environment monitoring according to the boot program in the deployment package, and if the environment of the target node does not meet the requirements, the basic environment is automatically installed, and then the middleware and the application are sequentially deployed according to the arrangement information in the arrangement file. For detailed steps, refer to the above-mentioned other embodiments, which will not be described here.

[0052] In one embodiment, it is assumed that the pre-configured arrangement file is conf, the deployment package is deploy.tar.gz, the execution program is easy, and the deployment command is. / easy deploy. When the user inputs the deployment command. / easy deploy, the installation steps are as shown in Figure 6 The specific steps include the following steps:

[0053] Step 1: Prepare the node. First, set the hostname of the current target node to master1, then add a line of record at the end of the hosts file of the machine, map the IP address 10.128.175.101 to the hostname master1, and add another line in the hosts file, map the same IP address 10.128.175.101 to the domain name docker-registry.easy. Thus, the target node (and the container running on this machine subsequently) can access the image warehouse service to be deployed through the domain name (docker-registry.easy), without the need to remember the complex IP address.

[0054] Step 2: Install the basic environment. First, establish a unified working directory / data for storing deployment packages and application data, then copy the deployment package deploy.tar.gz under the current directory to the / data directory, keep the original attributes, and finally decompress the deploy.tar.gz compressed package in the / data directory and display the detailed process, and the target path of the decompression is / data.

[0055] After the basic environment is installed, the containers and applications are deployed automatically according to the orchestration file, such as the log management and analysis tools elasticsearch, logstash and kibana, the database mysql, the service discovery and configuration management tool consul, the web visual management and viewing tool etcdkeeper, the open source distributed key value storage system etcd, the lightweight web server nginx, the visual container management tool portainer-cn, the image warehouse docker_registry and the image warehouse management tool docker_registry_uiconsul. After the deployment is completed, the connection of the visual container management tool and the container engine is automatically configured, and the image warehouse tool is automatically configured and the image naming rule is set. In the later period, portainer and docker-registry can be used for operation and maintenance, such as monitoring the service state, viewing the log, performing the expansion and shrinkage of the container and the like in the visual management interface.

[0056] It should be noted that, although the steps in the above embodiments are described in a specific order, those skilled in the art can understand that, in order to achieve the effects of the present application, the steps do not necessarily have to be executed in such an order, and they can be executed simultaneously (in parallel) or in other orders, and the schemes after these adjustments belong to equivalent technical schemes, and thus will fall within the protection scope of the present application.

[0057] Those skilled in the art can understand that all or part of the processes in the method of the above embodiment can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable storage medium can include any entity or device, medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0058] Another aspect of the present application also provides a computer readable storage medium.

[0059] In an embodiment of the computer readable storage medium according to the present application, the computer readable storage medium can be configured to store a program of the lightweight container orchestration and deployment method described above, which can be loaded and run by the processor to implement the lightweight container orchestration and deployment method described above. For the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed are referred to the method part of the embodiments of the present application. The computer readable storage medium can be a storage device formed by various electronic devices, and optionally, the computer readable storage medium in the embodiments of the present application is a non-transitory computer readable storage medium.

[0060] Another aspect of the present application also provides a smart device.

[0061] In an embodiment of the smart device according to the present application, the smart device can include at least one processor; and a memory connected in communication with the at least one processor; wherein the memory has stored therein a computer program, which, when executed by the at least one processor, implements the method according to any one of the embodiments described above. The smart device according to the present application can include a driving device, a smart car, a robot, etc. For the convenience of description, the smart device according to the present application is exemplarily shown in FIG. 1. Figure 7 , Figure 7 The memory 11 and the processor 12 are connected in communication through a bus, as exemplarily shown in FIG. 1.

[0062] In some embodiments of the present application, the smart device can further include at least one sensor, which is used to perceive information. The sensor is connected in communication with any one of the processors mentioned in the present application. Optionally, the processor is in communication with the sensor, and is used to complete the method according to any one of the embodiments described above. The smart device according to the present application can be, but is not limited to, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR) \ virtual reality (VR) device, etc., and the embodiments of the present application do not limit the smart device.

[0063] So far, the technical solution of the present application has been described in combination with the preferred embodiments shown in the drawings, but those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without departing from the principles of the present application, and the technical solutions after the changes or replacements will all fall within the protection scope of the present application.

Claims

1. A lightweight container orchestration and deployment method, characterized in that, The method includes: Obtain the pre-configured orchestration files and deployment packages, as well as the executable program used to start the deployment; In response to the user starting the execution program, the target node information and orchestration information are obtained from the orchestration file, and the software is deployed to the target node according to the orchestration information, the bootloader in the deployment package and the image file.

2. The container orchestration and deployment method according to claim 1, characterized in that, Before deploying the software to the target node based on the orchestration information, the bootloader in the deployment package, and the image file, the method further includes: Perform environmental checks on the target node according to the bootstrap in the deployment package; If the environment does not meet the installation requirements, the required environment will be installed automatically.

3. The lightweight container orchestration and deployment method according to claim 1 or 2, characterized in that, The orchestration information includes middleware, applications, and dependencies; the image file includes middleware images and application images; and the step of deploying the software to the target node based on the orchestration information, the bootloader in the deployment package, and the image file includes: Based on the middleware, applications, and dependencies, as well as the middleware image and application image, deploy the middleware and applications to the target node in sequence.

4. The lightweight container orchestration and deployment method according to claim 3, characterized in that, The method further includes: The middleware is initialized and configured according to the initialization script in the deployment package.

5. The lightweight container orchestration and deployment method according to claim 1, characterized in that, The orchestration files include local orchestration files for single-machine deployment and / or cluster orchestration files for cluster deployment.

6. The lightweight container orchestration and deployment method according to claim 3, characterized in that, The middleware includes an image repository, a web server, and a visual container management tool. The image repository is used to store and manage image files, the web server is used to process requests and return responses, and the visual container management tool is used to provide users with a visual interface for monitoring and maintaining containers.

7. The lightweight container orchestration and deployment method according to claim 6, characterized in that, After completing the deployment of the image repository, the method also includes: Configure the image naming rules in the image repository as follows: docker-registry.easy:5000 / {name}:{version}.

8. The lightweight container orchestration and deployment method according to claim 7, characterized in that, The method further includes: Load the image file from the local storage of the deployment package; If the local storage does not exist, it will be pulled from the image repository.

9. A smart device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores a computer program that, when executed by the at least one processor, implements the lightweight container orchestration and deployment method according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform the lightweight container orchestration and deployment method as described in any one of claims 1 to 8.