WO2018032770A1 - 一种应用组件部署方法及部署节点 - Google Patents

一种应用组件部署方法及部署节点 Download PDF

Info

Publication number
WO2018032770A1
WO2018032770A1 PCT/CN2017/078583 CN2017078583W WO2018032770A1 WO 2018032770 A1 WO2018032770 A1 WO 2018032770A1 CN 2017078583 W CN2017078583 W CN 2017078583W WO 2018032770 A1 WO2018032770 A1 WO 2018032770A1
Authority
WO
WIPO (PCT)
Prior art keywords
deployment
node
application
application component
instruction
Prior art date
Application number
PCT/CN2017/078583
Other languages
English (en)
French (fr)
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 WO2018032770A1 publication Critical patent/WO2018032770A1/zh
Priority to US16/278,556 priority Critical patent/US10684850B2/en

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/044Network management architectures or arrangements comprising hierarchical management structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • H04L41/5045Making service definitions prior to deployment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present invention relates to the field of cloud computing technologies, and in particular, to an application component deployment method and a deployment node.
  • the application includes multiple application components, and each application component is used to implement some functions of the application.
  • the user may separately deploy multiple application components of the application on multiple deployment nodes in the cloud platform, and the deployment node may be a virtual machine or a container.
  • the deployment node has a parent-child relationship, and the deployment node considers this relationship when deploying the application component.
  • the application component needs to meet a certain installation sequence in the deployment.
  • the deployment node A is the child of the deployment node B.
  • the application component B on the deployment node B must be installed before the application component A on the deployment node A can be installed.
  • CM Configuration Management
  • the embodiment of the invention provides an application component deployment method and a deployment node, which can reduce the dependence of the deployment node on the server, thereby improving the flexibility of application component deployment.
  • the first aspect of the present invention discloses an application deployment method, where the method is used to deploy multiple application components of an application on multiple deployment nodes, and the method includes:
  • the target deployment node receives the first deployment instruction sent by the management server, the target deployment node is one of the multiple deployment nodes, the first deployment instruction is used to indicate deployment of the application, and the target deployment node is configured according to the location Determining, by the first deployment instruction, a relative node of the target deployment node, where the relative node includes a parent node, and a second application component of the plurality of application components corresponding to the parent node;
  • the parent node sends a second deployment instruction, the second deployment instruction is used to instruct the parent node to deploy the second application component, and the target deployment node detects that the parent node has deployed the second application component
  • the target deployment node deploys a first application component according to the first deployment instruction, where the first application component is an application component corresponding to the target deployment node among the multiple application components.
  • Each deployment node can record the deployment status of the application components deployed on the deployment node in the storage server, so that each deployment node can detect the deployment status of other deployment nodes on the storage server, according to the deployment. Status to determine if other deployment nodes have deployed application components, or each deployment node can proactively notify other deployment nodes of the deployment status of the application components deployed on the deployment node.
  • the deployment status may include, but is not limited to, undeployed, deployed, deployed, deployed, and faulty.
  • the deployment node Before deploying the application component to each deployment node, it is necessary to confirm whether the deployment node has a parent node and whether the parent node has deployed the application component, because the deployment of the application component on each deployment node depends on the application on the parent node of the deployment node.
  • the deployment of a component that is, only if the parent node of the deployment node has deployed the application component, the deployment node can deploy the application component.
  • the target deployment node can guide the parent node of the target deployment node to deploy the application component, and then the target deployment node can also deploy the application component, and the whole process reduces the server.
  • deployment nodes can automatically deploy application components to increase the flexibility of application component deployment.
  • the target deployment node determines, according to the first deployment instruction, a relative node of the target deployment node, where the relative node includes a parent node, and the plurality of application components
  • the second application component corresponding to the parent node includes:
  • the target deployment node parses the first deployment instruction, obtains a hierarchical relationship between the target deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the first deployment instruction carries a hierarchical relationship between the target deployment node and the other deployment nodes, and a correspondence between the application components of the application and the deployment nodes included in the hierarchical relationship, so that the target deployment node
  • the first deployment instruction may be parsed and the hierarchical relationship and the corresponding relationship are directly extracted, and the parent node of the target deployment node is determined according to the hierarchical relationship, and the second application component corresponding to the parent node among the plurality of application components is determined according to the correspondence relationship.
  • the hierarchical relationship and the corresponding relationship may be presented in the form of an application deployment model diagram, where the deployment model diagram is a deployment model diagram of the application, where the application deployment model diagram may exist in the first deployment instruction; or the hierarchical relationship And the correspondence may exist in the first deployment instruction in the form of a data packet or a frame.
  • the first deployment instruction carries an application identifier of the application
  • the target deployment node determines, according to the first deployment instruction, a relative node of the target deployment node, where the relative The node includes a parent node
  • the second application component of the plurality of application components corresponding to the parent node includes:
  • the target deployment node sends a deployment relationship acquisition request that carries the application identifier to the storage server, where the deployment relationship acquisition request is used to request to obtain a deployment relationship of the application; and the target deployment node receives the storage server response
  • the deployment relationship acquires a deployment relationship of the application that is sent by the request, and the deployment relationship of the application includes a hierarchical relationship between the target deployment node and other deployment nodes, and an application component of the application and the relationship included in the hierarchical relationship. Determining a correspondence between the nodes; determining, by the target deployment node, a parent node of the target deployment node according to the hierarchical relationship, and determining, according to the correspondence relationship, a second one of the plurality of application components corresponding to the parent node Application component.
  • the deployment relationship of the application is pre-stored in the storage server, and the deployment relationship of the application includes a hierarchical relationship between the target deployment node and other deployment nodes, and an application component and a hierarchical relationship package of the application.
  • the target deployment node can obtain the hierarchical relationship between the target deployment node and other deployment nodes from the storage server, and the application components and levels of the application.
  • Corresponding relationship between the deployment nodes included in the relationship so that the target deployment node can determine the parent node of the target deployment node according to the hierarchical relationship, and determine the second application component corresponding to the parent node among the plurality of application components according to the correspondence relationship.
  • the relative node further includes a sibling node
  • the method further includes:
  • the target deployment node Determining, by the target deployment node, a third application component corresponding to the sibling node among the plurality of application components according to the first deployment instruction; detecting, by the target deployment node, that the parent node has deployed the second In the case of the application component, the target deployment node sends a third deployment instruction to the sibling node, where the third deployment instruction is used to instruct the sibling node to deploy the third application component.
  • the target deployment node deploys the first application component, and the target deployment node may send a third deployment instruction to the sibling node of the target deployment node to trigger the brother.
  • the node deploys a third application component
  • the third deployment instruction is sent to the sibling node of the target deployment node to trigger the sibling node to deploy the third application component.
  • the manner in which the node, the parent node includes the parent node, and the second application component corresponding to the parent node in the plurality of application components is similar, and details are not described herein. For details, refer to the description above.
  • the kinship node further includes a child node, and after the target deployment node deploys the first application component according to the first deployment instruction, the method further includes:
  • the target deployment node Determining, by the target deployment node, a fourth application component corresponding to the child node among the plurality of application components according to the first deployment instruction; the target deployment node sending a fourth deployment instruction to the child node, The fourth deployment instruction is used to instruct the child node to deploy the fourth application component.
  • the target deployment node is the parent node of the child node, and the installation of the application component on the child node depends on the installation of the application component on the target deployment node, so after the target deployment node deploys the first application component according to the first deployment instruction, the target deployment The node can send a fourth deployment instruction to the child node to trigger the child node to deploy the fourth application component.
  • the target deployment node determines the fourth application component corresponding to the child node in the multiple application components according to the first deployment instruction, and the foregoing “target deployment node according to the first deployment instruction. Determining the kinship node of the target deployment node, the kinship node includes a parent node, and the second application component corresponding to the parent node in the plurality of application components is similar, and details are not described herein. See the description above.
  • multiple deployment nodes can automatically perform application component deployment operations and reduce the dependency on the server. This not only simplifies the business logic of the cloud platform application deployment system, but also improves the capability of the cloud platform application deployment system to concurrently deploy applications. Can improve the efficiency of application deployment.
  • the method further includes:
  • the target deployment node updates a deployment status of the first application component to a fault state; the target deployment node redeploys the first application component; After the target deployment node redeploys the first application component, the target deployment node will be the first application component The deployment status update is complete for deployment.
  • the failure of the operation of the first application component is mainly caused by two reasons.
  • the first is that the target deployment node itself where the first application component is located fails, and the second is that the first application component itself fails.
  • the target deployment node itself fails, and the present invention does not consider it.
  • the present invention mainly considers the second case. It can be seen that, in the case that the operation of the first application component fails, the target deployment node can automatically perform the redeployment operation of the application component, thereby implementing automatic repair of the fault.
  • the method further includes:
  • the target deployment node Receiving, by the target deployment node, an upgrade instruction sent by the management server, the upgrade instruction instructing the target deployment node to upgrade the first application component; and the target deployment node updating a deployment status of the first application component to Not deployed; the target deployment node performs an upgrade operation on the first application component according to the upgrade instruction; the target deployment node updates the deployment status of the upgraded first application component to deployment completion.
  • the application component of the target deployment node may need to be upgraded because the new function of the service is online or needs to be repaired.
  • the upgrade command sent by the management server is received, the application component is not installed on the target deployment node by default, and the deployment status of the application component of the target deployment node needs to be updated to the undeployed state, and the first application component is executed according to the upgrade instruction.
  • the upgrade operation further, the target deployment node needs to update the deployment status of the upgraded first application component to the deployment completion.
  • the second aspect of the present invention discloses an application component deployment method, where the method is used to deploy multiple application components of an application on multiple deployment nodes, and the method includes:
  • the target deployment node receives the first deployment instruction sent by the management server, the target deployment node is one of the multiple deployment nodes, the first deployment instruction is used to indicate deployment of the application, and the target deployment node detects In a case that the parent node of the target deployment node has deployed the second application component, the target deployment node deploys the first application component according to the first deployment instruction, where the first application component is the multiple application component An application component corresponding to the target deployment node, where the second application component is an application component corresponding to the parent node among the plurality of application components; the target deployment node determines, according to the first deployment instruction a third application component corresponding to the sibling node of the target deployment node, where the target deployment node sends a third deployment instruction to the sibling node, where the third deployment instruction is used to indicate the brother Nodes deploy the third application component; or the target deployment node determines the plurality of application components according to the first deployment instruction a fourth application component corresponding to the child node of the target deployment node; the target deployment no
  • the target deployment node determines that the parent node has deployed the second application component, and the target deployment node does not need to wait for the deployment of the application component on the parent node, but directly deploys the first application component according to the first deployment instruction.
  • the target deployment node may further determine a third application component corresponding to the sibling node of the target deployment node according to the first deployment instruction, and send a third deployment instruction to the sibling node to trigger the sibling node to deploy the third application component, and further, the target deployment node
  • the fourth application component corresponding to the child node of the target deployment node may be determined according to the first deployment instruction, and the fourth deployment instruction is sent to the child node to trigger the child node to deploy the fourth application component.
  • the target deployment node can guide the sibling node or the child node to deploy the application component, and the target deployment node can also deploy the application component, the whole process reduces the dependence on the server, and deploys the node.
  • Application components can be deployed automatically to increase the flexibility of application component deployment.
  • the target deployment node determines, according to the first deployment instruction, that the third application component of the multiple application components that corresponds to the sibling node of the target deployment node includes:
  • the target deployment node parses the first deployment instruction, obtains a hierarchical relationship between the target deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the target deployment node determines a sibling node of the target deployment node according to the hierarchical relationship, and determines a third application component corresponding to the sibling node among the plurality of application components according to the correspondence relationship.
  • the first deployment instruction carries an application identifier of the application
  • the target deployment node determines, according to the first deployment instruction, the target deployment in the multiple application components.
  • the third application component corresponding to the sibling node of the node includes:
  • the target deployment node sends a deployment relationship acquisition request that carries the application identifier to the storage server, where the deployment relationship acquisition request is used to request to obtain a deployment relationship of the application; and the target deployment node receives the storage server response
  • the deployment relationship acquires a deployment relationship of the application that is sent by the request, and the deployment relationship of the application includes a hierarchical relationship between the target deployment node and other deployment nodes, and an application component of the application and the relationship included in the hierarchical relationship. Deploy the correspondence between nodes;
  • the target deployment node determines a sibling node of the target deployment node according to the hierarchical relationship, and determines a third application component corresponding to the sibling node among the plurality of application components according to the correspondence relationship.
  • the target deployment node determines, according to the first deployment instruction, a manner in which the fourth application component corresponding to the child node of the target deployment node among the multiple application components” is “the target”
  • the manner in which the deployment node determines the third application component of the plurality of application components corresponding to the sibling node of the target deployment node according to the first deployment instruction is similar, and details are not described herein. For details, refer to the description above.
  • a third aspect of the invention discloses a deployment node comprising functional units for performing some or all of the steps of any of the methods of the first aspect of the embodiments of the invention.
  • the deployment node may reduce the dependency of the deployment node on the server when performing some or all of the steps of any of the methods, thereby improving the flexibility of application component deployment.
  • a fourth aspect of the embodiments of the present invention discloses a deployment node, including a functional unit for performing some or all of the steps of any of the methods of the second aspect of the embodiments of the present invention.
  • the deployment node may reduce the dependency of the deployment node on the server when performing some or all of the steps of any of the methods, thereby improving the flexibility of application component deployment.
  • a fifth aspect of the embodiments of the present invention discloses a physical machine, where a plurality of deployment nodes are deployed, the physical machine includes: a processor, a receiver, a transmitter, and a memory, where the memory is configured to be stored.
  • the instructions are configured to execute the instructions, and the processor runs the instructions to perform some or all of the steps of any of the methods of the first aspect of the embodiments of the present invention.
  • the deployment node may reduce the dependency of the deployment node on the server when performing some or all of the steps of any of the methods, thereby improving the flexibility of application component deployment.
  • a sixth aspect of the embodiments of the present invention discloses a physical machine, where a plurality of deployment nodes are deployed, the physical machine includes: a processor, a receiver, a transmitter, and a memory, where the memory is configured to be stored.
  • the instructions are configured to execute the instructions, and the processor runs the instructions to perform some or all of the steps of any of the methods of the second aspect of the embodiments of the present invention.
  • the deployment node may reduce the dependency of the deployment node on the server when performing some or all of the steps of any of the methods, thereby improving the flexibility of application component deployment.
  • a seventh aspect of the embodiments of the present invention discloses a computer storage medium storing a program, the program specifically comprising instructions for performing some or all of the steps of any of the first aspects of the embodiments of the present invention.
  • the eighth aspect of the embodiments of the present invention discloses a computer storage medium, wherein the computer storage medium stores a program, and the program specifically includes instructions for performing some or all of the steps of any of the second aspects of the embodiments of the present invention.
  • the target deployment node determines, according to the first deployment instruction, a relative node of the target deployment node, the relative node includes a parent node, and the plurality of application components and the After the second application component corresponding to the parent node, the target deployment node may further detect whether the parent node has deployed the second application component, and if the parent node does not deploy the second application component The target deployment node sends a second deployment instruction to the parent node; if it is detected that the parent node has deployed the second application component, the target deployment node does not need to send to the parent node Second deployment instruction. This saves system resources.
  • the target deployment node deploys the first application component if it is determined that the target deployment node does not have a parent node. In this case, the target deployment node does not have a parent node, that is, the application component that the first application component does not depend on. At this time, the target deployment node can directly deploy the first application component without waiting.
  • the target deployment node updates the deployment status of the first application component to a deployment completion.
  • the parent node after the parent node deploys the second application component, the parent node updates the deployment status of the second application component to deployment completion.
  • the sibling node after the sibling node deploys the third application component, the sibling node updates the deployment status of the third application component to deployment completion.
  • the child node after the child node deploys the fourth application component, the child node updates the deployment status of the fourth application component to a deployment completion.
  • FIG. 1 is a schematic diagram of a network architecture of a cloud platform application deployment system according to an embodiment of the present invention
  • FIG. 1.1 is a schematic diagram of an application deployment model diagram disclosed in an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for deploying an application component according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another application component deployment method disclosed in an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a deployment node according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of another deployment node according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another deployment node according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another deployment node according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a physical machine according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of another physical machine disclosed in an embodiment of the present invention.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the embodiment of the invention discloses an application deployment method and a deployment node, which can reduce the dependence of the deployment node on the server, thereby improving the flexibility of application component deployment. The details are described below separately.
  • FIG. 1 is a schematic diagram of a network architecture of a cloud platform application deployment system according to an embodiment of the present invention.
  • the cloud platform application deployment system includes: a management server, multiple deployment nodes, a software server, and a storage server.
  • the application component deployment method disclosed in the embodiment of the present invention may be executed.
  • the management server (such as the cloud platform application deployment server) is configured to deliver deployment instructions for indicating deployment of the application to any one of the multiple deployment nodes, where the application may include multiple application components, each of which Application components are used to implement some of the functionality of the application.
  • the deployment node may include, but is not limited to, a virtual machine (VM), a container (Docker), or a physical machine.
  • VM virtual machine
  • Docker container
  • the deployment node considers the parent-child relationship when deploying the application component, which is reflected in the deployment order of the application component in the deployment.
  • the deployment node A is a child node of the deployment node B
  • the application component on the node B is deployed.
  • B must be installed before you can install application component A on deployment node A.
  • the hierarchical relationship also includes a sibling relationship, and the deployment node having the sibling relationship may not consider the installation order when deploying the application component.
  • the database management data model such as hierarchical model and mesh model
  • the parent node the parent node
  • the child node the child node
  • the level is called the siblings node.
  • the parent-child relationship between the deployment nodes is essentially a dependency between the application components to be installed on the deployment node.
  • the application node consists of two application components: the application orchestration scheduler and MySQL, and the application orchestration scheduler depends on the installation of MySQL.
  • the deployment node of the application orchestration scheduler to be installed depends on the MySQL to be installed.
  • the hierarchical relationship and the corresponding relationship may be presented in the form of a deployment model diagram, where the deployment model diagram is a deployment model diagram of the application to be deployed, where the deployment model diagram may be stored in the storage server; or the hierarchical relationship and The correspondence may exist in a deployment instruction issued by the management server in the form of a data packet or a frame.
  • the deployment model diagram may also carry an address of the application software package, where the application software package is used by the deployment node to obtain the application software package according to the address of the application software package.
  • the software server is used to store application software packages, dependent packages, etc.
  • the application software package may be a general application software package, such as a VM image, a MySQL Docker image or a software package, a nginx image or a software package, or User-specific application package.
  • the storage server may include, but is not limited to, a key value storage system etcd, a relational database management system MySQL, and a configuration file (config).
  • the storage server can store the hierarchical relationship between multiple deployment nodes and the correspondence between the application components of the application and the deployment nodes included in the hierarchical relationship.
  • the storage server may also record the deployment status of application components deployed on each deployment node, which may include, but is not limited to, undeployed, deployed, deployed, deployed, and failed.
  • the foregoing storage server may be integrated as a module on a management server or a software server, or the storage server may be separately deployed.
  • the user when a user needs to deploy an application on a cloud platform application deployment system, the user may specify a required deployment node in advance, and each deployment node needs to install an application component, and set a deployment node.
  • Information such as VM image, application package, installation method, etc.
  • the management server can send the application software package (usually the user-specific application software package) of the application to be deployed to the software server, so that the software server stores the application software package of the application to be deployed, and the subsequent deployment node can be from the software server.
  • the application software package usually the user-specific application software package
  • the management server may send a deployment instruction to the target deployment node (ie, any one of the deployment nodes) of the multiple deployment nodes, to trigger the target deployment node to determine the parent node of the target deployment node and the application component corresponding to the parent node according to the deployment instruction, and Determining the sibling nodes of the target deployment node and the application components corresponding to the sibling nodes, and determining the child nodes of the target deployment node and the application components corresponding to the child nodes. Further, the target deployment node instructs the parent node, the sibling node, and the child node to deploy the application component, and the target deployment node deploys the application component until the entire application is deployed.
  • the target deployment node ie, any one of the deployment nodes of the multiple deployment nodes
  • FIG. 1.1 is a schematic diagram of an application deployment model diagram disclosed in an embodiment of the present invention.
  • the application deployment model diagram is used to record a hierarchical relationship between multiple deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship.
  • the application deployment model diagram is a directed graph with arrows indicating dependencies.
  • Figure 1.1 includes multiple deployment nodes, such as V1, V2, V3, V4, and V5, where each deployment node corresponds to an application component.
  • Figure 1.1 also includes V0, where V0 is a virtual starting node and does not represent any one deployment node.
  • V0 is mainly used to ensure that there are no isolated deployment nodes in the deployment model diagram. For example, if there is no V0, V3 will become isolated. node.
  • the directed lines with arrows indicate dependencies (ie, parent-child relationships). In any dependency, the starting point depends on the end point, the starting point can be called a child node, and the ending point can be called a parent node.
  • V4 depends on V1 and V2, V4 is a child of V1 and V2, and V1 and V2 are both parent nodes of V4. If V4 is to install application components, it must be after the application components on V1 and V2 are installed. , V4 can install application components.
  • V5 depends on V2, V2 is the parent node of V5, and V5 is the child node of V2. Only after the application components on V2 are installed, V5 can install the application components.
  • V0 is the parent node of V1/V2/V3, but since V0 is a virtual start node, it does not represent any deployment node. V0 does not need to install application components. The system can install the application component of V0 by default.
  • V1/V2/V3 installs application components without waiting for V0 to install application components.
  • V1/V2/V3 can directly install their own application components.
  • deployment model diagram can also represent the fraternal relationship between the deployment nodes.
  • V4 and V5 are sibling nodes
  • V1, V2, and V3 are sibling nodes.
  • the management server may send the first deployment instruction to any deployment node (referred to as a target deployment node) of the application component to be installed, and the target deployment node receives the first deployment instruction, and determines a hierarchical relationship between the target deployment node and other deployment nodes.
  • the target deployment node may determine whether the parent node of the target deployment node exists according to the hierarchical relationship, and if the parent node exists, further determine the parent node.
  • Whether to deploy the second application component if the parent node does not deploy the second application component, send a second deployment instruction to the parent node, and after the parent node receives the second deployment instruction, the parent node deploys the second application component.
  • the target deployment node When the target deployment node detects that the parent node has deployed the second application component, the target deployment node deploys the first application component according to the corresponding relationship. Further, the target deployment node determines the sibling node of the target deployment node according to the hierarchical relationship, and also determines the sibling node. The third application component is not deployed, and the target deployment node may send a third deployment instruction to the sibling node, and after the sibling node receives the third deployment instruction, the sibling node deploys the third application component.
  • the target deployment node determines the child node of the target deployment node according to the hierarchical relationship, and further determines that the fourth application component is not deployed by the child node, and the target deployment node may send the child node to the child node.
  • the fourth deployment instruction after the child node receives the fourth deployment instruction, the sibling node deploys the fourth application component. Once the application components of all deployed nodes are deployed, the deployment of the entire application is complete.
  • the deployment node needs to first detect whether the dependent parent node completes the deployment of the application component, and if the parent node completes the deployment, the deployment node can Deploy application components. It can be seen that during the entire application deployment process, the deployment node reduces the dependence on the server, and each deployment node does not need to wait for the server to deploy the deployment task, but can automatically deploy the application component, thereby improving the flexibility of application component deployment.
  • the application deployment model diagram needs to be changed in the following two scenarios: the application component elastic reduction scenario and the application component elastic expansion scenario.
  • At least two deployment nodes are processed by multiple deployment nodes.
  • at least one deployment node needs to be deleted, and the deployment node changes.
  • the hierarchical relationship between the expansion node of the deployment node and other deployment nodes is the same as the hierarchical relationship between the deployment node and other deployment nodes.
  • V1 expansion node V6 In this case, V6 and V1, V2, and V3 are siblings, V6 is the parent of V4, and the parent of V6. Is the virtual start node V0.
  • the application deployment model map needs to be updated.
  • FIG. 2 is a schematic flowchart of an application deployment method according to an embodiment of the present invention. The method is used to deploy multiple application components of an application on multiple deployment nodes. As shown in FIG. 2, the method includes the following steps:
  • the target deployment node receives a first deployment instruction sent by the management server.
  • the target deployment node is one of the multiple deployment nodes, and the deployment node that sends the first deployment instruction by the management server can be regarded as the target deployment node.
  • the target deployment node may be any one of V1, V2, V3, V4, and V5. Assuming that the management server delivers the first deployment instruction to V4, V4 can be regarded as the target deployment node.
  • the first deployment instruction is used to indicate a deployment application, such as a Docker container application management system application and a guestbook application.
  • the first deployment instruction may carry a hierarchical relationship between the target deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship.
  • the first deployment instruction may carry an application identifier of the application.
  • the target deployment node determines, according to the first deployment instruction, a relative node of the target deployment node, where the relative node includes a parent node, and a second application component corresponding to the parent node among the plurality of application components.
  • the application components to be installed on the deployment node have dependencies
  • the application components to be installed must be installed in a certain order. Therefore, before deploying an application component to each deployment node, it is necessary to confirm whether the deployment node has a parent node and whether the parent node has deployed application components, because the deployment of the application component on each deployment node depends on the application on the parent node of the deployment node.
  • the deployment of a component that is, only if the parent node of the deployment node has deployed the application component, the deployment node can deploy the application component.
  • the target deployment node After the target deployment node receives the first deployment instruction sent by the management server, before deploying the first application component, the target deployment node needs to first determine the relative node of the target deployment node according to the first deployment instruction, and the relative node includes the parent node, and more The second application component of the application component corresponding to the parent node.
  • the target deployment node determines, according to the first deployment instruction, a relative node of the target deployment node, where the relative node includes a parent node, and the second application component corresponding to the parent node among the multiple application components includes:
  • the target deployment node parses the first deployment instruction, obtains a hierarchical relationship between the target deployment node and other deployment nodes, and a correspondence between the application components of the application and the deployment nodes included in the hierarchical relationship;
  • the target deployment node determines a parent node of the target deployment node according to the hierarchical relationship, and determines a second application component corresponding to the parent node among the plurality of application components according to the correspondence relationship.
  • the first deployment instruction carries a hierarchical relationship between the target deployment node and the other deployment nodes, and a correspondence between the application components of the application and the deployment nodes included in the hierarchical relationship, so that the target deployment node
  • the first deployment instruction can be parsed and the hierarchical relationship and the corresponding relationship are extracted directly, and the hierarchical relationship is determined.
  • the hierarchical relationship and the corresponding relationship may be presented in the form of an application deployment model diagram (such as the application deployment model diagram shown in FIG. 1.1), where the application deployment model diagram is a deployment model diagram of the application, and the application deployment model diagram may be Exist in the first deployment instruction; or the hierarchical relationship and the corresponding relationship may exist in the first deployment instruction in the form of a data packet or a frame.
  • an application deployment model diagram such as the application deployment model diagram shown in FIG. 1.1
  • the application deployment model diagram is a deployment model diagram of the application
  • the application deployment model diagram may be Exist in the first deployment instruction
  • the hierarchical relationship and the corresponding relationship may exist in the first deployment instruction in the form of a data packet or a frame.
  • the first deployment instruction carries an application identifier of the application
  • the target deployment node determines, according to the first deployment instruction, a relative node of the target deployment node, where the relative node includes a parent node, and multiple application components
  • the second application component corresponding to the parent node includes:
  • the target deployment node sends a deployment relationship acquisition request carrying the application identifier to the storage server, and the deployment relationship acquisition request is used to request the deployment relationship of the application.
  • the target deployment node receives the deployment relationship of the application sent by the storage server in response to the deployment relationship acquisition request, and the application deployment relationship includes a hierarchical relationship between the target deployment node and other deployment nodes, and between the application components included in the application and the deployment nodes included in the hierarchical relationship.
  • Correspondence relationship
  • the target deployment node determines a parent node of the target deployment node according to the hierarchical relationship, and determines a second application component corresponding to the parent node among the plurality of application components according to the correspondence relationship.
  • the deployment relationship of the application is pre-stored in the storage server, and the deployment relationship of the application includes a hierarchical relationship between the target deployment node and other deployment nodes, and deployment included in the application component and the hierarchical relationship of the application.
  • the correspondence between the nodes after the target deployment node receives the first deployment instruction, the target deployment node can obtain the hierarchical relationship between the target deployment node and other deployment nodes from the storage server, and the application component and the hierarchical relationship of the application include The corresponding relationship between the deployment nodes, so that the target deployment node can determine the parent node of the target deployment node according to the hierarchical relationship, and determine the second application component corresponding to the parent node among the plurality of application components according to the correspondence relationship.
  • the system defaults to the deployment state of the virtual start node, and the target deployment node that depends on the virtual start node may directly perform step 204.
  • the target deployment node sends a second deployment instruction to the parent node.
  • the second deployment instruction is used to instruct the parent node to deploy the second application component.
  • the parent node may obtain the application software package of the second application component from the storage server, and use the application software package to deploy the second application component.
  • the parent node needs to determine, according to the second deployment instruction, whether the parent node has the parent node of the parent node and whether the parent node of the parent node exists.
  • the application component is deployed. If the parent node of the parent node exists and the parent node of the parent node does not deploy the application component, the parent node needs to wait for the parent node's parent node to deploy the application component before the parent node can deploy the application component.
  • the target deployment node If the target deployment node detects that the parent node has deployed the second application component, the target deployment node deploys the first application component according to the first deployment instruction.
  • the first application component is an application component corresponding to the target deployment node among the plurality of application components.
  • each deployment node may record the deployment status of the application components deployed on the deployment node in the storage server, so that other deployment nodes can detect any deployment node in real time from the storage server.
  • the deployment of the application components is performed using the deployment state of the components and based on the deployment state of the application components of the deployment node.
  • the deployment status may include, but is not limited to, undeployed, deployed, deployed, deployed, and failed.
  • the parent node may update the deployment state of the second application component to the deployment completion.
  • the target deployment node may query the deployment status of the application component of the parent node from the storage server. If the deployment status of the application component of the parent node is the deployment completion, it may be determined that the parent application has deployed the second application component.
  • the parent node can actively notify the target deployment node, so that the target deployment can also determine that the parent node has deployed the second application component.
  • the target deployment node may determine the first application component according to the correspondence between the application component of the application and the deployment node included in the hierarchical relationship, and obtain the first application component from the software server.
  • An application package of the first application component deploys the first application component using an application package of the first application component.
  • the target deployment node may update the deployment status of the first application component to the deployment completion.
  • the target deployment node determines, according to the first deployment instruction, a third application component that is corresponding to the sibling node among the multiple application components.
  • the method for determining, by the target deployment node, the third application component corresponding to the sibling node among the multiple application components according to the first deployment instruction is specifically:
  • the target deployment node parses the first deployment instruction, obtains a hierarchical relationship between the target deployment node and other deployment nodes, and a correspondence between the application components of the application and the deployment nodes included in the hierarchical relationship;
  • the target deployment node determines the sibling node of the target deployment node according to the hierarchical relationship, and determines a third application component corresponding to the sibling node among the plurality of application components according to the correspondence relationship.
  • the first deployment instruction carries the application identifier of the application, and the manner in which the target deployment node determines the third application component corresponding to the sibling node among the multiple application components according to the first deployment instruction is specifically:
  • the target deployment node sends a deployment relationship acquisition request carrying the application identifier to the storage server, and the deployment relationship acquisition request is used to request the deployment relationship of the application.
  • the target deployment node receives the deployment relationship of the application sent by the storage server in response to the deployment relationship acquisition request, and the application deployment relationship includes a hierarchical relationship between the target deployment node and other deployment nodes, and between the application components included in the application and the deployment nodes included in the hierarchical relationship.
  • Correspondence relationship
  • the target deployment node determines the sibling node of the target deployment node according to the hierarchical relationship, and determines a third application component corresponding to the sibling node among the plurality of application components according to the correspondence relationship.
  • the target deployment node sends a third deployment instruction to the sibling node when the target deployment node detects that the parent node has deployed the second application component.
  • the third deployment instruction is used to instruct the sibling node to deploy the third application component.
  • the sibling node may obtain an application software package of the third application component from the storage server, and use the application software package to deploy the third application component.
  • the sibling node needs to determine, according to the third deployment instruction, whether the sibling node has a parent node of the sibling node and a parent of the sibling node. Whether the node deploys the application component. If the parent node of the sibling node exists and the parent node of the sibling node does not deploy the application component, the sibling node needs to wait for the parent node of the sibling node to deploy the application component, and the sibling node can deploy the application. Component.
  • the sibling node After the third application component is deployed by the sibling node, the sibling node updates the deployment status of the third application component to the deployment completion.
  • the target deployment node may first detect whether the next sibling node deploys the application component, and if the sibling node does not deploy the application component, the target deployment node The third deployment instruction may be sent to the sibling node. Otherwise, the target deployment node does not need to send the third deployment instruction to the sibling node. This saves system resources.
  • the target deployment node determines, according to the first deployment instruction, a fourth application component corresponding to the child node among the multiple application components.
  • the manner in which the target deployment node determines the fourth application component corresponding to the child node in the multiple application components according to the first deployment instruction is similar to the foregoing method, and details are not described herein again.
  • the target deployment node may determine, according to the first deployment instruction, a fourth application component corresponding to the child node among the multiple application components.
  • the target deployment node sends a fourth deployment instruction to the child node.
  • the fourth deployment instruction is used to instruct the child node to deploy the fourth application component.
  • the child node may obtain an application software package of the fourth application component from the storage server, and use the application software package to deploy the fourth application component.
  • the child node may update the deployment state of the fourth application component to the deployment completion.
  • the child node needs to determine, according to the fourth deployment instruction, whether the child node has the parent node of the child node and whether the parent node of the sibling node exists.
  • the application component is deployed. If the parent node of the child node exists and the parent node of the child node does not deploy the application component, the child node needs to wait for the parent node of the child node to deploy the application component, and the child node can deploy the application component.
  • the target deployment node may first detect whether the child node is deployed with the application component, and if the child node does not have the application component deployed, the target deployment node may The fourth deployment instruction is sent to the child node, otherwise, the target deployment node does not need to send the fourth deployment instruction to the child node. This saves system resources.
  • each deployment node the parent node of the target deployment node preferentially completes the installation of the application component, and secondly, the target deployment node completes the installation of the application component, and finally the sibling node of the target deployment node. / child node completes the installation of the application component.
  • the target deployment node is V4 in Figure 1.1
  • the application deployment model diagram is the application deployment model diagram shown in Figure 1.1.
  • the V4 receiving management server sends the deployment instruction for indicating the deployment of the application, and obtains the application deployment model diagram shown in Figure 1.1
  • the V4 detects whether the parent node of the V4 exists according to the application deployment model diagram shown in Figure 1.1, from Figure 1.1. It can be seen that the parent nodes of V4 are V1 and V2.
  • V4 detects the application components of V1 and V2 from the storage server.
  • V4 can send deployment instructions to V1 and V2 to indicate the deployment of application components.
  • V1 further detects whether there is a parent node of V1 according to the application deployment model diagram shown in FIG. 1.1. It can be seen from the application deployment model diagram shown in FIG. 1.1 that the parent node of V1 is V0. V0 is the virtual start node, and the deployment state of the application component of the system default V0 is installation completion. Therefore, V1 can directly obtain the application package of the application component corresponding to V1 from the software server and execute the deployment operation of the application component, corresponding to V1. After the application component is deployed, V1 updates the deployment status of the V1 application component to the installation on the storage server.
  • V2 further detects whether there is a parent node of V2 according to the application deployment model diagram shown in Figure 1.1.
  • the parent node of V2 For V0 V2 can directly obtain the application package of the application component of V2 from the software server and execute the deployment operation of the application component.
  • V2 deploys the application component of V2 on the storage server. The status update is complete for the installation.
  • V4 detects the deployment status of the application components on V1 and V2. After the deployment is complete, V4 can obtain the application package of the application component corresponding to V4 and perform the deployment operation of the application component. After the deployment is complete, V4 updates the deployment status of the V4 application components to the installation on the storage server.
  • V1 can detect whether there is a V1 sibling node or a V1 child node according to the application deployment model diagram shown in Figure 1.1.
  • V2 can also According to the application deployment model diagram shown in Figure 1.1, it is detected whether there is a sibling node of V2 or a child node of V2. It can be seen from the application deployment model diagram shown in Figure 1.1 that V1, V2, and V3 are sibling nodes, and V5 is V2. Child node.
  • both V1 and V2 may send a deployment instruction to the V3 to indicate deployment of the application component, and V2 may also send a deployment instruction to the V5 to indicate deployment of the application component.
  • the V1 or V2 can detect the deployment status of the application components of the V3. If the deployment status of the application components of the V3 is not installed, the V1 or V2 is sent to the V3.
  • the V1 or V2 does not need to send a deployment instruction for instructing the deployment of the application component to the V3, so that the repeated transmission to the V3 can be avoided. Deploy instructions to save system resources.
  • V3 After V3 receives the deployment instruction for indicating the deployment of the application component, and obtains the application deployment model diagram shown in Figure 1.1, V3 detects that the parent node of V3 is the virtual start node V0, and directly obtains the application package of the application component corresponding to V3. In turn, the deployment operation of the application component is performed. After the V3 is deployed, the deployment status of the V3 application component is updated to the deployment completion on the storage server. Further, when V3 detects that there is no V3 sibling node or V3 child node, V3 does not need to perform any operations.
  • V5 After V5 receives the deployment instruction for instructing to deploy the application component, and obtains the application deployment model diagram shown in Figure 1.1, V5 detects that the V5-dependent parent node V2 has completed the deployment of the application component, and V5 directly obtains the application component corresponding to V5. The application package then performs the deployment of the application components. After the deployment of the V5, the deployment status of the V5 application component is updated to the deployment completion on the storage server. Further, the V5 detects that the V5 sibling node V4 has completed the deployment of the application component, and the V5 does not have the V5 child node. When V5 does not need to do anything.
  • the V4 preferentially receives the deployment instruction sent by the management server, and obtains the application deployment model map.
  • the parent node V1/V2 of the V4 first performs the deployment operation of the application component, and after the application component deployment on the V1/V2 is completed, V3/V4/V5 Simultaneous execution of the deployment of application components.
  • the deployment node reduces the dependence on the server, and multiple deployment nodes can flexibly execute the deployment operation of the application component, which not only simplifies the business logic of the cloud platform application deployment system, but also improves the cloud platform application deployment system. The ability to deploy applications concurrently, while also improving the efficiency of application deployment.
  • the app will be up and running. However, during the post-application run, there may be cases where the application component fails, or the application component needs to be upgraded. For these situations, the deployment node can perform the corresponding operations autonomously, reducing the dependency on the server.
  • the method further includes:
  • the target deployment node updates the deployment status of the first application component to a fault state
  • the target deployment node After the target deployment node redeploys the first application component, the target deployment node updates the deployment status of the first application component to deployment completion.
  • a failure of the operation of the first application component of the target deployment node may occur, where the operation of the first application component is faulty.
  • the first is that the target deployment node where the first application component is located fails, and the second is that the first application component itself fails.
  • the target deployment node itself fails, and the present invention does not consider it.
  • the present invention mainly considers the second case.
  • the target deployment node needs to update the deployment status of the first application component of the target deployment node to a fault state, so as to be deployed with the target.
  • the other deployment nodes associated with the node obtain the deployment status of the application components of the target deployment node.
  • the target deployment node may obtain the application package of the first application component from the software server, redeploy the first application component, and after the target deployment node redeploys the first application component, the target deployment node will be the first application component.
  • the deployment status update is complete for deployment.
  • the target deployment node can automatically perform the redeployment operation of the application component, reducing the dependency on the server, and realizing the automatic repair of the fault.
  • the method further includes:
  • the target deployment node receives an upgrade instruction sent by the management server, where the upgrade instruction instructs the target deployment node to upgrade the first application component;
  • the target deployment node updates the deployment status of the first application component to undeployed
  • the target deployment node performs an upgrade operation on the first application component according to the upgrade instruction
  • the target deployment node updates the deployed state of the first application component that has been upgraded to the deployment completion.
  • the first application component of the target deployment node may need to be upgraded because the new function of the service is online or needs to be repaired. At this time, the first application component deployed on the current target deployment node is no longer available. If the application component is not installed by default, the deployment status of the first application component of the target deployment node needs to be updated to undeployed, and the upgrade operation is performed on the first application component according to the upgrade instruction; After the upgrade operation of an application component is completed, the deployment status of the upgraded first application component needs to be updated to the deployment completion.
  • the target deployment node may direct the parent node of the target deployment node to deploy the application component, and then the target deployment node may also deploy the application component.
  • the target deployment node can also guide the sibling nodes of the target deployment node and the child nodes to deploy the application components. The whole process reduces the dependence on the server, and the deployment node can automatically deploy the application components, thereby improving the flexibility of application component deployment.
  • FIG. 3 is a schematic flowchart of another application deployment method disclosed in an embodiment of the present invention.
  • the method is used to deploy multiple application components of an application on multiple deployment nodes. As shown in FIG. 3, the method includes the following steps:
  • the target deployment node receives a first deployment instruction sent by the management server.
  • the target deployment node is one of multiple deployment nodes, and the first deployment instruction is used to indicate that the application is deployed.
  • the target deployment node If the target deployment node detects that the parent node of the target deployment node has deployed the second application component, the target deployment node deploys the first application component according to the first deployment instruction.
  • the first application component is an application component corresponding to the target deployment node among the plurality of application components
  • the second application component is an application component corresponding to the parent node among the plurality of application components.
  • the target deployment node determines, according to the first deployment instruction, a third application component that is corresponding to the sibling node of the target deployment node among the multiple application components, and sends a third deployment instruction to the sibling node.
  • the third deployment instruction is used to instruct the sibling node to deploy the third application component.
  • the target deployment node determines, according to the first deployment instruction, that the third application component corresponding to the sibling node of the target deployment node among the multiple application components includes:
  • the target deployment node parses the first deployment instruction, obtains a hierarchical relationship between the target deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the target deployment node determines a sibling node of the target deployment node according to the hierarchical relationship, and determines a third application component corresponding to the sibling node among the plurality of application components according to the correspondence relationship.
  • the first deployment instruction carries an application identifier of the application
  • the target deployment node determines, according to the first deployment instruction, a corresponding one of the multiple application components that is the same as the sibling node of the target deployment node.
  • the third application component includes:
  • the target deployment node sends a deployment relationship acquisition request that carries the application identifier to the storage server, where the deployment relationship acquisition request is used to request to obtain a deployment relationship of the application;
  • the target deployment node receives a deployment relationship of the application that is sent by the storage server in response to the deployment relationship acquisition request, where the deployment relationship of the application includes a hierarchical relationship between the target deployment node and other deployment nodes, and the Correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the target deployment node determines a sibling node of the target deployment node according to the hierarchical relationship, and determines a third application component corresponding to the sibling node among the plurality of application components according to the correspondence relationship.
  • the target deployment node determines, according to the first deployment instruction, a fourth application component that is corresponding to the child node of the target deployment node among the multiple application components, and sends a fourth deployment instruction to the child node.
  • the fourth deployment instruction is used to instruct the child node to deploy the fourth application component.
  • the target deployment node determines the child nodes of the plurality of application components and the target deployment node according to the first deployment instruction.
  • the manner of the corresponding fourth application component is similar to the manner in which the target deployment node determines the third application component of the plurality of application components corresponding to the sibling node of the target deployment node according to the first deployment instruction, and details are not described herein again.
  • the target deployment node may directly wait for the first application according to the first deployment instruction.
  • the component at the same time, the target deployment node can also guide the sibling node of the target deployment node and the child node to deploy the application component, the whole process reduces the dependence on the server, and the deployment node can automatically deploy the application component, thereby improving the flexibility of application component deployment.
  • FIG. 4 is a schematic structural diagram of a deployment node according to an embodiment of the present invention.
  • the deployment node may be used to perform some or all of the steps in the method described in FIG. , will not repeat them here.
  • the deployment node 400 can include:
  • the receiving unit 401 is configured to receive a first deployment instruction sent by the management server, where the deployment node is one of the multiple deployment nodes, where the first deployment instruction is used to indicate that the application is deployed;
  • a first determining unit 402 configured to determine, according to the first deployment instruction, a relative node of the deployment node, where the relative node includes a parent node, and a second application corresponding to the parent node among the multiple application components Component
  • a sending unit 403 configured to send a second deployment instruction to the parent node, where the second deployment instruction is used to instruct the parent node to deploy the second application component;
  • a deployment unit 404 configured to deploy, according to the first deployment instruction, a first application component, where the deployment node detects that the parent node has deployed the second application component, where the first application component is An application component corresponding to the deployment node among the plurality of application components.
  • FIG. 5 is a schematic structural diagram of another deployment node according to an embodiment of the present invention.
  • the deployment node may be used to perform some or all of the steps in the method described in FIG. Description, no longer repeat here.
  • the deployment node shown in FIG. 5 is further optimized based on the deployment node shown in FIG. 4, and the deployment node shown in FIG. 5 is compared with the deployment node shown in FIG.
  • the relative node of the deployment node is determined according to the first deployment instruction, the relative node includes a parent node, and the plurality of application components and the An aspect of the second application component corresponding to the parent node, the first determining unit 402 is specifically configured to:
  • Parsing the first deployment instruction obtaining a hierarchical relationship between the deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the kinship node further includes a sibling node
  • the deployment node shown in FIG. 5 may further include:
  • a second determining unit 405, configured to determine, according to the first deployment instruction, a third application component that is corresponding to the sibling node among the multiple application components;
  • the sending unit 403 is further configured to: when the deployment node detects that the parent node has deployed the second application component, send a third deployment instruction to the sibling node, where the third deployment instruction is used Instructing the sibling node to deploy the third application component.
  • the deployment node shown in FIG. 5 may further include:
  • a first updating unit 406 configured to update a deployment state of the first application component to a fault state if a running of the first application component fails;
  • the deployment unit 404 is further configured to redeploy the first application component
  • the first update unit 406 is further configured to update the deployment status of the first application component to the deployment completion after the deployment node redeploys the first application component.
  • FIG. 6 is a schematic structural diagram of another deployment node according to an embodiment of the present invention.
  • the deployment node may be used to perform some or all of the steps in the method described in FIG. 2 . Description, no longer repeat here.
  • the deployment node shown in FIG. 6 is further optimized based on the deployment node shown in FIG. 4.
  • the deployment node shown in FIG. 6 is compared with the deployment node shown in FIG. In addition to all the units of the deployment node shown in FIG.
  • the first deployment instruction carries an application identifier of the application
  • the relative node of the target deployment node is determined according to the first deployment instruction, and the relative The node includes a parent node, and an aspect of the second application component of the plurality of application components corresponding to the parent node, where the first determining unit 402 is specifically configured to:
  • the receiving unit 401 Receiving, by the receiving unit 401, a deployment relationship of the application that is sent by the storage server in response to the deployment relationship acquisition request, where the deployment relationship of the application includes a hierarchical relationship between the deployment node and other deployment nodes, and the Correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the user node further includes a child node.
  • the deployment node shown in FIG. 6 may further include:
  • a third determining unit 407 configured to determine, according to the first deployment instruction, a fourth application component that is corresponding to the child node among the multiple application components;
  • the sending unit 403 is further configured to send a fourth deployment instruction to the child node, where the fourth deployment instruction is used to instruct the child node to deploy the fourth application component.
  • the receiving unit 401 is further configured to receive an upgrade instruction sent by the management server, where the upgrade instruction instructs the deployment node to upgrade the first application component;
  • the deployment node shown in Figure 6 can also include:
  • a second update unit 408, configured to update a deployment status of the first application component to undeployed
  • the executing unit 409 is configured to perform an upgrade operation on the first application component according to the upgrade instruction
  • the second update unit 408 is further configured to update the deployed state of the upgraded first application component to the deployment completion.
  • the deployment node 400 described in FIG. 4 to FIG. 6 in the whole process of application deployment, the deployment node reduces the dependency on the server, and the deployment node can automatically deploy the application component, thereby improving the flexibility of application component deployment.
  • FIG. 7 is a schematic structural diagram of another deployment node according to an embodiment of the present disclosure, where the deployment node may be used to perform some or all of the steps in the method described in FIG. Description, no longer repeat here.
  • the deployment node 700 can include:
  • the receiving unit 701 is configured to receive a first deployment instruction sent by the management server, where the deployment node is one of the multiple deployment nodes, where the first deployment instruction is used to indicate that the application is deployed;
  • a deployment unit 702 configured to deploy, according to the first deployment instruction, a first application component, where the deployment node detects that a parent node of the deployment node has deployed a second application component, where the first application component is An application component corresponding to the deployment node among the plurality of application components, where the second application component is an application component corresponding to the parent node among the plurality of application components;
  • a determining sending unit 703 configured to determine, according to the first deployment instruction, a third application component that is corresponding to the sibling node of the deployment node among the multiple application components, and send a third deployment instruction to the sibling node, where The third deployment instruction is used to indicate that the sibling node deploys the third application component; or is configured to determine, according to the first deployment instruction, a fourth one of the plurality of application components that corresponds to a child node of the deployment node.
  • An application component sending a fourth deployment instruction to the child node, the fourth deployment instruction being used to instruct the child node to deploy the fourth application component.
  • the determining sending unit 703 is specifically configured to:
  • Parsing the first deployment instruction obtaining a hierarchical relationship between the deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the first deployment instruction carries an application identifier of the application, and determining, according to the first deployment instruction, a third application corresponding to a sibling node of the deployment node among the multiple application components.
  • the aspect of the component, the determining sending unit 703 is specifically configured to:
  • the receiving unit 701 Receiving, by the receiving unit 701, a deployment relationship of the application that is sent by the storage server in response to the deployment relationship acquisition request, where the deployment relationship of the application includes a hierarchical relationship between the deployment node and other deployment nodes, and the Correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the deployment node reduces the dependency on the server, and the deployment node can automatically deploy the application component, thereby improving the flexibility of application component deployment.
  • the units described in FIG. 4 to FIG. 7 may be processes or threads.
  • the foregoing units are schematically divided, and some units may be one, for example, the first determining unit 402,
  • the second determining unit 405 and the third determining unit 407 may be one unit, and the first updating unit 406 and the second updating unit 408 may be a unit, which is not limited in the embodiment of the present invention.
  • the receiving unit 401 can be implemented by the receiver 802 in FIG. 8, and the sending unit 403 can be implemented by the transmitter 803 in FIG. a determining unit 402,
  • the deployment unit 404, the second determining unit 405, the first updating unit 406, the third determining unit 407, the second updating unit 408, and the executing unit 409 may be implemented by the processor 801 in FIG.
  • the receiving unit 701 can be implemented by the receiver 902 of FIG. 9, the deploying unit 702 can be implemented by the processor 901 of FIG. 9, and the determining transmitting unit 703 can be implemented by the transmitter 903 of FIG. .
  • FIG. 8 is a schematic structural diagram of a physical machine according to an embodiment of the present invention, where a plurality of deployment nodes are deployed on the physical machine 800, which can be used to execute the application component deployment method disclosed in FIG. All or part of the steps, the specific description will be described with reference to FIG. 2, and details are not described herein again.
  • the physical machine 800 may include: at least one processor 801, such as a CPU (Central Processing Unit), at least one receiver 802, at least one transmitter 803, and a memory 804, where The processor 801, the receiver 802, the transmitter 803, and the memory 804 are respectively connected to the communication bus.
  • processor 801 such as a CPU (Central Processing Unit)
  • the processor 801, the receiver 802, the transmitter 803, and the memory 804 are respectively connected to the communication bus.
  • the receiver 802 and the transmitter 803 may be integrated together, such as a transceiver, and the transceiver may be at least one of an antenna, a communication interface, and the like.
  • the receiver and the transmitter are used to deploy nodes, or deploy nodes and storage servers, and exchange information between the deployment nodes and the management server, and have different uses and specific forms.
  • the at least one transmitter 803 may include a communication interface or a program interface, such as an interface for inter-virtual machine or container to communicate with each other;
  • the parent node of the deployment node is deployed on a different physical machine, and the at least one transmitter 803 may include a hardware device such as an antenna.
  • the receiver is no longer exemplified here. among them,
  • the memory 804 may be a high speed RAM memory or a non-volatile memory. It will be understood by those skilled in the art that the structure of the physical machine 800 shown in FIG. 8 does not constitute a limitation of the present invention, and it may be a bus-shaped structure or a star-shaped structure, and may also include the same as shown in FIG. More or fewer parts, or some parts, or different parts.
  • the processor 801 is a control center of the physical machine 800, and may be a central processing unit (CPU).
  • the processor 801 connects various parts of the entire physical machine 800 by using various interfaces and lines, and is stored or executed by being stored or executed.
  • the deployment node detects that the parent node has deployed the second application component, deploying a first application component according to the first deployment instruction, where the first application component is the multiple application components An application component corresponding to the deployment node.
  • the processor 801 is specifically configured to:
  • Parsing the first deployment instruction obtaining a hierarchical relationship between the deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the first deployment instruction carries an application identifier of the application
  • the relative node of the deployment node is determined according to the first deployment instruction, where the relative node includes a parent node, and the multiple An aspect of the second application component corresponding to the parent node in the application component, the processor 801 is specifically configured to:
  • a deployment relationship of the application that is sent by the storage server in response to the deployment relationship acquisition request, where a deployment relationship of the application includes a hierarchical relationship between the deployment node and other deployment nodes, and the Correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the relative node further includes a sibling node
  • the processor 801 is further configured to perform the following steps:
  • the relative node further includes a child node, and after deploying the first application component according to the first deployment instruction, the processor 801 is further configured to:
  • the processor 801 is further configured to:
  • the deployment status of the first application component is updated to be deployed.
  • the processor 801 is further configured to:
  • the deployment node can guide the parent node of the deployment node to deploy the application component. Afterwards, the deployment node can also deploy the application component. The deployment node can also guide the sibling node of the deployment node and the child node to deploy the application component, and the whole process reduces the dependence on the server. Deployment nodes can automatically deploy application components to increase the flexibility of application component deployment.
  • FIG. 9 is a schematic structural diagram of another physical machine according to an embodiment of the present invention, where a plurality of deployment nodes are deployed on the physical machine 900, which can be used to execute the application component deployment method disclosed in FIG. All or part of the steps, please refer to FIG. 3 for detailed description, and details are not described herein again.
  • the physical machine 900 may include: at least one processor 901, such as a CPU (Central Processing Unit), at least one receiver 902, at least one transmitter 903, and a memory 904, where The processor 901, the receiver 902, the transmitter 903, and the memory 904 are respectively connected to the communication bus.
  • processor 901 such as a CPU (Central Processing Unit)
  • the processor 901, the receiver 902, the transmitter 903, and the memory 904 are respectively connected to the communication bus.
  • the receiver 902 and the transmitter 903 may be integrated together, such as a transceiver, and the transceiver may be at least one of an antenna, a communication interface, and the like.
  • the receiver and the transmitter are used to deploy nodes, or deploy nodes and storage servers, and exchange information between the deployment nodes and the management server, and have different uses and specific forms.
  • the at least one transmitter 903 may include an interface for communication between the virtual machines or the containers, such as a communication interface or a program interface;
  • the parent node of the deployment node is deployed on a different physical machine, and the at least one transmitter 903 may include a hardware device such as an antenna.
  • the receiver is no longer exemplified here.
  • the memory 904 may be a high speed RAM memory or a non-volatile memory. It will be understood by those skilled in the art that the structure of the physical machine 900 shown in FIG. 9 does not constitute a limitation of the present invention. It may be a bus-shaped structure or a star-shaped structure, and may also include the same as shown in FIG. More or fewer parts, or some parts, or different parts.
  • the processor 901 is a control center of the physical machine 900, and may be a central processing unit (CPU).
  • the processor 901 connects various parts of the entire physical machine 900 by using various interfaces and lines, and is stored or executed by being stored or executed.
  • the deployment node detects that the parent node of the deployment node has deployed the second application component, deploying the first application component according to the first deployment instruction, where the first application component is the multiple application component An application component corresponding to the deployment node, where the second application component is an application component corresponding to the parent node among the multiple application components;
  • the processor is specifically configured to:
  • Parsing the first deployment instruction obtaining a hierarchical relationship between the deployment node and other deployment nodes, and a correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the first deployment instruction carries an application identifier of the application, and determining, according to the first deployment instruction, a third application corresponding to a sibling node of the deployment node among the multiple application components.
  • the processor 901 is specifically configured to:
  • a deployment relationship of the application that is sent by the storage server in response to the deployment relationship acquisition request, where a deployment relationship of the application includes a hierarchical relationship between the deployment node and other deployment nodes, and the Correspondence between application components of the application and deployment nodes included in the hierarchical relationship;
  • the deployment node may deploy the first application component according to the first deployment instruction without waiting.
  • the deployment node can also guide the sibling nodes and child nodes of the deployment node to deploy application components. The whole process reduces the dependence on the server, and the deployment node can automatically deploy application components, thereby improving the flexibility of application component deployment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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

