CN113419818A - Basic component deployment method, device, server and storage medium - Google Patents

Basic component deployment method, device, server and storage medium Download PDF

Info

Publication number
CN113419818A
CN113419818A CN202110700236.6A CN202110700236A CN113419818A CN 113419818 A CN113419818 A CN 113419818A CN 202110700236 A CN202110700236 A CN 202110700236A CN 113419818 A CN113419818 A CN 113419818A
Authority
CN
China
Prior art keywords
component
target
deployment
container
container cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110700236.6A
Other languages
Chinese (zh)
Other versions
CN113419818B (en
Inventor
孙晓飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110700236.6A priority Critical patent/CN113419818B/en
Publication of CN113419818A publication Critical patent/CN113419818A/en
Application granted granted Critical
Publication of CN113419818B publication Critical patent/CN113419818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a basic component deployment method, a basic component deployment device, a basic component deployment server and a storage medium, and relates to the technical field of the Internet. The method comprises the following steps: receiving a component deployment command, wherein the component deployment command is used for instructing a target basic component to be deployed in a plurality of first container clusters, the plurality of first container clusters are used for providing services for a target object, and the target basic component is used for running the workload of the target object; responding to the component deployment command, and acquiring a current first running state of the target basic component in the plurality of first container clusters; for each first container cluster, deploying the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster. According to the scheme, the target basic components are deployed in the first container clusters in various first running states through one component deployment command, and therefore the deployment efficiency of the target basic components is improved.

Description

Basic component deployment method, device, server and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for deploying a basic component, a server, and a storage medium.
Background
Because the maximum number of server nodes supported by a Kubernetes (a container arrangement engine) cluster is 5000, the requirement of server nodes with ten thousand scales of an internet company cannot be met; thus, internet companies are often provided with server nodes via multiple kubernets clusters. However, the native kubernets cluster cannot be directly applied to the internet company, and at this time, some basic components for operating the workload (workload) of the internet company need to be deployed according to the service requirement of the internet company.
In the related art, it is general to connect to a plurality of kubernets clusters through a node cluster management tool, respectively, and send a deployment command (e.g., kubecect create/update command) to the plurality of kubernets clusters through kubecect (a kind of node cluster management tool) to deploy a base component in the plurality of kubernets clusters through the deployment command.
In the above scheme, for each kubernets cluster, it is necessary to perform a connection operation and an operation of sending a deployment command, however, when there are many kubernets clusters, it takes much time to perform the connection operation and the operation of sending the deployment command, which results in low deployment efficiency of the infrastructure component.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a terminal, and a storage medium for deploying a basic component, which can improve the deployment efficiency of the basic component. The technical scheme of the disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a method for deploying a base component, the method including:
receiving a component deployment command, wherein the component deployment command is used for instructing a target base component to be deployed in a plurality of first container clusters, the plurality of first container clusters are used for providing services for a target object, and the target base component is used for running the workload of the target object;
responding to the component deployment command, and acquiring a current first running state of the target basic component in the plurality of first container clusters;
for each first container cluster, deploying the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster.
In some embodiments, said deploying, in said first container cluster, said target base component according to a current first operating state of said target base component in said first container cluster comprises:
determining a deployment mode of the target basic component in the first container cluster according to a current first running state of the target basic component in the first container cluster;
generating a target instruction according to the deployment mode;
issuing the target instruction to the first container cluster, the target instruction to instruct deployment of the target base component in the first container cluster in the deployment manner.
In some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters;
the determining, according to a current first operating state of the target base component in the first container cluster, a deployment manner of the target base component in the first container cluster includes:
if the target basic component is deployed in the first container cluster, and the second operation state of the target basic component is different from the first operation state, determining that the deployment mode is to update the target basic component;
if the first operating state is used for indicating that the target basic component is not deployed in the first container cluster, determining that the deployment mode is to create the target basic component;
and if the first running state is used for indicating that the target basic component is not deleted in the first container cluster, determining that the deployment mode is to delete the target basic component.
In some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters;
before deploying the target base component in the first container cluster according to the current first operating state of the target base component in the first container cluster, the method further includes:
if the first operating state and the second operating state of the target basic component in the first container cluster are different, executing the step of deploying the target basic component in the first container cluster according to the current first operating state of the target basic component in the first container cluster.
In some embodiments, the obtaining the current first operating state of the target base component in the plurality of first container clusters further comprises:
determining deployment condition information for the workload;
according to the deployment condition information, determining a plurality of first container clusters matched with the deployment condition information from a plurality of second container clusters used for providing services for the target object.
In some embodiments, the determining, according to the deployment condition information, a plurality of first container clusters that match the deployment condition information from a plurality of second container clusters that are used for providing services for the target object includes:
determining a target class of a container cluster required by the workload according to the deployment condition information; determining a container cluster of the plurality of second container clusters that matches the target category as the first container cluster; or
And acquiring target attribute information according to the deployment condition information, and determining a container cluster matched with the target attribute information in the plurality of second container clusters as the first container cluster.
In some embodiments, after receiving the component deployment command, the method further comprises:
storing the component deployment command;
and responding to the newly added first container cluster for providing the service for the target object, and deploying the target basic component in the newly added first container cluster according to the component deployment command.
In some embodiments, the method further comprises:
receiving a state acquisition request;
responding to the state obtaining request, and obtaining a current third running state of the target basic component in the plurality of first container clusters;
and returning the current third running state of the target basic component in the plurality of first container clusters.
According to a second aspect of embodiments of the present disclosure, there is provided a base component deployment apparatus, the apparatus comprising:
a first receiving unit configured to execute a receiving component deployment command, the component deployment command being used for instructing a target base component to be deployed in a plurality of first container clusters, the plurality of first container clusters being used for providing services for a target object, the target base component being used for running a workload of the target object;
an obtaining unit, configured to, in response to the component deployment command, perform obtaining of a current first operating state of the target base component in the plurality of first container clusters;
a deployment unit configured to, for each first container cluster, execute deployment of the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster.
In some embodiments, the deployment unit comprises:
a first determining subunit, configured to determine, according to a current first operating state of the target base component in the first container cluster, a deployment manner of the target base component in the first container cluster;
the generating subunit is configured to execute generation of a target instruction according to the deployment mode;
a sending subunit configured to execute issuing the target instruction to the first container cluster, where the target instruction is used to instruct the target base component to be deployed in the first container cluster in the deployment manner.
In some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters;
the first determining subunit is configured to determine that the deployment mode is to update the target base component if the target base component has been deployed in the first container cluster and a second operating state of the target base component is different from the first operating state; if the first operating state is used for indicating that the target basic component is not deployed in the first container cluster, determining that the deployment mode is to create the target basic component; and if the first running state is used for indicating that the target basic component is not deleted in the first container cluster, determining that the deployment mode is to delete the target basic component.
In some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters;
the deployment unit is further configured to execute the deploying of the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster if the first operating state of the target base component in the first container cluster is different from the second operating state.
In some embodiments, the apparatus further comprises:
a first determination unit configured to perform determining deployment condition information of the workload;
a second determining unit configured to perform determining, according to the deployment condition information, a plurality of first container clusters that match the deployment condition information from a plurality of second container clusters that are used to provide a service for the target object.
In some embodiments, the second determining unit includes:
a second determining subunit configured to perform determining a target class of the container cluster required by the workload according to the deployment condition information; determining a container cluster of the plurality of second container clusters that matches the target category as the first container cluster; or
An obtaining subunit, configured to perform obtaining target attribute information according to the deployment condition information, and determine a container cluster, which is matched with the target attribute information, in the plurality of second container clusters as the first container cluster.
In some embodiments, the apparatus further comprises:
a storage unit configured to execute storing the component deployment command;
the deployment unit is further configured to respond to the newly added first container cluster for providing the service for the target object, and execute deployment of the target basic component in the newly added first container cluster according to the component deployment command.
In some embodiments, the apparatus further comprises:
a second receiving unit configured to execute a reception status acquisition request;
the obtaining unit is further configured to execute, in response to the state obtaining request, obtaining a current third operating state of the target base component in the plurality of first container clusters;
a sending unit configured to execute returning to a current third operating state of the target base component in the plurality of first container clusters.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the infrastructure component deployment method of any of the above aspects.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of a server, enable the terminal to perform the infrastructure component deployment method according to any one of the above aspects.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer program instructions which, when executed by a processor, implement the method of deployment of a base component as described in any of the above aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the embodiment of the disclosure, when the component deployment command is received, the target basic component is deployed to the plurality of first container clusters through the first operating state of the first container cluster, so that the target basic component is deployed to the plurality of first container clusters in the plurality of first operating states through one component deployment command, and the deployment efficiency of the target basic component is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an implementation environment for a method for deploying infrastructure components, according to an example embodiment.
FIG. 2 is a schematic diagram illustrating a base component deployment system in accordance with an exemplary embodiment.
FIG. 3 is a flow diagram illustrating a method for deploying a base component in accordance with an exemplary embodiment.
FIG. 4 is a flowchart illustrating a method for deploying a base component in accordance with an exemplary embodiment.
FIG. 5 is a block diagram illustrating a base component deployment apparatus in accordance with an exemplary embodiment.
FIG. 6 is a block diagram illustrating a server in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims. In addition, the relevant data referred to in this disclosure may be that authorized by the user or sufficiently authorized by the parties.
FIG. 1 is a schematic diagram of an implementation environment for a method for deploying infrastructure components, according to an example embodiment. Referring to fig. 1, the implementation environment includes a terminal 10, a server 20 for providing an infrastructure component deployment server 20, and a plurality of container clusters 30. The terminal 10 and the server 20 perform data interaction through network connection; data interaction between the server 20 and the plurality of container clusters 30 is performed through a data interface or a network connection.
When a running environment needs to be provided for the workload of the target object, the terminal 10 generates a component deployment command based on the workload, and transmits the component deployment command to the server 20. The server 20 is configured to receive the component deployment command, and deploy the underlying components for running the workload in the plurality of container clusters 30 according to the component deployment command. The plurality of container clusters 30 are used to provide container resources of the underlying components for the workload. Where the workload is an application running on the container cluster 30, consisting of one or a set of pods (the smallest and simplest units in the container cluster that can be created and deployed). For example, deployment (flow for resource creation), stateful (load management controller data interface for managing stateful applications), daemonset (flow for managing Pod objects). The target object may be an object of a development workload, for example, the target object is a developer enterprise.
For example, if a target object needs to develop an application with an image processing function, a basic component for running the image processing function needs to be deployed in the container clusters 30 corresponding to the target object, and a developer creates a component deployment command corresponding to the image processing function through the terminal 10 and sends the component deployment command to the server 20; the server 20 receives the component deployment command, and deploys the basic components for processing the image processing function into the plurality of container clusters 30 according to the image processing function in the component deployment command.
In some embodiments, the terminal 10 is at least one of a mobile phone, a tablet, a pc (personal computer), and a wearable device. The server 20 may be at least one of a server, a server cluster composed of a plurality of servers, a cloud server, a cloud computing platform, and a virtualization center. The container cluster 30 is a kubernets cluster or other cluster for running workloads, etc.
With reference to fig. 2, fig. 2 is a schematic diagram of an implementation environment of a basic component deployment method according to an example embodiment. The server 20 includes a basic component deployment service, which includes at least a storage module, a data interface module, and a plurality of control modules. Wherein, the storage module is used as bottom storage. For example, the storage module is Etcd (a distributed storage system). The data interface module is used as an http proxy and receives an http request or a kubecect command. For example, the data interface module is a module that provides services through a kube-apiserver process. The data interface service is provided through the kube-api server process, so that the mode of controlling the basic component through the data deployment command is maintained, the use habit of developers is compatible, and the development work of the developers is reduced.
The control module is configured to establish connections with the plurality of container clusters 30, respectively, and control the plurality of container clusters 30 to deploy the base component. For example, the control module is a sync-controller.
It should be noted that the plurality of control modules are deployed in a highly available deployment mode. In the server 20, a plurality of control modules are simultaneously run, and the plurality of control modules determine a target control module through the global lock, and control a plurality of container clusters 30 through the target control module. Wherein the process of the plurality of control modules determining one target control module through the global lock is as follows: and under the condition that no target control module exists currently, at least one target control module performs preemption, and the control module which is successfully preempted is determined as the target control module. And the target control module which is successfully preempted sends a response message to other control modules at regular time, wherein the response message is used for indicating the normal operation of the target control module, if the other control modules do not receive the response message sent by the target control module, the current operation fault of the target control module is determined, and the other control modules preempt again to determine a new target control module.
In this implementation, multiple control modules are deployed, which prevents the inability to deploy infrastructure components in multiple container clusters 30 when a control module has a problem. In addition, the plurality of control modules determine one target control module through the global lock to control the plurality of container clusters 30, so that the conflict caused by the control of the container clusters 30 by the plurality of target control modules is prevented.
FIG. 3 is a flowchart illustrating a method for deploying a base component, performed by a server as shown in FIG. 3, according to an exemplary embodiment, including the following steps S31-S33:
in step S31, the server receives a component deployment command instructing deployment of the target infrastructure component among the plurality of first container clusters.
With continued reference to FIG. 2, the server receives the component deployment command through the data interface module. The component deployment command is a command received through a kubecect command tool; alternatively, the command is received through an http call, which is not specifically limited in this embodiment of the present application. The component deployment command includes at least one of a command to create a base component of a workload, a command to update a base component of a workload, and a command to delete a base component of a workload.
The plurality of first container clusters are used to provide services for the target object. The target object refers to all container clusters in the system for deploying the current basic components by the plurality of first container clusters. Or, the plurality of first container clusters are container clusters capable of running the workload of the target object, among a plurality of container clusters capable of providing services for the target object. Accordingly, prior to this step, the server determines a plurality of first container clusters from the plurality of second container clusters. The process is realized by the following steps (1) to (2), and comprises the following steps:
(1) the server determines deployment condition information for the workload.
The deployment condition information is related information of a basic component which can be operated by the workload and is carried in the workload. For example, the deployment condition information is a target category of a container cluster in which the base component is located; alternatively, the basic component information may be target attribute information or the like. The target attribute information is attribute information of a workload corresponding to the basic component. Accordingly, in this step, the server determines the deployment condition information from the component deployment command.
(2) And the server determines a plurality of first container clusters matched with the deployment condition information from a plurality of second container clusters for providing services for the target object according to the deployment condition information.
In some embodiments, the server determines a target class of the container cluster required by the workload according to the deployment condition information; and determining a container cluster matched with the target category in the plurality of second container clusters as the first container cluster.
For example, if the workload is a workload corresponding to an image processing application, the workload needs to use a container cluster including a GPU when being deployed, the server determines that a target class of the required container cluster is an image processing class, and the server determines a first container cluster including an image processing class of the GPU from among a plurality of second container clusters. For another example, when performing a gray scale test, the gray scale test needs to be performed according to the cluster granularity, so as to ensure the system stability, and then the server uses a container cluster meeting the gray scale test in the plurality of second container clusters as the first container cluster.
In the implementation mode, the deployment of the basic components is more targeted by selecting the first container cluster of the target category for deployment, so that the normal operation of the workload in the container cluster with the basic components is ensured, and the deployment efficiency of the basic components is improved.
In some embodiments, the server obtains the target attribute information according to the deployment condition information, and determines a container cluster, which is matched with the target attribute information, of the plurality of second container clusters as the first container cluster.
Wherein, the target attribute information is the attribute information of the target container matched with the workload carried in the component deployment command. For example, the target attribute information is a field of workload attribute information, for example, a sync.k.8 s.io/cluster field in annotations. The server matches the target attribute information with the attribute information of the service cluster, and the matching mode is set according to needs, which is not specifically limited in the embodiment of the present disclosure. For example, the matching manner is a regular matching, and the matching container cluster is determined as the first container cluster.
In the implementation mode, the target container matched with the attribute information is determined for deployment, so that the deployment of the basic component is more targeted, and the deployment efficiency of the basic component is improved.
In addition, the server determines a plurality of first container clusters from the plurality of second container clusters, and performs basic component deployment on the plurality of first container clusters, so that the workload of basic component deployment is reduced and the efficiency of basic component deployment is improved on the premise that the normal operation of the workload is ensured.
In step S32, in response to the component deployment command, the server obtains a current first operating state of the target base component in the plurality of first container clusters.
The first operating state is an operating state of a target base component in the plurality of first container clusters. For example, the first operational state includes at least one of an installation state, a version state, and a parameter state.
In some embodiments, the server, upon receiving the component deployment command, determines a first operating state of the base component in each container cluster from the plurality of first container clusters based on the component deployment command. In some embodiments, the server aggregates the running statuses of the plurality of third container clusters locally in advance, and reads the first running statuses of the plurality of first container clusters from the locally stored running statuses of the plurality of third container clusters in response to the component deployment command.
For example, the server collects the operation statuses of the plurality of third container clusters into target fields of corresponding workloads in the control module through the control module, and stores the operation statuses into a kube-api server (a data interface) of the control module. And responding to the server receiving the component deployment command, sending a query request to the kube-apiserver, and acquiring the deployment states of the workload in different container clusters by reading the target fields of the related workload. Wherein the target field may be a status field.
In step S33, for each first container cluster, the server deploys the target infrastructure component in the first container cluster according to a current first operating state of the target infrastructure component in the first container cluster.
In some embodiments, the server determines a deployment manner for deploying the target infrastructure component in the first container cluster according to the first operating state, and deploys the target infrastructure component based on a different deployment manner. This process is realized by the following steps S331 to S333, including:
in step S331, the server determines a deployment manner of the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster.
The deployment mode comprises at least one of creation, update, deletion and the like.
In this step, the server determines a difference between a first operating state of the first container cluster and an expected operating state, and determines a deployment manner of the target infrastructure component in the target container based on the difference between the first operating state and the expected operating state. Accordingly, in some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters. Wherein the second operating state comprises at least one of an installation state, a version state, and a parameter state of the target base component.
The method comprises the following steps: and if the target basic component is deployed in the first container cluster, determining that the deployment mode is the updated target basic component if the second operation state of the target basic component is different from the first operation state. And if the first running state is used for indicating that the target basic component is not deployed in the first container cluster, determining that the deployment mode is to create the target basic component. And if the first running state is used for indicating that the target basic component is not deleted in the first container cluster, determining that the deployment mode is to delete the target basic component.
Wherein the first operating state is different from the second operating state and comprises: different versions of the target base component or different parameters configured in the target base component, etc. In this step, the server determines whether a target base component is created in the first container cluster through the first operating state, if the target base component is created in the first container cluster, the server determines whether a version state and configuration parameters of the target base component created in the first container cluster are consistent with an expected version state and parameters in the second operating state, and if the version state and the parameters are consistent, the target container component is not redeployed in the first container cluster. If the first operating status and the second operating status of the target base component in the first container cluster are different, the server performs step S33.
In the implementation manner, the server determines whether the first running state is the same as the second running state, if the first running state is the same as the second running state, the target basic component is not deployed, and if the first running state is different from the second running state, the target basic component is deployed, so that the deployment efficiency of the target basic component is improved.
And if at least one running state of the version state and the parameter of the first container cluster is inconsistent with the running state of the second container cluster, the server determines that the target parameter component in the first container cluster needs to be updated. If the first operation state is used for indicating that the target basic component is not deployed in the first container cluster, the server determines that the target parameter component with the operation state of the second operation state needs to be deployed in the first container cluster.
If the second running state is used for indicating to delete the target basic component, the server determines whether the target basic component is still deployed in the first container cluster according to the first running state, and if the target basic component is not deployed in the first container cluster, the target basic component is not deployed to the first container cluster any more. And if the target basic component is still deployed in the first container cluster, determining that the deployment mode of the target basic component in the first container cluster is deletion.
In the implementation manner, the first operation state is compared with the second operation state carried in the component deployment command, so that the deployment manner of the target basic component in different first container clusters is determined, and the target basic component is deployed according to the operation state of the first container cluster, so that the target basic component is uniformly deployed in the plurality of first container clusters.
In step S332, the server generates a target instruction according to the deployment mode.
If the deployment mode is to update the target basic component, the server generates an update instruction according to the version state or the parameter state in the second running state, wherein the update instruction is used for indicating the first container cluster to update the version or the parameter of the target basic component.
If the deployment mode is to create the target basic component, the server generates a creation instruction according to the version state and the parameter state in the second running state, wherein the creation instruction is used for indicating the first container cluster to create the target basic component corresponding to the version state and the parameter state.
And if the deployment mode is to delete the target basic component, the server generates a deletion instruction according to the component identifier of the target basic component, wherein the deletion instruction is used for indicating to delete the target basic component in the first container cluster.
In step S333, the server issues a target instruction to the first container cluster, where the target instruction is used to instruct to deploy the target base component in the first container cluster in a deployment manner.
In this step, the server sends the target instruction to the first container cluster through a target control module of the plurality of control modules.
In the implementation manner, by determining the deployment manner of the target basic component in the first container cluster, the problem that the target basic component in different first container clusters cannot perform the same operation on a plurality of first container clusters due to different running states of the target basic component is solved, and the target basic component is uniformly deployed in the plurality of first container clusters through one component deployment command.
Additionally, the server can also return the operational status of the plurality of first container clusters. Correspondingly, the process is as follows: the server receives a state acquisition request; responding to the state obtaining request, and obtaining a current third running state of the target basic component in the plurality of first container clusters; and returning the current third running state of the target basic component in the plurality of first container clusters.
The process of the server receiving the status obtaining request is similar to the process of the server receiving the component deployment command in step S31, and is not repeated here. The process of the server obtaining the current third operating state of the target basic component in the plurality of first container clusters is similar to the process of the server obtaining the first operating state in step S32, and details are not repeated here.
In the implementation mode, the server feeds back the running state of the target basic component to the user by acquiring the third running state, so that the running state of the target basic component is conveniently checked, and the checking efficiency of the running state of the target basic component is improved.
In the embodiment of the disclosure, when the component deployment command is received, the target basic component is deployed to the plurality of first container clusters according to the first operating state of the first container cluster, so that the target basic component is deployed to the plurality of first container clusters in the plurality of first operating states according to the component deployment command, and the deployment efficiency of the target basic component is improved.
In some embodiments, after receiving the component deployment command, the server may further store the component deployment command to this time, and detect an additional first container cluster among the plurality of first container clusters, thereby synchronizing the additional first container cluster. Referring to fig. 4, fig. 4 is a flowchart illustrating a method for deploying a base component, according to an exemplary embodiment, as shown in fig. 4, the method for deploying a base component is performed by a server, and includes the following steps S41-S45:
in step S41, the server receives a component deployment command instructing deployment of the target infrastructure component among the plurality of first container clusters.
This step is similar to step S31 and will not be described herein.
In step S42, in response to the component deployment command, the server obtains a current first operating state of the target base component in the plurality of first container clusters.
This step is similar to step S32 and will not be described herein.
In step S43, for each first container cluster, the server deploys the target infrastructure component in the first container cluster according to a current first operating state of the target infrastructure component in the first container cluster.
This step is similar to step S33 and will not be described herein.
In step S44, the server stores the component deployment command.
And after receiving the component deployment command, the server stores the component deployment command in the storage module.
It should be noted that this step is performed at any time after the server receives the component deployment command, and this is not particularly limited in the embodiment of the present disclosure.
In step S45, in response to the newly added first container cluster for providing the service for the target object, the server deploys the target infrastructure component in the newly added first container cluster according to the component deployment command.
Wherein the newly added first container cluster is the newly added first container cluster, or the first container cluster recovered for the failed container cluster.
Correspondingly, the server monitors the operating states of the plurality of container clusters through the control module, determines whether the container cluster is the first container cluster when detecting that a new container cluster is added, and executes step S45 if the container cluster is the first container cluster.
In the implementation manner, the target basic component is timely deployed in the newly added first container cluster by detecting the newly added first container cluster, so that the running states of the target basic components in the plurality of first container clusters are consistent.
In the embodiment of the disclosure, when the component deployment command is received, the target basic component is deployed to the plurality of first container clusters according to the first operating state of the first container cluster, so that the target basic component is deployed to the plurality of first container clusters in the plurality of first operating states according to the component deployment command, and the deployment efficiency of the target basic component is improved.
FIG. 5 is a block diagram illustrating a base component deployment apparatus in accordance with an exemplary embodiment. As shown in fig. 5, the apparatus includes:
a first receiving unit 501 configured to execute receiving a component deployment command, where the component deployment command is used to instruct a target infrastructure component to be deployed in a plurality of first container clusters, the plurality of first container clusters are used to provide services for a target object, and the target infrastructure component is used to run a workload of the target object;
an obtaining unit 502, configured to, in response to the component deployment command, perform obtaining of a current first operating state of the target base component in the plurality of first container clusters;
a deployment unit 503, configured to execute, for each first container cluster, deploying the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster.
In some embodiments, the deployment unit 503 includes:
a first determining subunit, configured to determine, according to a current first operating state of the target base component in the first container cluster, a deployment manner of the target base component in the first container cluster;
the generating subunit is configured to execute the generation of the target instruction according to the deployment mode;
a sending subunit configured to execute sending the target instruction to the first container cluster, where the target instruction is used to instruct the target base component to be deployed in the first container cluster in the deployment manner.
In some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters;
the first determining subunit is configured to determine that the deployment mode is to update the target base component if the target base component is already deployed in the first container cluster and a second operating state of the target base component is different from the first operating state; if the first operating state is used for indicating that the target basic component is not deployed in the first container cluster, determining that the deployment mode is to create the target basic component; and if the first running state is used for indicating that the target basic component is not deleted in the first container cluster, determining that the deployment mode is to delete the target basic component.
In some embodiments, the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component in the plurality of first container clusters;
the deployment unit 503 is further configured to execute the deploying of the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster if the first operating state of the target base component in the first container cluster is different from the second operating state.
In some embodiments, the apparatus further comprises:
a first determining unit configured to perform determining deployment condition information of the workload;
and a second determining unit configured to perform determining, from the plurality of second container clusters for providing the service for the target object, a plurality of first container clusters that match the deployment condition information according to the deployment condition information.
In some embodiments, the second determining unit includes:
a second determining subunit configured to perform determining a target class of the container cluster required by the workload according to the deployment condition information; determining a container cluster of the plurality of second container clusters that matches the target category as the first container cluster; or
And the acquisition subunit is configured to acquire target attribute information according to the deployment condition information, and determine a container cluster matched with the target attribute information in the plurality of second container clusters as the first container cluster.
In some embodiments, the apparatus further comprises:
a storage unit configured to execute storing the component deployment command;
the deploying unit 503 is further configured to, in response to the newly added first container cluster for providing the service for the target object, execute deploying the target base component in the newly added first container cluster according to the component deploying command.
In some embodiments, the apparatus further comprises:
a second receiving unit configured to execute a reception status acquisition request;
the obtaining unit 502 is further configured to, in response to the state obtaining request, perform obtaining of a current third operating state of the target base component in the plurality of first container clusters;
and the sending unit is configured to execute the third running state of the target base component in the plurality of first container clusters.
In the embodiment of the disclosure, when the component deployment command is received, the target basic component is deployed to the plurality of first container clusters according to the first operating state of the first container cluster, so that the target basic component is deployed to the plurality of first container clusters in the plurality of first operating states according to the component deployment command, and the deployment efficiency of the target basic component is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 600 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 601 and one or more memories 602, where the memory 602 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 601 to implement the methods provided by the method embodiments. Of course, the server 600 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 600 may also include other components for implementing the functions of the device, which is not described herein again.
In an exemplary embodiment, there is also provided a computer-readable storage medium in which instructions, when executed by a processor of a terminal, enable the terminal to perform the basic component deployment method in the above-described embodiments.
In an exemplary embodiment, a computer program product is also provided, which comprises a computer program/instructions, which when executed by a processor, implements the basic component deployment method in the above embodiments.
In some embodiments, the computer program according to the embodiments of the present application may be deployed to be executed on one computer device or on multiple computer devices located at one site, or may be executed on multiple computer devices distributed at multiple sites and interconnected by a communication network, and the multiple computer devices distributed at the multiple sites and interconnected by the communication network may constitute a block chain system.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for deploying a base component, the method comprising:
receiving a component deployment command, wherein the component deployment command is used for instructing a target base component to be deployed in a plurality of first container clusters, the plurality of first container clusters are used for providing services for a target object, and the target base component is used for running the workload of the target object;
responding to the component deployment command, and acquiring a current first running state of the target basic component in the plurality of first container clusters;
for each first container cluster, deploying the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster.
2. The method of claim 1, wherein deploying the target base component in the first container cluster according to the current first operating state of the target base component in the first container cluster comprises:
determining a deployment mode of the target basic component in the first container cluster according to a current first running state of the target basic component in the first container cluster;
generating a target instruction according to the deployment mode;
issuing the target instruction to the first container cluster, the target instruction to instruct deployment of the target base component in the first container cluster in the deployment manner.
3. The method of claim 2, wherein the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component among the plurality of first container clusters;
the determining, according to a current first operating state of the target base component in the first container cluster, a deployment manner of the target base component in the first container cluster includes:
if the target basic component is deployed in the first container cluster, and the second operation state of the target basic component is different from the first operation state, determining that the deployment mode is to update the target basic component;
if the first operating state is used for indicating that the target basic component is not deployed in the first container cluster, determining that the deployment mode is to create the target basic component;
and if the first running state is used for indicating that the target basic component is not deleted in the first container cluster, determining that the deployment mode is to delete the target basic component.
4. The method according to claim 1 or 3, wherein the component deployment command carries a second operating state of the target base component, the second operating state being an expected operating state of the target base component among the plurality of first container clusters;
before deploying the target base component in the first container cluster according to the current first operating state of the target base component in the first container cluster, the method further includes:
if the first operating state and the second operating state of the target basic component in the first container cluster are different, executing the step of deploying the target basic component in the first container cluster according to the current first operating state of the target basic component in the first container cluster.
5. The method of claim 1, wherein the obtaining the target base component is prior to a current first operating state in the plurality of first container clusters, the method further comprising:
determining deployment condition information for the workload;
according to the deployment condition information, determining a plurality of first container clusters matched with the deployment condition information from a plurality of second container clusters used for providing services for the target object.
6. The method of claim 1, wherein after receiving the component deployment command, the method further comprises:
storing the component deployment command;
and responding to the newly added first container cluster for providing the service for the target object, and deploying the target basic component in the newly added first container cluster according to the component deployment command.
7. A base component deployment apparatus, the apparatus comprising:
a first receiving unit configured to execute a receiving component deployment command, the component deployment command being used for instructing a target base component to be deployed in a plurality of first container clusters, the plurality of first container clusters being used for providing services for a target object, the target base component being used for running a workload of the target object;
an obtaining unit, configured to, in response to the component deployment command, perform obtaining of a current first operating state of the target base component in the plurality of first container clusters;
a deployment unit configured to, for each first container cluster, execute deployment of the target base component in the first container cluster according to a current first operating state of the target base component in the first container cluster.
8. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the infrastructure component deployment method of any of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of a server, enable the server to perform the infrastructure deployment method of any of claims 1 to 6.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the method of deployment of a base component of any of claims 1 to 6.
CN202110700236.6A 2021-06-23 2021-06-23 Basic component deployment method, device, server and storage medium Active CN113419818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110700236.6A CN113419818B (en) 2021-06-23 2021-06-23 Basic component deployment method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110700236.6A CN113419818B (en) 2021-06-23 2021-06-23 Basic component deployment method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN113419818A true CN113419818A (en) 2021-09-21
CN113419818B CN113419818B (en) 2022-06-10

Family

ID=77717543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110700236.6A Active CN113419818B (en) 2021-06-23 2021-06-23 Basic component deployment method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113419818B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835974A (en) * 2021-11-29 2021-12-24 深圳市明源云科技有限公司 Supervision method and device for k8s cluster and computer readable storage medium
WO2023050713A1 (en) * 2021-09-30 2023-04-06 苏州浪潮智能科技有限公司 Method, apparatus and system for managing container clusters and components, and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888550A (en) * 2014-04-22 2014-06-25 北京搜狐新媒体信息技术有限公司 Plug-in deployment method, device and system based on server cluster system
US20170249374A1 (en) * 2016-02-26 2017-08-31 Red Hat, Inc. Container clustering in a container-based architecture
EP3282356A1 (en) * 2016-08-11 2018-02-14 Entit Software LLC Container monitoring configuration deployment
CN111782232A (en) * 2020-07-31 2020-10-16 平安银行股份有限公司 Cluster deployment method and device, terminal equipment and storage medium
US10841152B1 (en) * 2017-12-18 2020-11-17 Pivotal Software, Inc. On-demand cluster creation and management
CN112269640A (en) * 2020-11-02 2021-01-26 浪潮云信息技术股份公司 Method for realizing life cycle management of container cloud component
CN112333004A (en) * 2020-10-13 2021-02-05 北京京东尚科信息技术有限公司 Container cluster gene-based proprietary cloud streaming type reconstruction and verification method and device
CN112511339A (en) * 2020-11-09 2021-03-16 宝付网络科技(上海)有限公司 Container monitoring alarm method, system, equipment and storage medium based on multiple clusters
CN112527507A (en) * 2020-12-21 2021-03-19 武汉联影医疗科技有限公司 Cluster deployment method and device, computer equipment and storage medium
CN112668011A (en) * 2020-12-29 2021-04-16 广东电网有限责任公司电力调度控制中心 Deployment method and system of cloud container cluster
CN112698916A (en) * 2020-12-31 2021-04-23 北京千方科技股份有限公司 Multi-container cluster management and control system, method and storage medium
CN112783607A (en) * 2021-01-29 2021-05-11 上海哔哩哔哩科技有限公司 Task deployment method and device in container cluster

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888550A (en) * 2014-04-22 2014-06-25 北京搜狐新媒体信息技术有限公司 Plug-in deployment method, device and system based on server cluster system
US20170249374A1 (en) * 2016-02-26 2017-08-31 Red Hat, Inc. Container clustering in a container-based architecture
EP3282356A1 (en) * 2016-08-11 2018-02-14 Entit Software LLC Container monitoring configuration deployment
US10841152B1 (en) * 2017-12-18 2020-11-17 Pivotal Software, Inc. On-demand cluster creation and management
CN111782232A (en) * 2020-07-31 2020-10-16 平安银行股份有限公司 Cluster deployment method and device, terminal equipment and storage medium
CN112333004A (en) * 2020-10-13 2021-02-05 北京京东尚科信息技术有限公司 Container cluster gene-based proprietary cloud streaming type reconstruction and verification method and device
CN112269640A (en) * 2020-11-02 2021-01-26 浪潮云信息技术股份公司 Method for realizing life cycle management of container cloud component
CN112511339A (en) * 2020-11-09 2021-03-16 宝付网络科技(上海)有限公司 Container monitoring alarm method, system, equipment and storage medium based on multiple clusters
CN112527507A (en) * 2020-12-21 2021-03-19 武汉联影医疗科技有限公司 Cluster deployment method and device, computer equipment and storage medium
CN112668011A (en) * 2020-12-29 2021-04-16 广东电网有限责任公司电力调度控制中心 Deployment method and system of cloud container cluster
CN112698916A (en) * 2020-12-31 2021-04-23 北京千方科技股份有限公司 Multi-container cluster management and control system, method and storage medium
CN112783607A (en) * 2021-01-29 2021-05-11 上海哔哩哔哩科技有限公司 Task deployment method and device in container cluster

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
倪海峰: "基于Kubernetes的云平台HPA算法的优化与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023050713A1 (en) * 2021-09-30 2023-04-06 苏州浪潮智能科技有限公司 Method, apparatus and system for managing container clusters and components, and storage medium
CN113835974A (en) * 2021-11-29 2021-12-24 深圳市明源云科技有限公司 Supervision method and device for k8s cluster and computer readable storage medium
CN113835974B (en) * 2021-11-29 2022-03-01 深圳市明源云科技有限公司 Supervision method and device for k8s cluster and computer readable storage medium

Also Published As

Publication number Publication date
CN113419818B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN110389900B (en) Distributed database cluster testing method and device and storage medium
CN109976774B (en) Block link point deployment method, device, equipment and storage medium
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN112035228B (en) Resource scheduling method and device
CN108804618B (en) Database configuration method, device, computer equipment and storage medium
CN112214330A (en) Method and device for deploying master nodes in cluster and computer-readable storage medium
CN111782370B (en) Kubernetes multi-cluster management system, method, terminal and storage medium
CN110752947A (en) K8s cluster deployment method and device, and deployment platform
CN104536899A (en) Software deploying and maintaining method based on intelligent cluster
CN113419818B (en) Basic component deployment method, device, server and storage medium
CN111611054B (en) Application deployment method and device
CN104978172A (en) Integrated management and control method, system and equipment of SDN (Software Defined Networking) applications
JP2016521897A (en) Application upgrade method and apparatus
CN110231956B (en) Method, system and device for constructing application program version
CN111831191A (en) Workflow configuration method and device, computer equipment and storage medium
CN113867600A (en) Development method and device for processing streaming data and computer equipment
CN116257438A (en) Updating method of interface test case and related equipment
CN111078238A (en) Centralized processing method and device for application configuration in container environment
CN113382077B (en) Micro-service scheduling method, micro-service scheduling device, computer equipment and storage medium
CN114006815B (en) Automatic deployment method and device for cloud platform nodes, nodes and storage medium
CN111147585B (en) Equipment upgrading method, device, storage medium and system
CN114168252A (en) Information processing system and method, network scheme recommendation component and method
CN111427634A (en) Atomic service scheduling method and device
US10073689B2 (en) Managing application lifecycles within a federation of distributed software applications
CN109032674B (en) Multi-process management method, system and network equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant