CN106603592B - A kind of method and moving apparatus for the application cluster migration based on service model - Google Patents

A kind of method and moving apparatus for the application cluster migration based on service model Download PDF

Info

Publication number
CN106603592B
CN106603592B CN201510664774.9A CN201510664774A CN106603592B CN 106603592 B CN106603592 B CN 106603592B CN 201510664774 A CN201510664774 A CN 201510664774A CN 106603592 B CN106603592 B CN 106603592B
Authority
CN
China
Prior art keywords
container
dependency relationship
resource
application cluster
mirror image
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201510664774.9A
Other languages
Chinese (zh)
Other versions
CN106603592A (en
Inventor
何震苇
杨新章
陆钢
李慧云
张凌
严丽云
李蓉蓉
周荣生
文锦军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201510664774.9A priority Critical patent/CN106603592B/en
Publication of CN106603592A publication Critical patent/CN106603592A/en
Application granted granted Critical
Publication of CN106603592B publication Critical patent/CN106603592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The method and moving apparatus for the application cluster migration based on service model that the invention discloses a kind of.The present embodiment realizes all nodes of application cluster and the automation migration of dependence by service model;The Software Mirroring relied on by analyzing each host, installs relied on Software Mirroring in batches on the host at target data center, improves application cluster migration velocity, to reduce the downtime of cluster migration;For the environmental parameter of node profile template bound targets application cluster, the configuration file of target cluster is generated, to promote the Configuration File Migration efficiency of application cluster;Mirroring agent of the mirror image warehouse at target data center as target application cluster, obtains from the mirror image warehouse of source data center on demand and caches required mirror image, so that the mirror image of application cluster be accelerated to install.

Description

Method and device for migrating application cluster based on service model
Technical Field
The invention relates to the field of cloud computing, in particular to a service model-based application cluster migration method and a migration device.
Background
A cloud application cluster refers to a group of servers providing internet or enterprise application services based on a cloud computing resource pool, and generally includes a plurality of server container nodes, each container node being composed of a hardware resource and a software stack. Hardware resources include virtual computing, storage, and network resources, typically provided by a cloud resource pool of a cloud data center. The software stack of the container node is composed of a plurality of layers of software which are mutually dependent, and comprises an operating system, platform software, application software and the like. Depending on whether the container nodes store runtime state, the container nodes of the application cluster can be divided into two categories: one type is a stateless container node, such as a load balancer, a Web server, etc., which does not store data at runtime; the other type is a data container node, such as a cache server, a database server and the like, which needs to store runtime data. When the application cluster is migrated, the stateless container node only involves migration of resources, software and configuration, and the data container node needs to perform data migration besides the content involved in the stateless container node migration.
The cloud application cluster is generally required to be migrated across data centers when online business, fault tolerance and machine room relocation are carried out, and software, configuration, data and a topological structure of the application cluster are integrally migrated from a current data center to a new data center.
Due to the complexity of the cloud application clusters and the environmental difference among the data centers, the cloud application clusters are difficult to migrate across the whole data centers, and the existing application cluster migration methods have many problems:
1. redeploying the application cluster: redeploying an application cluster, which relates to the links of cluster resource application, cluster software installation, cluster network configuration, cluster data and configuration file migration and the like, wherein many links need manual intervention, are long in time and are easy to make mistakes;
2. wide area network virtual machine migration: by adopting the V2V migration, only the automatic migration of software and data of a single virtual machine can be realized, the automatic migration of configuration files cannot be realized, the network structure migration of the whole application cluster cannot be realized, and the cross-data center copying time is long due to the large mirror image of the virtual machine.
Container technology that has emerged in recent years provides a lightweight system virtualization solution for sharing a kernel, for example, Docker has not only the resource isolation characteristic of a virtual machine but also lightweight and high-performance characteristics that the virtual machine does not have. Compared with a virtual machine, the container shares an operating system kernel, has no Guest OS, has no hypervisor layer, is lighter and higher in performance, and meanwhile, the container engine has the characteristics of large number of layered mirror images, so that the whole software stack of the application container node can be divided into a plurality of mirror image layers. The mirror image of upper strata relies on the mirror image of lower floor, and the mirror image of lower floor can supply the mirror image sharing of upper strata to greatly reduced the size of mirror image file, made the speed of storage, transmission and the installation of mirror image show and promote. However, the container technology only simplifies the software installation of a single container node, and does not solve the migration problem of the configuration file and the runtime data of the container node, nor the migration problem of the topology and the network configuration of the whole cluster.
Disclosure of Invention
The embodiment of the invention aims to solve the technical problem that: migration issues for application clusters, container node configuration files, runtime data, topology, and network configuration.
According to an aspect of the embodiments of the present invention, a method for migrating an application cluster based on a service model is provided, which includes: acquiring a service model file of an application cluster, and extracting a resource deployment attribute and a container node state of the application cluster in the service model file, wherein the resource deployment attribute comprises: a resource dependency relationship, a software dependency relationship and a topological connection relationship; and completing the migration of the application cluster according to the resource deployment attribute and the container node state.
In one embodiment, the obtaining a service model file of an application cluster, and extracting a resource deployment attribute and a container node state of the application cluster in the service model file specifically include: acquiring a service model file of an application cluster from a service model library of a source data center; importing the service model file into a service model library of a target data center; and extracting the resource dependency relationship, the software dependency relationship, the topological connection relationship and the container node state in the service model file.
In one embodiment, the completing migration of the application cluster according to the resource dependency, the software dependency, the topology dependency and the container node information of the application cluster specifically includes: setting the states of the resource dependency relationship and the software dependency relationship as unbound, setting the state of the topological connection relationship as not established, and setting the state of the container node as not established; allocating resources for the target application cluster according to the container node state and the resource dependency relationship; migrating software for the target application cluster according to the software dependency relationship; migrating the data of the source application cluster to the target application cluster; and carrying out topology connection configuration on the target application cluster according to the topology dependency relationship.
In one embodiment, allocating resources to the target application cluster according to the resource dependency relationship specifically includes: creating a virtual machine in the target application cluster container according to the resource dependency relationship and the container node state; creating a virtual data volume for a virtual machine in a target application cluster container according to the resource dependency relationship; creating a virtual network for the target application cluster according to the container node state; and binding the container resources for the target application cluster container according to the resource dependency relationship.
In one embodiment, creating a virtual machine in a target application cluster container according to a resource dependency relationship and container node information specifically includes: calculating the resource requirement of the virtual container node according to the virtual container node state in the container node state, the dependency relationship between the container node and the virtual container node in the resource dependency relationship and the resource quota requirement of the container node; creating a virtual machine for the virtual container node according to the resource requirement of the virtual container node, binding a virtual machine mirror image, and setting the state of the container node in the container node to be created, wherein the virtual machine mirror image comprises: a system kernel and a container engine.
In one embodiment, creating a virtual data volume for a target application cluster according to a container node state specifically includes: and creating a virtual data volume for the target application cluster according to the virtual data volume in the container node information, and setting the virtual machine state depended by the container node as created.
In one embodiment, creating a virtual network for a target application cluster according to resource dependencies comprises: and creating a virtual network for the target application cluster according to the container node state of the virtual network depended by the container node, and setting the virtual network state depended by the container node as created.
In one embodiment, binding a container resource for a target application cluster container according to a resource dependency relationship specifically includes: binding a virtual data volume for the container node according to the virtual machine dependency relationship in the resource dependency relationship, and binding a virtual data volume for the container node according to the data volume dependency relationship in the resource dependency relationship; binding a virtual network for the container node according to the network dependency relationship in the resource dependency relationship; the states of the virtual machine dependency, the data volume dependency and the network dependency are set to bound.
In one embodiment, migrating software for a target application cluster according to a software dependency relationship specifically includes: obtaining a container mirror image list of a virtual machine container node according to the inverse dependency relationship between the virtual machine and the container in the resource dependency relationship and the dependency relationship between the container and the container mirror image; calling a container engine of the virtual machine, acquiring a non-stored container mirror image from a container mirror image warehouse of the target data center, and if the specified container mirror image does not exist in the container mirror image warehouse of the target data center, acquiring the non-existing container mirror image from the container mirror image warehouse of the source data center by the container mirror image warehouse; the container engine installs the file of the container mirror image according to the mirror image dependency relationship in the resource dependency relationship; and binding the top-level mirror image of the container mirror image file for the container, and setting the mirror image dependency relationship in the resource dependency relationship as bound.
In one embodiment, when the states of all the mirror dependencies are bound, runtime data migration of the data container node is started, and data of the source application cluster is migrated to the target application cluster.
In one embodiment, migrating data of a source application cluster to a target application cluster to stop the source application cluster specifically includes: stopping the source application cluster, and acquiring data of the data container nodes in the source application cluster during operation; generating a snapshot mirror according to the data of the data container node in the source application cluster during operation; uploading the snapshot mirror to a container mirror warehouse of the source data center; and the container engine of the target data center acquires the mirror image snapshot from the source mirror image warehouse and imports the mirror image snapshot into the specified container node.
In one embodiment, performing topology connection configuration for a target application cluster according to a topology connection relationship specifically includes: acquiring connection information in a topological connection relation; configuring topological connection attribute parameters for the container; and starting the topological connection attribute parameters, and setting the state of the topological connection relation to be established.
In one embodiment, the method of this embodiment further includes: when the resource dependency relationship, the software dependency relationship and the topology connection dependency relationship are all bound, setting the state of the container node to be ready; and when the states of all the container nodes are set to be ready, confirming that the migration of the application cluster is completed.
According to an aspect of the present invention, a migration apparatus for migrating an application cluster based on a service model is provided, which is characterized by comprising: the information acquisition module is used for acquiring a service model file of the application cluster and extracting a resource deployment attribute and a container node state of the application cluster in the service model file, wherein the resource deployment attribute comprises: a resource dependency relationship, a software dependency relationship and a topological connection relationship; and the cluster migration module is used for completing the migration of the application cluster according to the resource deployment attribute and the container node state.
In one embodiment, the information acquisition module includes: the system comprises an export subunit, an import subunit and an information extraction unit, wherein the export subunit is used for acquiring a service model file of an application cluster from a service model library of a source data center; the importing subunit imports the service model file into a service model library of the target data center; and the information extraction unit is used for extracting the resource dependency relationship, the software dependency relationship, the topological connection relationship and the container node state in the service model file.
In one embodiment, a cluster migration module includes: the system comprises a state setting unit, a resource allocation unit, a software migration unit, a data migration unit and a topology configuration unit, wherein the state setting unit is used for setting the states of the resource dependency relationship and the software dependency relationship as unbound, setting the state of the topology connection relationship as not established and setting the state of the container node as not established; the resource allocation unit is used for allocating resources to the target application cluster according to the container node state and the resource dependency relationship; the software migration unit is used for migrating software for the target application cluster according to the software dependency relationship; the data migration unit is used for migrating the data of the source application cluster to the target application cluster; and the topology configuration unit is used for carrying out topology connection configuration on the target application cluster according to the topology dependency relationship.
In one embodiment, the resource allocation unit includes: the system comprises a resource creating subunit and a resource binding unit, wherein the resource creating subunit is used for creating a virtual machine in a target application cluster container according to a resource dependency relationship and a container node state; the virtual data volume is created for the virtual machine in the target application cluster container according to the resource dependency relationship; the virtual network is also used for establishing a virtual network for the target application cluster according to the container node state; and the resource binding unit is used for binding the container resources for the target application cluster container according to the resource dependency relationship.
In one embodiment, the resource creating subunit is specifically configured to calculate the resource requirement of each virtual machine node according to the resource quota requirement of the container node and the dependency relationship between the container node and the virtual machine node; the resource creating subunit is further configured to create a virtual machine for the virtual container node according to the resource requirement of the virtual container node, bind a virtual machine image, and set a state of the virtual machine on which the container node depends as created, where the virtual machine image includes: a system kernel and a container engine.
In an embodiment, the resource creating subunit is specifically configured to create a virtual data volume for the target application cluster according to the virtual data volume in the container node information, and set a state of a virtual machine on which the container node depends as created.
In an embodiment, the resource creating subunit is specifically configured to create a virtual network for the target application cluster according to a virtual network container node state that the container node depends on, and set the virtual network state that the container node depends on as created.
In one embodiment, the resource binding unit is specifically configured to bind the virtual machine dependency relationship according to the resource dependency relationship; the virtual data volume is bound for the container node; the virtual data volume is bound for the container node according to the data volume dependency relationship in the resource dependency relationship; the virtual network binding system is also used for binding the virtual network for the container node according to the network dependency relationship in the resource dependency relationship; and also for setting the states of the virtual machine dependencies, data volume dependencies, and network dependencies to bound.
In an embodiment, the software migration unit is specifically configured to obtain a container mirror list of a virtual machine container node according to an inverse dependency relationship between a virtual machine and a container in a resource dependency relationship and a dependency relationship between a container and a container mirror; the system comprises a container mirror warehouse, a virtual machine and a virtual machine, wherein the container mirror warehouse is used for storing container mirror images of a host computer; the system is also used for installing the file of the container mirror image according to the mirror image dependency relationship in the resource dependency relationship; and the system is also used for binding the top-level mirror image of the container mirror image file for the container and setting the mirror image dependency relationship in the resource dependency relationship as bound.
In one embodiment, the data migration unit is further configured to start runtime data migration of the data container node and migrate data of the source application cluster to the target application cluster when the states of all the mirror dependencies are bound.
In one embodiment, the data migration unit is specifically configured to stop the source application cluster, and obtain runtime data of a data container node in the source application cluster; the snapshot mirror image is generated according to the data of the data container nodes in the source application cluster during the operation; uploading the snapshot mirror to a container mirror warehouse of the source data center; and the container engine of the target data center acquires the mirror image snapshot from the source mirror image warehouse and imports the mirror image snapshot into the specified container node.
In an embodiment, the topology configuration unit is specifically configured to obtain connection information in a topology connection relationship; the topology connection attribute parameter configuration module is also used for configuring topology connection attribute parameters for the container; and the method is also used for starting the topological connection attribute parameters and setting the state of the topological connection relation to be established.
In an embodiment, the apparatus of this embodiment further includes a cluster migration unit, configured to set the state of the container node to be ready when the resource dependency, the software dependency, and the topology connection dependency are all bound; and the method is also used for confirming that the migration of the application cluster is completed after the state of all the container nodes is set to be ready.
In the embodiment, automatic migration of all nodes and dependency relationships of an application cluster is realized through a service model; by analyzing the software images depended on by each host, the software images depended on are installed on the hosts of the target data center in batch, the cluster migration speed is increased, and therefore the downtime of cluster migration is reduced; binding the environmental parameters of the target cluster for the node configuration file template to generate the configuration file of the target cluster, thereby improving the migration efficiency of the configuration file of the cluster; and the mirror image warehouse of the target data center is used as a mirror image agent of the target application cluster, and the required mirror image is acquired from the mirror image warehouse of the source data center and cached as required, so that the mirror image installation of the cluster is accelerated.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 illustrates a typical cloud application cluster architecture diagram.
FIG. 2 illustrates a container application service model diagram.
FIG. 3 illustrates an exemplary diagram of an application cluster service model.
FIG. 4 is a flow chart illustrating one embodiment of a method for service model-based application cluster migration of the present invention.
FIG. 5 is a flowchart illustrating an operation of one embodiment of the service model migration method according to the present invention.
FIG. 6 is a flowchart illustrating an embodiment of operations for allocating resources to a target cluster in the service model-based application cluster migration method according to the present invention.
FIG. 7 is a flowchart illustrating an embodiment of operations of creating a virtual machine by a target cluster in the service model-based application cluster migration method according to the present invention.
FIG. 8 is a flowchart illustrating an embodiment of the operation of creating a virtual network for an application cluster in the service model based application cluster migration method of the present invention.
FIG. 9 is a flowchart illustrating an embodiment of the operation of binding container resources for an application cluster in the service model-based application cluster migration method according to the present invention.
FIG. 10 is a flowchart illustrating operation of one embodiment of application cluster software migration in the service model based application cluster migration method of the present invention.
FIG. 11 is a flowchart illustrating an embodiment of the operation of runtime data migration on stateful nodes in the service model-based application cluster migration method of the present invention.
FIG. 12 is a flowchart outlining one embodiment of the operation of the topological connection configuration in a method for service model based application cluster migration in accordance with the present invention.
FIG. 13 is a schematic diagram illustrating an embodiment of a target cluster initiated operation in the service model based application cluster migration method of the present invention.
Fig. 14 shows a schematic structural diagram of a migration apparatus for migrating an application cluster based on a service model according to the present invention.
Fig. 15 is a schematic structural diagram of a migration apparatus for migrating an application cluster based on a service model according to still another embodiment of the present invention.
Fig. 16 is a schematic structural diagram of a migration apparatus for migrating an application cluster based on a service model according to still another embodiment of the present invention.
Fig. 17 is a schematic structural diagram of a migration apparatus for migrating an application cluster based on a service model according to still another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is referenced in one figure, further discussion of it is not necessary in subsequent figures.
Fig. 1 shows an architecture diagram of a typical cloud application cluster, and referring to fig. 1, it is assumed that a container application cluster is composed of 4 container nodes, which are respectively a load balancing node nginx, two Web server nodes WebApp + tomcat, and a database node mysql, and the application cluster is deployed on 3 virtual machines, wherein the nginx node, the two Web server nodes, and the mysql are respectively deployed on one virtual machine, and the virtual machine and the container of the whole cluster share the same IP subnet. The mysql nodes are stateful nodes, mount virtual volumes, have runtime data, and the other nodes are stateless nodes.
FIG. 2 shows an abstract container application service model, describing the components of the container application service model. The container application service model is composed of a container list, a software list, a resource list and connection relations and dependency relations, wherein the container, the resource and the software are all nodes of an attribute model, and the nodes can possess one or more attributes, zero or more operations and zero or more relations. The relationship between nodes is divided into two types: the dependency relationship specifies the installation order of the nodes, and the connection relationship specifies the communication direction of the nodes. Relationships may also have attributes and operations, simple relationships may be defined within a source node, and complex relationships may be defined separately. In addition, the service model also possesses some common attributes and common operations at the service model level, such as mirror repository URLs, cloud resource management URLs, and the like. The service model library comprises a Web server, when the service model is loaded by the service model library, the attribute and the state of the node and the relation of the service model can be accessed and modified through REST API, and the operation of the node and the relation can be called through REST API. Wherein the state of the container node comprises: the method comprises the steps of non-creation, ready and operation, wherein the non-creation means that a container does not exist, the ready means that the container is created, the resource dependence, the software dependence and the connection dependence of the container are bound, and only the container process is started in the operation and can provide services to the outside.
Fig. 3 shows an exemplary diagram of a service model of the container application cluster, which is illustrated in fig. 1, and describes the dependency and connection relationships of 4 container nodes. The device comprises a virtual machine A, a network A, a container mirror image Nginx, a WebApp container A, a WebApp container B, a Mysql container A and a container snapshot MysqlA, wherein the Nginx container A depends on the virtual machine A, the network A and the container mirror image Nginx, the WebApp container A and the WebApp container B depend on the virtual machine B, the network A and the container mirror image WebApp, and the Mysql container A depends on the virtual machine C, a data volume A, the network A. Virtual machine a, virtual machine B, virtual machine C, both rely on a virtual machine image Centos _ DockerEngine that encapsulates an operating system Centos base version and a container engine DockerEngine. The container mirror WebApp depends on the container mirror Tomcat, and the container mirror Nginx, the container mirror Tomcat and the container mirror Mysql all depend on the container mirror CentosExt which encapsulates the system library on which the upper container mirror depends.
The service model can be defined by description languages such as YAML, xml or json, and the like, can be loaded into the service model engine, can be mapped into classes and objects (such as Java) of a specific language, and in the service model engine, the attributes, operations and relationships of the service model can be directly called and accessed through the objects at the language level, and meanwhile, the service model engine externally provides a REST API interface to allow an external module to remotely access the service model through the REST API based on HTTP.
Taking the container nginnxa as an example, the node model defined by YAML is as follows:
a container:
nginx Container A
Type Nginx Container
State of not creating
Runtime data none
Network attribute { network mode host, host IP }
Quota attribute { CPU core number: 2, memory size: 2G, disk size: 1G }
List of operations:
-creating a container
-priming the container
-stopping the container
Resource dependency list:
virtual host { ID: virtual machine A, state: unbound, -operation: bound virtual machine }
Virtual network { ID: network A, State: unbound, -operation: bound network }
List of software dependencies:
container mirror { ID: Container mirror Nginx, State: unbound, -operation: bound mirror }
List of connection relationships:
connection of a rear-end agent { ID: connection of a rear-end agent 1, state: not established, operation: configuration of a rear-end agent, connection attribute { front-end port: 80, rear-end IP: < WebApp container A. network attribute. host IP >, rear-end port: < WebApp container A. network attribute. host port > }
Connection of a rear-end agent { ID: connection of a rear-end agent 2, state: not established, operation: configuration of a rear-end agent, connection attribute { front-end port: 80, rear-end IP: < WebApp container B. network attribute. host IP >, rear-end port: < WebApp container B. network attribute. host port > }
The model of WebApp Container A is defined as follows:
a container:
ID WebApp Container A
Type WebApp Container
State of not creating
Runtime data none
Network attribute { network mode: bridge, container IP, container port, host IP, host port, port mapping }
Quota attribute { CPU core number: 2, memory size: 2G, disk size: 5G }
Container operation list:
-creating a container
-priming the container
-stopping the container
Resource dependency list:
virtual host { ID: virtual machine B, state: unbound, -operation: bound virtual machine }
Virtual network { ID: network A, State: unbound, -operation: bound network }
List of software dependencies:
container mirror { ID: Container mirror WebApp, State: unbound, -operation: bound mirror }
List of connection relationships:
database connection { ID: database connection 1, state: not established, -operation: database connection configuration, attribute { database IP: < Mysql container a. network attribute. host IP >,
database IP < Mysql container a. network attributes host port >,
database name < Mysql container a. database attribute database name >,
database account number < Mysql container a. database attribute database account number >,
database password: < Mysql container a. database attribute. database password > }
The service model of Mysql container a is defined as follows:
a container:
ID Mysql Container A
Type Mysql container
State of not creating
Runtime data having
Container network attributes { Intranet IP, Intranet Port, Extranet IP, Extranet Port 3306, Port mapping }
Container quota attribute { CPU core number: 4, memory size: 4G, disk size: 50G }
Database attribute { database name, database account, database password }
Container operation list:
-creating a container
-priming the container
-stopping the container
-export container snapshots
Resource dependency list:
virtual host { ID: virtual machine C, state: unbound, operation: bound virtual machine }
Data volume { ID: data volume A, status: unbound, operation: bound data volume }
Virtual network { ID: network A, State: unbound, operation: bound network }
List of software dependencies:
container mirror { ID: Container mirror Mysql, State: unbound, operation: bound mirror }
Container snapshot { ID: container snapshot MysqlA, state: unbound, operation: bound mirror }
FIG. 4 is a flow chart of one embodiment of the method of the present invention. As shown in fig. 4, the method of this embodiment includes:
step S401, obtaining a service model file of an application cluster, and extracting a resource deployment attribute and a container node state of the application cluster in the service model file, wherein the resource deployment attribute comprises: resource dependencies, software dependencies, and topological connectivity.
And step S402, completing the migration of the application cluster according to the resource deployment attribute and the container node state.
In the embodiment, automatic migration of all nodes and dependency relationships of an application cluster is realized through a service model; by analyzing the software images depended on by each host, the software images depended on are installed on the hosts of the target data center in batch, the cluster migration speed is increased, and therefore the downtime of cluster migration is reduced; binding the environmental parameters of the target cluster for the node configuration file template to generate the configuration file of the target cluster, thereby improving the migration efficiency of the configuration file of the cluster; and the mirror image warehouse of the target data center is used as a mirror image agent of the target application cluster, and the required mirror image is acquired from the mirror image warehouse of the source data center and cached as required, so that the mirror image installation of the cluster is accelerated.
The inventive service model-based application cluster migration method is detailed below:
firstly, migrating a service model.
Referring to fig. 5, in the application cluster migration method based on the service model, migrating the service model specifically includes the following steps:
step S501, exporting the service model file of the application cluster from the service model library of the source data center.
Step S502, importing a service model file into a service model library of a target data center; extracting the resource dependency relationship, the software dependency relationship, the topological connection relationship and the container node state in the service model file, setting all the container node states as 'not established', setting the resource dependency relationship and the software dependency relationship as unbound, setting the topological connection relationship as not established, and setting the container node state as not established.
In one embodiment, migrating the service model may further include:
step S503, modifying the cloud resource management URL of the service model, and pointing the cloud resource management URL to the management URL of the target data center management agent.
Step S504, the URL attribute of the mirror image warehouse of the application model is modified, and the URL attribute of the mirror image warehouse points to the mirror image warehouse URL of the target data center.
Secondly, allocating resources to the target cluster in the application cluster migration method based on the service model, where, referring to fig. 6, the step of allocating resources to the target cluster in the present invention may include the following operations:
step S601, a virtual machine is created for the target cluster.
Step S602, a virtual storage is created for the target cluster.
Step S603, a virtual network is created for the target cluster.
Step S604, binding network resources for the target cluster.
Referring to fig. 7, the operation step S601 of creating a virtual machine for a target cluster specifically includes the following operations:
step S701, calling a virtual machine node query interface of a service model engine, and acquiring all virtual machines with the container node states of 'not created'.
Step S702, calculating a resource requirement of each virtual machine node according to the resource quota of the container node and the dependency relationship between the container node and the virtual machine node, where the resource requirement is the sum of specifications of each container on the virtual machine, and includes the number of CPU cores, the size of the memory of the virtual machine, the size of the disk, and the like.
Step S703, obtaining a virtual machine specification with a resource specification not less than the resource requirement through a cloud resource management platform of the management agent, for example, a virtual machine query interface API of the cloud computing management platform openstack.
Step S704, invoke a creation operation of a virtual machine node, for example, an interface of a service model proxy may be invoked, allocate a virtual machine to the virtual machine node according to a virtual machine image identifier and a virtual machine resource specification ID, bind the virtual machine image, and set a container node state in the container node to be created, where the virtual machine image includes: a system kernel and a container engine.
Step S705, after the virtual machine is successfully created, updating information such as the IP address and the host name of the virtual machine node, and setting the state of the container node to "created", thereby completing the creation of the virtual machine.
Referring to fig. 8, creating virtual storage 602 for a target cluster specifically includes the following operations:
in step S801, a virtual data volume with a container node state of "not created" is obtained, for example, a virtual storage node query interface of the service model may be called to perform querying and obtaining.
Step S802, a creation interface of the storage node of the virtual machine is called, for example, the creation and calling may be performed according to the size and type of the virtual data volume.
In step S803, the virtual network node in the state of "not created" is obtained, for example, by calling a virtual storage node query interface of the service model.
Step S804, a "creation" operation of each virtual network node is invoked, for example, the invocation and creation can be implemented according to information such as network bandwidth.
Step S805, a virtual network is created by calling a network management API interface of a cloud resource management platform in the target data center management agent through the service model engine.
Step S806, after the Virtual Network is successfully created, information such as a Network address, a gateway IP, a subnet mask, a Virtual Local Area Network identifier (VlAN) of the Virtual Network node is updated, and the state of the Virtual Network node is set to "created".
Referring to fig. 9, the step S603 of binding network resources to the target cluster may specifically include the following steps:
step S901, obtaining a resource dependency relationship that the container node state is "unbound", for example, a virtual query interface of a service model may be called to perform query and obtaining.
Step S902, for the dependency of the virtual machine, executing a binding virtual machine operation, updating a host IP of the container node, creating a container on the virtual machine through a container creation interface of a container engine of the management agent, and performing initialization configuration related to the container, for example, the initialization configuration may include an environment variable, a resource quota, and the like of the container, so as to change the state of the dependency of the virtual machine to "bound".
Step S903, for the data volume dependency, executing the data volume binding operation, and through the mount data volume interface of the container engine, mounting the data volume for the container, changing the state of the dependency into 'bound'.
Step S904, for the network dependency, executing a virtual network binding operation, first configuring a container network through a container engine network configuration interface, allocating a virtual network card to the container, bridging the virtual network card of the container to a host network bridge of the virtual machine, then adding a host IP and a host port of the container to a VLAN of the virtual machine network through a network management interface of the cloud resource management platform, and finally updating a network attribute of the container node, and setting a state of the network dependency as "bound".
And thirdly, migrating application cluster software.
Referring to fig. 10, the step of migrating software to an application cluster in the service model-based application cluster migration method according to the present invention may include:
step S1001, a container mirror image list required to be installed by each virtual machine node is obtained according to the inverse dependency relationship between the virtual machine and the container and the dependency relationship between the container and the container mirror image.
Step S1002, call the container engine on each virtual machine, and download the container images that do not exist on the virtual machines from the container image warehouse of the target data center.
Step S1003, if there is no designated container mirror image in the container mirror image warehouse of the target data center, the container mirror image warehouse downloads the wall-hanging storage container mirror image from the container mirror image warehouse of the source data center.
At step S1004, the container engine installs the mirror hierarchy into the host' S local mirror repository according to the mirror dependency hierarchy in the container mirror, where the local mirror repository is typically implemented by some federated file system supporting a hierarchical file structure, such as AUFS or BTRFS.
Step S1005, calling the binding mirror image operation of the container engine, binding the top container mirror image for each container, and setting the container mirror image dependency relationship as 'bound'
Step S1006, when the container mirror dependency relationships of all container nodes are "bound", it indicates that the software of the stateless node and the stateful node of the application cluster is installed, and the runtime data migration operation of the stateful node may be started.
In an embodiment, referring to fig. 11, the operation of runtime data migration of a stateful node may specifically include:
step S1101, stops the source application cluster.
Step S1102, exporting the runtime data with the state node in the source application cluster, and exporting the runtime data with the state container into a snapshot mirror by invoking a snapshot exporting operation of the container engine, where the snapshot mirror is a special container mirror and only includes runtime incremental data in the container.
And step S1103, uploading the snapshot mirror image to a container mirror image warehouse of the source data center.
In step S1104, the container engine of the target data center requests the target mirror repository to obtain a snapshot mirror.
In step S1105, the target image repository downloads the image snapshot from the source image repository.
In step S1106, the container engine imports the mirror snapshot into a designated container, thereby implementing runtime data migration.
Referring to fig. 12, the operation of the topology connection configuration in this embodiment may specifically include the following steps:
step S1201, a topology connection query interface of the service engine is called, and a topology connection list in which the state is "not established" in each container node is obtained.
Step S1202, setting a connection attribute parameter of the topology connection, for example, referring to the backend proxy connection definition of the above-mentioned Nginx container a, the content in "< >" in the connection attribute may be replaced with an attribute value of a corresponding node in the model, < WebApp container a. network attribute. host IP > represents a host IP attribute of the network attribute set of the WebApp container a node, and is assumed to be 10.10.10.11, < WebApp container a. network attribute. host port > represents a host port attribute of the network attribute set of the WebApp container a node, and is assumed to be 8080. The instantiated connection attributes are 80 for the front-end port, 10.10.10.10 for the back-end IP, 8080 for the back-end port.
Step S1103, a connection configuration operation is performed, each topology connection relationship has a configuration operation, the configuration operation binds a configuration API of the management agent, and the REST API of the container engine of the management agent is called to perform the connection configuration operation of the corresponding container. There is a need to extend the container engine, provide the script configuration REST API within the container, and execute the specified configuration script on the specified container. For example: the REST API for performing nginx backend connection configuration is:
http:// < container host IP >, < container engine port >/< container ID >/configshell/? shellfile ═ nginx _ config.sh & fe _ port ═ 80& be _ IP ═ 10.10.10.10& be _ port ═ 8080.
And after receiving the REST API request, the container engine is connected with the specified container through a pipeline mechanism or an SSH mechanism according to the container ID in the URI parameters, and executes the specified configuration script nginx _ config.
Step S1204, after the configuration script is successfully executed, changes the state of the topology connection relationship to "established".
Fifthly, starting the target application cluster
Referring to fig. 13, the operation of starting the target application cluster according to the present invention may specifically include the following steps:
step S1301, when the resource dependency relationship, the software dependency relationship, and the topology connection dependency relationship of the container node are all bound, the state of the container node is set to "ready".
Step S1302, sequentially starting the containers with the "ready" status according to the topological connection dependency relationship of the containers, calling the REST API of the container engine to start the containers, and setting the status of the container node as "running" after the container node is started. Firstly, a node at the end of a dependency relationship in reference fig. 1, that is, a depended root node, which is a Mysql container a node in this embodiment, is started, then dependent child nodes of the root node, a WebApp container a node and a WebApp container B node are started in sequence, and finally, a top-level node with topology dependence, that is, an Nginx container a node, is started.
Step S1303, after all container nodes of the cluster are started, migration work of the whole application cluster is completed
Fig. 14 is a schematic structural diagram of a migration apparatus for migrating an application cluster based on a service model according to an embodiment of the present invention. Referring to fig. 14, the apparatus of the present embodiment includes: an information acquisition module 1401 and a cluster migration module 1402.
An information obtaining module 1401, configured to obtain a service model file of an application cluster, and extract a resource deployment attribute and a container node state of the application cluster in the service model file, where the resource deployment attribute includes: a resource dependency relationship, a software dependency relationship and a topological connection relationship;
and the cluster migration module 1402 is configured to complete migration of the application cluster according to the resource deployment attribute and the container node state.
In one embodiment, referring to fig. 15, the information acquisition module 1401 includes: an export sub-unit 1501, an import sub-unit 1502, and an information extraction unit 1503.
The export subunit 1501 is configured to obtain the service model file of the application cluster from the service model library of the source data center.
The import sub-unit 1502 imports the service model file into the service model library of the target data center.
The information extraction unit 1503 is configured to extract the resource dependency relationship, the software dependency relationship, the topology connection relationship, and the container node state in the service model file.
In one embodiment, referring to fig. 16, cluster migration module 1402 comprises: a state setting unit 1601, a resource allocation unit 1602, a software migration unit 1603, a data migration unit 1604, and a topology configuration unit 1605.
Wherein,
the state setting unit 1601 is configured to set the states of the resource dependency relationship and the software dependency relationship as unbound, set the state of the topology connection relationship as not established, and set the state of the container node as not created.
A resource allocating unit 1602, configured to allocate resources for the target application cluster according to the container node state and the resource dependency relationship.
A software migration unit 1603, configured to migrate software for the target application cluster according to the software dependency relationship.
A data migration unit 1604 for migrating data of the source application cluster to the target application cluster.
A topology configuration unit 1605, configured to perform topology connection configuration for the target application cluster according to the topology dependency relationship.
In one embodiment, referring to fig. 17, the resource allocation unit 1602 includes: a resource creation subunit 1701 and a resource binding unit 1702.
A resource creating subunit 1701, configured to create a virtual machine in the target application cluster container according to the resource dependency relationship and the container node state; the virtual data volume is created for the virtual machine in the target application cluster container according to the resource dependency relationship; and the virtual network is created for the target application cluster according to the resource dependency relationship.
A resource binding unit 1702, configured to bind the container resource for the target application cluster container according to the resource dependency relationship.
In one embodiment, the resource creating subunit 1701 is specifically configured to calculate the resource requirement of each virtual machine node according to the resource quota requirement of the container node and the dependency relationship between the container node and the virtual machine node; the resource creating subunit is further configured to create a virtual machine for the virtual container node according to the resource requirement of the virtual container node, bind a virtual machine image, and set a state of the virtual machine on which the container node depends as created, where the virtual machine image includes: a system kernel and a container engine.
In one embodiment, the resource creation subunit 1701 is specifically configured to create a virtual data volume for the target application cluster according to the virtual data volume in the container node information, and set the virtual machine state on which the container node depends to be created.
In one embodiment, the resource creating subunit 1701 is specifically configured to create a virtual network for the target application cluster according to a virtual network container node state in the container node states, and set a virtual network state on which the container node depends to be created.
In an embodiment, the resource binding unit 1702 is specifically configured to determine, according to a virtual machine dependency in the resource dependencies; the virtual data volume is bound for the container node; the virtual data volume is bound for the container node according to the data volume dependency relationship in the resource dependency relationship; the virtual network binding system is also used for binding the virtual network for the container node according to the network dependency relationship in the resource dependency relationship; and also for setting the states of the virtual machine dependencies, data volume dependencies, and network dependencies to bound.
In an embodiment, the software migration unit 1603 is specifically configured to obtain a container mirror list of a virtual machine container node according to an inverse dependency relationship between a virtual machine and a container in a resource dependency relationship and a dependency relationship between a container and a container mirror; the system comprises a container mirror warehouse, a virtual machine and a virtual machine, wherein the container mirror warehouse is used for storing container mirror images of a host computer; the system is also used for installing the file of the container mirror image according to the mirror image dependency relationship in the resource dependency relationship; and the system is also used for binding the top-level mirror image of the container mirror image file for the container and setting the mirror image dependency relationship in the resource dependency relationship as bound.
In one embodiment, the data migration unit 1604 is configured to initiate runtime data migration of the data container node to migrate runtime data of the source application cluster to the target application cluster when states of all mirror dependencies are bound.
In an embodiment, the data migration unit 1604 is specifically configured to stop the source application cluster, and obtain data of a data container node in the source application cluster during running; the snapshot mirror image is generated according to the data of the data container nodes in the source application cluster during the operation; uploading the snapshot mirror to a container mirror warehouse of the source data center; the container engine, which is also used in the target data center, takes the mirror snapshot from the source mirror repository and imports the mirror snapshot into the designated container node.
In an embodiment, the topology configuration unit 1605 is specifically configured to obtain connection information in the topology connection relationship; the topology connection attribute parameter configuration module is also used for configuring topology connection attribute parameters for the container; and the method is also used for starting the topological connection attribute parameters and setting the state of the topological connection relation to be established.
In one embodiment, referring to fig. 16, the migration apparatus in this implementation may further include: the cluster migration unit 1606 is configured to set the state of the container node to ready when the resource dependency relationship, the software dependency relationship, and the topology connection dependency relationship are all bound; and the method is also used for confirming that the migration of the application cluster is completed after the state of all the container nodes is set to be ready.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (24)

1. A method for migrating an application cluster based on a service model is characterized by comprising the following steps:
acquiring a service model file of an application cluster, and extracting a resource deployment attribute and a container node state of the application cluster in the service model file, wherein the resource deployment attribute comprises: a resource dependency relationship, a software dependency relationship and a topological connection relationship;
completing the migration of the application cluster according to the resource deployment attribute and the container node state, wherein the migration comprises the following steps:
setting the states of the resource dependency relationship and the software dependency relationship as unbound, setting the state of the topological connection relationship as not established, and setting the state of the container node as not established;
distributing resources for the target application cluster according to the container node state and the resource dependency relationship;
migrating software for the target application cluster according to the software dependency relationship;
migrating the data of the source application cluster to the target application cluster;
and performing topology connection configuration on the target application cluster according to the topology dependency relationship.
2. The method of claim 1, wherein obtaining the service model file of the application cluster and extracting the resource deployment attribute and the container node state of the application cluster in the service model file comprises:
acquiring a service model file of an application cluster from a service model library of a source data center;
importing the service model file into a service model library of a target data center;
and extracting the resource deployment attribute and the container node state in the service model file.
3. The method of claim 1, wherein allocating resources for a target application cluster according to the resource dependencies comprises:
creating a virtual machine in a target application cluster container according to the resource dependency relationship and the container node state;
creating a virtual data volume for a virtual machine in a target application cluster container according to the resource dependency relationship;
creating a virtual network for the target application cluster according to the resource dependency relationship;
and binding the container resources for the target application cluster container according to the resource dependency relationship.
4. The method of claim 1, wherein creating a virtual machine at a target application cluster container according to the resource dependencies and container node information comprises:
calculating the resource requirement of each virtual machine node according to the resource quota requirement of the container node and the dependency relationship between the container node and the virtual machine node;
creating a virtual machine for a virtual container node according to the resource requirement of the virtual container node, binding a virtual machine mirror image, and setting the state of the virtual machine on which the container node depends as created;
wherein the virtual machine image comprises: a system kernel and a container engine.
5. The method of claim 1, wherein creating a virtual data volume for a target application cluster based on the container node state comprises:
and creating a virtual data volume for the target application cluster according to the virtual data volume in the container node information, and setting the state of the virtual machine depended by the container node as created.
6. The method of claim 1, wherein creating a virtual network for a target application cluster according to resource dependencies comprises:
and creating a virtual network for the target application cluster according to the virtual network container node state depended by the container node, and setting the virtual network state depended by the container node as created.
7. The method of claim 1, wherein said binding a container resource for a target application cluster container according to the resource dependency comprises:
binding a virtual data volume for the container node according to the virtual machine dependency relationship in the resource dependency relationship;
binding a virtual data volume for the container node according to the data volume dependency relationship in the resource dependency relationship;
binding a virtual network for the container node according to the network dependency relationship in the resource dependency relationship;
and setting the states of the virtual machine dependency relationship, the data volume dependency relationship and the network dependency relationship as bound.
8. The method of claim 4, wherein migrating software for a target application cluster according to the software dependencies comprises:
obtaining a container mirror image list of a virtual machine container node according to the inverse dependency relationship between the virtual machine and the container in the resource dependency relationship and the dependency relationship between the container and the container mirror image;
calling a container engine of the virtual machine, acquiring a non-stored container mirror image from a container mirror image warehouse of the target data center, and if no specified container mirror image exists in the container mirror image warehouse of the target data center, acquiring the non-stored container mirror image from a container mirror image warehouse of the source data center by the container mirror image warehouse;
the container engine installs the file of the container mirror image according to the mirror image dependency relationship in the resource dependency relationship;
and binding the top mirror image of the container mirror image file for the container, and setting the mirror image dependency relationship in the resource dependency relationship as bound.
9. The method of claim 8,
and when the states of all the mirror image dependency relations are bound, starting the runtime data migration of the data container nodes, and migrating the data of the source application cluster to the target application cluster.
10. The method of claim 9, wherein migrating the data of the source application cluster to the target application cluster ceases the source application cluster comprises:
stopping the source application cluster, and acquiring data of the data container nodes in the source application cluster during operation;
generating a snapshot mirror according to the data of the data container node in the source application cluster during operation;
uploading the snapshot mirror to a container mirror repository of a source data center;
and the container engine of the target data center acquires the mirror image snapshot from the source mirror image warehouse and imports the mirror image snapshot into a specified container node.
11. The method of claim 10, wherein the performing topology connection configuration for the target application cluster according to the topology connection relationship comprises:
acquiring connection information in the topological connection relation;
configuring topological connection attribute parameters for the container;
and starting the topological connection attribute parameters, and setting the state of the topological connection relation to be established.
12. The method of claim 11, further comprising:
when the resource dependency relationship, the software dependency relationship and the topology connection dependency relationship are all bound, setting the state of the container node to be ready;
and when the states of all the container nodes are set to be ready, confirming that the migration of the application cluster is completed.
13. A migration apparatus for application cluster migration based on a service model, comprising:
the information acquisition module is used for acquiring a service model file of an application cluster and extracting a resource deployment attribute and a container node state of the application cluster in the service model file, wherein the resource deployment attribute comprises: a resource dependency relationship, a software dependency relationship and a topological connection relationship;
the cluster migration module is used for completing the migration of the application cluster according to the resource deployment attribute and the container node state;
wherein the cluster migration module comprises: the system comprises a state setting unit, a resource allocation unit, a software migration unit, a data migration unit and a topology configuration unit;
the state setting unit is used for setting the states of the resource dependency relationship and the software dependency relationship as unbound, setting the state of the topological connection relationship as not established, and setting the state of the container node as not established;
the resource allocation unit is used for allocating resources to the target application cluster according to the container node state and the resource dependency relationship;
the software migration unit is used for migrating software for the target application cluster according to the software dependency relationship;
the data migration unit is used for migrating the data of the source application cluster to the target application cluster;
and the topology configuration unit is used for carrying out topology connection configuration on the target application cluster according to the topology dependency relationship.
14. The migration apparatus according to claim 13, wherein the information acquisition module comprises: the device comprises an export subunit, an import subunit and an information extraction unit;
the export subunit is used for acquiring the service model file of the application cluster from the service model library of the source data center;
the importing subunit imports the service model file into a service model library of a target data center;
and the information extraction unit is used for extracting the resource dependency relationship, the software dependency relationship, the topological connection relationship and the container node state in the service model file.
15. The migration apparatus according to claim 13, wherein said resource allocation unit comprises: a resource creation sub-unit and a resource binding unit,
wherein,
the resource creating subunit is used for creating a virtual machine in the target application cluster container according to the resource dependency relationship and the container node state; the virtual data volume is created for the virtual machine in the target application cluster container according to the resource dependency relationship; the virtual network is also used for establishing a virtual network for the target application cluster according to the resource dependency relationship;
and the resource binding unit is used for binding the container resources for the target application cluster container according to the resource dependency relationship.
16. The migration device according to claim 13, wherein:
the resource creating subunit is specifically configured to calculate the resource requirement of each virtual machine node according to the resource quota requirement of the container node and the dependency relationship between the container node and the virtual machine node;
the resource creating subunit is further configured to create a virtual machine for the virtual container node according to the resource requirement of the virtual container node, bind a virtual machine image, and set a state of the virtual machine on which the container node depends as created, where the virtual machine image includes: a system kernel and a container engine.
17. The migration apparatus according to claim 15, wherein the resource creating subunit is specifically configured to create a virtual data volume for the target application cluster according to the virtual data volume in the container node information, and set a state of a virtual machine on which the container node depends as created.
18. The migration device according to claim 15, wherein:
and the resource creating subunit is specifically configured to create a virtual network for the target application cluster according to the virtual network container node state on which the container node depends, and set the virtual network state on which the container node depends as created.
19. The migration device according to claim 15, wherein:
the resource binding unit is specifically used for binding the virtual machine dependency relationship in the resource dependency relationship; the virtual data volume is bound for the container node; the system is also used for binding the virtual data volume for the container node according to the data volume dependency relationship in the resource dependency relationship; the virtual network binding module is also used for binding the virtual network for the container node according to the network dependency relationship in the resource dependency relationship; and the system is also used for setting the states of the virtual machine dependency relationship, the data volume dependency relationship and the network dependency relationship to be bound.
20. The migration device of claim 16,
the software migration unit is specifically configured to obtain a container mirror list of a virtual machine container node according to the inverse dependency relationship between the virtual machine and the container in the resource dependency relationship and the dependency relationship between the container and the container mirror; the system comprises a container mirror warehouse of a target data center, a container mirror engine of a virtual machine, a container mirror image warehouse of a source data center and a container mirror image engine of the virtual machine, wherein the container mirror image warehouse is used for acquiring a container mirror image which does not exist on a host from the container mirror image warehouse of the target data center; the file of the container mirror image is also installed according to the mirror image dependency relationship in the resource dependency relationship; and the system is also used for binding the top-level mirror image of the container mirror image file for the container and setting the mirror image dependency relationship in the resource dependency relationship as bound.
21. The migration apparatus according to claim 20, wherein the data migration unit is configured to, when the states of all the mirror dependencies are bound, start runtime data migration of the data container node, and migrate runtime data of the source application cluster to the target application cluster.
22. The migration apparatus according to claim 21, wherein the data migration unit is specifically configured to stop the source application cluster, and obtain runtime data of the data container node in the source application cluster; the snapshot mirror image is generated according to the data of the data container nodes in the source application cluster during the operation; uploading the snapshot mirror to a container mirror repository of a source data center; and the container engine used for the target data center acquires the mirror image snapshot from the source mirror image warehouse and imports the mirror image snapshot into a specified container node.
23. The migration apparatus according to claim 22, wherein the topology configuration unit is specifically configured to acquire connection information in the topology connection relationship; the topology connection attribute parameter is configured for the container; and the topology connection attribute parameter is also used for starting the topology connection attribute parameter and setting the state of the topology connection relationship to be established.
24. The migration device according to claim 23, further comprising: the cluster migration unit is used for setting the state of the container node to be ready when the resource dependency relationship, the software dependency relationship and the topology connection dependency relationship are all bound; and the method is also used for confirming that the migration of the application cluster is completed after the state of all the container nodes is set to be ready.
CN201510664774.9A 2015-10-15 2015-10-15 A kind of method and moving apparatus for the application cluster migration based on service model Active CN106603592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510664774.9A CN106603592B (en) 2015-10-15 2015-10-15 A kind of method and moving apparatus for the application cluster migration based on service model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510664774.9A CN106603592B (en) 2015-10-15 2015-10-15 A kind of method and moving apparatus for the application cluster migration based on service model

Publications (2)

Publication Number Publication Date
CN106603592A CN106603592A (en) 2017-04-26
CN106603592B true CN106603592B (en) 2019-10-01

Family

ID=58552172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510664774.9A Active CN106603592B (en) 2015-10-15 2015-10-15 A kind of method and moving apparatus for the application cluster migration based on service model

Country Status (1)

Country Link
CN (1) CN106603592B (en)

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246167B (en) * 2017-07-11 2022-04-01 阿里巴巴集团控股有限公司 Container scheduling method and device
CN109391664B (en) * 2017-08-11 2021-04-20 中国电信股份有限公司 System and method for multi-cluster container deployment
CN107589982B (en) * 2017-09-12 2021-01-15 国云科技股份有限公司 Method for migrating virtual machine from VMware to KVM
CN107579898B (en) * 2017-09-14 2020-08-14 快云信息科技有限公司 Method and device for interconnection communication among multiple containers
CN109587281B (en) * 2017-09-29 2020-07-28 华为技术有限公司 Container configuration method and computing node
CN107734019B (en) * 2017-09-29 2020-12-25 中国石油化工股份有限公司 System and method for on-line migration of exploration and development containers
CN107728947A (en) * 2017-10-13 2018-02-23 郑州云海信息技术有限公司 A kind of cold moving method of container and system
CN107729151A (en) * 2017-10-19 2018-02-23 济南浪潮高新科技投资发展有限公司 A kind of method of cluster management FPGA resource
CN107704618B (en) * 2017-10-27 2020-09-25 北京航空航天大学 Thermal migration method and system based on aufs file system
CN107734052B (en) * 2017-11-02 2019-12-10 华南理工大学 Load balancing container scheduling method facing component dependence
CN109840132B (en) * 2017-11-27 2021-05-14 华为技术有限公司 Arranging method and device of container and storage medium
CN109150964B (en) * 2018-07-06 2022-01-11 中科星图股份有限公司 Migratable data management method and service migration method
CN109165095B (en) * 2018-08-16 2022-04-15 中科边缘智慧信息科技(苏州)有限公司 Task package based information system rapid opening method
CN109005245B (en) * 2018-09-07 2021-09-14 广州微算互联信息技术有限公司 Cloud mobile phone use management method and system
CN113383319B (en) 2018-10-24 2024-05-03 华为云计算技术有限公司 Target-driven dynamic object placement optimization
CN111352689B (en) * 2018-12-21 2023-04-07 中国电信股份有限公司 Method and device for realizing seamless migration of application containerized deployment
CN109857516B (en) * 2018-12-29 2023-12-12 航天信息股份有限公司 Cluster migration method and device based on container
CN111756562B (en) * 2019-03-29 2023-07-14 深信服科技股份有限公司 Cluster takeover method, system and related components
CN110795162B (en) * 2019-09-26 2022-07-05 北京浪潮数据技术有限公司 Method and device for generating container mirror image file
CN111459415B (en) * 2020-04-15 2023-05-23 腾讯云计算(长沙)有限责任公司 Cross-cloud data migration method, device, equipment and storage medium
CN111294410B (en) * 2020-05-11 2020-08-14 杭州朗澈科技有限公司 Method for uploading local mirror image file to multi-region private mirror image warehouse
CN111522545B (en) * 2020-07-06 2020-10-20 嘉兴太美医疗科技有限公司 Method, device, system and readable medium for dynamically constructing model based on Java
CN113946275B (en) * 2020-07-15 2024-04-09 中移(苏州)软件技术有限公司 Cache management method and device and storage medium
CN112333003B (en) * 2020-10-13 2022-11-08 北京京东尚科信息技术有限公司 Method and device for acquiring proprietary cloud container cluster gene information
CN112558930B (en) * 2020-12-09 2022-02-08 苏州空天信息研究院 Software generation system and method for container service
US11762571B2 (en) 2020-12-21 2023-09-19 International Business Machines Corporation Migration of uncached data after cutover
CN112769617A (en) * 2021-01-06 2021-05-07 武汉紫阑信息技术有限公司 Method for migrating RabbitMQ cluster and computer system
CN115134231B (en) * 2021-03-17 2024-03-08 北京搜狗科技发展有限公司 Communication method, device and device for communication
CN113359511A (en) * 2021-06-23 2021-09-07 陕西工大锐迪信息技术有限公司 Construction method and device of industrial control simulation network, computer equipment and storage medium
CN113326100B (en) * 2021-06-29 2024-04-09 深信服科技股份有限公司 Cluster management method, device, equipment and computer storage medium
CN113672337B (en) * 2021-07-16 2024-02-13 广东浪潮智慧计算技术有限公司 Application migration method, device, equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856548A (en) * 2012-12-07 2014-06-11 华为技术有限公司 Dynamic resource scheduling method and dynamic resource scheduler
CN104935618A (en) * 2014-03-19 2015-09-23 福建福昕软件开发股份有限公司北京分公司 Cluster disposition method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9372726B2 (en) * 2013-01-09 2016-06-21 The Research Foundation For The State University Of New York Gang migration of virtual machines using cluster-wide deduplication

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856548A (en) * 2012-12-07 2014-06-11 华为技术有限公司 Dynamic resource scheduling method and dynamic resource scheduler
CN104935618A (en) * 2014-03-19 2015-09-23 福建福昕软件开发股份有限公司北京分公司 Cluster disposition method

Also Published As

Publication number Publication date
CN106603592A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106603592B (en) A kind of method and moving apparatus for the application cluster migration based on service model
US11265366B2 (en) Lifecycle management of custom resources in a cloud computing environment
US11171913B2 (en) Systems and methods for implementing address translation services
US9712604B2 (en) Customized configuration of cloud-based applications prior to deployment
US9582319B2 (en) Migrating virtual machines across network separated data centers
US9262238B2 (en) Connection management for an application in a computing platform
US9665356B2 (en) Configuration of an application in a computing platform
US9170797B2 (en) Automated deployment of an application in a computing platform
US20160092119A1 (en) Data migration between different types of storage systems
US20150186129A1 (en) Method and system for deploying a program module
US20170052807A1 (en) Methods, apparatuses, and computer program products for deploying and managing software containers
US11593143B2 (en) System and method for distributed orchestration management in network function virtualization
WO2019055871A1 (en) Systems and methods for a policy-driven orchestration of deployment of distributed applications
US11681585B2 (en) Data migration for a shared database
US10728169B1 (en) Instance upgrade migration
US11343141B2 (en) Methods and apparatus to migrate physical server hosts between virtual standard switches and virtual distributed switches in a network
US11210347B2 (en) Object search with pagination and non-duplicates support
US20240112062A1 (en) Quantum circuit service
US11838362B2 (en) Data object delivery for distributed cluster computing
CN115865921A (en) Method, system, storage medium and electronic device for constructing container network
JP2023553278A (en) Automatic generation of affinity and anti-affinity rules
US20230195514A1 (en) Uniform addressing in business process engine
US20230131665A1 (en) Updating virtual images of computing environments
US20240248776A1 (en) Inventory management system for managing functions, resources and services of a telecommunications network
US20240005268A1 (en) Network architecture provisioning using build sheets

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20170426

Assignee: Tianyiyun Technology Co.,Ltd.

Assignor: CHINA TELECOM Corp.,Ltd.

Contract record no.: X2024110000040

Denomination of invention: A method and migration device for application cluster migration based on service model

Granted publication date: 20191001

License type: Common License

Record date: 20240914

EE01 Entry into force of recordation of patent licensing contract