A method for automatically deploying docker containers on an edge computing platform

By adopting the docker application submission system and automatic deployment system on the edge computing platform, the automatic deployment and monitoring of docker containers is solved, and the problem of insufficient application of docker technology on the edge computing platform is met, the platform's portability and low power consumption requirements are met, the hardware cost is reduced and development efficiency is improved.

CN114610438BActive Publication Date: 2025-04-18SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011422331.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-08
Publication Date
2025-04-18
Estimated Expiration
2040-12-08

AI Technical Summary

Technical Problem

On edge computing platforms, docker technology is rarely used, and docker technology based on Arm architecture is not yet mature and not stable enough, making it difficult to meet the portability and low power consumption requirements of edge computing platforms.

Method used

A method of automatic deployment of docker containers on edge computing platforms is proposed, using docker application submission system and docker application automatic deployment system, submit docker running tasks through json files, and manage resources by master and slave nodes to realize automatic deployment and monitoring of docker containers.

Benefits of technology

The automated deployment of docker containers on the edge computing platform is realized, which meets the platform's portability and low power consumption requirements, reduces the hardware cost of docker deployment, and improves the efficiency of application development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610438B_ABST
    Figure CN114610438B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically deploying docker containers on an edge computing platform, and adopts a system for automatically deploying docker containers on an edge computing platform, which includes a docker application submission system and a docker application automatic deployment system; the docker containers deployed by the method can independently run multiple processes and multiple applications, make more effective use of the resources of the edge computing platform, and maintain the security of each independent application at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information technology and relates to a method for automatically deploying Docker containers on an edge computing platform. Background Art

[0002] In recent years, mobile edge computing all-in-one machines have become a hot topic in the field of computer architecture. Edge computing all-in-one machines are mainly composed of: 1) hardware level: small computers, network equipment and other hardware that meet the needs of edge computing; 2) software level: resource management systems customized for edge computing. Its main features are: small size, low power consumption, light weight, easy expansion, high performance and low cost. People can use the portability and flexibility of edge computing all-in-one machines to provide computing and storage services close to data input, solving the problems of high latency, unstable network and insecure hijacking of data when data is transmitted back to the central data center of cloud computing in the traditional mode.

[0003] Containers are user spaces that run directly on the operating system kernel. Container virtualization is called "operating system virtualization". Container technology allows multiple independent user spaces to run on the same host machine. Compared with traditional virtualization, containers have relatively low overhead because containers do not require simulation layers and management layers to run, but use the system call interface of the operating system. However, due to the complexity of container management, Docker technology came into being. Docker is an open source engine that can automatically deploy developed applications to containers. Users can "Dockerize" their programs in just a few minutes. In addition, Docker containers have high performance, and many containers can run on a host machine.

[0004] At present, edge computing is emerging in many industries, such as smart medical care, video surveillance, field surveys, military operations, etc. There are more and more types of applications. In order to ensure the high security of data and high performance of applications on edge computing platforms, the isolation of resources between applications is particularly important. However, docker technology is currently only used on traditional large servers, and there is little exploration of its application on edge computing platforms. On the other hand, large servers are generally based on the x86 architecture, while edge computing platforms are more suitable for portability and low power consumption. The docker technology based on the Arm architecture is not yet mature and is not stable enough.

[0005] In order to make full use of the resources of the edge computing platform, a technology for automatically deploying docker containers on the edge computing platform is proposed. Although docker technology is widely used in data centers, it is rarely used on edge computing platforms. Summary of the invention

[0006] The purpose of the present invention is to provide a method for automatically deploying Docker containers on an edge computing platform. The Docker containers deployed by this method can independently run multiple processes and multiple applications, make more effective use of the resources of the edge computing platform, and maintain the security of each independent application.

[0007] The technical solution adopted by the present invention is a method for automatically deploying docker containers on an edge computing platform, which adopts an automatic deployment system for docker containers on an edge computing platform, and the system includes a docker application submission system and a docker application automatic deployment system;

[0008] The specific steps include:

[0009] Step 1: The user submits a docker run task to the edge computing platform in the form of a json file;

[0010] Step 2: After receiving the docker task json description, the master process selects a node that can meet the docker task resource requirements. At the same time, the master process sends the docker task information to slave1, and updates the remaining resources on slave1 to the value after subtracting the docker task requirements in the data structure in memory;

[0011] Step 3: After slave1 obtains the docker task information to be run, it starts the container process;

[0012] Step 4: Pull the image of the Docker task through the container process, and implement resource isolation based on CPU and memory through the API of the Docker service;

[0013] Step 5, start the container process again on slave1;

[0014] Step 6: Based on the container process started in step 5, create a docker process through the task command and monitor the life cycle of the docker process;

[0015] Step 7: Feedback the status information of the Docker process to the user interface step by step.

[0016] The present invention is also characterized in that:

[0017] The docker application submission system includes a front-end docker application setting information filling interface and a back-end docker application setting information receiving and storing operation;

