Business orchestration deployment method, system, network device and storage medium

Through business arrangement and deployment methods, obtain and analyze business configuration files, generate dependent trees and perform mirror construction and container deployment, solve the problem of high complexity when the Docker system manual deployment business is deployed, and realizes the simplified business deployment process.

CN114721764BActive Publication Date: 2025-01-24ZTE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011507151.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2025-01-24
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

When manually deploying services using the Docker system, users need to care about the complex processes of basic service deployment, network connection, network configuration parameters, service registration and discovery, which leads to high difficulty and complexity, and they cannot focus on the transformation and deployment strategies of business containers.

Method used

Put forward a business arrangement and deployment method. By obtaining the basic environmental information of the server to be deployed, obtaining and analyzing the business configuration documents, the user business is treated layered, the mirror image depends on the tree and the container dependence, and the mirror construction and container deployment are performed. Arranging and deployment of user business.

Benefits of technology

It greatly reduces the difficulty and complexity of business deployment. Users do not need to care about complex deployment processes and focus on the transformation and deployment strategies of business containers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721764B_ABST
    Figure CN114721764B_ABST
Patent Text Reader

Abstract

The present application proposes a business orchestration deployment method, system, network device and storage medium, which relate to container technology. The business orchestration deployment method includes: obtaining basic environment information of the server to be deployed; when the basic environment information of the server to be deployed meets the user's needs, obtaining and parsing the business configuration file, and processing the user business in layers, wherein the user business includes at least two services, and the service includes at least one microservice, and there is a dependency relationship between the microservices; according to the dependency relationship, generating a mirror dependency tree and a container dependency tree; according to the dependency relationship, mirroring and container deployment are performed for all nodes of each layer of the mirror dependency tree and the container dependency tree; starting all containers to complete the orchestration deployment of the user business. The present application is applied to the microservice orchestration deployment of small and micro scenarios, which greatly reduces the difficulty and complexity of deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to container technology, and in particular, to a service orchestration deployment method, system, network device, and storage medium. Background Art

[0002] Docker is an open source application container engine. Currently, many users use the Docker system to manually deploy their business.

[0003] However, when manually deploying services using the Docker system, users need to be concerned with basic service deployment, network connectivity, network configuration parameters, service registration and discovery processes, etc. This is difficult and complex, making it impossible for users to focus on the transformation and deployment strategies of business containers. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a service orchestration deployment method, system, network device and storage medium, which greatly reduces the difficulty and complexity of service deployment, allowing users to focus on the transformation and deployment strategy of the service container.

[0005] To achieve the above-mentioned purpose, an embodiment of the present application provides a business orchestration and deployment method, including: obtaining basic environment information of a server to be deployed; when the basic environment information of the server to be deployed meets user requirements, obtaining and parsing a business configuration file, and performing layered processing on the user business, wherein the user business includes at least two services, the service includes at least one microservice, and there is a dependency relationship between the microservices; based on the dependency relationship, generating an image dependency tree and a container dependency tree; based on the dependency relationship, mirroring and container deploying all nodes of each layer of the image dependency tree and the container dependency tree; starting all containers to complete the orchestration and deployment of the user business.

[0006] To achieve the above objectives, the present application also proposes a service orchestration deployment system, including:

[0007] The configuration file processing module is used to obtain basic environment information of the server to be deployed; determine whether the server to be deployed meets the user's needs; obtain and parse the service configuration file, and perform hierarchical processing on the user's service, wherein the user's service includes at least two services, the service includes at least one microservice, and there is a dependency relationship between the microservices;

[0008] A dependency tree generation module, used to generate an image dependency tree and a container dependency tree according to the dependency relationship;

[0009] An image building module, used to build images for all nodes at each layer of the image dependency tree according to the dependency relationship;

[0010] The container deployment module is used to perform container deployment on all nodes at each layer of the container dependency tree according to the dependency relationship, start all containers, and complete the orchestration deployment of the user service.

[0011] To achieve the above object, the present application also provides a network device, the device comprising:

[0012] at least one processor; and,

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the service orchestration deployment method described above.

[0015] The business orchestration deployment method, system, network device and storage medium proposed in the present application can automatically process the user's business in layers by obtaining the user's business configuration file and system configuration file, divide it into various microservices, generate a dependency tree based on the dependency relationship between microservices, perform image construction and service container deployment, and complete the user's business orchestration deployment, so that the user does not need to worry about complex deployment processes, etc., which greatly reduces the difficulty and complexity of business deployment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0017] Figure 1 is a flowchart of the service orchestration and deployment method provided by the first embodiment of the present application;

[0018] Figure 2 is a flowchart of the service orchestration and deployment method provided in the second embodiment of the present application;

[0019] Figure 3 is a flowchart of a service orchestration and deployment method provided in the third embodiment of the present application;

[0020] Figure 4 is a flowchart of a service orchestration and deployment method provided in the fourth embodiment of the present application;

[0021] Figure 5 It is a structural diagram of a service orchestration and deployment system provided in the fifth embodiment of the present application;

[0022] Figure 6 It is a structural diagram of a service orchestration and deployment system provided in a sixth embodiment of the present application;

[0023] Figure 7 It is a structural diagram of the network device provided in the seventh embodiment of the present application. DETAILED DESCRIPTION

[0024] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0025] The first embodiment of the present application relates to a service arrangement and deployment method, such as Figure 1 As shown, specifically including:

[0026] Step 101: Obtain basic environment information of the server to be deployed.

[0027] Specifically, the business orchestration method of the embodiment of the present invention is based on the Docker system, which is an open source application container engine. In addition, the basic environment information in this step may include: Docker system related parameters, firewall module information, network interface configuration information, disk space information, and various startup items. Of course, this is only a specific example. In actual use, the basic environment information can be obtained according to user needs or actual business deployment needs, and will not be described one by one here. In addition, this application does not limit the number of servers to be deployed. One server can be deployed, or multiple servers can be deployed.

[0028] Step 102, when the basic environment information of the server to be deployed meets the user requirements, obtain and parse the service configuration file, and perform layered processing on the user service, wherein the user service includes at least two services, the service includes at least one microservice, and there is a dependency relationship between the microservices.

[0029] Specifically, the business configuration file can be customized according to the user's business deployment requirements. The business configuration file may include: the dependencies between services, the size of each container, the target path of each container and the log storage path of each service, the IP address of each container, etc. Of course, this is only a specific example. In actual application, the business configuration file can also contain other business configuration information. In addition, by flexibly configuring the container network through the business configuration file, an advanced use form can be formed in which a single container uses multiple network cards to form multiple business planes using different types of network infrastructure. It effectively meets the deployment requirements of many different types of services.

[0030] Furthermore, through the business configuration file, users can customize the volume (a logical storage unit) size and target path required by the business container, thereby automatically allocating, managing and mapping the source path on the virtual disk while ensuring high data availability.

[0031] In addition, user services can be divided into four layers: network basic services, middleware services, framework services, and business services. Of course, each layer of services can also be divided into many finer microservices according to actual business development needs. There is no limitation on the specific business division method or rules here. It can be divided according to business functions and business types, or users can define their own division methods.

[0032] Step 103: Generate an image dependency tree and a container dependency tree according to the dependency relationship.

[0033] Specifically, the dependency relationship between services is that high-level services are basically dependent on low-level services, and multiple high-level services may depend on multiple low-level service components at the same time. This dependency relationship can be understood as the completion of one service must be based on the completion of one or more other services.

[0034] Step 104: Build images and deploy containers for all nodes in each layer of the image dependency tree and the container dependency tree according to the dependency relationship.

[0035] Specifically, each layer of the dependency tree is deployed and checked in a concurrent manner, including image building, container building, business initialization startup, and waiting for the business status to be normal. After the work at this level is completed, the deployment, installation and configuration of the next level begins. The process at each level is the same until all containers at all levels are deployed. In addition, the network interconnection and IP address allocation of all containers in this application are completed by combining the business configuration file specification and the automatic allocation of the orchestration system.

[0036] Step 105: Start all containers to complete the orchestration and deployment of user services.