本发明实施例公开了一种应用组件部署方法及部署节点,该方法包括:目标部署节点接收管理服务器发送的第一部署指令;所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;所述目标部署节点向所述父节点发送第二部署指令;在所述目标部署节点检测到所述父节点已部署所述第二应用组件的情况下,所述目标部署节点根据所述第一部署指令部署第一应用组件。实施本发明实施例可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。

Description

一种应用组件部署方法及部署节点
本申请要求于2016年8月19日提交中国专利局、申请号为201610700065.6、发明名称为“一种应用组件部署方法及部署节点”的发明专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及云计算技术领域,尤其涉及一种应用组件部署方法及部署节点。
背景技术
随着云计算技术的发展,涌现出了云计算平台(也称云平台),云平台具有高度并发、用户量大等特性。用户可以根据自己的需要在云平台上部署应用,通常,应用包括多个应用组件,每个应用组件用于实现该应用的部分功能。具体的,用户可以将应用的多个应用组件分别部署在云平台中的多个部署节点上,该部署节点可以是虚拟机或容器。其中,部署节点之间存在父子关系,而部署节点在部署应用组件时会考虑这种关系,具体体现在应用组件在部署中需满足一定的安装顺序,比如:部署节点A是部署节点B的子节点,则部署节点B上的应用组件B必须先安装完,才能安装部署节点A上的应用组件A。
目前,云平台应用部署服务器使用配置管理(Configuration Management,CM)工具,集中控制应用部署的整个过程。这种方式中,各部署节点对云平台应用部署服务器的依赖性较强。例如,如果在整个应用的部署过程中,云平台应用部署系统出现故障,就会出现一部分应用组件无法安装的问题,进而导致整个应用无法完成部署。
发明内容
本发明实施例提供了一种应用组件部署方法及部署节点,可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。
本发明第一方面公开了一种应用部署方法,所述方法用于在多个部署节点上部署应用的多个应用组件,所述方法包括:
目标部署节点接收管理服务器发送的第一部署指令,所述目标部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;所述目标部署节点向所述父节点发送第二部署指令,所述第二部署指令用于指示所述父节点部署所述第二应用组件;在所述目标部署节点检测到所述父节点已部署所述第二应用组件的情况下,所述目标部署节点根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述目标部署节点对应的应用组件。
其中,每个部署节点均可以在存储服务器中记录该部署节点上部署的应用组件的部署状态,这样,每个部署节点均可以在存储服务器检测其他部署节点的部署状态,根据部署 状态来确定其他部署节点是否已部署应用组件,或者,每个部署节点可以主动告知其他部署节点该部署节点上部署应用组件的部署状态。其中,该部署状态可以包括但不限于未部署、部署中、部署完成、部署失败以及故障状态。
其中,每个部署节点部署应用组件之前,需要确认该部署节点是否存在父节点以及该父节点是否已部署应用组件,因为每个部署节点上应用组件的部署依赖于该部署节点的父节点上应用组件的部署,即只有该部署节点的父节点已部署应用组件的情况下,该部署节点才能部署应用组件。
可见,目标部署节点接收管理服务器发送的第一部署指令之后,目标部署节点可以指导该目标部署节点的父节点部署应用组件,之后,目标部署节点也可以部署应用组件,整个过程减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
在一种可选的实施方式中,所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件包括:
所述目标部署节点解析所述第一部署指令,获得所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
所述目标部署节点根据所述层级关系确定所述目标部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
在该可选的实施方式中,第一部署指令中携带目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系,这样,目标部署节点可以解析第一部署指令并直接提取出层级关系以及对应关系,以及根据层级关系确定目标部署节点的父节点,以及根据对应关系确定多个应用组件中与父节点对应的第二应用组件。
其中,该层级关系以及该对应关系可以以应用部署模型图的形式呈现,该部署模型图为该应用的部署模型图,该应用部署模型图可以存在于第一部署指令中;或者,该层级关系以及该对应关系可以以数据包或帧的形式存在于第一部署指令中。
在一种可选的实施方式中,所述第一部署指令携带有所述应用的应用标识,所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件包括:
所述目标部署节点向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;所述目标部署节点接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;所述目标部署节点根据所述层级关系确定所述目标部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
在该可选的实施方式中,存储服务器中预先存储有应用的部署关系,该应用的部署关系包括目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包 括的部署节点间的对应关系,目标部署节点在接收到第一部署指令之后,目标部署节点就可以从存储服务器中获取目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系,这样,目标部署节点就可以根据层级关系确定目标部署节点的父节点,以及根据对应关系确定多个应用组件中与父节点对应的第二应用组件。
在一种可选的实施方式中,所述亲属节点还包括兄弟节点,所述方法还包括:
所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述兄弟节点对应的第三应用组件;在所述目标部署节点检测到所述父节点已部署所述第二应用组件情况下,所述目标部署节点向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件。
需要说明的是,目标部署节点的父节点已部署第二应用组件之后,目标部署节点部署第一应用组件,同时,目标部署节点可以向目标部署节点的兄弟节点发送第三部署指令,以触发兄弟节点部署第三应用组件;
或者,目标部署节点部署第一应用组件完成之后,再向目标部署节点的兄弟节点发送第三部署指令,以触发兄弟节点部署第三应用组件。
其中,“目标部署节点根据第一部署指令确定多个应用组件中与兄弟节点对应的第三应用组件”的方式与上述“目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件”的方式类似,在此不再赘述,具体请参见上面的描述。
在一种可选的实施方式中,所述亲属节点还包括子节点,在所述目标部署节点根据所述第一部署指令部署第一应用组件之后,所述方法还包括:
所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件;所述目标部署节点向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
其中,目标部署节点作为子节点的父节点,子节点上应用组件的安装依赖于目标部署节点上应用组件的安装,故目标部署节点根据所述第一部署指令部署第一应用组件之后,目标部署节点才能向子节点发送第四部署指令,以触发子节点部署第四应用组件。
其中,“所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件”的方式与上述“目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件”的方式类似,在此不再赘述,具体请参见上面的描述。
可见,多个部署节点可以自动地执行应用组件的部署操作,减少对服务器的依赖,这样,不仅可以简化云平台应用部署系统的业务逻辑,提升云平台应用部署系统并发部署应用的能力,同时还可以提高应用部署的效率。
在一种可选的实施方式中,所述方法还包括:
在所述第一应用组件的运行出现故障的情况下,所述目标部署节点将所述第一应用组件的部署状态更新为故障状态;所述目标部署节点重新部署所述第一应用组件;在所述目标部署节点重新部署所述第一应用组件完成后,所述目标部署节点将所述第一应用组件的 部署状态更新为部署完成。
其中,第一应用组件的运行出现故障主要由两种原因造成的,第一种是第一应用组件所在的目标部署节点本身出现故障,第二种是第一应用组件本身出现故障。第一种情况下目标部署节点本身出现故障,本发明不考虑,本发明主要考虑第二种情况。可见,在第一应用组件的运行出现故障的情况下,目标部署节点可以自动执行应用组件的重新部署操作,进而实现故障的自动修复。
在一种可选的实施方式中,所述方法还包括:
所述目标部署节点接收所述管理服务器发送的升级指令,所述升级指令指示所述目标部署节点升级所述第一应用组件;所述目标部署节点将所述第一应用组件的部署状态更新为未部署;所述目标部署节点根据所述升级指令对所述第一应用组件执行升级操作;所述目标部署节点将已升级的所述第一应用组件的部署状态更新为部署完成。
其中,在该可选的实施方式中,由于业务的新功能上线或者需要修复问题,目标部署节点的应用组件有可能需要升级。当接收到管理服务器发送的升级指令时,默认为目标部署节点上没有安装应用组件,需要将目标部署节点的应用组件的部署状态更新为未部署状态,同时,根据升级指令对第一应用组件执行升级操作,进一步地,目标部署节点需要将已升级的所述第一应用组件的部署状态更新为部署完成。
本发明第二方面公开了一种应用组件部署方法,其特征在于,所述方法用于在多个部署节点上部署应用的多个应用组件,所述方法包括:
目标部署节点接收管理服务器发送的第一部署指令,所述目标部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;在所述目标部署节点检测到所述目标部署节点的父节点已部署第二应用组件的情况下,所述目标部署节点根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述目标部署节点对应的应用组件,所述第二应用组件为所述多个应用组件中与所述父节点对应的应用组件;所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件;所述目标部署节点向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件;或,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的子节点对应的第四应用组件;所述目标部署节点向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
其中,在该实施方式中,目标部署节点确定父节点已部署第二应用组件,目标部署节点就不需要等待父节点上应用组件的部署,而直接可以根据第一部署指令部署第一应用组件,同时,目标部署节点还可以根据第一部署指令确定目标部署节点的兄弟节点对应的第三应用组件,向兄弟节点发送第三部署指令,以触发兄弟节点部署第三应用组件,此外,目标部署节点还可以根据第一部署指令确定目标部署节点的子节点对应的第四应用组件,向子节点发送第四部署指令,以触发子节点部署第四应用组件。
可见,目标部署节点接收管理服务器发送的第一部署指令之后,目标部署节点可以指导兄弟节点或子节点部署应用组件,目标部署节点也可以部署应用组件,整个过程减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
在一种可选的实施方式中,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件包括:
所述目标部署节点解析所述第一部署指令,获得所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;所述目标部署节点根据所述层级关系确定所述目标部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
在一种可选的实施方式中,所述第一部署指令携带有所述应用的应用标识,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件包括:
所述目标部署节点向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;所述目标部署节点接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
所述目标部署节点根据所述层级关系确定所述目标部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
需要说明的是,“所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的子节点对应的第四应用组件”的方式与上述“所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件”的方式类似,在此不再赘述,具体请参见上面的描述。
本发明第三方面公开了一种部署节点,包括用于执行本发明实施例第一方面任一方法的部分或全部步骤的功能单元。其中,该部署节点执行第一方面任一方法的部分或全部步骤时可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。
本发明实施例第四方面公开了一种部署节点,包括用于执行本发明实施例第二方面任一方法的部分或全部步骤的功能单元。其中,该部署节点执行第二方面任一方法的部分或全部步骤时可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。
本发明实施例第五方面公开了一种物理机,所述物理机上部署有多个部署节点,所述物理机包括:处理器、接收器、发送器以及存储器,所述存储器被配置用于存储指令,所述处理器被配置用于运行所述指令,所述处理器运行所述指令以执行本发明实施例第一方面任一方法的部分或全部步骤。其中,该部署节点执行第一方面任一方法的部分或全部步骤时可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。
本发明实施例第六方面公开了一种物理机,所述物理机上部署有多个部署节点,所述物理机包括:处理器、接收器、发送器以及存储器,所述存储器被配置用于存储指令,所述处理器被配置用于运行所述指令,所述处理器运行所述指令以执行本发明实施例第二方面任一方法的部分或全部步骤。其中,该部署节点执行第二方面任一方法的部分或全部步骤时可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。
本发明实施例第七方面公开了一种计算机存储介质,所述计算机存储介质存储有程序,所述程序具体包括用于执行本发明实施例第一方面任一方法的部分或全部步骤的指令。
本发明实施例第八方面公开了一种计算机存储介质,所述计算机存储介质存储有程序,所述程序具体包括用于执行本发明实施例第二方面任一方法的部分或全部步骤的指令。
在一些可能的实施方式中,在所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件之后,所述目标部署节点还可以检测所述父节点是否已部署所述第二应用组件,在检测到所述父节点未部署所述第二应用组件的情况下,所述目标部署节点向所述父节点发送第二部署指令;在检测到所述父节点已部署所述第二应用组件的情况下,所述目标部署节点就不需要向所述父节点发送第二部署指令。这样,就可以节省系统资源。
在一些可能的实施方式中,在确定所述目标部署节点不具有父节点的情况下,所述目标部署节点部署所述第一应用组件。在这种情况下,目标部署节点不具有父节点,即第一应用组件没有依赖的应用组件,此时,目标部署节点无需等待,可以直接部署第一应用组件。
在一些可能的实施方式中,在所述目标部署节点部署所述第一应用组件完成后,所述目标部署节点将所述第一应用组件的部署状态更新为部署完成。
在一些可能的实施方式中,在所述父节点部署所述第二应用组件完成后,所述父节点将所述第二应用组件的部署状态更新为部署完成。
在一些可能的实施方式中,在所述兄弟节点部署所述第三应用组件完成后,所述兄弟节点将所述第三应用组件的部署状态更新为部署完成。
在一些可能的实施方式中,在所述子节点部署所述第四应用组件完成后,所述子节点将所述第四应用组件的部署状态更新为部署完成。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例公开的一种云平台应用部署系统的网络架构示意图;
图1.1是本发明实施例公开的一种应用部署模型图的示意图;
图2是本发明实施例公开的一种应用组件部署方法的流程示意图;
图3是本发明实施例公开的另一种应用组件部署方法的流程示意图;
图4是本发明实施例公开的一种部署节点的结构示意图;
图5是本发明实施例公开的另一种部署节点的结构示意图;
图6是本发明实施例公开的另一种部署节点的结构示意图;
图7是本发明实施例公开的另一种部署节点的结构示意图;
图8是本发明实施例公开的一种物理机的结构示意图;
图9是本发明实施例公开的另一种物理机的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书的术语“第一”“第二”“第三”“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本发明实施例公开了一种应用部署方法及部署节点,可以减少部署节点对服务器的依赖,从而提高应用组件部署的灵活性。以下分别进行详细说明。
为了更好理解本发明实施例公开的一种应用组件部署方法,下面先对本发明实施例适用的网络架构进行描述。
请参见图1,图1是本发明实施例公开的一种云平台应用部署系统的网络架构示意图。如图1所示,该云平台应用部署系统包括:管理服务器、多个部署节点、软件服务器以及存储服务器。在图1所示的云平台应用部署系统中,可以执行本发明实施例所公开的应用组件部署方法。
其中,管理服务器(如云平台应用部署服务器)主要用于向多个部署节点中的任一个部署节点下发用于指示部署应用的部署指令,其中,该应用可以包括多个应用组件,每个应用组件用于实现该应用的部分功能。
其中,部署节点可以包括但不限于虚拟机(Virtual Machine,VM)、容器(Docker)或者物理机,部署节点之间存在层级关系,该层级关系包括父子关系,此外,应用的应用组件与层级关系中包括的部署节点之间存在对应关系,即每个部署节点都有对应的应用组件。同一个物理机上可以部署多个部署节点。多个不同层级的部署节点也可能部署在同一个物理机上。通常,部署节点在部署应用组件时会考虑父子关系,具体体现在应用组件在部署中需满足一定的安装顺序,比如:部署节点A是部署节点B的子节点,则部署节点B上的应用组件B必须先安装完,才能安装部署节点A上的应用组件A。此外,该层级关系还包括兄弟关系,存在兄弟关系的部署节点在部署应用组件时可以不考虑安装顺序。
其中,在数据库管理的数据模型(如层次模型和网状模型)中,一个节点如果有上一级,则称这个上一级是它的父节点(the parent node),如果有下一级,则称这个下一级是它的子节点(The children node),如果有平级,则称这个平级是它的兄弟节点(the siblings node)。
可以看出,部署节点之间的父子关系本质上是部署节点上待安装的应用组件之间的依赖关系。举例来说,假设需要部署Docker应用管理系统应用,该Docker应用管理系统应 用包括两个应用组件:应用编排调度器以及MySQL,而应用编排调度器的安装依赖于MySQL的安装,则在应用部署模型图中,待安装应用编排调度器的部署节点依赖于待安装MySQL的部署节点,其中,应用编排调度器为编排部署Docker应用的软件。
可选的,该层级关系以及该对应关系可以以部署模型图的形式呈现,该部署模型图为待部署应用的部署模型图,该部署模型图可以存储在存储服务器中;或者,该层级关系以及该对应关系可以以数据包或帧的形式存在于管理服务器下发的部署指令中。可选的,部署模型图还可以携带有应用软件包的地址,该应用软件包的地址用于部署节点根据该应用软件包的地址获取应用的软件包。
其中,软件服务器用于存储应用软件包、依赖包等,该应用软件包可以为通用的应用软件包,比如VM的镜像,MySQL的Docker镜像或软件包,nginx的镜像或软件包,也可以为用户私有的应用软件包。
存储服务器可以包括但不限于键值存储系统etcd、关系型数据库管理系统MySQL以及配置文件(config)。存储服务器可以存储多个部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系。此外,存储服务器还可以记录每个部署节点上部署的应用组件的部署状态,其中,该部署状态可以包括但不限于未部署、部署中、部署完成、部署失败以及故障状态。
需要说明的是,上述存储服务器可以作为一个模块集成在管理服务器或软件服务器上,或者,上述存储服务器可以单独部署。
在图1所示的云平台应用部署系统中,当用户需要在云平台应用部署系统上部署应用时,用户可以预先指定需要的部署节点,每个部署节点需要安装的应用组件,设置部署节点的信息(比如VM镜像、应用软件包、安装方式等)、指定部署节点之间的层级关系以及应用的应用组件与层级关系中包括的部署节点之间的对应关系。之后,管理服务器可以将待部署应用的应用软件包(通常为用户私有的应用软件包)发送给软件服务器,以便软件服务器存储该待部署应用的应用软件包,后续部署节点就可以从软件服务器中获取应用软件包,以执行应用组件的部署操作。
同时,管理服务器可以向多个部署节点中的目标部署节点(即任意一个部署节点)发送部署指令,以触发目标部署节点根据部署指令确定目标部署节点的父节点以及父节点对应的应用组件,以及确定目标部署节点的兄弟节点以及兄弟节点对应的应用组件,以及确定目标部署节点的子节点以及子节点对应的应用组件。进一步地,由目标部署节点来指导父节点、兄弟节点以及子节点来部署应用组件,以及目标部署节点部署应用组件,直到整个应用完成部署。
请一并参见图1.1,图1.1是本发明实施例公开的一种应用部署模型图的示意图。其中,该应用部署模型图用于记录多个部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系。
如图1.1所示,该应用部署模型图为一个有向图,箭头表示依赖关系。图1.1中包括多个部署节点,比如:V1、V2、V3、V4以及V5,其中,每个部署节点均对应一个应用组件。此外,图1.1中还包括V0,其中V0为虚拟起始节点,不代表任意一个部署节点,V0主要用于确保部署模型图中不存在孤立的部署节点,比如,如果没有V0,V3将成为孤立 节点。带箭头的有向线条表示依赖关系(即父子关系),任意依赖关系中,表示起点依赖于终点,起点可以称为子节点,终点可以称为父节点。存在依赖关系的两个部署节点,必须由父节点上的应用组件安装完后,才能安装子节点上的应用组件。举例来说,V4依赖于V1和V2,V4为V1和V2的子节点,而V1和V2均为V4的父节点,如果V4要安装应用组件,必须待V1和V2上的应用组件安装完后,V4才能安装应用组件。同理,V5依赖于V2,V2为V5的父节点,V5为V2的子节点,只有V2上的应用组件安装完后,V5才能安装应用组件。此外,V0均为V1/V2/V3的父节点,但是由于V0为虚拟起始节点,不代表任意一个部署节点,V0不需要安装应用组件,系统可以默认V0的应用组件安装状态为安装成功,V1/V2/V3安装应用组件时无需等待V0安装应用组件,V1/V2/V3可以直接安装各自的应用组件。
此外,该部署模型图还可以表示部署节点之间的兄弟关系,比如:V4与V5互为兄弟节点,V1、V2以及V3互为兄弟节点。
管理服务器可以将第一部署指令下发给待安装应用组件的任一个部署节点(称为目标部署节点),该目标部署节点接收第一部署指令,确定目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系之后,目标部署节点就可以根据该层级关系确定是否存在该目标部署节点的父节点,若存在父节点,则进一步确定父节点是否部署第二应用组件,若父节点未部署第二应用组件,则向父节点发送第二部署指令,父节点接收到该第二部署指令之后,父节点部署第二应用组件。目标部署节点检测到父节点已部署第二应用组件的情况下,目标部署节点根据对应关系部署第一应用组件,进一步地,目标部署节点根据层级关系确定目标部署节点的兄弟节点,还确定兄弟节点未部署第三应用组件,目标部署节点可以向兄弟节点发送第三部署指令,兄弟节点接收到该第三部署指令之后,兄弟节点部署第三应用组件。更进一步地,当该目标部署节点第一应用组件部署完后,目标部署节点根据层级关系确定目标部署节点的子节点,还确定子节点未部署第四应用组件,目标部署节点可以向子节点发送第四部署指令,子节点接收到该第四部署指令之后,兄弟节点部署第四应用组件。当所有部署节点的应用组件部署完成后,整个应用的部署就完成了。
需要说明的是,针对每个部署节点,当该部署节点接收到部署指令后,该部署节点都需要先检测其依赖的父节点是否完成应用组件的部署,若父节点完成部署,该部署节点才能部署应用组件。可见,整个应用部署过程中,部署节点减少了对服务器的依赖,各部署节点不需要一直等待服务器下发部署任务,而可以自动部署应用组件,从而提高应用组件部署的灵活性。
需要说明的是,当应用的业务场景发生变更需要解决问题时,相应地,应用部署模型图也会发生变更。
其中,应用部署模型图需要变更的场景主要有如下两种:应用组件弹性缩容场景以及应用组件弹性扩容场景。
在应用组件弹性缩容场景下,通常是多个部署节点中存在至少2个部署节点处理的业务是一样的,这种情况下,为了节约资源,需要删除其中至少一个部署节点,部署节点发生变更,相应地,就需要更新应用部署模型图。
在应用组件弹性扩容场景下,通常是需要增加某个或某些部署节点的扩容节点,其中,该部署节点的扩容节点与其他部署节点的层级关系与该部署节点与其他部署节点的层级关系一致,比如:在图1.1所示的应用部署模型图中,需要增加一个V1的扩容节点V6,此时,V6与V1、V2、V3互为兄弟节点,V6是V4的父节点,V6的父节点为虚拟起始节点V0。由于增加扩容节点后,部署节点的亲属关系发生变化,故需要更新应用部署模型图。
请参阅图2,图2是本发明实施例公开的一种应用部署方法的流程示意图。其中,该方法用于在多个部署节点上部署应用的多个应用组件,如图2所示,该方法包括以下步骤:
201、目标部署节点接收管理服务器发送的第一部署指令。
其中,该目标部署节点为多个部署节点中的一个,可以将管理服务器下发第一部署指令的部署节点看成是目标部署节点。
举例来说,假设该多个部署节点为图1.1所示应用部署模型图中的部署节点,则该目标部署节点可以为V1、V2、V3、V4以及V5中的任一个。假设管理服务器向V4下发第一部署指令,则可以将V4看成是目标部署节点。
其中,该第一部署指令用于指示部署应用,比如:Docker容器应用管理系统应用、Guestbook应用。
可选的,该第一部署指令可以携带有目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系。或者,可选的,该第一部署指令可以携带有应用的应用标识。
202、目标部署节点根据第一部署指令确定目标部署节点的亲属节点,亲属节点包括父节点,以及多个应用组件中与父节点对应的第二应用组件。
需要说明的是,由于部署节点之间存在依赖关系(即父子关系),即部署节点上待安装的应用组件存在依赖关系,待安装的应用组件必须按照一定的先后顺序来安装。因此,每个部署节点部署应用组件之前,需要确认该部署节点是否存在父节点以及该父节点是否已部署应用组件,因为每个部署节点上应用组件的部署依赖于该部署节点的父节点上应用组件的部署,即只有该部署节点的父节点已部署应用组件的情况下,该部署节点才能部署应用组件。故目标部署节点接收到管理服务器发送的第一部署指令之后,在部署第一应用组件之前,目标部署节点需要先根据第一部署指令确定目标部署节点的亲属节点,亲属节点包括父节点,以及多个应用组件中与父节点对应的第二应用组件。
作为一种可选的实施方式,目标部署节点根据第一部署指令确定目标部署节点的亲属节点,亲属节点包括父节点,以及多个应用组件中与父节点对应的第二应用组件包括:
目标部署节点解析第一部署指令,获得目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系;
目标部署节点根据层级关系确定目标部署节点的父节点,以及根据对应关系确定多个应用组件中与父节点对应的第二应用组件。
在该可选的实施方式中,第一部署指令中携带目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系,这样,目标部署节点可以解析第一部署指令并直接提取出层级关系以及对应关系,以及根据层级关系确定 目标部署节点的父节点,以及根据对应关系确定多个应用组件中与父节点对应的第二应用组件。
其中,该层级关系以及该对应关系可以以应用部署模型图的形式呈现(如图1.1所示的应用部署模型图),该应用部署模型图为该应用的部署模型图,该应用部署模型图可以存在于第一部署指令中;或者,该层级关系以及该对应关系可以以数据包或帧的形式存在于第一部署指令中。
作为另一种可选的实施方式,第一部署指令携带有应用的应用标识,目标部署节点根据第一部署指令确定目标部署节点的亲属节点,亲属节点包括父节点,以及多个应用组件中与父节点对应的第二应用组件包括:
目标部署节点向存储服务器发送携带有应用标识的部署关系获取请求,部署关系获取请求用于请求获取应用的部署关系;
目标部署节点接收存储服务器响应部署关系获取请求发送的应用的部署关系,应用的部署关系包括目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系;
目标部署节点根据层级关系确定目标部署节点的父节点,以及根据对应关系确定多个应用组件中与父节点对应的第二应用组件。
在该可选的实施方式中,存储服务器中预先存储有应用的部署关系,该应用的部署关系包括目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系,目标部署节点在接收到第一部署指令之后,目标部署节点就可以从存储服务器中获取目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系,这样,目标部署节点就可以根据层级关系确定目标部署节点的父节点,以及根据对应关系确定多个应用组件中与父节点对应的第二应用组件。
可选的,若目标部署节点的父节点为虚拟起始节点,则系统默认该虚拟起始节点的部署状态为部署完成,则依赖于该虚拟起始节点的目标部署节点可以直接执行步骤204。
203、目标部署节点向父节点发送第二部署指令。
其中,该第二部署指令用于指示父节点部署第二应用组件。
父节点接收到目标部署节点发送的第二部署指令后,父节点可以从存储服务器中获取第二应用组件的应用软件包,以及使用该应用软件包来部署第二应用组件。
需要说明的是,父节点接收到目标部署节点发送的第二部署指令后,该父节点需要根据该第二部署指令确定该父节点是否存在该父节点的父节点以及该父节点的父节点是否部署应用组件,如果存在该父节点的父节点并且该父节点的父节点未部署应用组件,则该父节点需要等待该父节点的父节点部署应用组件完成后,该父节点才能部署应用组件。
204、在目标部署节点检测到父节点已部署第二应用组件的情况下,目标部署节点根据第一部署指令部署第一应用组件。
其中,该第一应用组件为多个应用组件中与目标部署节点对应的应用组件。
本发明实施例中,每个部署节点均可以在存储服务器中记录该部署节点上部署的应用组件的部署状态,以便其他的部署节点能从存储服务器上实时检测到任一个部署节点的应 用组件的部署状态,并根据部署节点的应用组件的部署状态来执行应用组件的部署。该部署状态可以包括但不限于未部署、部署中、部署完成、部署失败以及故障状态。
其中,在所述父节点部署所述第二应用组件完成后,所述父节点可以将所述第二应用组件的部署状态更新为部署完成。
可选的,目标部署节点可以从存储服务器中查询父节点的应用组件的部署状态,如果查询到父节点的应用组件的部署状态为部署完成,则可以确定父节点已部署第二应用组件。
可选的,父节点上的应用组件部署完成后,父节点可以主动告知目标部署节点,这样,目标部署也可以确定父节点已部署第二应用组件。
在目标部署节点检测到父节点已部署第二应用组件的情况下,目标部署节点可以根据应用的应用组件与层级关系中包括的部署节点间的对应关系确定第一应用组件,从软件服务器中获取第一应用组件的应用软件包,使用第一应用组件的应用软件包来部署第一应用组件。
可选的,在目标部署节点部署所述第一应用组件完成后,目标部署节点可以将第一应用组件的部署状态更新为部署完成。
205、目标部署节点根据第一部署指令确定多个应用组件中与兄弟节点对应的第三应用组件。
可选的,目标部署节点根据第一部署指令确定多个应用组件中与兄弟节点对应的第三应用组件的方式具体为:
目标部署节点解析第一部署指令,获得目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系;
目标部署节点根据层级关系确定目标部署节点的兄弟节点,以及根据对应关系确定多个应用组件中与兄弟节点对应的第三应用组件。
可选的,第一部署指令携带有所述应用的应用标识,目标部署节点根据第一部署指令确定多个应用组件中与兄弟节点对应的第三应用组件的方式具体为:
目标部署节点向存储服务器发送携带有应用标识的部署关系获取请求,部署关系获取请求用于请求获取应用的部署关系;
目标部署节点接收存储服务器响应部署关系获取请求发送的应用的部署关系,应用的部署关系包括目标部署节点与其他部署节点间的层级关系,以及应用的应用组件与层级关系中包括的部署节点间的对应关系;
目标部署节点根据层级关系确定目标部署节点的兄弟节点,以及根据对应关系确定多个应用组件中与兄弟节点对应的第三应用组件。
206、在目标部署节点检测到父节点已部署第二应用组件情况下,目标部署节点向兄弟节点发送第三部署指令。
其中,第三部署指令用于指示兄弟节点部署第三应用组件。
兄弟节点接收到目标部署节点发送的第三部署指令后,兄弟节点可以从存储服务器中获取第三应用组件的应用软件包,以及使用该应用软件包来部署第三应用组件。
需要说明的是,兄弟节点接收到目标部署节点发送的第三部署指令后,该兄弟节点需要根据该第三部署指令确定该兄弟节点是否存在该兄弟节点的父节点以及该兄弟节点的父 节点是否部署应用组件,如果存在该兄弟节点的父节点并且该兄弟节点的父节点未部署应用组件,则该兄弟节点需要等待该兄弟节点的父节点部署应用组件完成后,该兄弟节点才能部署应用组件。
其中,在所述兄弟节点部署所述第三应用组件完成后,所述兄弟节点将所述第三应用组件的部署状态更新为部署完成。
可选的,在目标部署节点检测到父节点已部署第二应用组件的情况下,目标部署节点可以先检测下兄弟节点是否部署有应用组件,如果兄弟节点未部署有应用组件,则目标部署节点可以向兄弟节点发送第三部署指令,否则,目标部署节点就不需要向兄弟节点发送第三部署指令。这样,可以节省系统资源。
207、目标部署节点根据第一部署指令确定多个应用组件中与子节点对应的第四应用组件。
其中,目标部署节点根据第一部署指令确定多个应用组件中与子节点对应的第四应用组件的方式与上述方法类似,在此不再赘述。
其中,目标部署节点根据第一部署指令部署第一应用组件之后,目标部署节点可以根据第一部署指令确定多个应用组件中与子节点对应的第四应用组件。
208、目标部署节点向子节点发送第四部署指令。
其中,第四部署指令用于指示子节点部署第四应用组件。
子节点接收到目标部署节点发送的第四部署指令后,子节点可以从存储服务器中获取第四应用组件的应用软件包,以及使用该应用软件包来部署第四应用组件。
其中,在所述子节点部署所述第四应用组件完成后,所述子节点可以将所述第四应用组件的部署状态更新为部署完成。
需要说明的是,子节点接收到目标部署节点发送的第四部署指令后,该子节点需要根据该第四部署指令确定该子节点是否存在该子节点的父节点以及该兄弟节点的父节点是否部署应用组件,如果存在该子节点的父节点并且该子节点的父节点未部署应用组件,则该子节点需要等待该子节点的父节点部署应用组件完成后,该子节点才能部署应用组件。
可选的,在目标部署节点检测到父节点已部署第二应用组件的情况下,目标部署节点可以先检测下子节点是否部署有应用组件,如果子节点未部署有应用组件,则目标部署节点可以向子节点发送第四部署指令,否则,目标部署节点就不需要向子节点发送第四部署指令。这样,可以节省系统资源。
综上可以看出各部署节点的应用组件安装的先后顺序,即目标部署节点的父节点优先完成应用组件的安装,其次是该目标部署节点完成应用组件的安装,最后该目标部署节点的兄弟节点/子节点完成应用组件的安装。
下面结合图1.1举例来说明:
假设该目标部署节点为图1.1中的V4,应用部署模型图为图1.1所示的应用部署模型图。V4接收管理服务器发送用于指示部署应用的部署指令,并获取到图1.1所示的应用部署模型图之后,V4根据图1.1所示的应用部署模型图检测是否存在V4的父节点,从图1.1中可以看出,V4的父节点为V1和V2,V4根据图1.1所示的应用部署模型图检测到V4的父节点为V1和V2之后,V4从存储服务器中检测V1和V2的应用组件的部署状态均为 未安装,V4可以分别向V1和V2发送用于指示部署应用组件的部署指令。V1接收到部署指令之后,进一步地,V1根据图1.1所示的应用部署模型图检测是否存在V1的父节点,从图1.1所示的应用部署模型图中可以看出,V1的父节点为V0,而V0为虚拟起始节点,系统默认V0的应用组件的部署状态为安装完成,故V1可以直接从软件服务器中获取V1对应的应用组件的应用软件包并执行应用组件的部署操作,V1对应的应用组件部署完后,V1在存储服务器上将V1的应用组件的部署状态更新为安装完成。
同样,V2接收到部署指令之后,进一步地,V2根据图1.1所示的应用部署模型图检测是否存在V2的父节点,从图1.1所示的应用部署模型图中可以看出,V2的父节点为V0,故V2可以直接从软件服务器中获取V2对应的应用组件的应用软件包并执行应用组件的部署操作,V2对应的应用组件部署完后,V2在存储服务器上将V2的应用组件的部署状态更新为安装完成。
V4检测到V1和V2上的应用组件的部署状态为部署完成后,V4就可以获取V4对应的应用组件的应用软件包,并执行应用组件的部署操作。部署完成后,V4在存储服务器上将V4的应用组件的部署状态更新为安装完成。
同时,V1上的应用组件部署完成后,V1可以根据图1.1所示的应用部署模型图检测是否存在V1的兄弟节点或V1的子节点,同样,V2上的应用组件部署完成后,V2也可以根据图1.1所示的应用部署模型图检测是否存在V2的兄弟节点或V2的子节点,从图1.1所示的应用部署模型图可以看出,V1、V2以及V3互为兄弟节点,V5为V2的子节点。可选的,无论V3的应用组件的部署状态处于什么状态,V1和V2均可以向V3发送用于指示部署应用组件的部署指令,V2还可以向V5发送用于指示部署应用组件的部署指令。可选的,V1或V2上的应用组件均部署完成后,V1或V2可以先检测V3的应用组件的部署状态,若V3的应用组件的部署状态为未安装,V1或V2再向V3发送用于指示部署应用组件的部署指令,若V3的应用组件的部署状态为部署完成,V1或V2就不需要向V3发送用于指示部署应用组件的部署指令了,这样,就可以避免重复向V3发送部署指令,从而节省系统资源。
V3接收到用于指示部署应用组件的部署指令,获取图1.1所示的应用部署模型图之后,V3检测到V3的父节点为虚拟起始节点V0,直接获取V3对应的应用组件的应用软件包进而执行应用组件的部署操作。V3部署完后,在存储服务器上将V3的应用组件的部署状态更新为部署完成,进一步地,当V3检测到不存在V3的兄弟节点或V3的子节点时,V3不需要执行任何操作。
V5接收到用于指示部署应用组件的部署指令,获取图1.1所示的应用部署模型图之后,V5检测到V5依赖的父节点V2已经完成应用组件的部署,V5直接获取V5对应的应用组件的应用软件包进而执行应用组件的部署操作。V5部署完后,在存储服务器上将V5的应用组件的部署状态更新为部署完成,进一步地,V5检测到V5的兄弟节点V4已经完成应用组件的部署,并且V5不存在V5的子节点,此时,V5不需要执行任何操作。
至此,图1.1所示的所有部署节点均完成应用组件的部署,即整个应用部署完成了。从上述可以看出,V4优先接收管理服务器发送的部署指令,并获取到应用部署模型图,V4的父节点V1/V2先执行应用组件的部署操作,V1/V2上的应用组件部署完成之后,V3/V4/V5 同时执行应用组件的部署。
可见,整个应用部署的过程中,部署节点减少了对服务器的依赖,多个部署节点可以灵活地执行应用组件的部署操作,不仅可以简化云平台应用部署系统的业务逻辑,提升云平台应用部署系统并发部署应用的能力,同时还可以提高应用部署的效率。
应用部署完成之后,应用就可以正常运行了。然而,在后期应用运行的过程中,有可能会出现应用组件出现故障的情况,或者应用组件需要升级的情况。针对这些情况,部署节点可以自主地执行相应操作,减少对服务器的依赖。
作为另一种可选的实施方式,所述方法还包括:
11)在所述第一应用组件的运行出现故障的情况下,所述目标部署节点将所述第一应用组件的部署状态更新为故障状态;
12)所述目标部署节点重新部署所述第一应用组件;
13)在所述目标部署节点重新部署所述第一应用组件完成后,所述目标部署节点将所述第一应用组件的部署状态更新为部署完成。
在该可选的实施方式中,应用部署完成之后,在后续的运行过程中,有可能发生目标部署节点的第一应用组件的运行出现故障的情况,其中,第一应用组件的运行出现故障主要由两种原因造成的,第一种是第一应用组件所在的目标部署节点本身出现故障,第二种是第一应用组件本身出现故障。第一种情况下目标部署节点本身出现故障,本发明不考虑,本发明主要考虑第二种情况。
由于部署节点之间是存在亲属关系的,故当第一应用组件的运行出现故障的情况下,目标部署节点需要将目标部署节点的第一应用组件的部署状态更新为故障状态,以便与目标部署节点关联的其他部署节点获取到该目标部署节点的应用组件的部署状态。
进一步地,目标部署节点可以从软件服务器中获取第一应用组件的应用软件包,重新部署第一应用组件,在目标部署节点重新部署第一应用组件完成后,目标部署节点将第一应用组件的部署状态更新为部署完成。
可见,在第一应用组件的运行出现故障的情况下,目标部署节点可以自动执行应用组件的重新部署操作,减少了对服务器的依赖,实现故障的自动修复。
作为另一种可选的实施方式,所述方法还包括:
21)所述目标部署节点接收所述管理服务器发送的升级指令,所述升级指令指示所述目标部署节点升级所述第一应用组件;
22)所述目标部署节点将所述第一应用组件的部署状态更新为未部署;
23)所述目标部署节点根据所述升级指令对所述第一应用组件执行升级操作;
24)所述目标部署节点将已升级的所述第一应用组件的部署状态更新为部署完成。
在该可选的实施方式中,由于业务的新功能上线或者需要修复问题,目标部署节点的第一应用组件有可能需要升级,此时,当前目标部署节点上部署的第一应用组件就已经不再实用,默认为没有安装升级的应用组件,故需要将目标部署节点的第一应用组件的部署状态更新为未部署,并根据升级指令对第一应用组件执行升级操作;在目标部署节点的第一应用组件的升级操作完成之后,需要将已升级的第一应用组件的部署状态更新为部署完成。
在图2所描述的方法流程中,目标部署节点接收管理服务器发送的第一部署指令之后,目标部署节点可以指导该目标部署节点的父节点部署应用组件,之后,目标部署节点也可以部署应用组件,目标部署节点还可以指导该目标部署节点的兄弟节点以及子节点部署应用组件,整个过程减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
请参阅图3,图3是本发明实施例公开的另一种应用部署方法的流程示意图。其中,该方法用于在多个部署节点上部署应用的多个应用组件,如图3所示,该方法包括以下步骤:
301、目标部署节点接收管理服务器发送的第一部署指令。
其中,目标部署节点为多个部署节点中的一个,第一部署指令用于指示部署应用。
302、在目标部署节点检测到目标部署节点的父节点已部署第二应用组件的情况下,目标部署节点根据第一部署指令部署第一应用组件。
其中,第一应用组件为多个应用组件中与目标部署节点对应的应用组件,第二应用组件为多个应用组件中与父节点对应的应用组件。
303、目标部署节点根据第一部署指令确定多个应用组件中与目标部署节点的兄弟节点对应的第三应用组件,向兄弟节点发送第三部署指令。
其中,第三部署指令用于指示兄弟节点部署第三应用组件。
可选的,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件包括:
所述目标部署节点解析所述第一部署指令,获得所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
所述目标部署节点根据所述层级关系确定所述目标部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
可选的,所述第一部署指令携带有所述应用的应用标识,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件包括:
所述目标部署节点向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
所述目标部署节点接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
所述目标部署节点根据所述层级关系确定所述目标部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
304、目标部署节点根据第一部署指令确定多个应用组件中与目标部署节点的子节点对应的第四应用组件,向子节点发送第四部署指令。
其中,第四部署指令用于指示子节点部署第四应用组件。
其中,“目标部署节点根据第一部署指令确定多个应用组件中与目标部署节点的子节点 对应的第四应用组件”的方式与上述“目标部署节点根据第一部署指令确定多个应用组件中与目标部署节点的兄弟节点对应的第三应用组件”的方式类似,在此不再赘述。
在图3所描述的方法流程中,在目标部署节点检测到目标部署节点的父节点已部署第二应用组件的情况下,目标部署节点可以不需要等待,直接根据第一部署指令部署第一应用组件,同时,目标部署节点还可以指导该目标部署节点的兄弟节点以及子节点部署应用组件,整个过程减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
请参见图4,图4是本发明实施例公开的一种部署节点的结构示意图,其中,该部署节点可以用于执行图2所描述方法中的部分或全部步骤,具体可以参见图2的描述,在此不再赘述。如图4所示,该部署节点400可以包括:
接收单元401,用于接收管理服务器发送的第一部署指令,所述部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署应用;
第一确定单元402,用于根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;
发送单元403,用于向所述父节点发送第二部署指令,所述第二部署指令用于指示所述父节点部署所述第二应用组件;
部署单元404,用于在所述部署节点检测到所述父节点已部署所述第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件。
请参见图5,图5是本发明实施例公开的另一种部署节点的结构示意图,其中,该部署节点可以用于执行图2所描述方法中的部分或全部步骤,具体可以参见图2的描述,在此不再赘述。其中,图5所示的部署节点是在图4所示部署节点的基础上进一步优化得到的,图5所示的部署节点与图4所示部署节点相比,图5所示的部署节点除了包括图4所示部署节点的所有单元外,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述第一确定单元402具体用于:
解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
可选的,所述亲属节点还包括兄弟节点,图5所示的部署节点还可以包括:
第二确定单元405,用于根据所述第一部署指令确定所述多个应用组件中与所述兄弟节点对应的第三应用组件;
所述发送单元403,还用于在所述部署节点检测到所述父节点已部署所述第二应用组件情况下,向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件。
可选的,图5所示的部署节点还可以包括:
第一更新单元406,用于在所述第一应用组件的运行出现故障的情况下,将所述第一应用组件的部署状态更新为故障状态;
所述部署单元404,还用于重新部署所述第一应用组件;
所述第一更新单元406,还用于在所述部署节点重新部署所述第一应用组件完成后,将所述第一应用组件的部署状态更新为部署完成。
请参见图6,图6是本发明实施例公开的另一种部署节点的结构示意图,其中,该部署节点可以用于执行图2所描述方法中的部分或全部步骤,具体可以参见图2的描述,在此不再赘述。其中,图6所示的部署节点是在图4所示部署节点的基础上进一步优化得到的,图6所示的部署节点与图4所示部署节点相比,图6所示的部署节点除了包括图4所示部署节点的所有单元外,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述第一确定单元402具体用于:
通过所述发送单元403向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
通过所述接收单元401接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
可选的,所述亲属节点还包括子节点,在所述部署单元404根据所述第一部署指令部署第一应用组件之后,图6所示的部署节点还可以包括:
第三确定单元407,用于根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件;
所述发送单元403,还用于向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
可选的,所述接收单元401,还用于接收所述管理服务器发送的升级指令,所述升级指令指示所述部署节点升级所述第一应用组件;
图6所示的部署节点还可以包括:
第二更新单元408,用于将所述第一应用组件的部署状态更新为未部署;
执行单元409,用于根据所述升级指令对所述第一应用组件执行升级操作;
所述第二更新单元408,还用于将已升级的所述第一应用组件的部署状态更新为部署完成。
在图4~图6所描述的部署节点400中,在应用部署的整个过程中,部署节点减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
请参见图7,图7是本发明实施例公开的另一种部署节点的结构示意图,其中,该部署节点可以用于执行图3所描述方法中的部分或全部步骤,具体可以参见图3的描述,在此不再赘述。如图7所示,该部署节点700可以包括:
接收单元701,用于接收管理服务器发送的第一部署指令,所述部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
部署单元702,用于在所述部署节点检测到所述部署节点的父节点已部署第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件,所述第二应用组件为所述多个应用组件中与所述父节点对应的应用组件;
确定发送单元703,用于根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件;向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件;或,用于根据所述第一部署指令确定所述多个应用组件中与所述部署节点的子节点对应的第四应用组件;向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
可选的,在所述根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述确定发送单元703具体用于:
解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
可选的,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述确定发送单元703具体用于:
向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
通过所述接收单元701接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
在图7所描述的部署节点中,在应用部署的整个过程中,部署节点减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
需要说明的是,上述图4~图7所描述的单元可以是进程,也可以是线程,此外,上述单元是示意性划分的,某些单元可以是一个,比如:第一确定单元402,第二确定单元405以及第三确定单元407可以是一个单元,第一更新单元406以及第二更新单元408可以是一个单元,本发明实施例不做限定,
此外,在一种实现方式下,上述图4~图6所描述的单元中,接收单元401可以由图8中的接收器802实现,发送单元403可以由图8中的发送器803实现;第一确定单元402、 部署单元404、第二确定单元405、第一更新单元406、第三确定单元407、第二更新单元408以及执行单元409可以由图8中的处理器801实现。
图7所描述的单元中,接收单元701可以由图9中的接收器902实现,部署单元702可以由图9中的处理器901实现,确定发送单元703可以由图9中的发送器903实现.
请参见图8,图8是本发明实施例公开的一种物理机的结构示意图,其中,该物理机800上部署有多个部署节点,可以用于执行图2所公开的应用组件部署方法中的全部或部分步骤,具体描述请参照图2所描述的,在此不再赘述。如图8所示,该物理机800可以包括:至少一个处理器801,例如CPU(Central Processing Unit,中央处理器),至少一个接收器802、至少一个发送器803以及存储器804,其中,所述处理器801、接收器802、发送器803以及存储器804分别连接通信总线。可选的,接收器802和发送器803可以集成在一起,比如:收发器,该收发器可以为天线、通信接口等中的至少一种。本领域技术人员应当理解,接收器和发送器是用于部署节点间,或者部署节点与存储服务器,以及部署节点与管理服务器间交互信息的,用途不同,具体的形态不同。例如,如果部署节点与该部署节点的父节点部署在同一物理机上,则至少一个发送器803中可以包括通信接口或者程序接口等用于虚拟机间或者容器间相互通信的接口;如果部署节点与该部署节点的父节点部署在不同的物理机上,则该至少一个发送器803可以包括天线等硬件设备。关于接收器此处不再举例。其中,
存储器804可以是高速RAM存储器,也可以是非易失性的存储器(non-volatile memory)。本领域技术人员可以理解,图8中示出的物理机800的结构并不构成对本发明的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图8所示的更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,处理器801为物理机800的控制中心,可以是中央处理器(Central Processing Unit,CPU),处理器801利用各种接口和线路连接整个物理机800的各个部分,通过运行或执行存储在存储器804内的软件程序和/或模块,以及调用存储在存储器804内存储的程序代码,用于执行以下操作:
通过所述接收器802接收管理服务器发送的第一部署指令,所述部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;
通过所述发送器803向所述父节点发送第二部署指令,所述第二部署指令用于指示所述父节点部署所述第二应用组件;
在所述部署节点检测到所述父节点已部署所述第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件。
可选的,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述处理器801具体用于:
解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
可选的,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述处理器801具体用于:
通过所述发送器803向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
通过所述接收器802接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
可选的,所述亲属节点还包括兄弟节点,所述处理器801还用于执行以下步骤:
根据所述第一部署指令确定所述多个应用组件中与所述兄弟节点对应的第三应用组件;
在所述部署节点检测到所述父节点已部署所述第二应用组件情况下,通过所述发送器803向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件。
可选的,所述亲属节点还包括子节点,在根据所述第一部署指令部署第一应用组件之后,所述处理器801还用于执行以下操作:
根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件;
通过所述发送器803向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
作为一种可选的实施方式,所述处理器801还用于执行以下操作:
在所述第一应用组件的运行出现故障的情况下,将所述第一应用组件的部署状态更新为故障状态;
重新部署所述第一应用组件;
在所述部署节点重新部署所述第一应用组件完成后,将所述第一应用组件的部署状态更新为部署完成。
作为另一种可选的实施方式,所述处理器801还用于执行以下操作:
通过所述接收器802接收所述管理服务器发送的升级指令,所述升级指令指示所述部署节点升级所述第一应用组件;
将所述第一应用组件的部署状态更新为未部署;
根据所述升级指令对所述第一应用组件执行升级操作;
将已升级的所述第一应用组件的部署状态更新为部署完成。
在图8所描述的物理机800中,部署节点接收管理服务器发送的第一部署指令之后, 部署节点可以指导该部署节点的父节点部署应用组件,之后,部署节点也可以部署应用组件,部署节点还可以指导该部署节点的兄弟节点以及子节点部署应用组件,整个过程减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
请参见图9,图9是本发明实施例公开的另一种物理机的结构示意图,其中,该物理机900上部署有多个部署节点,可以用于执行图3所公开的应用组件部署方法中的全部或部分步骤,具体描述请参照图3所描述的,在此不再赘述。如图9所示,该物理机900可以包括:至少一个处理器901,例如CPU(Central Processing Unit,中央处理器),至少一个接收器902、至少一个发送器903以及存储器904,其中,所述处理器901、接收器902、发送器903以及存储器904分别连接通信总线。可选的,接收器902和发送器903可以集成在一起,比如:收发器,该收发器可以为天线、通信接口等中的至少一种。本领域技术人员应当理解,接收器和发送器是用于部署节点间,或者部署节点与存储服务器,以及部署节点与管理服务器间交互信息的,用途不同,具体的形态不同。例如,如果部署节点与该部署节点的父节点部署在同一物理机上,则至少一个发送器903中可以包括通信接口或者程序接口等用于虚拟机间或者容器间相互通信的接口;如果部署节点与该部署节点的父节点部署在不同的物理机上,则该至少一个发送器903可以包括天线等硬件设备。关于接收器此处不再举例。
存储器904可以是高速RAM存储器,也可以是非易失性的存储器(non-volatile memory)。本领域技术人员可以理解,图9中示出的物理机900的结构并不构成对本发明的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图9所示的更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,处理器901为物理机900的控制中心,可以是中央处理器(Central Processing Unit,CPU),处理器901利用各种接口和线路连接整个物理机900的各个部分,通过运行或执行存储在存储器904内的软件程序和/或模块,以及调用存储在存储器904内存储的程序代码,用于执行以下操作:
通过所述接收器902接收管理服务器发送的第一部署指令,所述部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
在所述部署节点检测到所述部署节点的父节点已部署第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件,所述第二应用组件为所述多个应用组件中与所述父节点对应的应用组件;
根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件;通过所述发送器903向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件;或,
根据所述第一部署指令确定所述多个应用组件中与所述部署节点的子节点对应的第四应用组件;通过所述发送器903向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
可选的,在所述901根据所述第一部署指令确定所述多个应用组件中与所述部署节点 的兄弟节点对应的第三应用组件的方面,所述处理器具体用于:
解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
可选的,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述处理器901具体用于:
通过所述发送器903向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
通过所述接收器902接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
在图9所描述的物理机900中,在部署节点检测到部署节点的父节点已部署第二应用组件的情况下,部署节点可以不需要等待,直接根据第一部署指令部署第一应用组件,同时,部署节点还可以指导该部署节点的兄弟节点以及子节点部署应用组件,整个过程减少了对服务器的依赖,部署节点可以自动部署应用组件,从而提高应用组件部署的灵活性。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和单元并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其他实施例的相关描述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (30)

  1. 一种应用组件部署方法,其特征在于,所述方法用于在多个部署节点上部署应用的多个应用组件,所述方法包括:
    目标部署节点接收管理服务器发送的第一部署指令,所述目标部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
    所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;
    所述目标部署节点向所述父节点发送第二部署指令,所述第二部署指令用于指示所述父节点部署所述第二应用组件;
    在所述目标部署节点检测到所述父节点已部署所述第二应用组件的情况下,所述目标部署节点根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述目标部署节点对应的应用组件。
  2. 根据权利要求1所述的方法,其特征在于,所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件包括:
    所述目标部署节点解析所述第一部署指令,获得所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    所述目标部署节点根据所述层级关系确定所述目标部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
  3. 根据权利要求1所述的方法,其特征在于,所述第一部署指令携带有所述应用的应用标识,所述目标部署节点根据所述第一部署指令确定所述目标部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件包括:
    所述目标部署节点向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
    所述目标部署节点接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    所述目标部署节点根据所述层级关系确定所述目标部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
  4. 根据权利要求1~3任一项所述的方法,其特征在于,所述亲属节点还包括兄弟节点,所述方法还包括:
    所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述兄弟节点对应的第三应用组件;
    在所述目标部署节点检测到所述父节点已部署所述第二应用组件的情况下,所述目标部署节点向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件。
  5. 根据权利要求1~3任一项所述的方法,其特征在于,所述亲属节点还包括子节点,在所述目标部署节点根据所述第一部署指令部署第一应用组件之后,所述方法还包括:
    所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件;
    所述目标部署节点向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
  6. 根据权利要求1~3任一项所述的方法,其特征在于,所述方法还包括:
    在所述第一应用组件的运行出现故障的情况下,所述目标部署节点将所述第一应用组件的部署状态更新为故障状态;
    所述目标部署节点重新部署所述第一应用组件;
    在所述目标部署节点重新部署所述第一应用组件完成后,所述目标部署节点将所述第一应用组件的部署状态更新为部署完成。
  7. 根据权利要求1~3任一项所述的方法,其特征在于,所述方法还包括:
    所述目标部署节点接收所述管理服务器发送的升级指令,所述升级指令指示所述目标部署节点升级所述第一应用组件;
    所述目标部署节点将所述第一应用组件的部署状态更新为未部署;
    所述目标部署节点根据所述升级指令对所述第一应用组件执行升级操作;
    所述目标部署节点将已升级的所述第一应用组件的部署状态更新为部署完成。
  8. 一种应用组件部署方法,其特征在于,所述方法用于在多个部署节点上部署应用的多个应用组件,所述方法包括:
    目标部署节点接收管理服务器发送的第一部署指令,所述目标部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
    在所述目标部署节点检测到所述目标部署节点的父节点已部署第二应用组件的情况下,所述目标部署节点根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述目标部署节点对应的应用组件,所述第二应用组件为所述多个应用组件中与所述父节点对应的应用组件;
    所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件;所述目标部署节点向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件;或,
    所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的子节点对应的第四应用组件;所述目标部署节点向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
  9. 根据权利要求8所述的方法,其特征在于,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标部署节点的兄弟节点对应的第三应用组件包括:
    所述目标部署节点解析所述第一部署指令,获得所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    所述目标部署节点根据所述层级关系确定所述目标部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
  10. 根据权利要求8所述的方法,其特征在于,所述第一部署指令携带有所述应用的应用标识,所述目标部署节点根据所述第一部署指令确定所述多个应用组件中与所述目标 部署节点的兄弟节点对应的第三应用组件包括:
    所述目标部署节点向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
    所述目标部署节点接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述目标部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    所述目标部署节点根据所述层级关系确定所述目标部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
  11. 一种部署节点,其特征在于,包括:
    接收单元,用于接收管理服务器发送的第一部署指令,所述部署节点为多个部署节点中的一个,所述第一部署指令用于指示部署应用;
    第一确定单元,用于根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;
    发送单元,用于向所述父节点发送第二部署指令,所述第二部署指令用于指示所述父节点部署所述第二应用组件;
    部署单元,用于在所述部署节点检测到所述父节点已部署所述第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件。
  12. 根据权利要求11所述的部署节点,其特征在于,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述第一确定单元具体用于:
    解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
  13. 根据权利要求11所述的部署节点,其特征在于,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述第一确定单元具体用于:
    通过所述发送单元向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
    通过所述接收单元接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
  14. 根据权利要求11~13任一项所述的部署节点,其特征在于,所述亲属节点还包括兄弟节点,所述部署节点还包括:
    第二确定单元,用于根据所述第一部署指令确定所述多个应用组件中与所述兄弟节点对应的第三应用组件;
    所述发送单元,还用于在所述部署节点检测到所述父节点已部署所述第二应用组件的情况下,向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件。
  15. 根据权利要求11~13任一项所述的部署节点,其特征在于,所述亲属节点还包括子节点,在所述部署单元根据所述第一部署指令部署第一应用组件之后,所述部署节点还包括:
    第三确定单元,用于根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件;
    所述发送单元,还用于向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
  16. 根据权利要求11~13任一项所述的部署节点,其特征在于,所述部署节点还包括:
    第一更新单元,用于在所述第一应用组件的运行出现故障的情况下,将所述第一应用组件的部署状态更新为故障状态;
    所述部署单元,还用于重新部署所述第一应用组件;
    所述第一更新单元,还用于在所述部署节点重新部署所述第一应用组件完成后,将所述第一应用组件的部署状态更新为部署完成。
  17. 根据权利要求11~13任一项所述的部署节点,其特征在于,所述接收单元,还用于接收所述管理服务器发送的升级指令,所述升级指令指示所述部署节点升级所述第一应用组件;
    所述部署节点还包括:
    第二更新单元,用于将所述第一应用组件的部署状态更新为未部署;
    执行单元,用于根据所述升级指令对所述第一应用组件执行升级操作;
    所述第二更新单元,还用于将已升级的所述第一应用组件的部署状态更新为部署完成。
  18. 一种部署节点,其特征在于,包括:
    接收单元,用于接收管理服务器发送的第一部署指令,所述部署节点为多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
    部署单元,用于在所述部署节点检测到所述部署节点的父节点已部署第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件,所述第二应用组件为所述多个应用组件中与所述父节点对应的应用组件;
    确定发送单元,用于根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件;向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件;或,用于根据所述第一部署指令确定所述多个应用组件中与所述部署节点的子节点对应的第四应用组件;向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
  19. 根据权利要求18所述的部署节点,其特征在于,在所述根据所述第一部署指令确 定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述确定发送单元具体用于:
    解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
  20. 根据权利要求18所述的部署节点,其特征在于,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述确定发送单元具体用于:
    向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
    通过所述接收单元接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
  21. 一种物理机,所述物理机上部署有多个部署节点,所述物理机包括:处理器、接收器、发送器以及存储器,其中,所述处理器、接收器、发送器以及存储器分别连接通信总线,所述存储器中存储有程序代码,且所述处理器用于调用所述存储器中存储的程序代码,以执行以下步骤:
    通过所述接收器接收管理服务器发送的第一部署指令,所述部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
    根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件;
    通过所述发送器向所述父节点发送第二部署指令,所述第二部署指令用于指示所述父节点部署所述第二应用组件;
    在所述部署节点检测到所述父节点已部署所述第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件。
  22. 根据权利要求21所述的物理机,其特征在于,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述处理器具体用于:
    解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
  23. 根据权利要求21所述的物理机,其特征在于,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述部署节点的亲属节点,所述亲属节点 包括父节点,以及所述多个应用组件中与所述父节点对应的第二应用组件的方面,所述处理器具体用于:
    通过所述发送器向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
    通过所述接收器接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的父节点,以及根据所述对应关系确定所述多个应用组件中与所述父节点对应的第二应用组件。
  24. 根据权利要求21~23任一项所述的物理机,其特征在于,所述亲属节点还包括兄弟节点,所述处理器还用于执行以下步骤:
    根据所述第一部署指令确定所述多个应用组件中与所述兄弟节点对应的第三应用组件;
    在所述部署节点检测到所述父节点已部署所述第二应用组件情况下,通过所述发送器向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件。
  25. 根据权利要求21~23任一项所述的物理机,其特征在于,所述亲属节点还包括子节点,在根据所述第一部署指令部署第一应用组件之后,所述处理器还用于执行以下步骤:
    根据所述第一部署指令确定所述多个应用组件中与所述子节点对应的第四应用组件;
    通过所述发送器向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
  26. 根据权利要求21~23任一项所述的物理机,其特征在于,所述处理器还用于执行以下步骤:
    在所述第一应用组件的运行出现故障的情况下,将所述第一应用组件的部署状态更新为故障状态;
    重新部署所述第一应用组件;
    在所述部署节点重新部署所述第一应用组件完成后,将所述第一应用组件的部署状态更新为部署完成。
  27. 根据权利要求21~23任一项所述的物理机,其特征在于,所述处理器还用于执行以下步骤:
    通过所述接收器接收所述管理服务器发送的升级指令,所述升级指令指示所述部署节点升级所述第一应用组件;
    将所述第一应用组件的部署状态更新为未部署;
    根据所述升级指令对所述第一应用组件执行升级操作;
    将已升级的所述第一应用组件的部署状态更新为部署完成。
  28. 一种物理机,所述物理机上部署有多个部署节点,包括:处理器、接收器、发送器以及存储器,其中,所述处理器、接收器、发送器以及存储器分别连接通信总线,所述存储器中存储有程序代码,且所述处理器用于调用所述存储器中存储的程序代码,以执行 以下步骤:
    通过所述接收器接收管理服务器发送的第一部署指令,所述部署节点为所述多个部署节点中的一个,所述第一部署指令用于指示部署所述应用;
    在所述部署节点检测到所述部署节点的父节点已部署第二应用组件的情况下,根据所述第一部署指令部署第一应用组件,所述第一应用组件为所述多个应用组件中与所述部署节点对应的应用组件,所述第二应用组件为所述多个应用组件中与所述父节点对应的应用组件;
    根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件;通过所述发送器向所述兄弟节点发送第三部署指令,所述第三部署指令用于指示所述兄弟节点部署所述第三应用组件;或,
    根据所述第一部署指令确定所述多个应用组件中与所述部署节点的子节点对应的第四应用组件;通过所述发送器向所述子节点发送第四部署指令,所述第四部署指令用于指示所述子节点部署所述第四应用组件。
  29. 根据权利要求28所述的物理机,其特征在于,在所述根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述处理器具体用于:
    解析所述第一部署指令,获得所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
  30. 根据权利要求28所述的物理机,其特征在于,所述第一部署指令携带有所述应用的应用标识,在所述根据所述第一部署指令确定所述多个应用组件中与所述部署节点的兄弟节点对应的第三应用组件的方面,所述处理器具体用于:
    通过所述发送器向存储服务器发送携带有所述应用标识的部署关系获取请求,所述部署关系获取请求用于请求获取所述应用的部署关系;
    通过所述接收器接收所述存储服务器响应所述部署关系获取请求发送的所述应用的部署关系,所述应用的部署关系包括所述部署节点与其他部署节点间的层级关系,以及所述应用的应用组件与所述层级关系中包括的部署节点间的对应关系;
    根据所述层级关系确定所述部署节点的兄弟节点,以及根据所述对应关系确定所述多个应用组件中与所述兄弟节点对应的第三应用组件。
