WO2021217871A1 - Method and apparatus for deploying micro service cluster, computer device and storage medium - Google Patents

Method and apparatus for deploying micro service cluster, computer device and storage medium Download PDF

Info

Publication number
WO2021217871A1
WO2021217871A1 PCT/CN2020/099554 CN2020099554W WO2021217871A1 WO 2021217871 A1 WO2021217871 A1 WO 2021217871A1 CN 2020099554 W CN2020099554 W CN 2020099554W WO 2021217871 A1 WO2021217871 A1 WO 2021217871A1
Authority
WO
WIPO (PCT)
Prior art keywords
cluster
target
name
microservice
environment
Prior art date
Application number
PCT/CN2020/099554
Other languages
French (fr)
Chinese (zh)
Inventor
耿铭
金鑫
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021217871A1 publication Critical patent/WO2021217871A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of microservice architecture, and in particular to a microservice cluster deployment method, device, computer equipment and storage medium.
  • the Kubernetes cluster container scheduling orchestration technology is to divide the resources managed by a single operating system into isolated groups.
  • the Kubernetes cluster container scheduling orchestration technology can be understood as a kind of sandbox. Each container runs an application. The containers are isolated from each other, but a communication mechanism can be established between the containers.
  • building a Kubernetes cluster requires manual configuration, which is labor intensive, and the production and operation efficiency is low.
  • the labor costs are more and more, especially when it is encountered due to abnormalities.
  • Kubernetes does not natively support the rollback function.
  • the inventor realizes that Helm's rollback function requires a command line operation to specifically query historical versions, and cannot distinguish the application environment, which consumes higher labor costs and lower operation and maintenance efficiency.
  • This application provides a microservice cluster deployment method, device, computer equipment, and storage medium, which realizes the automatic configuration of a cluster under a Kubernetes cluster container, reduces the tedious steps of manual configuration, improves the construction efficiency, and reduces the cost.
  • a microservice cluster deployment method includes:
  • the microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained;
  • the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package;
  • the target list includes a target primary IP address and at least one target node IP address;
  • the target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
  • a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created.
  • the target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
  • the environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  • a microservice cluster deployment device includes:
  • the receiving module is configured to receive the microservice cluster deployment instruction, and obtain the microservice cluster deployment file contained in the microservice cluster deployment instruction;
  • the microservice cluster deployment file includes the target environment cluster name, the target list, and the environment configuration package A target environment configuration package associated with a name;
  • the target list includes a target primary IP address and at least one target node IP address;
  • the storage module is used to store the target environment configuration package in a local warehouse.
  • the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and combines the Docker image file with the environment configuration package Names are associated, and the Docker image file is uploaded to the Docker registration machine;
  • the query module is configured to, after sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
  • the creation module is used to create a first microservice cluster consistent with the target environment cluster name if there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, which will be the same as the target host
  • the target machine in the Kubernetes cluster container that matches the IP address is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the target machine.
  • the first target node of the first microservice cluster is used to create a first microservice cluster consistent with the target environment cluster name if there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, which will be the same as the target host
  • the target machine in the Kubernetes cluster container that matches the IP address is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the target machine.
  • the installation module is used to install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target hosts.
  • the determining module is used to build the environment configuration of the first microservice cluster through the Helm tool, and determine the completion of the deployment of the microservice cluster deployment file.
  • a computer device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:
  • the microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained;
  • the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package;
  • the target list includes a target primary IP address and at least one target node IP address;
  • the target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
  • a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created.
  • the target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
  • the environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  • a computer-readable storage medium stores a computer program
  • the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
  • the microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained;
  • the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package;
  • the target list includes a target primary IP address and at least one target node IP address;
  • the target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
  • a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created.
  • the target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
  • the environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  • This application obtains the microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment configuration package associated with the environment configuration package name;
  • the target environment configuration package is stored in a local warehouse, and the local warehouse uses a Docker tool to make the target environment configuration package into a Docker image file, associate the Docker image file with the name of the environment configuration package, and associate the Upload the Docker image file to the Docker registration machine; create a first microservice cluster consistent with the target environment cluster name, and determine the target machine in the Kubernetes cluster container matching the target primary IP address as the first
  • the first target host of a microservice cluster determines the target machine in the Kubernetes cluster container matching the IP address of the target node as the first target node of the first microservice cluster;
  • the Helm tool The target environment configuration package is installed on the first target host, and the Docker image file associated with the name of the environment configuration package is pushed from the Docker registry to all the first target no
  • the environment configuration of a microservice cluster is determined to complete the deployment of the microservice cluster deployment file.
  • the target environment configuration package in the microservice cluster deployment file is obtained and stored in the local warehouse, and the Docker image file is made through the Docker tool.
  • Upload to the Docker registry create the first microservice cluster, install the target environment configuration package to the first target host in the first microservice cluster through the Helm tool, and push the Docker image file from the Docker registry to all the first target hosts in the first microservice cluster.
  • a target node and the environment configuration for building the first microservice cluster Therefore, automatically configuring a cluster under the Kubernetes cluster container reduces the tedious steps of manual configuration, improves the construction efficiency, and reduces the cost.
  • Fig. 1 is a schematic diagram of an application environment of a microservice cluster deployment method in an embodiment of the present application
  • Figure 2 is a flowchart of a microservice cluster deployment method in an embodiment of the present application
  • FIG. 3 is a flowchart of step S60 of a microservice cluster deployment method in an embodiment of the present application
  • FIG. 4 is a flowchart of a microservice cluster deployment method in another embodiment of the present application.
  • FIG. 5 is a flowchart of step S80 of a microservice cluster deployment method in an embodiment of the present application
  • Fig. 6 is a flowchart of step S60 of a microservice cluster deployment method in another embodiment of the present application.
  • FIG. 7 is a functional block diagram of a microservice cluster deployment device in an embodiment of the present application.
  • FIG. 8 is a functional block diagram of the determining module in the microservice cluster deployment device in an embodiment of the present application.
  • Fig. 9 is a schematic diagram of a computer device in an embodiment of the present application.
  • the microservice cluster deployment method provided by this application can be applied in the application environment as shown in Fig. 1, where the client (computer equipment) communicates with the server through the network.
  • the client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a microservice cluster deployment method is provided, and the technical solution mainly includes the following steps S10-S60:
  • the microservice cluster deployment instruction is received, and the microservice cluster deployment file included in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes a target environment cluster name, a target list, and information associated with the environment configuration package name Target environment configuration package; the target list includes a target primary IP address and at least one target node IP address.
  • the microservice cluster deployment instruction refers to an instruction triggered when the target microservice cluster needs to be deployed, and the target microservice cluster is a cluster composed of multiple node servers or computers under the microservice architecture.
  • the microservice cluster deployment instruction includes the target microservice cluster deployment file, and after receiving the microservice cluster deployment instruction, the microservice cluster deployment file is obtained, and the microservice cluster deployment file is for the target microservice cluster.
  • the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment configuration package, and the target environment cluster is named for the target microservice cluster A named unique code, the target list is a unique address (ie IP address) corresponding to all involved node servers or computers in the target microservice cluster, and the target list includes a target primary IP address and at least one target node IP address, the target primary IP address is the IP address corresponding to the server or computer in the target microservice cluster that needs to be deployed, and is responsible for managing the resources of all node servers or computers, and the target node IP address is all that needs to be deployed.
  • the target list is a unique address (ie IP address) corresponding to all involved node servers or computers in the target microservice cluster
  • the target list includes a target primary IP address and at least one target node IP address
  • the target primary IP address is the IP address corresponding to the server or computer in the target microservice cluster that needs to be deployed, and is responsible for managing the resources of all node servers or computers
  • the server includes a Kubernetes cluster container, which is a containerized management cluster management system based on Docker, which provides the convenience of large-scale containerized cluster management.
  • the target environment configuration package name includes a chart directory name, a target environment name, and a target version name
  • the target environment name is based on the configuration under the target environment configuration package associated with the environment configuration package name.
  • the file name corresponding to the file is abbreviated and obtained
  • the target version name is an iteratively updated version number
  • the uniqueness of the environment configuration package name is determined according to the chart directory name, the target environment name, and the target version name .
  • the target environment configuration package name includes the chart directory name, the target environment name, and the target version name.
  • the target environment configuration package name is "chart_EGLW_1.0.0”
  • the chart directory name is ,
  • the target environment name and the target version name can determine the unique environment configuration package, and the target environment name is spliced according to the abbreviation of the file name corresponding to the configuration file under the target environment configuration package.
  • the target version name is an iteratively updated version number, and the format of the target version name can be set according to requirements, for example, the format of the target version name is XX.XX.XX.
  • the Kubernetes cluster container can allow the directory files with the same chart directory name to have different versions in different clusters, breaking the chart with only one version in the Kubernetes cluster container.
  • the insufficiency of the directory file of the directory name makes it possible to separate the directory files of the same chart directory name between clusters.
  • the target environment configuration package is made into a Docker image file by using the Docker tool.
  • the Docker image file is a completely consistent file for making the target environment configuration package. After receiving the Docker image file, you can follow The developer runs the same as the target environment configuration package, and does not need to manually configure the target environment configuration package one by one.
  • the local warehouse is a server or computer that stores the target environment configuration package and the historical environment configuration package.
  • the history The environment configuration package of is the target environment configuration package received before, the Docker registration machine manages to push the received Docker image file to the specified registered target machine, and the Docker tool is for developers to write Shell commands A tool for visual management of lines or scripts, through the Docker tool, the threshold for developers can be lowered, the time for writing Shell command lines or scripts can be reduced, and development efficiency can be improved.
  • the Helm tool is used to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name.
  • the microservice cluster deployment file is sent to the Kubernetes cluster container, and the Kubernetes cluster container is queried from the Kubernetes cluster container with the name of the target environment cluster through the Helm tool, and the Kubernetes cluster
  • the container includes several environmental cluster names.
  • the Helm tool is a tool that provides powerful functions such as software deployment, deletion, upgrade, and rollback of applications on Kubernetes, and is convenient for users to find, install, upgrade, and uninstall applications in a simple manner.
  • the first microservice cluster is created, and the first microservice cluster is the same as the target environment cluster name.
  • the target machine in the Kubernetes cluster container matching the target primary IP address is determined as the first target host of the first microservice cluster, and the target machine is the A server or computer that has a unique IP address in the Kubernetes cluster container and is registered on the Docker registration machine.
  • the registration is an operation mode of registering on the Docker registration machine and uploading the corresponding state of the target machine regularly.
  • the target machine in the Kubernetes cluster container matching the node IP address is determined to be the first target node of the first microservice cluster, that is, all target machines in the Kubernetes cluster container except the first target node are traversed Query the target machine that matches one of the IP addresses of all the target nodes, and determine the target machine as the first target node of the first microservice cluster.
  • the target environment configuration package can be installed to the first target host through the Helm tool.
  • the installation process is completely completed by the Helm tool without manual operation.
  • the The Docker image file associated with the environmental configuration package name is pushed from the Docker registration machine to all the first target nodes, and the push mode is a point-to-multipoint sending mode.
  • S60 Build the environment configuration of the first microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
  • the Helm tool is used to install the Docker image file on all the first target nodes to build the first microservice cluster, complete the environment configuration of the first microservice cluster, and then determine the The deployment of the microservice cluster deployment file is completed.
  • This application obtains the microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment configuration package associated with the environment configuration package name;
  • the target environment configuration package is stored in a local warehouse, and the local warehouse uses a Docker tool to make the target environment configuration package into a Docker image file, associate the Docker image file with the name of the environment configuration package, and associate the Upload the Docker image file to the Docker registration machine; create a first microservice cluster consistent with the target environment cluster name, and determine the target machine in the Kubernetes cluster container matching the target primary IP address as the first
  • the first target host of a microservice cluster determines the target machine in the Kubernetes cluster container matching the IP address of the target node as the first target node of the first microservice cluster;
  • the Helm tool The target environment configuration package is installed on the first target host, and the Docker image file associated with the name of the environment configuration package is pushed from the Docker registry to all the first target no
  • This application realizes the creation of the first microservice cluster by obtaining the target environment configuration package in the microservice cluster deployment file and storing it in the local warehouse, using the Docker tool to make a Docker image file, uploading it to the Docker registry, and creating the first microservice cluster, and using the Helm tool to store the target environment
  • the configuration package is installed to the first target host in the first microservice cluster, and the Docker image file is pushed from the Docker registration machine to all the first target nodes, and the environment configuration of the first microservice cluster is set up. Therefore, Automatic configuration of a cluster under the Kubernetes cluster container reduces the tedious steps of manual configuration, improves the construction efficiency, and reduces the cost.
  • the step S60 that is, the establishment of the environment configuration of the first microservice cluster through the Helm tool, and the determination to complete the deployment of the microservice cluster deployment file includes:
  • a directory file with the same name as the chart directory in the name of the environment configuration package is found from the target environment configuration package, and the directory file is used to manage the file directories under the chart directory name.
  • the file directory in a file in the form of a file is saved.
  • the Kubernetes cluster container executes the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster, and completes the configuration of the first microservice cluster.
  • Environmental configuration Through the Helm tool, the Kubernetes cluster container executes the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster, and completes the configuration of the first microservice cluster. Environmental configuration.
  • the Helm tool also operates on the directory file associated with the chart directory name, and performs resource declaration on the directory file associated with the chart directory name in the first microservice cluster, which means that the directory file is enabled , Enable the files under the chart directory name, that is, enable the related files of the chart directory name.
  • the method further includes:
  • S70 If there is an environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, mark the cluster with the environment cluster name consistent with the target environment cluster name as a second microservice cluster; the second The microservice cluster includes a second target host and at least one second target node.
  • the cluster whose environment cluster name is consistent with the target environment cluster name is determined as the second microservice Cluster
  • the second target host is a server or computer that is associated with a second microservice cluster and manages resources for all second target nodes under the second microservice cluster
  • the second target node is a second microservice cluster. All node servers or computers under the service cluster except the second target host.
  • the target primary IP address and the target node IP address in the target list perform the operations on the second target host and all the second target nodes in the second microservice cluster.
  • Refresh that is, re-determine the second target host and all second target nodes of the second microservice cluster.
  • the step S80 that is, updating the second target host and all second target nodes of the second microservice cluster according to the target list includes:
  • S801 Cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node.
  • the second target host there is an association relationship between the second target host and the second microservice cluster, and a connection is established through a regular monitoring method and an interactive communication method to cancel the association between the second microservice cluster and the second target host , That is, cancel the connection between the second microservice cluster and the second target host; the second target node has an association relationship with the second microservice cluster, and the connection is established through regular monitoring and interactive communication, and the cancellation
  • the association between the second microservice cluster and the second target node is to cancel the connection between the second microservice cluster and the second target node.
  • the target machine in the Kubernetes cluster container that matches the target primary IP address is associated with the second microservice cluster, and the Kubernetes cluster that matches the target primary IP address is established.
  • the target machine in the container is recorded as the updated second target host; the target machine in the Kubernetes cluster container matching the target node IP address is associated with the second microservice cluster, and
  • the target machine record in the Kubernetes cluster container matching the IP address of the target node is the updated second target node, and the second microservice cluster is associated with multiple second target nodes.
  • the target environment configuration package can be installed to the updated second target host through the Helm tool.
  • the installation process is completely completed by the Helm tool without manual operation.
  • the The Docker image file associated with the name of the environment configuration package is pushed from the Docker registry to all the second target nodes, and the push mode is a point-to-multipoint sending mode.
  • the environment configuration of the second microservice cluster is built through the Helm tool, and the deployment of the deployment file of the microservice cluster is determined to be completed.
  • the Helm tool is used to install the Docker image file on all the second target nodes to build the second microservice cluster, complete the environment configuration of the second microservice cluster, and then determine the The deployment of the microservice cluster deployment file is completed.
  • This application realizes that the target environment configuration package in the microservice cluster deployment file is obtained and stored in the local warehouse, the Docker image file is made through the Docker tool, and uploaded to the Docker registry, and the second microservice cluster is updated according to the target list.
  • the Helm tool installs the target environment configuration package to the updated second target host in the second microservice cluster, and at the same time pushes the Docker image file from the Docker registry to all the updated second target nodes, and builds the second microservice cluster.
  • the environment configuration of the service cluster therefore, provides a way to update the existing cluster in the Kubernetes cluster container, through the Helm tool and the Docker tool, the target environment configuration package is iteratively updated the environment configuration of the cluster, and the labor cost and labor cost of cluster construction are realized. Improved construction efficiency.
  • step S60 that is, after the environment configuration of the first microservice cluster is built through the Helm tool, and after the deployment of the microservice cluster deployment file is determined to be completed, it includes :
  • the microservice cluster rollback deployment instruction is received, and the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction is obtained; the microservice cluster rollback deployment file includes the rollback environment cluster name and the rollback deployment file. Rollback list and rollback version name; the rollback list includes a rollback master IP address and at least one rollback node IP address.
  • the microservice cluster rollback deployment instruction refers to an instruction that is triggered when a target microservice cluster that has been deployed and exists needs to be rolled back to a certain historical version
  • the microservice cluster rollback deployment instruction The rollback deployment file of the microservice cluster includes the rollback deployment file of the microservice cluster.
  • the rollback deployment file of the microservice cluster includes the rollback environment cluster name, the rollback list, and the rollback version name;
  • the rollback list includes a rollback master IP address and at least An IP address of a rollback node
  • the rollback environment cluster is a name with a unique code corresponding to the target microservice cluster that needs to perform the environment rollback operation
  • the rollback list is the target microservice that needs to perform the environment rollback operation
  • the unique addresses ie IP addresses) corresponding to all involved node servers or computers in the cluster
  • the rollback list includes one rollback primary IP address and at least one rollback node IP address, and the rollback primary IP address is required
  • the rollback node IP address is the target microservice cluster that needs to perform the environment rollback operation IP addresses corresponding to all involved node servers or computers except the primary IP address of the rollback
  • S120 Determine the name of the configured environment configuration package that matches the name of the rollback version, and obtain the environment configuration package associated with the matched environment configuration package name from the local warehouse, where the local warehouse uses Docker
  • the tool makes the environment configuration package into a rollback Docker image file, associates the rollback Docker image file with the rollback version name, and uploads the rollback Docker image file to the Docker registry.
  • the local warehouse manages all environment configuration packages, and the matching environment configuration package is obtained from the local warehouse Name-associated environment configuration package, the environment configuration package is made into the rollback Docker image file through the Docker tool, and the rollback Docker image file is associated with the rollback version name, and all The rollback Docker image file is sent to the Docker registration machine.
  • the cluster whose environment cluster name is consistent with the rollback environment cluster name is determined as the third microservice cluster
  • the third target host is associated with the third microservice cluster
  • the management pair The servers or computers of all the resources of the third target node under the microservice cluster, where the third target node is all the node servers or computers under the third microservice cluster except the third target host; according to the rollback list
  • the rollback primary IP address and the rollback node IP address in the third microservice cluster refresh the third target host and all the third target nodes in the third microservice cluster, that is, re-determine the The third target host and all third target nodes of the third microservice cluster.
  • the environment configuration package can be installed to the updated third target host through the Helm tool.
  • the installation process is completely completed by the Helm tool without manual operation.
  • the rollback Docker image file is pushed from the Docker registration machine to all the third target nodes, and the pushing method is a point-to-multipoint sending method.
  • the Helm tool install the rollback Docker image file to all the third target nodes, so as to build the third microservice cluster, complete the environment configuration of the third microservice cluster, and then determine The deployment of the microservice cluster deployment file is completed.
  • This application realizes that the environment configuration package corresponding to the rollback version name can be quickly obtained through the local warehouse, and the third microservice cluster can be quickly rolled back to any historical environment configuration through the Docker tool and the Helm tool. , So as to quickly build the environment configuration of the third microservice cluster. In this way, manual configuration operations are greatly reduced, and the rollback limitation of the Kubernetes cluster container is solved, and the cluster under the Kubernetes cluster container can quickly be rolled back to the historical task.
  • a microservice cluster deployment device is provided, and the microservice cluster deployment device corresponds to the microservice cluster deployment method in the foregoing embodiment one-to-one.
  • the device for deploying a microservice cluster includes a receiving module 11, a storage module 12, a query module 13, a creation module 14, an installation module 15 and a determination module 16.
  • the detailed description of each functional module is as follows:
  • the receiving module 11 is configured to receive a microservice cluster deployment instruction, and obtain a microservice cluster deployment file contained in the microservice cluster deployment instruction;
  • the microservice cluster deployment file includes a target environment cluster name, a target list, and environment configuration A target environment configuration package associated with the package name;
  • the target list includes a target primary IP address and at least one target node IP address;
  • the storage module 12 is configured to store the target environment configuration package in a local warehouse, which uses a Docker tool to make the target environment configuration package into a Docker image file, and configures the Docker image file with the environment The package name is associated, and the Docker image file is uploaded to the Docker registration machine;
  • the query module 13 is configured to, after sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
  • the creation module 14 is configured to create a first microservice cluster consistent with the target environment cluster name if there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, which will be consistent with the target environment cluster name.
  • the target machine in the Kubernetes cluster container that matches the primary IP address is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the target node IP address is determined to be The first target node of the first microservice cluster;
  • the installation module 15 is used to install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the The first target node;
  • the determining module 16 is configured to build the environment configuration of the first microservice cluster through the Helm tool, and determine the completion of the deployment of the microservice cluster deployment file.
  • the target environment configuration package name includes a chart directory name, a target environment name, and a target version name
  • the target environment name is based on the configuration under the target environment configuration package associated with the environment configuration package name.
  • the file name corresponding to the file is abbreviated and obtained
  • the target version name is an iteratively updated version number
  • the uniqueness of the environment configuration package name is determined according to the chart directory name, the target environment name, and the target version name .
  • the determining module 16 includes:
  • the obtaining unit 61 is configured to obtain the chart directory name in the target environment configuration package and the name of the environment configuration package;
  • the execution unit 62 is configured to use the Helm tool, the Kubernetes cluster container to execute the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster to complete the first The environment configuration of the microservice cluster.
  • the query module 13 includes:
  • the marking unit is configured to mark the cluster whose environmental cluster name is consistent with the target environment cluster name as the second microservice cluster if there is an environmental cluster name consistent with the target environment cluster name in the Kubernetes cluster container;
  • the second microservice cluster includes a second target host and at least one second target node;
  • An update unit configured to update the second target host and all second target nodes of the second microservice cluster according to the target list
  • the installation unit is configured to install the target environment configuration package to the updated second target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry To all the second target nodes after the update;
  • the deployment unit is used to build the environment configuration of the second microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
  • the update unit includes:
  • a canceling subunit configured to cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node;
  • the association subunit is configured to determine the target machine in the Kubernetes cluster container that matches the target primary IP address as the updated second target host, and the Kubernetes that matches the target node IP address The target machine in the cluster container is determined to be the second target node after the update.
  • the determining module 16 further includes:
  • the rollback receiving unit is configured to receive a microservice cluster rollback deployment instruction, and obtain the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction;
  • the microservice cluster rollback deployment file includes rollback Environmental cluster name, rollback list, and rollback version name;
  • the rollback list includes a rollback primary IP address and at least one rollback node IP address;
  • the rollback production unit is used to determine the environment configuration package name that matches the rollback version name and has been configured, and obtains the environment configuration package associated with the matched environment configuration package name from the local warehouse, so
  • the local warehouse uses the Docker tool to make the environment configuration package into a rollback Docker image file, associate the rollback Docker image file with the rollback version name, and upload the rollback Docker image file to the Docker registration machine;
  • the rollback marking unit is used to mark the cluster whose environment cluster name is consistent with the rollback environment cluster name as a third microservice cluster; and update the third target host and the third microservice cluster of the third microservice cluster according to the rollback list All third target nodes;
  • the rollback dark transfer unit is used to install the environment configuration package to the updated third target host through the Helm tool, and at the same time push the rollback Docker image file from the Docker registry to all updated The third target node;
  • the rollback deployment unit is used to build the environment configuration of the third microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
  • microservice cluster deployment device For the specific limitation of the microservice cluster deployment device, please refer to the above limitation on the microservice cluster deployment method, which will not be repeated here.
  • Each module in the above-mentioned microservice cluster deployment device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a microservice cluster deployment method.
  • a computer device including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program to implement the microservice cluster deployment method in the above embodiment .
  • a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the microservice cluster deployment method in the above-mentioned embodiment.
  • the computer-readable storage medium may be non-volatile or volatile.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM
  • SDRAM double data rate SDRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous link (Synchlink) DRAM
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