[0037] In this implementation, network communication between all containers or network communication between containers and server hosts can be achieved by combining the establishment of a dedicated bridge (a software bridging method built into Linux) and the use of the Docker host network. The ipv4 ip_forward (IP layer 3 forwarding) function of the Linux system, netfilter and iptables (Linux built-in firewall module and control system) are used for NAT (network address translation) to meet the needs of simple container layer network communication and container and server host network communication. This allows users to focus on the transformation and deployment strategy of the business container itself without having to pay attention to the complex underlying basic service deployment, network connection, service registration and discovery processes, etc.

[0038] Compared with the prior art, this embodiment obtains the user's business profile, hierarchically processes the user's business, divides it into various microservices, generates a dependency tree according to the dependency relationship between the microservices, and performs image construction and service container deployment, so that the user does not need to worry about complex basic service deployment, network parameter configuration and other processes, which greatly reduces the difficulty and complexity of business deployment.

[0039] The second embodiment of the present application relates to a service orchestration deployment method, which is substantially the same as the first embodiment, except that: Figure 3 As shown, before step 102, the following steps are also included:

[0040] Step 201, determining whether the basic environment information of the server to be deployed meets the user's requirements.

[0041] Step 202: If the basic environment information of the server to be deployed does not meet the user's requirements, a basic environment check is performed on the server to be deployed, and the system is installed and configured according to the system configuration file.

[0042] Specifically, the system configuration file in step 201 is a system configuration file pre-edited by the user. If there is one server to be deployed, the user pre-edits a single-machine system configuration file; if there are two servers to be deployed, the user pre-edits a dual-machine system configuration file.

[0043] In addition, if the basic environment of the server to be deployed does not meet user requirements, the system needs to be installed and configured according to the system configuration file. For example, the Docker system parameters, the firewall module in the Linux system, the network interface configuration, the startup items, etc. need to be modified and reconfigured according to user needs.

[0044] Compared with the prior art, this embodiment, on the basis of achieving the beneficial effects of the first embodiment, can also perform system installation and related parameter configuration on the server according to a user-defined system configuration file when the basic environment information of the server to be deployed does not meet user requirements, thereby providing a business deployment method with customizable policies, which greatly meets the user's personalized deployment needs.

[0045] The third embodiment of the present application relates to a service orchestration deployment method, which is substantially the same as the first embodiment, except that: Figure 3 As shown, step 103 includes:

[0046] Step 301, traverse the content of the dependency items in the business configuration file, wherein the dependency items are the dependency relationships between microservices.

[0047] Specifically, the content of the dependency in the business configuration file is the service name of the service that this service depends on. For example, if service A depends on service B, then the content of the dependency of service A in the business configuration file is B, which is the service name of the dependent service. Of course, this is just a specific example. In actual use, the representation method of the dependency in the business configuration file can also use other representations. I will not go into details here.

[0048] Step 302: Generate an image dependency tree and a container dependency tree through a recursive backtracking algorithm.

[0049] Specifically, the generated image dependency tree needs to satisfy that no other image-dependent component is used as the root node; and the container dependency tree needs to satisfy that no other container-dependent component is used as the root node. In addition, when deploying containers, these root nodes determine the number of deployment threads, and each tree is deployed in reverse from the leaf node to the parent node in a subsequent traversal manner.

[0050] In this embodiment, if the generation of the image dependency tree and the container dependency tree fails, it means that the business orchestration deployment has failed, and it is necessary to clean up the system and configuration information and generate a failure log.

[0051] Compared with the prior art, this embodiment, on the basis of achieving the beneficial effects of the first embodiment, performs dependency calculations with less correlation within each service layer after business stratification processing, which greatly reduces the complexity of dependency tree generation calculations and improves business deployment efficiency.

[0052] In order to enable those skilled in the art to more clearly understand the overall process of the service orchestration deployment method disclosed in the first to third embodiments of the present invention, the fourth embodiment of the present invention takes the application of the service orchestration deployment method in a dual-server situation as an example for explanation.

[0053] like Figure 4As shown, the service orchestration deployment method provided by the fourth embodiment of the present invention includes:

[0054] Step 401, obtaining basic environment information of two servers to be deployed.