[0018] The docker application information filled in by the docker application submission system will be transmitted to the docker application submission system backend through the http protocol, and the docker application submission system backend will save the docker application information.

[0019] The docker application information is saved in a database or written to a separate file.

[0020] The interface for filling in the front-end Docker application setting information is the web page or configuration file.

[0021] The docker application automatic deployment system includes a docker application deployment parsing module, a task scheduling module, a container building module, and a container startup and monitoring module that transmit information in sequence.

[0022] The docker application deployment parsing module includes the following functions: calling the json or yaml decoding library to parse the docker application description information submitted by the user; encapsulating the parsed docker application description information into a computing task and submitting it to the task scheduling module on the edge computing platform.

[0023] The task scheduling module includes the following functions: responsible for allocating resources to computing tasks and scheduling them to run on the corresponding slave nodes.

[0024] The container building module includes the following functions: preparing for the operation of Docker, including pulling images and performing resource isolation.

[0025] The container startup and monitoring module includes the following functions:

[0026] 1) Inject the user's application into the corresponding Docker container, derive a child process through the Linux system call, and the child process then executes the Docker command to run the Docker container;

[0027] 2) Monitor the status of the started subprocess. On the one hand, report the life cycle information of the subprocess upward, and on the other hand, redirect the file input and output descriptors of the subprocess to the specified file to obtain the log of the docker application.

[0028] The life cycle information in step 2) includes running, successful or failed.

[0029] The beneficial effect of the present invention is that, compared with the large-scale deployment of docker in traditional data centers, the automated deployment technology of docker containers on the edge computing platform meets the requirements of portability and low power consumption of the edge computing platform, and reduces the hardware cost of docker deployment. On the other hand, it reduces the burden on programmers, making it easy to port the programs written by programmers to the architecture platform (large servers based on x86 and edge computing platforms based on Arm), thereby improving the efficiency of application development. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a structural block diagram of a system for automatically deploying Docker containers on an edge computing platform adopted in a method for automatically deploying Docker containers on an edge computing platform of the present invention. DETAILED DESCRIPTION

[0031] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] The present invention provides a method for automatically deploying Docker containers on an edge computing platform, using an automatic deployment system for Docker containers on an edge computing platform, such as Figure 1 As shown, the system includes a docker application submission system A1 and a docker application automatic deployment system A2;

[0033] The docker application submission system A1 mainly provides users with an interface for setting deployment requirements for docker applications, which can be a web page or a configuration file. Users define the application name, application location, CPU cores used, and memory usage to be dockerized using json or yaml syntax.

[0034] The docker application automatic deployment system A2 is divided into: S1: docker application deployment parsing module. S2: task scheduling module. S3: container construction module. S4: container startup and monitoring module. The docker application automatic deployment system A2 first obtains the docker application deployment requirements set by the user from the A1 system, parses them into the environment information of the docker application, and packages the docker application deployment into a task to be run, and submits it to the task scheduling module S2. Then, the edge computing platform starts the task scheduling module S2, and selects a slave node from the managed slaves node according to the best fit algorithm based on the resource requirements of the docker running task, such as the number of CPU cores and memory usage. The docker running task is then scheduled to run on this slave node. When the slave process on the specified node receives the docker task information, the slave process starts the container construction module S3. S3 pulls the docker image for the docker task and calls the Linux system call for resource isolation and restriction. Finally, the container startup and monitoring module S4 is responsible for deriving the docker container process, which complies with the resource restrictions and isolation specified by S3 and runs the application set by the user. At the same time, the executor in the S4 module is responsible for monitoring the life cycle of the docker container, that is, passing the readiness, operation, success or failure information of the docker container to the user-perceivable docker application submission system A1.

[0035] The docker application submission system A1 includes: a front-end docker application setting information filling interface, and a back-end docker application setting information receiving and storage operation.

[0036] The front-end docker application setting information filling interface can be in the form of a web page. Through this interface, users can use json or yaml syntax to set the basic information of this docker application, including the application program, image address, mount directory, resource requirements (CPU core number and memory usage) of the docker application, etc. The docker application information filled in by the front end will be transmitted to the system back end via the http protocol. The system back end will save the docker application information, which can be saved in the database or written into a separate file. The present invention adopts the method of saving in the database.

[0037] The contents of docker application deployment parsing module S1 include:

[0038] S101: Call the json or yaml decoding library to parse the docker application description information submitted by the user.

[0039] S102: Encapsulate the parsed docker application description information into a computing task and submit it to the task scheduling module on the edge computing platform.

[0040] The task scheduling module S2 includes:

[0041] S201: The task scheduling module of the edge computing platform is responsible for allocating resources to computing tasks and scheduling them to run on the corresponding slave nodes.

[0042] The container building blocks for S3 include:

[0043] S301: Prepare for the operation of Docker, including pulling images, isolating resources, etc.