PCT/CN2017/078583 2016-08-19 2017-03-29 一种应用组件部署方法及部署节点 WO2018032770A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/278,556 US10684850B2 (en) 2016-08-19 2019-02-18 Application component deployment method and deployment node

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610700065.6A CN107769949B (zh) 2016-08-19 2016-08-19 一种应用组件部署方法及部署节点
CN201610700065.6 2016-08-19

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/278,556 Continuation US10684850B2 (en) 2016-08-19 2019-02-18 Application component deployment method and deployment node

Publications (1)

Publication Number Publication Date
WO2018032770A1 true WO2018032770A1 (zh) 2018-02-22

Family

ID=61197313

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/078583 WO2018032770A1 (zh) 2016-08-19 2017-03-29 一种应用组件部署方法及部署节点

Country Status (3)

Country Link
US (1) US10684850B2 (zh)
CN (1) CN107769949B (zh)
WO (1) WO2018032770A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107769949B (zh) * 2016-08-19 2021-02-12 华为技术有限公司 一种应用组件部署方法及部署节点
US11086700B2 (en) * 2018-08-24 2021-08-10 Vmware, Inc. Template driven approach to deploy a multi-segmented application in an SDDC
CN110896404B (zh) * 2018-09-12 2021-09-14 华为技术有限公司 数据处理的方法、装置和计算节点
CN109302483B (zh) * 2018-10-17 2021-02-02 网宿科技股份有限公司 一种应用程序的管理方法及系统
US11019178B1 (en) * 2019-01-07 2021-05-25 West Corporation Deployment router based on channel traffic
CN110417870B (zh) * 2019-07-05 2022-05-13 北京达佳互联信息技术有限公司 配置文件管理方法、装置、设备和存储介质
CN112242920B (zh) * 2019-07-19 2022-09-02 杭州海康威视数字技术股份有限公司 一种云平台部署方法、装置及节点
CN110413286B (zh) * 2019-07-31 2023-08-22 创新先进技术有限公司 一种应用部署方法、装置及设备
CN114556290A (zh) * 2019-08-16 2022-05-27 盖璞股份有限公司 用于部署企业软件更新的系统和方法
CN113031971B (zh) * 2019-12-25 2022-04-29 北京世纪好未来教育科技有限公司 软件部署方法、系统及计算机存储介质
CN111897538B (zh) * 2020-07-13 2022-06-21 浪潮电子信息产业股份有限公司 一种基于cpu和操作系统的容器平台部署方法及系统
US11070423B1 (en) * 2020-10-14 2021-07-20 Cisco Technology, Inc. Intent deployment in a network environment
US11556332B2 (en) * 2021-02-23 2023-01-17 International Business Machines Corporation Application updating in a computing environment using a function deployment component
CN114374688A (zh) * 2022-01-12 2022-04-19 南方电网大数据服务有限公司 应用程序部署方法、装置、计算机设备和存储介质
CN115562691A (zh) * 2022-12-05 2023-01-03 中科南京信息高铁研究院 一种基于容器的云应用发布方法及系统
CN116719647B (zh) * 2023-08-09 2023-11-03 苏州浪潮智能科技有限公司 超算集群管理方法、装置、编排管理设备及超算集群

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765620A (zh) * 2014-01-02 2015-07-08 国际商业机器公司 一种程序模块部署的方法和系统
US20150215370A1 (en) * 2014-01-28 2015-07-30 Open Text S.A. System and method for integration of browser based applications in a managed application environment
CN105429791A (zh) * 2015-11-03 2016-03-23 国网技术学院 一种分布式服务状态检测器及方法
CN105635216A (zh) * 2014-11-03 2016-06-01 华为软件技术有限公司 分布式应用的升级方法、设备和分布式系统
CN105740003A (zh) * 2014-12-11 2016-07-06 中兴通讯股份有限公司 一种恢复、升级虚拟机的方法及装置

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681391B1 (en) * 2000-06-21 2004-01-20 Microsoft Corporation Method and system for installing software on a computer system
US8209679B2 (en) * 2006-01-12 2012-06-26 Oracle International Corporation Computer implemented method and system for processing a client request for an application program
US9250972B2 (en) * 2006-06-19 2016-02-02 International Business Machines Corporation Orchestrated peer-to-peer server provisioning
US7987460B2 (en) * 2006-10-10 2011-07-26 Intel Corporation Automation tool for application installations
CN101325509B (zh) * 2007-06-11 2011-04-06 华为技术有限公司 安装软件组件的方法、系统及装置
US8396880B2 (en) * 2009-11-30 2013-03-12 Red Hat, Inc. Systems and methods for generating an optimized output range for a data distribution in a hierarchical database
US8589344B2 (en) * 2009-11-30 2013-11-19 Red Hat, Inc. Systems and methods for generating iterated distributions of data in a hierarchical database
US8434080B2 (en) * 2011-12-22 2013-04-30 Software Ag Usa, Inc. Distributed cloud application deployment systems and/or associated methods
CN103209162B (zh) * 2012-01-16 2016-05-18 中国科学院声学研究所 一种Web类业务部署方法及装置
CN103475521B (zh) * 2013-09-10 2016-11-16 杭州华为数字技术有限公司 一种部署服务器的方法和装置
WO2016067370A1 (ja) * 2014-10-28 2016-05-06 株式会社Murakumo 情報処理装置、方法およびプログラム
CN107769949B (zh) * 2016-08-19 2021-02-12 华为技术有限公司 一种应用组件部署方法及部署节点

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765620A (zh) * 2014-01-02 2015-07-08 国际商业机器公司 一种程序模块部署的方法和系统
US20150215370A1 (en) * 2014-01-28 2015-07-30 Open Text S.A. System and method for integration of browser based applications in a managed application environment
CN105635216A (zh) * 2014-11-03 2016-06-01 华为软件技术有限公司 分布式应用的升级方法、设备和分布式系统
CN105740003A (zh) * 2014-12-11 2016-07-06 中兴通讯股份有限公司 一种恢复、升级虚拟机的方法及装置
CN105429791A (zh) * 2015-11-03 2016-03-23 国网技术学院 一种分布式服务状态检测器及方法