[0055] Step 402: judging whether the main server to be deployed meets the user's requirements according to the basic environment information of the main server.

[0056] Specifically, if the main server does not meet the user's requirements, step 403 is executed; if the main server meets the user's requirements, step 404 is executed.

[0057] Step 403, check the basic environment of the main server, and install and configure the system according to the main server system configuration file.

[0058] If the system installation and configuration fails, step 411 is executed.

[0059] Step 404: determine whether the standby server to be deployed meets the user's requirements based on the basic environment information of the standby server.

[0060] Specifically, if the standby server does not meet the user's requirements, step 405 is executed; if the standby server meets the user's requirements, step 406 is executed.

[0061] Step 405, check the basic environment of the standby server, and install and configure the system according to the standby server system configuration file.

[0062] If the system installation and configuration fails, step 411 is executed.

[0063] Step 406, installing and configuring dual-machine components on the primary server and the backup server.

[0064] Specifically, the dual-machine component installation and configuration may include: disk configuration, heartbeat network, synchronization network, etc., which are only specific examples here. Of course, other components and configurations can also be installed according to user needs.

[0065] Step 407, obtain and parse the service configuration file, and process the user service in layers, wherein the user service includes at least two services, and the service includes at least one microservice, and there is a dependency relationship between the microservices.

[0066] Step 408: Generate an image dependency tree and a container dependency tree according to the dependency relationship.

[0067] If the generation of the image dependency tree and the container dependency tree fails, step 412 is executed.

[0068] Step 409: perform image building and container deployment on all nodes of each layer of the image dependency tree and the container dependency tree according to the dependency relationship.

[0069] If the image building and container deployment fail, step 412 is executed.

[0070] Step 410: Start all containers to complete the orchestration and deployment of user services.

[0071] Step 411, clean up system and configuration information, and generate a failure log.

[0072] Step 412: clean up the configuration information, images, and containers in the two servers, and generate a failure log.

[0073] In this implementation, for dual-server business deployment, the dual-machine system can use disk real-time replication technology to replicate the disk block devices on the Linux system in real time, ensuring that any data changes on the synchronized disk on the current host are copied to the corresponding disk on the standby machine. A virtual disk is set on the actual block device, and the upper-level business does not need to care about the actual disk device used at the bottom when using the disk. The business and disk device are decoupled to achieve greater hardware compatibility and reduce the invasiveness of the upper-level coding.

[0074] Compared with the prior art, this embodiment obtains the user's business profile, hierarchically processes the user's business, divides it into various microservices, generates a dependency tree according to the dependency relationship between the microservices, and performs image construction and service container deployment, so that the user does not need to worry about complex basic service deployment, network parameter configuration and other processes, which greatly reduces the difficulty and complexity of business deployment.

[0075] In addition, it should be understood that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs that do not change the core design of the algorithm and process are all within the scope of protection of this patent.

[0076] A fifth embodiment of the present invention relates to a service arrangement and deployment system, such as Figure 5 As shown, including:

[0077] The configuration file processing module 501 is used to obtain basic environment information of the server to be deployed; determine whether the server to be deployed meets the user's needs; obtain and parse the service configuration file, and perform hierarchical processing on the user service, wherein the user service includes at least two services;

[0078] A dependency tree generation module 502, used to generate an image dependency tree and a container dependency tree according to the dependency relationship between the services;

[0079] An image building module 503 is used to build an image for each layer of the image dependency tree according to the dependency relationship;

[0080] The container deployment module 504 is used to deploy service containers on each layer of the container dependency tree according to the dependency relationship and start all service containers.

[0081] Furthermore, if Figure 6 As shown, the business orchestration deployment system also includes:

[0082] The monitoring module 505 is used to monitor the running status of all services in the server to be deployed.

[0083] It should be noted that the monitoring module 505 sets a series of monitoring indicators when monitoring the operating status of all services, including: failure of key services, number of common multiple service failures, network unreachability, network quality, etc. Of course, the above are only examples of specific monitoring indicators. In actual application, users can customize monitoring indicators and monitoring methods.

[0084] It is not difficult to find that this embodiment is a device embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.