A method and an apparatus for deploying a micro service cluster, a computer device and a storage medium. Said method comprises: upon receipt of a micro service cluster deployment instruction, acquiring a micro service cluster deployment file; storing a target environment configuration package into a local warehouse, making a Docket mirror file from the target environment configuration package by means of a Docker tool, associating the Docker mirror file with an environment configuration package name, and uploading the Docker mirror file to a Docker register; querying, by means of a Helm tool, from a Kubernetes cluster container whether there is an environment cluster name consistent with a target environment cluster name; creating a first micro service cluster consistent with the target environment cluster name; installing, by means of the Helm tool, the target environment configuration package into a first target host, and pushing the Docker mirror file to all of first target nodes; and constructing an environment configuration of the first micro service cluster by means of the Helm tool. The present invention implements automatic configuration of a cluster under a Kubernetes cluster container, reducing manual configuration, and improving the construction efficiency.

Description

微服务集群部署方法、装置、计算机设备及存储介质Microservice cluster deployment method, device, computer equipment and storage medium
本申请要求于2020年04月28日提交中国专利局、申请号为202010351614X,发明名称为“微服务集群部署方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 28, 2020, the application number is 202010351614X, and the invention title is "microservice cluster deployment method, device, computer equipment and storage medium". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及微服务架构领域,尤其涉及一种微服务集群部署方法、装置、计算机设备及存储介质。This application relates to the field of microservice architecture, and in particular to a microservice cluster deployment method, device, computer equipment and storage medium.
背景技术Background technique
现有技术中,Kubernetes集群容器调度编排技术为通过将单个操作系统管理的资源划分到孤立的组中,Kubernetes集群容器调度编排技术可理解为一种沙盒,每个容器内运行一个应用,不同的容器相互隔离,但可在容器之间建立通信机制。但是搭建Kubernetes集群都需要手动配置,耗费人工,生产运维效率低,并且,随着迭代升版的频次越来越多,耗费的人工成本就越来越多,特别是遇到由于异常需要回滚Kubernetes集群上业务应用的历史版本时,由于Kubernetes原生并不支持回滚功能。发明人意识到,Helm的回滚功能需要进行通过命令行操作来专门查询历史版本,并且无法区分应用所在环境,耗费的人工成本更高,运维效率更低。In the prior art, the Kubernetes cluster container scheduling orchestration technology is to divide the resources managed by a single operating system into isolated groups. The Kubernetes cluster container scheduling orchestration technology can be understood as a kind of sandbox. Each container runs an application. The containers are isolated from each other, but a communication mechanism can be established between the containers. However, building a Kubernetes cluster requires manual configuration, which is labor intensive, and the production and operation efficiency is low. Moreover, as the frequency of iterative upgrades increases, the labor costs are more and more, especially when it is encountered due to abnormalities. When rolling the historical version of the business application on the Kubernetes cluster, because Kubernetes does not natively support the rollback function. The inventor realizes that Helm's rollback function requires a command line operation to specifically query historical versions, and cannot distinguish the application environment, which consumes higher labor costs and lower operation and maintenance efficiency.
发明内容Summary of the invention
本申请提供一种微服务集群部署方法、装置、计算机设备及存储介质,实现了自动配置Kubernetes集群容器下的一个集群,减少了人工配置的繁琐步骤,提高了搭建效率,减少了成本。This application provides a microservice cluster deployment method, device, computer equipment, and storage medium, which realizes the automatic configuration of a cluster under a Kubernetes cluster container, reduces the tedious steps of manual configuration, improves the construction efficiency, and reduces the cost.
一种微服务集群部署方法,包括:A microservice cluster deployment method includes:
接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package; the target list includes a target primary IP address and at least one target node IP address;
将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;After sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created. The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes;
通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
一种微服务集群部署装置,包括:A microservice cluster deployment device includes:
接收模块,用于接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The receiving module is configured to receive the microservice cluster deployment instruction, and obtain the microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes the target environment cluster name, the target list, and the environment configuration package A target environment configuration package associated with a name; the target list includes a target primary IP address and at least one target node IP address;
存储模块,用于将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The storage module is used to store the target environment configuration package in a local warehouse. The local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and combines the Docker image file with the environment configuration package Names are associated, and the Docker image file is uploaded to the Docker registration machine;
查询模块,用于将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;The query module is configured to, after sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
创建模块,用于若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;The creation module is used to create a first microservice cluster consistent with the target environment cluster name if there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, which will be the same as the target host The target machine in the Kubernetes cluster container that matches the IP address is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the target machine. The first target node of the first microservice cluster;
安装模块,用于通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;The installation module is used to install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target hosts. A target node;
确定模块,用于通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The determining module is used to build the environment configuration of the first microservice cluster through the Helm tool, and determine the completion of the deployment of the microservice cluster deployment file.
一种计算机设备,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A computer device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:
接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package; the target list includes a target primary IP address and at least one target node IP address;
将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;After sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述 Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created. The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes;
通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package; the target list includes a target primary IP address and at least one target node IP address;
将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;After sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created. The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes;
通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
本申请通过获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;通过Helm工具搭建所述第一微服 务集群的环境配置,确定完成所述微服务集群部署文件的部署,如此,实现了获取微服务集群部署文件中的目标环境配置包存储至本地仓库中,通过Docker工具制作Docker镜像文件,上传至Docker注册机,创建第一微服务集群,通过Helm工具将目标环境配置包安装至第一微服务集群中的第一目标主机,同时将Docker镜像文件从Docker注册机推送至所有所述第一目标节点,以及搭建所述第一微服务集群的环境配置,因此,自动配置Kubernetes集群容器下的一个集群,减少了人工配置的繁琐步骤,提高了搭建效率,减少了成本。This application obtains the microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment configuration package associated with the environment configuration package name; The target environment configuration package is stored in a local warehouse, and the local warehouse uses a Docker tool to make the target environment configuration package into a Docker image file, associate the Docker image file with the name of the environment configuration package, and associate the Upload the Docker image file to the Docker registration machine; create a first microservice cluster consistent with the target environment cluster name, and determine the target machine in the Kubernetes cluster container matching the target primary IP address as the first The first target host of a microservice cluster determines the target machine in the Kubernetes cluster container matching the IP address of the target node as the first target node of the first microservice cluster; the Helm tool The target environment configuration package is installed on the first target host, and the Docker image file associated with the name of the environment configuration package is pushed from the Docker registry to all the first target nodes; the Helm tool is used to build the first target node. The environment configuration of a microservice cluster is determined to complete the deployment of the microservice cluster deployment file. In this way, the target environment configuration package in the microservice cluster deployment file is obtained and stored in the local warehouse, and the Docker image file is made through the Docker tool. Upload to the Docker registry, create the first microservice cluster, install the target environment configuration package to the first target host in the first microservice cluster through the Helm tool, and push the Docker image file from the Docker registry to all the first target hosts in the first microservice cluster. A target node and the environment configuration for building the first microservice cluster. Therefore, automatically configuring a cluster under the Kubernetes cluster container reduces the tedious steps of manual configuration, improves the construction efficiency, and reduces the cost.
附图说明Description of the drawings
图1是本申请一实施例中微服务集群部署方法的应用环境示意图;Fig. 1 is a schematic diagram of an application environment of a microservice cluster deployment method in an embodiment of the present application;
图2是本申请一实施例中微服务集群部署方法的流程图;Figure 2 is a flowchart of a microservice cluster deployment method in an embodiment of the present application;
图3是本申请一实施例中微服务集群部署方法的步骤S60的流程图;FIG. 3 is a flowchart of step S60 of a microservice cluster deployment method in an embodiment of the present application;
图4是本申请又一实施例中微服务集群部署方法的流程图;FIG. 4 is a flowchart of a microservice cluster deployment method in another embodiment of the present application;
图5是本申请一实施例中微服务集群部署方法的步骤S80的流程图;FIG. 5 is a flowchart of step S80 of a microservice cluster deployment method in an embodiment of the present application;
图6是本申请又一实施例中微服务集群部署方法的步骤S60的流程图;Fig. 6 is a flowchart of step S60 of a microservice cluster deployment method in another embodiment of the present application;
图7是本申请一实施例中微服务集群部署装置的原理框图;FIG. 7 is a functional block diagram of a microservice cluster deployment device in an embodiment of the present application;
图8是本申请一实施例中微服务集群部署装置中的确定模块的原理框图;FIG. 8 is a functional block diagram of the determining module in the microservice cluster deployment device in an embodiment of the present application;
图9是本申请一实施例中计算机设备的示意图。Fig. 9 is a schematic diagram of a computer device in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请提供的微服务集群部署方法,可应用在如图1的应用环境中,其中,客户端(计算机设备)通过网络与服务器进行通信。其中,客户端(计算机设备)包括但不限于为各种个人计算机、笔记本电脑、智能手机、平板电脑、摄像头和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The microservice cluster deployment method provided by this application can be applied in the application environment as shown in Fig. 1, where the client (computer equipment) communicates with the server through the network. Among them, the client (computer equipment) includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种微服务集群部署方法,其技术方案主要包括以下步骤S10-S60:In an embodiment, as shown in FIG. 2, a microservice cluster deployment method is provided, and the technical solution mainly includes the following steps S10-S60:
S10,接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址。S10. The microservice cluster deployment instruction is received, and the microservice cluster deployment file included in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes a target environment cluster name, a target list, and information associated with the environment configuration package name Target environment configuration package; the target list includes a target primary IP address and at least one target node IP address.
可理解地,所述微服务集群部署指令指在需对目标微服务集群进行部署时触发的指令,所述目标微服务集群为使用微服务架构下的多个节点服务器或计算机构成的集群,所述微服务集群部署指令包含有所述目标微服务集群部署文件,接收到所述微服务集群部署指令 之后,获取所述微服务集群部署文件,所述微服务集群部署文件为对所述目标微服务集群部署所需的相关文件,所述微服务集群部署文件包括所述目标环境集群名、所述目标清单和所述目标环境配置包,所述目标环境集群名为对所述目标微服务集群命名的唯一码,所述目标清单为所述目标微服务集群中的所有涉及的节点服务器或计算机对应的唯一地址(即IP地址),所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址,所述目标主IP地址为需部署的所述目标微服务集群中负责管理对所有节点服务器或计算机的资源的服务器或计算机对应的IP地址,所述目标节点IP地址为需部署的所述目标微服务集群中除所述目标主IP地址之外的所有涉及的节点服务器或计算机对应的IP地址,所述目标环境配置包为对所述目标微服务集群进行部署所需的代码集合的文件,所述目标环境配置包与所述目标环境配置包名称关联,所述目标环境配置包名称为给所述目标环境配置包命名的名称。Understandably, the microservice cluster deployment instruction refers to an instruction triggered when the target microservice cluster needs to be deployed, and the target microservice cluster is a cluster composed of multiple node servers or computers under the microservice architecture. The microservice cluster deployment instruction includes the target microservice cluster deployment file, and after receiving the microservice cluster deployment instruction, the microservice cluster deployment file is obtained, and the microservice cluster deployment file is for the target microservice cluster. Related files required for service cluster deployment, the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment configuration package, and the target environment cluster is named for the target microservice cluster A named unique code, the target list is a unique address (ie IP address) corresponding to all involved node servers or computers in the target microservice cluster, and the target list includes a target primary IP address and at least one target node IP address, the target primary IP address is the IP address corresponding to the server or computer in the target microservice cluster that needs to be deployed, and is responsible for managing the resources of all node servers or computers, and the target node IP address is all that needs to be deployed. The IP addresses of all involved node servers or computers in the target microservice cluster except the target primary IP address, and the target environment configuration package is a collection of codes required to deploy the target microservice cluster File, the target environment configuration package is associated with the target environment configuration package name, and the target environment configuration package name is a name for the target environment configuration package.
其中,服务器包括Kubernetes集群容器,所述Kubernetes集群容器为在Docker的基础上的容器化管理集群的管理系统,提供了大规模容器化的集群管理的便捷性。The server includes a Kubernetes cluster container, which is a containerized management cluster management system based on Docker, which provides the convenience of large-scale containerized cluster management.
在一实施例中,所述目标环境配置包名称包括chart目录名、目标环境名和目标版本名,所述目标环境名为根据与所述环境配置包名称关联的所述目标环境配置包下的配置文件对应的文件名进行缩写而获得,所述目标版本名为迭代更新的版本号,根据所述chart目录名、所述目标环境名和所述目标版本名确定了所述环境配置包名称的唯一性。In an embodiment, the target environment configuration package name includes a chart directory name, a target environment name, and a target version name, and the target environment name is based on the configuration under the target environment configuration package associated with the environment configuration package name. The file name corresponding to the file is abbreviated and obtained, the target version name is an iteratively updated version number, and the uniqueness of the environment configuration package name is determined according to the chart directory name, the target environment name, and the target version name .
可理解地,所述目标环境配置包名称包含有所述chart目录名、所述目标环境名和所述目标版本名,例如:目标环境配置包名称为“chart_EGLW_1.0.0”,通过所述chart目录名、所述目标环境名和所述目标版本名可以确定唯一的所述环境配置包,所述目标环境名为根据所述目标环境配置包下的配置文件对应的文件名的缩写拼接而成,所述目标版本名为迭代更新的版本号,所述目标版本名的格式可以根据需求进行设定,比如所述目标版本名的格式为XX.XX.XX。Understandably, the target environment configuration package name includes the chart directory name, the target environment name, and the target version name. For example, the target environment configuration package name is "chart_EGLW_1.0.0", and the chart directory name is , The target environment name and the target version name can determine the unique environment configuration package, and the target environment name is spliced according to the abbreviation of the file name corresponding to the configuration file under the target environment configuration package. The target version name is an iteratively updated version number, and the format of the target version name can be set according to requirements, for example, the format of the target version name is XX.XX.XX.
如此,通过所述目标环境配置包名称实现了所述Kubernetes集群容器可以允许相同chart目录名的目录文件在不同的集群中可以存在不同的版本,打破了所述Kubernetes集群容器中只有一个版本的chart目录名的目录文件的不足,做到集群间的相同chart目录名的目录文件相互隔开。In this way, through the target environment configuration package name, it is realized that the Kubernetes cluster container can allow the directory files with the same chart directory name to have different versions in different clusters, breaking the chart with only one version in the Kubernetes cluster container. The insufficiency of the directory file of the directory name makes it possible to separate the directory files of the same chart directory name between clusters.
S20,将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中。S20. Store the target environment configuration package in a local warehouse, where the local warehouse uses a Docker tool to make the target environment configuration package into a Docker image file, and associate the Docker image file with the name of the environment configuration package , Upload the Docker image file to the Docker registration machine.
可理解地,通过Docker工具将所述目标环境配置包制作成Docker镜像文件,所述Docker镜像文件为将所述目标环境配置包制作出完全一致的文件,接收到所述Docker镜像文件就可以跟开发者运行所述目标环境配置包一样进行运行,无需人工对目标环境配置包一个个配置,所述本地仓库为存储所述目标环境配置包及历史的环境配置包的服务器或计算机,所述历史的环境配置包为在此之前接收到的目标环境配置包,所述Docker注册机为管理接收到的Docker镜像文件推送至指定的已注册的目标机,所述Docker工具为便于开 发人员编写Shell命令行或脚本的可视化管理的工具,通过所述Docker工具可以降低开发人员的门槛及减少编写Shell命令行或脚本的时间,提高了开发效率。Understandably, the target environment configuration package is made into a Docker image file by using the Docker tool. The Docker image file is a completely consistent file for making the target environment configuration package. After receiving the Docker image file, you can follow The developer runs the same as the target environment configuration package, and does not need to manually configure the target environment configuration package one by one. The local warehouse is a server or computer that stores the target environment configuration package and the historical environment configuration package. The history The environment configuration package of is the target environment configuration package received before, the Docker registration machine manages to push the received Docker image file to the specified registered target machine, and the Docker tool is for developers to write Shell commands A tool for visual management of lines or scripts, through the Docker tool, the threshold for developers can be lowered, the time for writing Shell command lines or scripts can be reduced, and development efficiency can be improved.
S30,将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名。S30. After the microservice cluster deployment file is sent to the Kubernetes cluster container, the Helm tool is used to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name.
可理解地,所述微服务集群部署文件发送至所述Kubernetes集群容器,通过所述Helm工具,从所述Kubernetes集群容器中查询与所述目标环境集群名一致的环境集群名,所述Kubernetes集群容器包括若干个环境集群名。Understandably, the microservice cluster deployment file is sent to the Kubernetes cluster container, and the Kubernetes cluster container is queried from the Kubernetes cluster container with the name of the target environment cluster through the Helm tool, and the Kubernetes cluster The container includes several environmental cluster names.
其中,所述Helm工具为提供Kubernetes上的软件部署、删除、升级、回滚应用等强大功能的工具,并方便用户以简单的方式查找、安装、升级、卸载应用程序,Among them, the Helm tool is a tool that provides powerful functions such as software deployment, deletion, upgrade, and rollback of applications on Kubernetes, and is convenient for users to find, install, upgrade, and uninstall applications in a simple manner.
S40,若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点。S40: If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, create a first microservice cluster consistent with the target environment cluster name, which will match the target primary IP address The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first The first target node of the microservice cluster.
可理解地,如果所述Kubernetes集群容器中查询不到鱼所述目标环境集群名一致的环境集群名,就创建所述第一微服务集群,所述第一微服务集群为与所述目标环境集群名相同的目标微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,所述目标机为所述Kubernetes集群容器中具有唯一IP地址并在所述Docker注册机上完成注册的服务器或计算机,所述注册为在所述Docker注册机上进行登记并定时上传目标机相应状态的操作方式,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点,即对所述Kubernetes集群容器中除去所述第一目标节点的所有目标机进行遍历,查询出与所有所述目标节点IP地址中的其中一个相匹配的目标机,并将该目标机确定为所述第一微服务集群的所述第一目标节点。Understandably, if the environment cluster name consistent with the target environment cluster name cannot be queried in the Kubernetes cluster container, the first microservice cluster is created, and the first microservice cluster is the same as the target environment cluster name. For target microservice clusters with the same cluster name, the target machine in the Kubernetes cluster container matching the target primary IP address is determined as the first target host of the first microservice cluster, and the target machine is the A server or computer that has a unique IP address in the Kubernetes cluster container and is registered on the Docker registration machine. The registration is an operation mode of registering on the Docker registration machine and uploading the corresponding state of the target machine regularly. The target machine in the Kubernetes cluster container matching the node IP address is determined to be the first target node of the first microservice cluster, that is, all target machines in the Kubernetes cluster container except the first target node are traversed Query the target machine that matches one of the IP addresses of all the target nodes, and determine the target machine as the first target node of the first microservice cluster.
S50,通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点。S50. Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes .
可理解地,通过所述Helm工具可以将所述目标环境配置包安装至所述第一目标主机中,安装过程完全由所述Helm工具完成,无需人工操作,以此同时,可以将于所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点,所述推送的方式为一点对多点的发送方式。Understandably, the target environment configuration package can be installed to the first target host through the Helm tool. The installation process is completely completed by the Helm tool without manual operation. At the same time, the The Docker image file associated with the environmental configuration package name is pushed from the Docker registration machine to all the first target nodes, and the push mode is a point-to-multipoint sending mode.
S60,通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。S60: Build the environment configuration of the first microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
可理解地,通过Helm工具,将所述Docker镜像文件安装至所有所述第一目标节点,从而搭建所述第一微服务集群,完成所述第一微服务集群的环境配置,进而确定所述微服务集群部署文件完成了部署。Understandably, the Helm tool is used to install the Docker image file on all the first target nodes to build the first microservice cluster, complete the environment configuration of the first microservice cluster, and then determine the The deployment of the microservice cluster deployment file is completed.
本申请通过获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。This application obtains the microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment configuration package associated with the environment configuration package name; The target environment configuration package is stored in a local warehouse, and the local warehouse uses a Docker tool to make the target environment configuration package into a Docker image file, associate the Docker image file with the name of the environment configuration package, and associate the Upload the Docker image file to the Docker registration machine; create a first microservice cluster consistent with the target environment cluster name, and determine the target machine in the Kubernetes cluster container matching the target primary IP address as the first The first target host of a microservice cluster determines the target machine in the Kubernetes cluster container matching the IP address of the target node as the first target node of the first microservice cluster; the Helm tool The target environment configuration package is installed on the first target host, and the Docker image file associated with the name of the environment configuration package is pushed from the Docker registry to all the first target nodes; the Helm tool is used to build the first target node. The environment configuration of a microservice cluster determines that the deployment of the microservice cluster deployment file is completed.
本申请实现了通过获取微服务集群部署文件中的目标环境配置包存储至本地仓库中,通过Docker工具制作Docker镜像文件,上传至Docker注册机,创建第一微服务集群,通过Helm工具将目标环境配置包安装至第一微服务集群中的第一目标主机,同时将Docker镜像文件从Docker注册机推送至所有所述第一目标节点,以及搭建所述第一微服务集群的环境配置,因此,自动配置Kubernetes集群容器下的一个集群,减少了人工配置的繁琐步骤,提高了搭建效率,减少了成本。This application realizes the creation of the first microservice cluster by obtaining the target environment configuration package in the microservice cluster deployment file and storing it in the local warehouse, using the Docker tool to make a Docker image file, uploading it to the Docker registry, and creating the first microservice cluster, and using the Helm tool to store the target environment The configuration package is installed to the first target host in the first microservice cluster, and the Docker image file is pushed from the Docker registration machine to all the first target nodes, and the environment configuration of the first microservice cluster is set up. Therefore, Automatic configuration of a cluster under the Kubernetes cluster container reduces the tedious steps of manual configuration, improves the construction efficiency, and reduces the cost.
在一实施例中,如图3所示,所述步骤S60中,即所述通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署,包括:In one embodiment, as shown in FIG. 3, the step S60, that is, the establishment of the environment configuration of the first microservice cluster through the Helm tool, and the determination to complete the deployment of the microservice cluster deployment file includes:
S601,获取所述目标环境配置包中的与所述环境配置包名称中的chart目录名。S601: Obtain the chart directory name in the target environment configuration package and the name of the environment configuration package.
可理解地,从所述目标环境配置包查找出与所述环境配置包名称中的所述chart目录名相同的目录文件,所述目录文件为了实现对所述chart目录名下的文件目录的管理,通常将文件目录以文件的形式保存在一个文件中。Understandably, a directory file with the same name as the chart directory in the name of the environment configuration package is found from the target environment configuration package, and the directory file is used to manage the file directories under the chart directory name. , Usually save the file directory in a file in the form of a file.
S602,通过Helm工具,所述Kubernetes集群容器执行对所述第一微服务集群中的所述目标环境配置包中与chart目录名关联的目录文件的资源声明,完成所述第一微服务集群的环境配置。S602. Through the Helm tool, the Kubernetes cluster container executes the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster, and completes the configuration of the first microservice cluster. Environmental configuration.
可理解地,所述Helm工具还对所述chart目录名关联的目录文件进行操作,对所述第一微服务集群中的与chart目录名关联的目录文件进行资源声明,即表明启用该目录文件,将所述chart目录名下的文件进行启用,即将所述chart目录名的相关文件启用。Understandably, the Helm tool also operates on the directory file associated with the chart directory name, and performs resource declaration on the directory file associated with the chart directory name in the first microservice cluster, which means that the directory file is enabled , Enable the files under the chart directory name, that is, enable the related files of the chart directory name.
如此,本申请通过所述Helm工具,能够快速及完成对于所述chart目录名关联的目录文件的资源声明,减少了人工繁琐操作。In this way, this application can quickly and complete the resource declaration of the directory file associated with the chart directory name through the Helm tool, which reduces manual and tedious operations.
在一实施例中,如图4所示,所述步骤S30之后,即自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名之后,还包括:In an embodiment, as shown in FIG. 4, after the step S30, that is, after querying from the Kubernetes cluster container whether there is an environmental cluster name consistent with the target environmental cluster name, the method further includes:
S70,若所述Kubernetes集群容器中存在与所述目标环境集群名一致的环境集群名,则将环境集群名与所述目标环境集群名一致的集群标记为第二微服务集群;所述第二微服务集群包括一个第二目标主机和至少一个第二目标节点。S70: If there is an environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, mark the cluster with the environment cluster name consistent with the target environment cluster name as a second microservice cluster; the second The microservice cluster includes a second target host and at least one second target node.
可理解地,如果所述Kubernetes集群容器中存在了与所述目标环境集群名一致的环境集群名时,就将环境集群名与所述目标环境集群名一致的集群确定为所述第二微服务集群,所述第二目标主机为与第二微服务集群关联的,且管理对第二微服务集群下的所有第二目标节点的资源的服务器或计算机,所述第二目标节点为第二微服务集群下的除第二目标主机以外的所有节点服务器或计算机。Understandably, if there is an environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, the cluster whose environment cluster name is consistent with the target environment cluster name is determined as the second microservice Cluster, the second target host is a server or computer that is associated with a second microservice cluster and manages resources for all second target nodes under the second microservice cluster, and the second target node is a second microservice cluster. All node servers or computers under the service cluster except the second target host.
S80,根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点。S80. Update the second target host and all second target nodes of the second microservice cluster according to the target list.
可理解地,根据所述目标清单中的所述目标主IP地址和所述目标节点IP地址,对所述第二微服务集群中的所述第二目标主机和所有所述第二目标节点进行刷新,即重新确定所述第二微服务集群的第二目标主机和所有第二目标节点。Understandably, according to the target primary IP address and the target node IP address in the target list, perform the operations on the second target host and all the second target nodes in the second microservice cluster. Refresh, that is, re-determine the second target host and all second target nodes of the second microservice cluster.
在一实施例中,如图5所示,所述步骤S80中,即所述根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点,包括:In one embodiment, as shown in FIG. 5, the step S80, that is, updating the second target host and all second target nodes of the second microservice cluster according to the target list includes:
S801,取消所述第二微服务集群与所述第二目标主机的关联,同时取消所述第二微服务集群与所述第二目标节点的关联。S801: Cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node.
可理解地,所述第二目标主机与所述第二微服务集群存在关联关系,通过定时监控方式和交互通信方式建立连接,取消所述第二微服务集群与所述第二目标主机的关联,即取消所述第二微服务集群与所述第二目标主机的连接;所述第二目标节点与所述第二微服务集群存在关联关系,通过定时监控方式和交互通信方式建立连接,取消所述第二微服务集群与所述第二目标节点的关联,即取消所述第二微服务集群与所述第二目标节点的连接。Understandably, there is an association relationship between the second target host and the second microservice cluster, and a connection is established through a regular monitoring method and an interactive communication method to cancel the association between the second microservice cluster and the second target host , That is, cancel the connection between the second microservice cluster and the second target host; the second target node has an association relationship with the second microservice cluster, and the connection is established through regular monitoring and interactive communication, and the cancellation The association between the second microservice cluster and the second target node is to cancel the connection between the second microservice cluster and the second target node.
S802,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标节点。S802. Determine the target machine in the Kubernetes cluster container that matches the target primary IP address as the updated second target host, and set the target machine in the Kubernetes cluster container that matches the target node IP address The target machine is determined to be the second target node after the update.
可理解地,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机跟所述第二微服务集群建立关联关系,并将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机记录为更新之后的所述第二目标主机;将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机跟所述第二微服务集群建立关联关系,并将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机记录为更新之后的所述第二目标节点,所述第二微服务集群存在与多个所述第二目标节点的关联。Understandably, the target machine in the Kubernetes cluster container that matches the target primary IP address is associated with the second microservice cluster, and the Kubernetes cluster that matches the target primary IP address is established. The target machine in the container is recorded as the updated second target host; the target machine in the Kubernetes cluster container matching the target node IP address is associated with the second microservice cluster, and The target machine record in the Kubernetes cluster container matching the IP address of the target node is the updated second target node, and the second microservice cluster is associated with multiple second target nodes.
S90,通过Helm工具将所述目标环境配置包安装至更新之后的所述第二目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第二目标节点。S90. Install the target environment configuration package to the updated second target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all updates The second target node afterwards.
可理解地,通过所述Helm工具可以将所述目标环境配置包安装至更新之后的所述第二目标主机中,安装过程完全由所述Helm工具完成,无需人工操作,以此同时,可以将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第二目标节点,所述推送的方式为一点对多点的发送方式。Understandably, the target environment configuration package can be installed to the updated second target host through the Helm tool. The installation process is completely completed by the Helm tool without manual operation. At the same time, the The Docker image file associated with the name of the environment configuration package is pushed from the Docker registry to all the second target nodes, and the push mode is a point-to-multipoint sending mode.
S100,通过Helm工具搭建所述第二微服务集群的环境配置,确定完成所述微服务集 群部署文件的部署。In S100, the environment configuration of the second microservice cluster is built through the Helm tool, and the deployment of the deployment file of the microservice cluster is determined to be completed.
可理解地,通过Helm工具,将所述Docker镜像文件安装至所有所述第二目标节点,从而搭建所述第二微服务集群,完成所述第二微服务集群的环境配置,进而确定所述微服务集群部署文件完成了部署。Understandably, the Helm tool is used to install the Docker image file on all the second target nodes to build the second microservice cluster, complete the environment configuration of the second microservice cluster, and then determine the The deployment of the microservice cluster deployment file is completed.
本申请实现了通过获取微服务集群部署文件中的目标环境配置包存储至本地仓库中,通过Docker工具制作Docker镜像文件,上传至Docker注册机,根据目标清单更新所述第二微服务集群,通过Helm工具将目标环境配置包安装至第二微服务集群中更新之后的第二目标主机,同时将Docker镜像文件从Docker注册机推送至所有更新之后的第二目标节点,以及搭建所述第二微服务集群的环境配置,因此,提供了一种更新所述Kubernetes集群容器中已经存在的集群,通过Helm工具和Docker工具将目标环境配置包迭代更新集群的环境配置,实现了集群搭建的人工成本和提高了搭建效率。This application realizes that the target environment configuration package in the microservice cluster deployment file is obtained and stored in the local warehouse, the Docker image file is made through the Docker tool, and uploaded to the Docker registry, and the second microservice cluster is updated according to the target list. The Helm tool installs the target environment configuration package to the updated second target host in the second microservice cluster, and at the same time pushes the Docker image file from the Docker registry to all the updated second target nodes, and builds the second microservice cluster. The environment configuration of the service cluster, therefore, provides a way to update the existing cluster in the Kubernetes cluster container, through the Helm tool and the Docker tool, the target environment configuration package is iteratively updated the environment configuration of the cluster, and the labor cost and labor cost of cluster construction are realized. Improved construction efficiency.
在一实施例中,如图6所示,所述步骤S60之后,即所述通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署之后,包括:In one embodiment, as shown in FIG. 6, after the step S60, that is, after the environment configuration of the first microservice cluster is built through the Helm tool, and after the deployment of the microservice cluster deployment file is determined to be completed, it includes :
S110,接收到微服务集群回滚部署指令,获取所述微服务集群回滚部署指令中包含的微服务集群回滚部署文件;所述微服务集群回滚部署文件包括回滚环境集群名、回滚清单和回滚版本名称;所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址。S110. The microservice cluster rollback deployment instruction is received, and the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction is obtained; the microservice cluster rollback deployment file includes the rollback environment cluster name and the rollback deployment file. Rollback list and rollback version name; the rollback list includes a rollback master IP address and at least one rollback node IP address.
可理解地,所述微服务集群回滚部署指令指在需要对已经部署完成且存在的目标微服务集群进行回滚至历史的某一版本时触发的指令,所述微服务集群回滚部署指令包括所述微服务集群回滚部署文件,所述微服务集群回滚部署文件包括回滚环境集群名、回滚清单和回滚版本名称;所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址,所述回滚环境集群名为需执行环境回滚操作的目标微服务集群对应的具有唯一码的名称,所述回滚清单为需执行环境回滚操作的目标微服务集群中的所有涉及的节点服务器或计算机对应的唯一地址(即IP地址),所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址,所述回滚主IP地址为需执行环境回滚操作的目标微服务集群中负责管理对所有节点服务器或计算机的资源的服务器或计算机对应的IP地址,所述回滚节点IP地址为需执行环境回滚操作的目标微服务集群中除所述回滚主IP地址之外的所有涉及的节点服务器或计算机对应的IP地址,所述回滚版本为历史的环境配置包关联的环境配置包名称的其中之一,所述回滚版本的选择可以为在所有历史的环境配置包关联的环境配置包名称中进行选择,也可以为开发人员手动输入或者通过查询对话框中模糊查询之后进行选择。Understandably, the microservice cluster rollback deployment instruction refers to an instruction that is triggered when a target microservice cluster that has been deployed and exists needs to be rolled back to a certain historical version, and the microservice cluster rollback deployment instruction The rollback deployment file of the microservice cluster includes the rollback deployment file of the microservice cluster. The rollback deployment file of the microservice cluster includes the rollback environment cluster name, the rollback list, and the rollback version name; the rollback list includes a rollback master IP address and at least An IP address of a rollback node, the rollback environment cluster is a name with a unique code corresponding to the target microservice cluster that needs to perform the environment rollback operation, and the rollback list is the target microservice that needs to perform the environment rollback operation The unique addresses (ie IP addresses) corresponding to all involved node servers or computers in the cluster, the rollback list includes one rollback primary IP address and at least one rollback node IP address, and the rollback primary IP address is required The IP address of the server or computer corresponding to the server or computer responsible for managing the resources of all node servers or computers in the target microservice cluster that performs the environment rollback operation, and the rollback node IP address is the target microservice cluster that needs to perform the environment rollback operation IP addresses corresponding to all involved node servers or computers except the primary IP address of the rollback, the rollback version is one of the environmental configuration package names associated with the historical environmental configuration package, and the rollback version The selection can be selected from the environmental configuration package names associated with all historical environmental configuration packages, or can be manually entered by the developer or selected after fuzzy query in the query dialog box.
S120,确定与所述回滚版本名称匹配的且已进行配置的环境配置包名称,自所述本地仓库中获取与匹配的所述环境配置包名称关联的环境配置包,所述本地仓库通过Docker工具将所述环境配置包制作成回滚Docker镜像文件,将所述回滚Docker镜像文件与所述回滚版本名称进行关联,将所述回滚Docker镜像文件上传至所述Docker注册机中。S120. Determine the name of the configured environment configuration package that matches the name of the rollback version, and obtain the environment configuration package associated with the matched environment configuration package name from the local warehouse, where the local warehouse uses Docker The tool makes the environment configuration package into a rollback Docker image file, associates the rollback Docker image file with the rollback version name, and uploads the rollback Docker image file to the Docker registry.
可理解地,获取与所述回滚版本名称匹配的且已经进行过配置的环境配置包名称(即历史的环境配置包关联的环境配置包名称),所述本地仓库中存储着所有历史的环境配置包且每一个历史的环境配置包都与一个对应的环境配置包名称关联,所述本地仓库做到对所 有环境配置包的管理,从所述本地仓库中获取与匹配的所述环境配置包名称关联的环境配置包,通过所述Docker工具将所述环境配置包制作成所述回滚Docker镜像文件,并且将所述回滚Docker镜像文件与所述回滚版本名称建立关联关系,将所述回滚Docker镜像文件发送至所述Docker注册机。Understandably, obtain the name of the environment configuration package that matches the name of the rollback version and that has been configured (that is, the name of the environment configuration package associated with the historical environment configuration package), and all historical environments are stored in the local warehouse Configuration package and each historical environment configuration package is associated with a corresponding environment configuration package name, the local warehouse manages all environment configuration packages, and the matching environment configuration package is obtained from the local warehouse Name-associated environment configuration package, the environment configuration package is made into the rollback Docker image file through the Docker tool, and the rollback Docker image file is associated with the rollback version name, and all The rollback Docker image file is sent to the Docker registration machine.
S130,将环境集群名与所述回滚环境集群名一致的集群标记为第三微服务集群;根据所述回滚清单更新所述第三微服务集群的第三目标主机和所有第三目标节点。S130. Mark the cluster whose environment cluster name is consistent with the rollback environment cluster name as a third microservice cluster; update the third target host and all third target nodes of the third microservice cluster according to the rollback list .
可理解地,将环境集群名与所述回滚环境集群名一致的集群确定为所述第三微服务集群,所述第三目标主机为与第三微服务集群关联的,且管理对第三微服务集群下的所有第三目标节点的资源的服务器或计算机,所述第三目标节点为第三微服务集群下的除第三目标主机以外的所有节点服务器或计算机;根据所述回滚清单中的所述回滚主IP地址和所述回滚节点IP地址,对所述第三微服务集群中的所述第三目标主机和所有所述第三目标节点进行刷新,即重新确定所述第三微服务集群的第三目标主机和所有第三目标节点。Understandably, the cluster whose environment cluster name is consistent with the rollback environment cluster name is determined as the third microservice cluster, the third target host is associated with the third microservice cluster, and the management pair The servers or computers of all the resources of the third target node under the microservice cluster, where the third target node is all the node servers or computers under the third microservice cluster except the third target host; according to the rollback list The rollback primary IP address and the rollback node IP address in the third microservice cluster refresh the third target host and all the third target nodes in the third microservice cluster, that is, re-determine the The third target host and all third target nodes of the third microservice cluster.
S140,通过Helm工具将所述环境配置包安装至更新之后的所述第三目标主机,同时将所述回滚Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第三目标节点。S140. Install the environment configuration package to the updated third target host through the Helm tool, and at the same time push the rollback Docker image file from the Docker registry to all the updated third target nodes .
可理解地,通过所述Helm工具可以将所述环境配置包安装至更新之后的所述第三目标主机中,安装过程完全由所述Helm工具完成,无需人工操作,以此同时,可以将所述回滚Docker镜像文件从所述Docker注册机推送至所有所述第三目标节点,所述推送的方式为一点对多点的发送方式。Understandably, the environment configuration package can be installed to the updated third target host through the Helm tool. The installation process is completely completed by the Helm tool without manual operation. The rollback Docker image file is pushed from the Docker registration machine to all the third target nodes, and the pushing method is a point-to-multipoint sending method.
S150,通过Helm工具搭建所述第三微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。S150: Build the environment configuration of the third microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
可理解地,通过Helm工具,将所述回滚Docker镜像文件安装至所有所述第三目标节点,从而搭建所述第三微服务集群,完成所述第三微服务集群的环境配置,进而确定所述微服务集群部署文件完成了部署。Understandably, through the Helm tool, install the rollback Docker image file to all the third target nodes, so as to build the third microservice cluster, complete the environment configuration of the third microservice cluster, and then determine The deployment of the microservice cluster deployment file is completed.
本申请实现了通过在本地仓库能够快速获取与所述回滚版本名称对应的环境配置包,并通过Docker工具和Helm工具快速将所述第三微服务集群回滚至历史任一版的环境配置,从而快速搭建所述第三微服务集群的环境配置,如此,大大减少了人工配置操作,而且解决了Kubernetes集群容器的回滚限制,能够快速让Kubernetes集群容器下的集群快速回滚至历史任一版本的环境配置。This application realizes that the environment configuration package corresponding to the rollback version name can be quickly obtained through the local warehouse, and the third microservice cluster can be quickly rolled back to any historical environment configuration through the Docker tool and the Helm tool. , So as to quickly build the environment configuration of the third microservice cluster. In this way, manual configuration operations are greatly reduced, and the rollback limitation of the Kubernetes cluster container is solved, and the cluster under the Kubernetes cluster container can quickly be rolled back to the historical task. One version of the environment configuration.
在一实施例中,提供一种微服务集群部署装置,该微服务集群部署装置与上述实施例中微服务集群部署方法一一对应。如图7所示,该微服务集群部署装置包括接收模块11、存储模块12、查询模块13、创建模块14、安装模块15和确定模块16。各功能模块详细说明如下:In one embodiment, a microservice cluster deployment device is provided, and the microservice cluster deployment device corresponds to the microservice cluster deployment method in the foregoing embodiment one-to-one. As shown in FIG. 7, the device for deploying a microservice cluster includes a receiving module 11, a storage module 12, a query module 13, a creation module 14, an installation module 15 and a determination module 16. The detailed description of each functional module is as follows:
接收模块11,用于接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目 标节点IP地址;The receiving module 11 is configured to receive a microservice cluster deployment instruction, and obtain a microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes a target environment cluster name, a target list, and environment configuration A target environment configuration package associated with the package name; the target list includes a target primary IP address and at least one target node IP address;
存储模块12,用于将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The storage module 12 is configured to store the target environment configuration package in a local warehouse, which uses a Docker tool to make the target environment configuration package into a Docker image file, and configures the Docker image file with the environment The package name is associated, and the Docker image file is uploaded to the Docker registration machine;
查询模块13,用于将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;The query module 13 is configured to, after sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
创建模块14,用于若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;The creation module 14 is configured to create a first microservice cluster consistent with the target environment cluster name if there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, which will be consistent with the target environment cluster name. The target machine in the Kubernetes cluster container that matches the primary IP address is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the target node IP address is determined to be The first target node of the first microservice cluster;
安装模块15,用于通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;The installation module 15 is used to install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the The first target node;
确定模块16,用于通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The determining module 16 is configured to build the environment configuration of the first microservice cluster through the Helm tool, and determine the completion of the deployment of the microservice cluster deployment file.
在一实施例中,所述目标环境配置包名称包括chart目录名、目标环境名和目标版本名,所述目标环境名为根据与所述环境配置包名称关联的所述目标环境配置包下的配置文件对应的文件名进行缩写而获得,所述目标版本名为迭代更新的版本号,根据所述chart目录名、所述目标环境名和所述目标版本名确定了所述环境配置包名称的唯一性。In an embodiment, the target environment configuration package name includes a chart directory name, a target environment name, and a target version name, and the target environment name is based on the configuration under the target environment configuration package associated with the environment configuration package name. The file name corresponding to the file is abbreviated and obtained, the target version name is an iteratively updated version number, and the uniqueness of the environment configuration package name is determined according to the chart directory name, the target environment name, and the target version name .
在一实施例中,如图8所示,所述确定模块16包括:In an embodiment, as shown in FIG. 8, the determining module 16 includes:
获取单元61,用于获取所述目标环境配置包中的与所述环境配置包名称中的chart目录名;The obtaining unit 61 is configured to obtain the chart directory name in the target environment configuration package and the name of the environment configuration package;
执行单元62,用于通过Helm工具,所述Kubernetes集群容器执行对所述第一微服务集群中的所述目标环境配置包中与chart目录名关联的目录文件的资源声明,完成所述第一微服务集群的环境配置。The execution unit 62 is configured to use the Helm tool, the Kubernetes cluster container to execute the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster to complete the first The environment configuration of the microservice cluster.
在一实施例中,所述查询模块13包括:In an embodiment, the query module 13 includes:
标记单元,用于若所述Kubernetes集群容器中存在与所述目标环境集群名一致的环境集群名,则将环境集群名与所述目标环境集群名一致的集群标记为第二微服务集群;所述第二微服务集群包括一个第二目标主机和至少一个第二目标节点;The marking unit is configured to mark the cluster whose environmental cluster name is consistent with the target environment cluster name as the second microservice cluster if there is an environmental cluster name consistent with the target environment cluster name in the Kubernetes cluster container; The second microservice cluster includes a second target host and at least one second target node;
更新单元,用于根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点;An update unit, configured to update the second target host and all second target nodes of the second microservice cluster according to the target list;
安装单元,用于通过Helm工具将所述目标环境配置包安装至更新之后的所述第二目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第二目标节点;The installation unit is configured to install the target environment configuration package to the updated second target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry To all the second target nodes after the update;
部署单元,用于通过Helm工具搭建所述第二微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The deployment unit is used to build the environment configuration of the second microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
在一实施例中,所述更新单元包括:In an embodiment, the update unit includes:
取消子单元,用于取消所述第二微服务集群与所述第二目标主机的关联,同时取消所述第二微服务集群与所述第二目标节点的关联;A canceling subunit, configured to cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node;
关联子单元,用于将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标节点。The association subunit is configured to determine the target machine in the Kubernetes cluster container that matches the target primary IP address as the updated second target host, and the Kubernetes that matches the target node IP address The target machine in the cluster container is determined to be the second target node after the update.
在一实施例中,所述确定模块16还包括:In an embodiment, the determining module 16 further includes:
回滚接收单元,用于接收到微服务集群回滚部署指令,获取所述微服务集群回滚部署指令中包含的微服务集群回滚部署文件;所述微服务集群回滚部署文件包括回滚环境集群名、回滚清单和回滚版本名称;所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址;The rollback receiving unit is configured to receive a microservice cluster rollback deployment instruction, and obtain the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction; the microservice cluster rollback deployment file includes rollback Environmental cluster name, rollback list, and rollback version name; the rollback list includes a rollback primary IP address and at least one rollback node IP address;
回滚制作单元,用于确定与所述回滚版本名称匹配的且已进行配置的环境配置包名称,自所述本地仓库中获取与匹配的所述环境配置包名称关联的环境配置包,所述本地仓库通过Docker工具将所述环境配置包制作成回滚Docker镜像文件,将所述回滚Docker镜像文件与所述回滚版本名称进行关联,将所述回滚Docker镜像文件上传至所述Docker注册机中;The rollback production unit is used to determine the environment configuration package name that matches the rollback version name and has been configured, and obtains the environment configuration package associated with the matched environment configuration package name from the local warehouse, so The local warehouse uses the Docker tool to make the environment configuration package into a rollback Docker image file, associate the rollback Docker image file with the rollback version name, and upload the rollback Docker image file to the Docker registration machine;
回滚标记单元,用于将环境集群名与所述回滚环境集群名一致的集群标记为第三微服务集群;根据所述回滚清单更新所述第三微服务集群的第三目标主机和所有第三目标节点;The rollback marking unit is used to mark the cluster whose environment cluster name is consistent with the rollback environment cluster name as a third microservice cluster; and update the third target host and the third microservice cluster of the third microservice cluster according to the rollback list All third target nodes;
回滚暗转单元,用于通过Helm工具将所述环境配置包安装至更新之后的所述第三目标主机,同时将所述回滚Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第三目标节点;The rollback dark transfer unit is used to install the environment configuration package to the updated third target host through the Helm tool, and at the same time push the rollback Docker image file from the Docker registry to all updated The third target node;
回滚部署单元,用于通过Helm工具搭建所述第三微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The rollback deployment unit is used to build the environment configuration of the third microservice cluster through the Helm tool, and determine to complete the deployment of the microservice cluster deployment file.
关于微服务集群部署装置的具体限定可以参见上文中对于微服务集群部署方法的限定,在此不再赘述。上述微服务集群部署装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the microservice cluster deployment device, please refer to the above limitation on the microservice cluster deployment method, which will not be repeated here. Each module in the above-mentioned microservice cluster deployment device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行 时以实现一种微服务集群部署方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 9. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize a microservice cluster deployment method.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述实施例中微服务集群部署方法。In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. The processor executes the computer program to implement the microservice cluster deployment method in the above embodiment .
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述实施例中微服务集群部署方法。其中,所述计算机可读存储介质可以是非易失性,也可以是易失性。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the microservice cluster deployment method in the above-mentioned embodiment. Wherein, the computer-readable storage medium may be non-volatile or volatile.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAMA person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM
(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。(SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), And memory bus dynamic RAM (RDRAM), etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种微服务集群部署方法,其中,包括:A microservice cluster deployment method, which includes:
    接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package; the target list includes a target primary IP address and at least one target node IP address;
    将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
    将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;After sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
    若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created. The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
    通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes;
    通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  2. 如权利要求1所述的微服务集群部署方法,其中,所述目标环境配置包名称包括chart目录名、目标环境名和目标版本名,所述目标环境名为根据与所述环境配置包名称关联的所述目标环境配置包下的配置文件对应的文件名进行缩写而获得,所述目标版本名为迭代更新的版本号,根据所述chart目录名、所述目标环境名和所述目标版本名确定了所述环境配置包名称的唯一性。The microservice cluster deployment method of claim 1, wherein the target environment configuration package name includes a chart directory name, a target environment name, and a target version name, and the target environment name is based on the name associated with the environment configuration package name. The file name corresponding to the configuration file under the target environment configuration package is abbreviated and obtained, the target version name is an iteratively updated version number, which is determined according to the chart directory name, the target environment name, and the target version name The uniqueness of the environment configuration package name.
  3. 如权利要求1所述的微服务集群部署方法,其中,所述通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署,包括:The method for deploying a microservice cluster according to claim 1, wherein the establishment of the environment configuration of the first microservice cluster through the Helm tool and determining the completion of the deployment of the deployment file of the microservice cluster comprises:
    获取所述目标环境配置包中的与所述环境配置包名称中的chart目录名;Acquiring the chart directory name in the target environment configuration package and the name of the environment configuration package;
    通过Helm工具,所述Kubernetes集群容器执行对所述第一微服务集群中的所述目标环境配置包中与chart目录名关联的目录文件的资源声明,完成所述第一微服务集群的环境配置。Through the Helm tool, the Kubernetes cluster container executes the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster to complete the environment configuration of the first microservice cluster .
  4. 如权利要求1所述的微服务集群部署方法,其中,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名之后,还包括:The microservice cluster deployment method of claim 1, wherein after querying from the Kubernetes cluster container whether there is an environmental cluster name consistent with the target environmental cluster name, the method further comprises:
    若所述Kubernetes集群容器中存在与所述目标环境集群名一致的环境集群名,则将环境集群名与所述目标环境集群名一致的集群标记为第二微服务集群;所述第二微服务集群包括一个第二目标主机和至少一个第二目标节点;If there is an environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, the cluster whose environment cluster name is consistent with the target environment cluster name is marked as the second microservice cluster; the second microservice The cluster includes a second target host and at least one second target node;
    根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点;Update the second target host and all second target nodes of the second microservice cluster according to the target list;
    通过Helm工具将所述目标环境配置包安装至更新之后的所述第二目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第二目标节点;Install the target environment configuration package to the updated second target host through the Helm tool, and at the same time push the Docker image file associated with the environment configuration package name from the Docker registry to all updated The second target node;
    通过Helm工具搭建所述第二微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the second microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  5. 如权利要求4所述的微服务集群部署方法,其中,所述根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点,包括:The method for deploying a microservice cluster according to claim 4, wherein said updating the second target host and all second target nodes of the second microservice cluster according to the target list comprises:
    取消所述第二微服务集群与所述第二目标主机的关联,同时取消所述第二微服务集群与所述第二目标节点的关联;Cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node;
    将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标节点。The target machine in the Kubernetes cluster container that matches the target primary IP address is determined to be the updated second target host, and the target machine in the Kubernetes cluster container that matches the target node IP address is determined Determined as the second target node after the update.
  6. 如权利要求1所述的微服务集群部署方法,其中,所述通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署之后,包括:The method for deploying a microservice cluster according to claim 1, wherein the establishment of the environment configuration of the first microservice cluster through the Helm tool, and after determining that the deployment of the microservice cluster deployment file is completed, comprises:
    接收到微服务集群回滚部署指令,获取所述微服务集群回滚部署指令中包含的微服务集群回滚部署文件;所述微服务集群回滚部署文件包括回滚环境集群名、回滚清单和回滚版本名称;所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址;The microservice cluster rollback deployment instruction is received, and the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction is obtained; the microservice cluster rollback deployment file includes the rollback environment cluster name and the rollback list And the rollback version name; the rollback list includes a rollback master IP address and at least one rollback node IP address;
    确定与所述回滚版本名称匹配的且已进行配置的环境配置包名称,自所述本地仓库中获取与匹配的所述环境配置包名称关联的环境配置包,所述本地仓库通过Docker工具将所述环境配置包制作成回滚Docker镜像文件,将所述回滚Docker镜像文件与所述回滚版本名称进行关联,将所述回滚Docker镜像文件上传至所述Docker注册机中;Determine the environment configuration package name that matches the rollback version name and has been configured, and obtain the environment configuration package associated with the matching environment configuration package name from the local warehouse, and the local warehouse uses the Docker tool to download The environment configuration package is made into a rollback Docker image file, the rollback Docker image file is associated with the rollback version name, and the rollback Docker image file is uploaded to the Docker registry;
    将环境集群名与所述回滚环境集群名一致的集群标记为第三微服务集群;根据所述回滚清单更新所述第三微服务集群的第三目标主机和所有第三目标节点;Mark the cluster whose environment cluster name is consistent with the rollback environment cluster name as the third microservice cluster; update the third target host and all third target nodes of the third microservice cluster according to the rollback list;
    通过Helm工具将所述环境配置包安装至更新之后的所述第三目标主机,同时将所述回滚Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第三目标节点;Install the environment configuration package to the updated third target host through the Helm tool, and at the same time push the rollback Docker image file from the Docker registry to all the updated third target nodes;
    通过Helm工具搭建所述第三微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the third microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  7. 一种微服务集群部署装置,其中,包括:A microservice cluster deployment device, which includes:
    接收模块,用于接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The receiving module is configured to receive the microservice cluster deployment instruction, and obtain the microservice cluster deployment file contained in the microservice cluster deployment instruction; the microservice cluster deployment file includes the target environment cluster name, the target list, and the environment configuration package A target environment configuration package associated with a name; the target list includes a target primary IP address and at least one target node IP address;
    存储模块,用于将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The storage module is used to store the target environment configuration package in a local warehouse. The local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and combines the Docker image file with the environment configuration package Names are associated, and the Docker image file is uploaded to the Docker registration machine;
    查询模块,用于将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过 Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;The query module is configured to, after sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
    创建模块,用于若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;The creation module is used to create a first microservice cluster consistent with the target environment cluster name if there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, which will be the same as the target host The target machine in the Kubernetes cluster container that matches the IP address is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the target machine. The first target node of the first microservice cluster;
    安装模块,用于通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;The installation module is used to install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target hosts. A target node;
    确定模块,用于通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The determining module is used to build the environment configuration of the first microservice cluster through the Helm tool, and determine the completion of the deployment of the microservice cluster deployment file.
  8. 如权利要求7所述的微服务集群部署装置,其中,包括:The microservice cluster deployment device according to claim 7, which comprises:
    获取单元,用于获取所述目标环境配置包中的与所述环境配置包名称中的chart目录名;An obtaining unit for obtaining the chart directory name in the target environment configuration package and the name of the environment configuration package;
    执行单元,用于通过Helm工具,所述Kubernetes集群容器执行对所述第一微服务集群中的所述目标环境配置包中与chart目录名关联的目录文件的资源声明,完成所述第一微服务集群的环境配置。The execution unit is configured to use the Helm tool to execute the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster by the Kubernetes cluster container to complete the first microservice cluster. The environment configuration of the service cluster.
  9. 一种计算机设备,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A computer device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:
    接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package; the target list includes a target primary IP address and at least one target node IP address;
    将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
    将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;After sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
    若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created. The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
    通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes;
    通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  10. 如权利要求9所述的计算机设备,其中,所述目标环境配置包名称包括chart目录名、目标环境名和目标版本名,所述目标环境名为根据与所述环境配置包名称关联的所述目标环境配置包下的配置文件对应的文件名进行缩写而获得,所述目标版本名为迭代更新的版本号,根据所述chart目录名、所述目标环境名和所述目标版本名确定了所述环境配置包名称的唯一性。The computer device according to claim 9, wherein the target environment configuration package name includes a chart directory name, a target environment name, and a target version name, and the target environment name is based on the target associated with the environment configuration package name. The file name corresponding to the configuration file under the environment configuration package is abbreviated and obtained, the target version name is an iteratively updated version number, and the environment is determined according to the chart directory name, the target environment name, and the target version name Configure the uniqueness of the package name.
  11. 如权利要求9所述的计算机设备,其中,所述处理器用于:The computer device of claim 9, wherein the processor is configured to:
    获取所述目标环境配置包中的与所述环境配置包名称中的chart目录名;Acquiring the chart directory name in the target environment configuration package and the name of the environment configuration package;
    通过Helm工具,所述Kubernetes集群容器执行对所述第一微服务集群中的所述目标环境配置包中与chart目录名关联的目录文件的资源声明,完成所述第一微服务集群的环境配置。Through the Helm tool, the Kubernetes cluster container executes the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster to complete the environment configuration of the first microservice cluster .
  12. 如权利要求9所述的计算机设备,其中,所述处理器用于:The computer device of claim 9, wherein the processor is configured to:
    若所述Kubernetes集群容器中存在与所述目标环境集群名一致的环境集群名,则将环境集群名与所述目标环境集群名一致的集群标记为第二微服务集群;所述第二微服务集群包括一个第二目标主机和至少一个第二目标节点;If there is an environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, the cluster whose environment cluster name is consistent with the target environment cluster name is marked as the second microservice cluster; the second microservice The cluster includes a second target host and at least one second target node;
    根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点;Update the second target host and all second target nodes of the second microservice cluster according to the target list;
    通过Helm工具将所述目标环境配置包安装至更新之后的所述第二目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第二目标节点;Install the target environment configuration package to the updated second target host through the Helm tool, and at the same time push the Docker image file associated with the environment configuration package name from the Docker registry to all updated The second target node;
    通过Helm工具搭建所述第二微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the second microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  13. 如权利要求12所述的计算机设备,其中,所述处理器用于:The computer device of claim 12, wherein the processor is configured to:
    取消所述第二微服务集群与所述第二目标主机的关联,同时取消所述第二微服务集群与所述第二目标节点的关联;Cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node;
    将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标节点。The target machine in the Kubernetes cluster container that matches the target primary IP address is determined to be the updated second target host, and the target machine in the Kubernetes cluster container that matches the target node IP address is determined Determined as the second target node after the update.
  14. 如权利要求9所述的计算机设备,其中,所述处理器用于:The computer device of claim 9, wherein the processor is configured to:
    接收到微服务集群回滚部署指令,获取所述微服务集群回滚部署指令中包含的微服务集群回滚部署文件;所述微服务集群回滚部署文件包括回滚环境集群名、回滚清单和回滚版本名称;所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址;The microservice cluster rollback deployment instruction is received, and the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction is obtained; the microservice cluster rollback deployment file includes the rollback environment cluster name and the rollback list And the rollback version name; the rollback list includes a rollback master IP address and at least one rollback node IP address;
    确定与所述回滚版本名称匹配的且已进行配置的环境配置包名称,自所述本地仓库中获取与匹配的所述环境配置包名称关联的环境配置包,所述本地仓库通过Docker工具将所述环境配置包制作成回滚Docker镜像文件,将所述回滚Docker镜像文件与所述回滚版本名称进行关联,将所述回滚Docker镜像文件上传至所述Docker注册机中;Determine the environment configuration package name that matches the rollback version name and has been configured, and obtain the environment configuration package associated with the matching environment configuration package name from the local warehouse, and the local warehouse uses the Docker tool to download The environment configuration package is made into a rollback Docker image file, the rollback Docker image file is associated with the rollback version name, and the rollback Docker image file is uploaded to the Docker registry;
    将环境集群名与所述回滚环境集群名一致的集群标记为第三微服务集群;根据所述回滚清单更新所述第三微服务集群的第三目标主机和所有第三目标节点;Mark the cluster whose environment cluster name is consistent with the rollback environment cluster name as the third microservice cluster; update the third target host and all third target nodes of the third microservice cluster according to the rollback list;
    通过Helm工具将所述环境配置包安装至更新之后的所述第三目标主机,同时将所述回滚Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第三目标节点;Install the environment configuration package to the updated third target host through the Helm tool, and at the same time push the rollback Docker image file from the Docker registry to all the updated third target nodes;
    通过Helm工具搭建所述第三微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the third microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
    接收到微服务集群部署指令,获取所述微服务集群部署指令中包含的微服务集群部署文件;所述微服务集群部署文件包括目标环境集群名、目标清单和与环境配置包名称关联的目标环境配置包;所述目标清单包括一个目标主IP地址和至少一个目标节点IP地址;The microservice cluster deployment instruction is received, and the microservice cluster deployment file contained in the microservice cluster deployment instruction is obtained; the microservice cluster deployment file includes the target environment cluster name, the target list, and the target environment associated with the environment configuration package name Configuration package; the target list includes a target primary IP address and at least one target node IP address;
    将所述目标环境配置包存储至本地仓库中,所述本地仓库通过Docker工具将所述目标环境配置包制作成Docker镜像文件,将所述Docker镜像文件与所述环境配置包名称进行关联,将所述Docker镜像文件上传至Docker注册机中;The target environment configuration package is stored in a local warehouse, and the local warehouse uses the Docker tool to make the target environment configuration package into a Docker image file, and associates the Docker image file with the environment configuration package name, and Upload the Docker image file to the Docker registration machine;
    将所述微服务集群部署文件发送给Kubernetes集群容器之后,通过Helm工具,自所述Kubernetes集群容器中查询是否存在与所述目标环境集群名一致的环境集群名;After sending the microservice cluster deployment file to the Kubernetes cluster container, use the Helm tool to query from the Kubernetes cluster container whether there is an environment cluster name consistent with the target environment cluster name;
    若所述Kubernetes集群容器中不存在与所述目标环境集群名一致的环境集群名,则创建与所述目标环境集群名一致的第一微服务集群,将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为所述第一微服务集群的第一目标节点;If there is no environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, a first microservice cluster consistent with the target environment cluster name will be created, and all those that match the target primary IP address will be created. The target machine in the Kubernetes cluster container is determined to be the first target host of the first microservice cluster, and the target machine in the Kubernetes cluster container that matches the IP address of the target node is determined to be the first microservice The first target node of the cluster;
    通过Helm工具将所述目标环境配置包安装至第一目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有所述第一目标节点;Install the target environment configuration package to the first target host through the Helm tool, and at the same time push the Docker image file associated with the name of the environment configuration package from the Docker registry to all the first target nodes;
    通过Helm工具搭建所述第一微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the first microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  16. 如权利要求15所述的计算机可读存储介质,其中,所述目标环境配置包名称包括chart目录名、目标环境名和目标版本名,所述目标环境名为根据与所述环境配置包名称关联的所述目标环境配置包下的配置文件对应的文件名进行缩写而获得,所述目标版本名为迭代更新的版本号,根据所述chart目录名、所述目标环境名和所述目标版本名确定了所述环境配置包名称的唯一性。The computer-readable storage medium of claim 15, wherein the target environment configuration package name includes a chart directory name, a target environment name, and a target version name, and the target environment name is based on the name associated with the environment configuration package name. The file name corresponding to the configuration file under the target environment configuration package is abbreviated and obtained, the target version name is an iteratively updated version number, which is determined according to the chart directory name, the target environment name, and the target version name The uniqueness of the environment configuration package name.
  17. 如权利要求15所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 15, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    获取所述目标环境配置包中的与所述环境配置包名称中的chart目录名;Acquiring the chart directory name in the target environment configuration package and the name of the environment configuration package;
    通过Helm工具,所述Kubernetes集群容器执行对所述第一微服务集群中的所述目标环境配置包中与chart目录名关联的目录文件的资源声明,完成所述第一微服务集群的环境配置。Through the Helm tool, the Kubernetes cluster container executes the resource declaration of the directory file associated with the chart directory name in the target environment configuration package in the first microservice cluster to complete the environment configuration of the first microservice cluster .
  18. 如权利要求15所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 15, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    若所述Kubernetes集群容器中存在与所述目标环境集群名一致的环境集群名,则将环境集群名与所述目标环境集群名一致的集群标记为第二微服务集群;所述第二微服务集群包括一个第二目标主机和至少一个第二目标节点;If there is an environment cluster name consistent with the target environment cluster name in the Kubernetes cluster container, the cluster whose environment cluster name is consistent with the target environment cluster name is marked as the second microservice cluster; the second microservice The cluster includes a second target host and at least one second target node;
    根据所述目标清单更新所述第二微服务集群的第二目标主机和所有第二目标节点;Update the second target host and all second target nodes of the second microservice cluster according to the target list;
    通过Helm工具将所述目标环境配置包安装至更新之后的所述第二目标主机,同时将与所述环境配置包名称关联的所述Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第二目标节点;Install the target environment configuration package to the updated second target host through the Helm tool, and at the same time push the Docker image file associated with the environment configuration package name from the Docker registry to all updated The second target node;
    通过Helm工具搭建所述第二微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the second microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:18. The computer-readable storage medium of claim 18, wherein, when the program instructions are executed by the processor, they are further used to implement the following steps:
    取消所述第二微服务集群与所述第二目标主机的关联,同时取消所述第二微服务集群与所述第二目标节点的关联;Cancel the association between the second microservice cluster and the second target host, and at the same time cancel the association between the second microservice cluster and the second target node;
    将与所述目标主IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标主机,将与所述目标节点IP地址匹配的所述Kubernetes集群容器中的目标机确定为更新之后的所述第二目标节点。The target machine in the Kubernetes cluster container that matches the target primary IP address is determined to be the updated second target host, and the target machine in the Kubernetes cluster container that matches the target node IP address is determined Determined as the second target node after the update.
  20. 如权利要求15所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 15, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    接收到微服务集群回滚部署指令,获取所述微服务集群回滚部署指令中包含的微服务集群回滚部署文件;所述微服务集群回滚部署文件包括回滚环境集群名、回滚清单和回滚版本名称;所述回滚清单包括一个回滚主IP地址和至少一个回滚节点IP地址;The microservice cluster rollback deployment instruction is received, and the microservice cluster rollback deployment file included in the microservice cluster rollback deployment instruction is obtained; the microservice cluster rollback deployment file includes the rollback environment cluster name and the rollback list And the rollback version name; the rollback list includes a rollback master IP address and at least one rollback node IP address;
    确定与所述回滚版本名称匹配的且已进行配置的环境配置包名称,自所述本地仓库中获取与匹配的所述环境配置包名称关联的环境配置包,所述本地仓库通过Docker工具将所述环境配置包制作成回滚Docker镜像文件,将所述回滚Docker镜像文件与所述回滚版本名称进行关联,将所述回滚Docker镜像文件上传至所述Docker注册机中;Determine the environment configuration package name that matches the rollback version name and has been configured, and obtain the environment configuration package associated with the matching environment configuration package name from the local warehouse, and the local warehouse uses the Docker tool to download The environment configuration package is made into a rollback Docker image file, the rollback Docker image file is associated with the rollback version name, and the rollback Docker image file is uploaded to the Docker registry;
    将环境集群名与所述回滚环境集群名一致的集群标记为第三微服务集群;根据所述回滚清单更新所述第三微服务集群的第三目标主机和所有第三目标节点;Mark the cluster whose environment cluster name is consistent with the rollback environment cluster name as the third microservice cluster; update the third target host and all third target nodes of the third microservice cluster according to the rollback list;
    通过Helm工具将所述环境配置包安装至更新之后的所述第三目标主机,同时将所述回滚Docker镜像文件从所述Docker注册机推送至所有更新之后的所述第三目标节点;Install the environment configuration package to the updated third target host through the Helm tool, and at the same time push the rollback Docker image file from the Docker registry to all the updated third target nodes;
    通过Helm工具搭建所述第三微服务集群的环境配置,确定完成所述微服务集群部署文件的部署。The environment configuration of the third microservice cluster is built through the Helm tool, and the deployment of the microservice cluster deployment file is determined to be completed.
PCT/CN2020/099554 2020-04-28 2020-06-30 Method and apparatus for deploying micro service cluster, computer device and storage medium WO2021217871A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010351614.X 2020-04-28
CN202010351614.XA CN111666080B (en) 2020-04-28 2020-04-28 Micro service cluster deployment method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021217871A1 true WO2021217871A1 (en) 2021-11-04

Family

ID=72383005

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099554 WO2021217871A1 (en) 2020-04-28 2020-06-30 Method and apparatus for deploying micro service cluster, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN111666080B (en)
WO (1) WO2021217871A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114047938A (en) * 2022-01-11 2022-02-15 北京云歌科技有限责任公司 Method, device and equipment for constructing mirror image and readable storage medium
CN114157658A (en) * 2021-12-06 2022-03-08 京东科技信息技术有限公司 Mirror image warehouse deployment method and device, electronic equipment and computer readable medium
CN114840225A (en) * 2022-04-26 2022-08-02 光大科技有限公司 Application deployment method and device, storage medium and electronic device
CN115145604A (en) * 2022-07-18 2022-10-04 国能信控互联技术有限公司 Containerized electric power marketing system deployment method
CN116643846A (en) * 2023-06-01 2023-08-25 北京首都在线科技股份有限公司 Timed task processing method and device based on container cluster arrangement management platform
CN116661811A (en) * 2023-07-31 2023-08-29 明阳时创(北京)科技有限公司 Closed-loop containerized controllable service cluster construction method and service cluster device
CN117033325A (en) * 2023-10-08 2023-11-10 恒生电子股份有限公司 Mirror image file preheating and pulling method and device
CN117331578A (en) * 2023-12-01 2024-01-02 之江实验室 Cluster mirror image deployment method and system for microminiature data center

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181439A (en) * 2020-09-24 2021-01-05 中国建设银行股份有限公司 Micro-service deployment method and device, electronic equipment and readable storage medium
CN112241314B (en) * 2020-10-29 2022-08-09 浪潮通用软件有限公司 Multi-Kubernetes cluster management method and device and readable medium
CN112363806B (en) * 2020-11-23 2023-09-22 北京信安世纪科技股份有限公司 Cluster management method and device, electronic equipment and storage medium
CN112463304A (en) * 2020-12-03 2021-03-09 金蝶软件(中国)有限公司 Rollback method and apparatus for container mirror image, computer device, and storage medium
CN112749085B (en) * 2020-12-31 2023-10-24 北京知因智慧科技有限公司 Cross-cluster task publishing method and device, electronic equipment and storage medium
CN112769947A (en) * 2021-01-20 2021-05-07 浪潮云信息技术股份公司 Method for managing micro-service engine instances based on tenant-side container cluster
CN113157339B (en) * 2021-04-23 2023-07-18 东云睿连(武汉)计算技术有限公司 Application service extension method, system, storage medium and device based on OSB
CN113190327B (en) * 2021-04-30 2023-02-03 平安证券股份有限公司 Micro-service deployment method, device, equipment and storage medium
CN113553075A (en) * 2021-07-28 2021-10-26 用友汽车信息科技(上海)股份有限公司 Deployment method, deployment system, computer device and storage medium for micro-services
CN113741909B (en) * 2021-08-31 2024-04-12 平安国际智慧城市科技股份有限公司 Micro-service deployment method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180173512A1 (en) * 2016-12-19 2018-06-21 International Business Machines Corporation Optimized Creation of Distributed Storage and Distributed Processing Clusters on Demand
CN108809722A (en) * 2018-06-13 2018-11-13 郑州云海信息技术有限公司 A kind of method, apparatus and storage medium of deployment Kubernetes clusters
CN109634621A (en) * 2018-11-30 2019-04-16 武汉烽火信息集成技术有限公司 Openstack Platform deployment method, storage medium, electronic equipment and system
CN110532101A (en) * 2019-09-03 2019-12-03 中国联合网络通信集团有限公司 The deployment system and method for micro services cluster
CN110752947A (en) * 2019-10-18 2020-02-04 北京浪潮数据技术有限公司 K8s cluster deployment method and device, and deployment platform
CN110806880A (en) * 2019-11-04 2020-02-18 紫光云技术有限公司 High-reliability, high-performance and high-efficiency container cluster deployment method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110012088B (en) * 2019-03-29 2022-05-24 浪潮云信息技术股份公司 Kubernets-based Redis master-slave cluster automatic deployment scheme

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180173512A1 (en) * 2016-12-19 2018-06-21 International Business Machines Corporation Optimized Creation of Distributed Storage and Distributed Processing Clusters on Demand
CN108809722A (en) * 2018-06-13 2018-11-13 郑州云海信息技术有限公司 A kind of method, apparatus and storage medium of deployment Kubernetes clusters
CN109634621A (en) * 2018-11-30 2019-04-16 武汉烽火信息集成技术有限公司 Openstack Platform deployment method, storage medium, electronic equipment and system
CN110532101A (en) * 2019-09-03 2019-12-03 中国联合网络通信集团有限公司 The deployment system and method for micro services cluster
CN110752947A (en) * 2019-10-18 2020-02-04 北京浪潮数据技术有限公司 K8s cluster deployment method and device, and deployment platform
CN110806880A (en) * 2019-11-04 2020-02-18 紫光云技术有限公司 High-reliability, high-performance and high-efficiency container cluster deployment method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157658A (en) * 2021-12-06 2022-03-08 京东科技信息技术有限公司 Mirror image warehouse deployment method and device, electronic equipment and computer readable medium
CN114157658B (en) * 2021-12-06 2024-03-01 京东科技信息技术有限公司 Mirror warehouse deployment method, apparatus, electronic device and computer readable medium
CN114047938B (en) * 2022-01-11 2023-05-26 北京向量栈科技有限公司 Method, device, equipment and readable storage medium for constructing mirror image
CN114047938A (en) * 2022-01-11 2022-02-15 北京云歌科技有限责任公司 Method, device and equipment for constructing mirror image and readable storage medium
CN114840225A (en) * 2022-04-26 2022-08-02 光大科技有限公司 Application deployment method and device, storage medium and electronic device
CN114840225B (en) * 2022-04-26 2023-09-19 光大科技有限公司 Application deployment method and device, storage medium and electronic device
CN115145604A (en) * 2022-07-18 2022-10-04 国能信控互联技术有限公司 Containerized electric power marketing system deployment method
CN116643846B (en) * 2023-06-01 2024-02-20 北京首都在线科技股份有限公司 Timed task processing method and device based on container cluster arrangement management platform
CN116643846A (en) * 2023-06-01 2023-08-25 北京首都在线科技股份有限公司 Timed task processing method and device based on container cluster arrangement management platform
CN116661811A (en) * 2023-07-31 2023-08-29 明阳时创(北京)科技有限公司 Closed-loop containerized controllable service cluster construction method and service cluster device
CN116661811B (en) * 2023-07-31 2023-10-20 明阳时创(北京)科技有限公司 Closed-loop containerized controllable service cluster construction method and service cluster device
CN117033325B (en) * 2023-10-08 2023-12-26 恒生电子股份有限公司 Mirror image file preheating and pulling method and device
CN117033325A (en) * 2023-10-08 2023-11-10 恒生电子股份有限公司 Mirror image file preheating and pulling method and device
CN117331578A (en) * 2023-12-01 2024-01-02 之江实验室 Cluster mirror image deployment method and system for microminiature data center
CN117331578B (en) * 2023-12-01 2024-03-26 之江实验室 Cluster mirror image deployment method and system for microminiature data center

Also Published As

Publication number Publication date
CN111666080A (en) 2020-09-15
CN111666080B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
WO2021217871A1 (en) Method and apparatus for deploying micro service cluster, computer device and storage medium
KR101574366B1 (en) Synchronizing virtual machine and application life cycles
US10007499B2 (en) Decoupled installation of data management systems
US7558867B2 (en) Automatic firmware upgrade for a thin client using one or more FTP servers
CN111782232A (en) Cluster deployment method and device, terminal equipment and storage medium
US9250672B2 (en) Cloning target machines in a software provisioning environment
US10797952B1 (en) Intelligent rollback analysis of configuration changes
US11789628B1 (en) Systems, methods, and computer readable media for managing a hosts file
US10601647B2 (en) Network configuration system
US8346886B2 (en) System, method, and medium for configuring client computers to operate disconnected from a server computer while using a master instance of the operating system
US20100217840A1 (en) Methods and systems for replicating provisioning servers in a software provisioning environment
CN110098952B (en) Server management method and device
US20140122860A1 (en) Cloud system and boot deployment method for the cloud system
US20040034861A1 (en) System and method for automating firmware maintenance
CN102710814A (en) Method and device for controlling Internet protocol (IP) address of virtual machine
US20040221146A1 (en) Build time dynamic installation of drivers on cloned systems
CN107483241B (en) Method and device for downloading upgrade mirror image version in network element upgrading process
US20100058319A1 (en) Agile deployment of server
US11336588B2 (en) Metadata driven static determination of controller availability
CN115421740A (en) Deployment method and device of cloud native application
US20070256068A1 (en) Product updating with custom actions
CN104008096A (en) Browser-based application operation method and apparatus
US20090183149A1 (en) Data imaging system and methods
CN112463304A (en) Rollback method and apparatus for container mirror image, computer device, and storage medium
US11656948B2 (en) Method and system for mapping protection policies to data cluster components

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20934099

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20934099

Country of ref document: EP

Kind code of ref document: A1