Also Published As

Publication number Publication date
CN107769949B (zh) 2021-02-12
US20190213004A1 (en) 2019-07-11
US10684850B2 (en) 2020-06-16
CN107769949A (zh) 2018-03-06

Similar Documents

Publication Publication Date Title
WO2018032770A1 (zh) 一种应用组件部署方法及部署节点
US10432460B2 (en) Network service scaling method and apparatus
US11656852B2 (en) System and method for autowiring of a microservice architecture
US20170085419A1 (en) System and method for deploying an application
US10541862B2 (en) VNF processing policy determining method, apparatus, and system
WO2017113201A1 (zh) 一种网络服务的生命周期管理方法及设备
EP3839726B1 (en) Software modification initiation method and apparatus
WO2020177564A1 (zh) Vnf的生命周期管理方法及装置
US11221866B2 (en) Accelerator loading method, system, and apparatus
US20240111549A1 (en) Method and apparatus for constructing android running environment
CN111143034B (zh) 一种控制网络数据转发平面的方法、装置及系统
US11416267B2 (en) Dynamic hardware accelerator selection and loading based on acceleration requirements
WO2010000142A1 (zh) 一种分布式网管系统及其维护管理方法
KR20180006971A (ko) 하드웨어 가속 방법 및 관련 장치
CN107534577B (zh) 一种网络业务实例化的方法及设备
CN111143023A (zh) 一种资源变更的方法及装置、设备、存储介质
US11119754B1 (en) Upgrading system components with forward and backward compatibility
CN114968477A (zh) 容器热迁移方法及容器热迁移装置
CN113448650A (zh) 直播功能插件加载方法、装置、设备及存储介质
JP2017538237A (ja) 仮想マシン名を表示するための方法、装置、およびシステム
CN113342456A (zh) 一种连接方法、装置、设备和存储介质
CN110782040A (zh) 一种pytorch任务训练方法、装置、设备及介质
CN111447076A (zh) 网络功能虚拟化nvf系统的容器部署方法及网元
US11269615B2 (en) Automatically orchestrating deployments of software-defined storage stacks
WO2020155987A1 (zh) 一种网络功能虚拟化nfv架构的调度管理方法及装置

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: 17840746

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: 17840746

Country of ref document: EP

Kind code of ref document: A1