[0085] It should be noted that the service orchestration and deployment system provided by this embodiment is mainly used for orchestration and deployment of microservices in small and micro scenarios. Different from the traditional manual deployment of a large number of containers on the docker system, this system greatly reduces the difficulty and complexity of service orchestration and deployment. In addition, compared with the kubernetes system (k8s system), it saves a lot of cluster physical resources, allowing small and micro scenarios to avoid the huge cluster infrastructure costs to reuse the basic capabilities of large distributed microservice frameworks.

[0086] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.

[0087] A sixth embodiment of the present application relates to a network device, such as Figure 7 As shown, including:

[0088] at least one processor 701; and,

[0089] A memory 702 is communicatively connected to at least one processor 701; wherein,

[0090] The memory 702 stores instructions that can be executed by at least one processor 701. The instructions are executed by the at least one processor 701 so that the at least one processor 701 can execute the service orchestration deployment method described in any of the above method embodiments.

[0091] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0092] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0093] The seventh embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.

[0094] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0095] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A service arrangement and deployment method, characterized in that: include: Get the basic environment information of the server to be deployed; When the basic environment information of the server to be deployed meets the user's requirements, a service configuration file is obtained and parsed, and the user service is processed in layers, wherein the user service includes at least two services, the service includes at least one microservice, and there is a dependency relationship between the microservices; Traverse the contents of dependencies in the business configuration file, wherein the contents of the dependencies are dependencies between microservices; Generate the image dependency tree and container dependency tree respectively through recursive backtracking algorithm; According to the dependency relationship, image building and container deployment are performed on all nodes of each layer of the image dependency tree and the container dependency tree; Start all containers to complete the deployment of the user service.

2. The service arrangement and deployment method according to claim 1, characterized in that: When the basic environment information of the server to be deployed meets the user requirements, before obtaining and parsing the service configuration file, the method further includes: Determine whether the basic environment information of the server to be deployed meets user requirements; If the basic environment information of the server to be deployed does not meet the user's requirements, a basic environment check is performed on the server to be deployed, and the system is installed and configured according to the system configuration file.

3. The service arrangement and deployment method according to claim 1, characterized in that: The layered processing of user services includes: dividing the user services into one or more of network basic services, middleware services, framework services and business services.

4. The service arrangement and deployment method according to claim 2, characterized in that: After the system is installed and configured according to the system configuration file, the method further includes: when the number of the servers to be deployed is two, dual-machine components are installed and configured on the two servers to be deployed.

5. The service arrangement and deployment method according to claim 1, characterized in that: After performing image building and container deployment on all nodes of each layer of the image dependency tree and the container dependency tree, the method further includes: if any operation of the image building and the container deployment fails, cleaning up the configuration information, images and containers in the server to be deployed, and generating a failure log.

6. A service orchestration and deployment system, characterized in that: include: Configuration file processing module, used to obtain basic environment information of the server to be deployed; Determine whether the server to be deployed meets user requirements; Obtaining and parsing a service configuration file, and processing the user service in layers, wherein the user service includes at least two services, the service includes at least one microservice, and there is a dependency relationship between the microservices; A dependency tree generation module is used to traverse the content of dependencies in the business configuration file, wherein the dependency content is the dependency relationship between microservices; and generate a mirror dependency tree and a container dependency tree respectively through a recursive backtracking algorithm; An image building module, used to build images for all nodes at each layer of the image dependency tree according to the dependency relationship; The container deployment module is used to perform container deployment on all nodes at each layer of the container dependency tree according to the dependency relationship, start all containers, and complete the orchestration deployment of the user service.

7. The service arrangement and deployment system according to claim 6, characterized in that: Also includes: The monitoring module is used to monitor the running status of all services in the server to be deployed.

8. A network device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the service orchestration deployment method according to any one of claims 1 to 5.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the service orchestration and deployment method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Deployment system and deployment method of application program

    CN105867955A

  • Microservice application arrangement and deployment method and device and computer terminal

    CN108762769A

  • Service arrangement method and system based on application environment

    CN111367534A

  • Apparatus, systems, and methods for cloud agnostic multi-tier application modeling and deployment

    US20140372533A1