[0044] The container startup and monitoring module S4 includes:

[0045] S401: Inject the user's application into the corresponding docker container, and derive a child process through a linux system call. The child process then executes the docker command to run the docker container.

[0046] S402: Monitor the status of the started subprocess. On the one hand, report the life cycle information of the subprocess (running, successful or failed) upward, and on the other hand, redirect the file input and output descriptors of the subprocess to the specified file to obtain the log of the docker application.

[0047] The present invention provides a method for automatically deploying docker containers on an edge computing platform, wherein the edge computing platform is a cluster composed of multiple small machine nodes. The resource management system running on it is represented by a master node managing multiple slave nodes. The edge computing platform provides a task submission interface to users.

[0048] The specific steps include:

[0049] Step 1: The user submits a docker run task to the edge computing platform in the form of a json file;

[0050] Step 2: After receiving the docker task json description, the master process selects a node that can meet the docker task resource requirements. At the same time, the master process sends the docker task information to slave1, and updates the remaining resources on slave1 to the value after subtracting the docker task requirements in the data structure in memory;

[0051] Step 3: After slave1 obtains the docker task information to be run, it starts the container process;

[0052] Step 4: Pull the image of the Docker task through the container process, and implement resource isolation based on CPU and memory through the API of the Docker service;

[0053] Step 5, start the container process again on slave1;

[0054] Step 6: Based on the container process started in step 5, create a docker process through the task command and monitor the life cycle of the docker process;

[0055] Step 7: Feedback the status information of the Docker process (ready, running, failed, and successful) to the user interface step by step.

Claims

1. A method for automatically deploying Docker containers on an edge computing platform, characterized in that: A docker container automatic deployment system on an edge computing platform is used, the system includes a docker application submission system and a docker application automatic deployment system; The specific steps include: Step 1: The user submits a docker run task to the edge computing platform in the form of a json file; Step 2: After receiving the docker task json description, the master process selects a node that can meet the docker task resource requirements. At the same time, the master process sends the docker task information to slave1, and updates the remaining resources on slave1 to the value after subtracting the docker task requirements in the data structure in memory; Step 3: After slave1 obtains the docker task information to be run, it starts the container process; Step 4: Pull the image of the Docker task through the container process, and implement resource isolation based on CPU and memory through the API of the Docker service; Step 5, start the container process again on slave1; Step 6: Based on the container process started in step 5, create a docker process through the task command and monitor the life cycle of the docker process; Step 7: Feedback the status information of the Docker process to the user interface step by step.

2. According to the method for automatically deploying docker containers on an edge computing platform according to claim 1, it is characterized in that: The docker application submission system includes a front-end docker application setting information filling interface and a back-end docker application setting information receiving and storing operation; The docker application information filled in by the docker application submission system will be transmitted to the docker application submission system backend through the http protocol, and the docker application submission system backend will save the docker application information.

3. According to the method for automatically deploying docker containers on an edge computing platform according to claim 2, it is characterized in that: The docker application information is saved in a database or written into a separate file.

4. The automatic deployment system for Docker containers on the edge computing platform according to claim 2 is characterized in that: The front-end docker application setting information filling interface is a web page or a configuration file.

5. The automatic deployment system for Docker containers on the edge computing platform according to claim 1 is characterized in that: The docker application automatic deployment system includes a docker application deployment parsing module, a task scheduling module, a container building module, and a container startup and monitoring module that transmit information in sequence.

6. The automatic deployment system for Docker containers on the edge computing platform according to claim 5 is characterized in that: The docker application deployment parsing module includes the following functions: calling the json or yaml decoding library to parse the docker application description information submitted by the user; encapsulating the parsed docker application description information into a computing task and submitting it to the task scheduling module on the edge computing platform.

7. The automatic deployment system for Docker containers on the edge computing platform according to claim 6 is characterized in that: The task scheduling module includes the following functions: responsible for allocating resources to computing tasks and scheduling them to run on corresponding slave nodes.

8. The automatic deployment system for Docker containers on the edge computing platform according to claim 7 is characterized in that: The container construction module includes the following functions: preparing for the operation of Docker, including pulling images and performing resource isolation.

9. The automatic deployment system for Docker containers on the edge computing platform according to claim 8 is characterized in that: The container startup and monitoring module includes the following functions: 1) Inject the user's application into the corresponding Docker container, derive a child process through the Linux system call, and the child process then executes the Docker command to run the Docker container; 2) Monitor the status of the started subprocess. On the one hand, report the life cycle information of the subprocess upward, and on the other hand, redirect the file input and output descriptors of the subprocess to the specified file to obtain the log of the docker application.

10. The automatic deployment system of Docker containers on the edge computing platform according to claim 9 is characterized in that: The life cycle information in step 2) includes running, successful or failed.

Citation Information

Patent Citations

  • Application deployment method and cloud computing system

    CN105468362A

  • A CDN node edge computing system based on docker container

    CN109067890A