CN114911494A - Application deployment method, apparatus, electronic device and medium for distributed system - Google Patents

Application deployment method, apparatus, electronic device and medium for distributed system Download PDF

Info

Publication number
CN114911494A
CN114911494A CN202210634043.XA CN202210634043A CN114911494A CN 114911494 A CN114911494 A CN 114911494A CN 202210634043 A CN202210634043 A CN 202210634043A CN 114911494 A CN114911494 A CN 114911494A
Authority
CN
China
Prior art keywords
deployment
application
deployment node
target
node
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.)
Pending
Application number
CN202210634043.XA
Other languages
Chinese (zh)
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210634043.XA priority Critical patent/CN114911494A/en
Publication of CN114911494A publication Critical patent/CN114911494A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present disclosure provides an application deployment method and apparatus for a distributed system, an electronic device, a computer-readable storage medium, and a computer program product, which relate to the field of computer technologies, and in particular, to the field of application deployment technologies. The scheme is as follows: acquiring a deployment instruction of an application, wherein the deployment instruction indicates a preset computing resource condition required by the deployment of the application and at least one target deployment node set used for deploying the application; at least one target deployment node set is selected from the plurality of candidate deployment node sets based on the deployment instruction. For each target deployment node set: acquiring computing resource information of each first deployment node in the target deployment node set; selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set, wherein the current computing resource of each second deployment node in the at least one second deployment node meets a preset computing resource condition; and sending a deployment instruction to each second deployment node.

Description

Application deployment method, apparatus, electronic device and medium for distributed system
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an application deployment method and apparatus for a distributed system, an electronic device, a computer-readable storage medium, and a computer program product.
Background
In the current era of rapid development of internet, internet of things and cloud computing, the cost and efficiency of development, operation and maintenance of application services are receiving more and more attention. How to reduce the development cost of the application and improve the deployment, operation and maintenance efficiency of the application service is a technical problem to be solved urgently by those skilled in the art.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The present disclosure provides an application deployment method, apparatus, electronic device, computer-readable storage medium, and computer program product for a distributed system.
According to an aspect of the present disclosure, an application deployment method for a distributed system is provided. The distributed system includes a plurality of sets of candidate deployment nodes. The method comprises the following steps: acquiring a deployment instruction of an application, wherein the deployment instruction indicates a preset computing resource condition required by the deployment of the application and at least one target deployment node set used for deploying the application; based on the deployment instructions, at least one target deployment node set is selected from a plurality of candidate deployment node sets, each target deployment node set of the at least one target deployment node set comprising a plurality of first deployment nodes. The method further comprises the following steps: for each target deployment node set: acquiring computing resource information of each first deployment node in the target deployment node set; selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set, wherein the current computing resource of each second deployment node in the at least one second deployment node meets a preset computing resource condition; and sending a deployment instruction to each second deployment node to instruct each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
According to another aspect of the present disclosure, an application deployment apparatus for a distributed system is provided. The distributed system includes a plurality of sets of candidate deployment nodes. The device includes: the deployment instruction acquisition unit is configured to acquire a deployment instruction of the application, wherein the deployment instruction indicates a preset computing resource condition required by the deployment of the application and at least one target deployment node set used for deploying the application; a target deployment node set selection unit configured to select at least one target deployment node set from a plurality of candidate deployment node sets based on a deployment instruction, each target deployment node set of the at least one target deployment node set including a plurality of first deployment nodes; and an application deployment unit configured to, for each set of target deployment nodes: acquiring computing resource information of each first deployment node in the target deployment node set; selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set, wherein the current computing resource of each second deployment node in the at least one second deployment node meets a preset computing resource condition; and sending a deployment instruction to each second deployment node to instruct each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the application deployment method for a distributed system described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above application deployment method for a distributed system.
According to yet another aspect of the disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described application deployment method for a distributed system.
According to one or more embodiments of the disclosure, computing resources can be scheduled for a plurality of nodes to be deployed in a distributed system, and the efficiency of application deployment is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
Fig. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with embodiments of the present disclosure;
FIG. 2 shows a flow diagram of an application deployment method for a distributed system, in accordance with an embodiment of the present disclosure;
FIG. 3 shows a flow diagram of a portion of a process in an application deployment method for a distributed system, according to an embodiment of the disclosure;
FIG. 4 illustrates another flow diagram of an application deployment method for a distributed system in accordance with an embodiment of the present disclosure;
FIG. 5 shows a block diagram of an application deployment apparatus for a distributed system, according to an embodiment of the present disclosure;
FIG. 6 illustrates another block diagram of an application deployment apparatus for a distributed system, in accordance with an embodiment of the present disclosure; and
FIG. 7 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", and the like to describe various elements is not intended to limit the positional relationship, the temporal relationship, or the importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
In some related art, developers may develop applications or service products using development languages such as C + +, Go, or Java. In other related technologies, a developer may perform operations such as compiling, unit testing, integrated testing, packaging, distributing, and deploying by using a plurality of open source management tools.
However, the following technical problems still exist in the related art:
firstly, in a complex distributed system environment, with the rapid development of service iteration, the application packaging and deployment scheme in the related art cannot provide the capabilities of rapid deployment and version rollback of applications for continuous service iteration development and frequent on-line deployment.
Second, the ability to schedule computing resources for multi-zone distributed clusters in a real production application environment is lacking in the related art.
In addition, the portability problem of cloud and operating system distribution exists in the related technology, and the environment consistency guarantee of cross-development, test and production is not provided. For more complex applications, developers of multiple technology stacks are usually required to cooperate to complete the development stage, and developers of different technology stacks may adopt different development languages, which may cause huge waste of labor cost and time cost.
Based on this, the disclosed embodiments provide an application deployment method, apparatus, electronic device, computer-readable storage medium, and computer program product for a distributed system. The computing resource information of each first deployment node is obtained from a target deployment node set specified by a deployment instruction, so that the load capacity observation of each first deployment node in the target deployment node set is realized; and selecting a second deployment node of which the computing resource meets the preset computing resource condition from the plurality of first deployment nodes to deploy the application. Therefore, the capacity of rapid application deployment can be provided, computing resource scheduling can be performed on a plurality of nodes to be deployed in the distributed system, and application deployment efficiency is improved.
Kubernetes (K8 s for short) is a container-based cluster management platform that provides a mechanism for application deployment, planning, updating, and maintenance with the goal of making container-deployed applications simple and efficient. A core characteristic of K8s is to manage containers autonomously to ensure that the containers in the cloud platform operate according to the expected state of the user. In K8s, Container set (Pod) may be viewed as an aggregate of a set of containers (containers), all of which operate in Container set, which may be the smallest unit of work of K8 s.
Some K8s structures may include a mirror repository (Image-repository), a Master (Master) component, and a plurality of Node components. A mirror repository is a type of repository or collection of repositories for storing container mirrors. The Master component comprises a Kube-Master and a server interface (API-server), wherein the Kube-Master provides a management control center of K8s, and the API-server provides an interface for operation of various resource objects of K8 s. The Node components run at the corresponding nodes, provide the K8s runtime environment, and maintain the Pod. The Node component includes a kubel that provides a primary Node proxy that monitors the nodes that have been assigned and a plurality of Pod.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the application deployment method for the distributed system.
In some embodiments, the server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In certain embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. A user operating a client device 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with the server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
A user may use client devices 101, 102, 103, 104, 105, and/or 106 to send deployment instructions for an application to server 120 to instruct server 120 or other servers communicatively connected to server 120 to deploy the application. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular telephones, smart phones, tablets, Personal Digital Assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a blockchain network, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, 104, 105, and/or 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and/or 106.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the conventional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The database 130 may be of different types. In certain embodiments, the database used by the server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or conventional stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with this disclosure.
FIG. 2 shows a flow diagram of an application deployment method 200 for a distributed system including a plurality of sets of candidate deployment nodes, according to an embodiment of the disclosure. As shown in fig. 2, the method 200 includes:
step S210, acquiring a deployment instruction of the application, wherein the deployment instruction indicates a preset computing resource condition required by the deployment of the application and at least one target deployment node set used for deploying the application;
step S220, based on a deployment instruction, selecting at least one target deployment node set from a plurality of candidate deployment node sets, wherein each target deployment node set in the at least one target deployment node set comprises a plurality of first deployment nodes; and
performing the following steps for each target set of deployment nodes:
step S230, obtaining the computing resource information of each first deployment node in the target deployment node set;
step S240, selecting at least one second deployment node from the plurality of first deployment nodes in the target deployment node set, where a current computing resource of each second deployment node in the at least one second deployment node satisfies a preset computing resource condition; and
and step S250, sending a deployment instruction to each second deployment node to instruct each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
The method 200 obtains the computing resource information of each first deployment node from the target deployment node set specified by the deployment instruction, thereby realizing the observation of the load capacity of each first deployment node in the target deployment node set; and selecting a second deployment node of which the computing resources meet the preset computing resource condition from the plurality of first deployment nodes for deployment of the application. Therefore, the capacity of rapid application deployment can be provided, computing resource scheduling can be performed on a plurality of nodes to be deployed in the distributed system, and application deployment efficiency is improved.
Each set of candidate deployment nodes of the plurality of sets of candidate deployment nodes may include a plurality of candidate deployment nodes, each of which may be a candidate deployment device. Different sets of candidate deployment nodes may be located in different regions. In one example, the plurality of candidate deployment nodes may be a plurality of Node (Node) components in K8 s.
In step S210, an application deployment instruction submitted by a user may be received through a user interface. In one example, the application deployment instructions submitted by the user may be received through a server interface (API-server) of K8 s. The deployment instructions may, for example, instruct to deploy the application to be deployed in a plurality of deployment node sets located in different regions. In addition, the preset computing resource condition may be disk space, memory capacity, the number of CPU cores, the number of available processes, and the like required for deploying the application.
In one example of step S220, there may be 4 candidate deployment node sets A, B, C, D, for example, and the deployment instruction may specify to deploy the application on the deployment node set A, B by way of a tag according to business requirements. For example, deployment Node set a may include multiple Node components in K8s, and deployment Node set B may also include another multiple Node components in K8 s. Different Node components may be partitioned into the same or different sets of deployment nodes according to traffic needs. Thus, the deployment node set A, B specified by the deployment application may be selected from the candidate deployment node set A, B, C, D, for example, by a management control center such as K8 s.
In one example of step S240, the converged communication rights may be unified by encapsulating the underlying API inside the K8S cluster. For example, the management control center monitors and acquires Node (Node) information, pods information and the like in real time, so as to monitor the operation state of the deployment Node in real time and observe the load capacity. In one example, the operational status of the deployment node may be monitored in real time through a polling mechanism.
When observing that the current computing resources of one or more deployment nodes meet the preset computing resource condition, the one or more deployment nodes in the set can be used as nodes for deploying the application.
FIG. 3 shows a flow diagram of a portion of a process in an application deployment method 200 for a distributed system, according to an embodiment of the disclosure. According to some embodiments, the deployment instruction may also indicate a version identification of the application. And as shown in fig. 3, step S250 may further include:
step S351, instructing each second deployment node to acquire an image file of a corresponding version for deploying the application from an image warehouse according to the version identification, wherein the image warehouse stores the image file of at least one version for deploying the application; and
and step S352, instructing each second deployment node to deploy the application on the second deployment node based on the acquired image file.
Therefore, the application is deployed by acquiring the image file from the image warehouse, and even for the more complex application, the problems of deployment errors and the like caused by the fact that the application configuration file needs to be transmitted for many times in the traditional deployment process can be solved. In addition, the deployment instruction can indicate the version identifier of the application to be deployed, so that the image file of the version corresponding to the specified version identifier can be efficiently acquired from the image warehouse, the application deployment efficiency can be improved on one hand, and the rapid application version rollback capability can be provided on the other hand. That is, the online application may be automatically rolled back to the specified version according to the deployment instructions.
The mirror repository may be a repository or collection of repositories for storing container mirror files. In some examples, the mirror repository provides access paths for Node (Node) components within the K8s cluster by providing access ports.
In some examples, the image file stored in the image repository for deploying the at least one version of the application may be built and submitted to the image repository by a user based on a unified build standard of the image repository. Therefore, the service basic environment can be unified, and the problem of difficult service deployment caused by a fragmented environment is solved.
According to some embodiments, the step S352 may include: and determining a virtual running environment for the target application based on the acquired image file.
The virtual runtime environment may be a Container, such as a Container (Container) in K8 s. By determining the virtual operating environment for the target application according to the acquired image file, the environment consistency guarantee of cross-development, test and production can be provided.
According to some embodiments, the step S240 may include: a second deployment node is selected from the plurality of first deployment nodes, the second deployment node having more currently available computing resources than other deployment nodes of the plurality of first deployment nodes.
Therefore, the deployment node with the most available resources can be selected from the target deployment node set for application deployment, and the flexibility of efficient resource utilization can be further guaranteed.
In some examples, the management control center, e.g., K8s, may vote for multiple deployment nodes associated therewith, and when an application deployment request is obtained, the deployment node with the largest amount of currently available computing resources is selected by voting.
FIG. 4 shows a flow diagram of an application deployment method 400 for a distributed system, in accordance with an embodiment of the present disclosure. The method 400 includes steps S410 to S490. Steps S410 to S450 are similar to steps S210 to S250 described above with respect to fig. 2, and are not repeated herein for brevity.
According to some embodiments, prior to step S450, method 400 may further comprise:
step S460, performing traffic shielding on the application currently running on other first deployment nodes in the corresponding target deployment node set.
Therefore, in a scene that version updating needs to be performed on the online application, for example, traffic shielding is performed on the application of the current version running on other first deployment nodes in the target deployment node set, so that errors of the application version running on the line can be avoided, and updating of the application version can be completed smoothly.
With continued reference to fig. 4, according to some embodiments, method 400 may further include:
step S470, obtaining authority certificate information of each candidate deployment node set in a plurality of candidate deployment node sets; and
and step S480, verifying the authority certificate information.
And the authority certificate information of at least one target deployment node set selected from the multiple candidate deployment node sets passes the verification.
The authority certificate information may include a CA certificate, which is an issuing authority of the certificate. The CA is the authority responsible for issuing certificates, authenticating certificates, and managing issued certificates. The certificate may include a public key and a private key. A user can trust the CA by verifying the signature of the CA, and any user can obtain the certificate (including the public key) of the CA to verify the certificate it issued. Once verified, the certificate is considered valid.
In some examples, the permission certificate information may be placed under a specified directory of a configuration file of the deployment node.
Therefore, since the authority certificate information of the target deployment node set passes the authentication verification, the automatic application deployment is carried out by using the nodes passing the authentication verification, and the automatic smooth operation of the automatic deployment operation can be further ensured.
With continued reference to fig. 4, according to some embodiments, method 400 may further include:
step S490, aiming at each target deployment node set, in response to determining that the current computing resources of all the first deployment nodes in the target deployment node set do not meet the preset computing resource conditions, sending alarm information.
For example, in some scenarios, the management control center of K8s may monitor and acquire Node (Node) information, pods information, and the like in real time, so as to monitor and observe the operation status of the deployment Node in real time. When it is observed that the current computing resources of all the deployment nodes do not meet the preset computing resource condition, it indicates that the application cannot be normally deployed in the target deployment node set at present, and thus an application deployment error may be caused. Therefore, by sending alarm information, for example, application developers can be prompted to correct the deployment instruction or platform maintenance personnel can be prompted to maintain the deployment node again in time.
Fig. 5 shows a block diagram of an application deployment apparatus 500 for a distributed system according to an embodiment of the present disclosure.
As shown in fig. 5, the present disclosure provides an application deployment apparatus 500 for a distributed system comprising a plurality of sets of candidate deployment nodes. The apparatus 500 comprises:
a deployment instruction obtaining unit 510 configured to obtain a deployment instruction of an application, where the deployment instruction indicates a preset computing resource condition required for deploying the application and at least one target deployment node set for deploying the application;
a target deployment node set selecting unit 520 configured to select at least one target deployment node set from a plurality of candidate deployment node sets based on the deployment instruction, each target deployment node set of the at least one target deployment node set including a plurality of first deployment nodes; and
an application deployment unit 530 configured to, for each set of target deployment nodes:
acquiring computing resource information of each first deployment node in the target deployment node set;
selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set, wherein the current computing resource of each second deployment node in the at least one second deployment node meets a preset computing resource condition; and
and sending a deployment instruction to each second deployment node to instruct each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
Fig. 6 shows a block diagram of an application deployment apparatus 600 for a distributed system according to an embodiment of the present disclosure. As shown in fig. 6, apparatus 600 includes units 610-660, where units 610-630 are similar to units 510-530 described above with respect to fig. 5.
According to some embodiments, the deployment instruction may further indicate a version identification of the application, and the application deployment unit 630 may be further configured to:
indicating each second deployment node to acquire an image file of a corresponding version for deploying the application from an image warehouse according to the version identification, wherein the image warehouse stores the image file of at least one version for deploying the application; and
and instructing each second deployment node to deploy the application on the second deployment node based on the acquired image file.
According to some embodiments, the application deployment unit 630 may be further configured to:
and determining a virtual running environment for the target application based on the acquired image file.
According to some embodiments, the application deployment unit 630 may be further configured to:
selecting a second deployment node from the plurality of first deployment nodes, the second deployment node having more currently available computing resources than other deployment nodes of the plurality of first deployment nodes.
According to some embodiments, the apparatus 600 may further comprise a traffic masking unit 640, the traffic masking unit 640 being configured to: and performing traffic shielding on the applications currently running on other first deployment nodes in the corresponding target deployment node set before instructing each second deployment node to deploy the applications on the second deployment node according to the deployment instruction.
According to some embodiments, the apparatus 600 may further comprise a verification unit 650, the verification unit 650 being configured to: acquiring authority certificate information of each candidate deployment node set in a plurality of candidate deployment node sets; and verifying the authority certificate information. And the authority certificate information of at least one target deployment node set selected from the multiple candidate deployment node sets passes the verification.
According to some embodiments, the apparatus 600 may further comprise an alarm unit 660, the alarm unit 660 being configured to: and for each target deployment node set, sending alarm information in response to the fact that the current computing resources of all first deployment nodes in the target deployment node set do not meet the preset computing resource condition.
According to an embodiment of the present disclosure, there is also provided an electronic device, a readable storage medium, and a computer program product.
Referring to fig. 7, a block diagram of a structure of an electronic device 700, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701, which may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
A number of components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 may be any type of device capable of inputting information to the electronic device 700, and the input unit 706 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote controller. Output unit 707 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. Storage unit 708 may include, but is not limited to, magnetic or optical disks. The communication unit 709 allows electricityThe sub-device 700 exchanges information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and/or a chipset, such as bluetooth TM Devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 701 performs the various methods and processes described above, such as the method 200 or the method 400. For example, in some embodiments, the method 200 or the method 400 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the method 200 or the method 400 described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform the method 200 or the method 400.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced with equivalent elements that appear after the present disclosure.

Claims (17)

1. An application deployment method for a distributed system comprising a plurality of sets of candidate deployment nodes, the method comprising:
acquiring a deployment instruction of an application, wherein the deployment instruction indicates a preset computing resource condition required for deploying the application and at least one target deployment node set used for deploying the application;
selecting the at least one target deployment node set from the plurality of candidate deployment node sets based on the deployment instructions, each target deployment node set of the at least one target deployment node set comprising a plurality of first deployment nodes; and
for each target deployment node set:
acquiring computing resource information of each first deployment node in the target deployment node set;
selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set, wherein the current computing resource of each second deployment node in the at least one second deployment node meets the preset computing resource condition; and
and sending the deployment instruction to each second deployment node to instruct each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
2. The method of claim 1, wherein the deployment instruction further indicates a version identification of the application, and wherein instructing each second deployment node to deploy the application on the second deployment node in accordance with the deployment instruction comprises:
instructing each second deployment node to acquire an image file of a corresponding version for deploying the application from an image warehouse according to the version identifier, wherein the image warehouse stores the image file of at least one version for deploying the application; and
and instructing each second deployment node to deploy the application on the second deployment node based on the acquired image file.
3. The method of claim 2, wherein instructing each second deployment node to deploy the application on the second deployment node based on the obtained image file comprises:
and determining a virtual running environment for the target application based on the acquired image file.
4. The method of claim 1, wherein, for each target deployment node set, selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set comprises:
selecting a second deployment node from the plurality of first deployment nodes, the second deployment node having more currently available computing resources than other deployment nodes of the plurality of first deployment nodes.
5. The method of any of claims 1 to 4, further comprising:
and performing traffic shielding on the applications currently running on other first deployment nodes in the corresponding target deployment node set before instructing each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
6. The method of any of claims 1 to 4, further comprising:
acquiring authority certificate information of each candidate deployment node set in the plurality of candidate deployment node sets; and
verifying the authority certificate information;
wherein the authority certificate information of the at least one target deployment node set selected from the plurality of candidate deployment node sets passes the verification.
7. The method of any of claims 1 to 4, further comprising:
and for each target deployment node set, sending alarm information in response to the fact that the current computing resources of all first deployment nodes in the target deployment node set do not meet the preset computing resource condition.
8. An application deployment apparatus for a distributed system comprising a plurality of sets of candidate deployment nodes, the apparatus comprising:
a deployment instruction obtaining unit configured to obtain a deployment instruction of an application, the deployment instruction indicating a preset computing resource condition required for deploying the application and at least one target deployment node set for deploying the application;
a target deployment node set selection unit configured to select the at least one target deployment node set from the plurality of candidate deployment node sets based on the deployment instruction, each target deployment node set of the at least one target deployment node set comprising a plurality of first deployment nodes; and
an application deployment unit configured to, for each set of target deployment nodes:
acquiring computing resource information of each first deployment node in the target deployment node set;
selecting at least one second deployment node from a plurality of first deployment nodes in the target deployment node set, wherein the current computing resource of each second deployment node in the at least one second deployment node meets the preset computing resource condition; and
and sending the deployment instruction to each second deployment node to instruct each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
9. The apparatus of claim 8, wherein the deployment instructions further indicate a version identification of the application, and wherein the application deployment unit is further configured to:
instructing each second deployment node to acquire an image file for deploying the corresponding version of the application from an image repository according to the version identifier, wherein the image repository stores the image file for deploying at least one version of the application; and
and instructing each second deployment node to deploy the application on the second deployment node based on the acquired image file.
10. The apparatus of claim 9, wherein the application deployment unit is further configured to:
and determining a virtual running environment for the target application based on the acquired image file.
11. The apparatus of claim 8, wherein the application deployment unit is further configured to:
selecting a second deployment node from the plurality of first deployment nodes, the second deployment node having more currently available computing resources than other deployment nodes of the plurality of first deployment nodes.
12. The apparatus of any of claims 8 to 11, further comprising a traffic masking unit configured to:
and performing traffic shielding on the applications currently running on other first deployment nodes in the corresponding target deployment node set before instructing each second deployment node to deploy the application on the second deployment node according to the deployment instruction.
13. The apparatus of any of claims 8 to 11, further comprising a verification unit configured to:
acquiring authority certificate information of each candidate deployment node set in the multiple candidate deployment node sets; and
verifying the authority certificate information;
wherein the permission certificate information of the at least one target deployment node set selected from the plurality of candidate deployment node sets passes the verification.
14. The apparatus of any of claims 8 to 11, further comprising an alarm unit configured to:
and for each target deployment node set, sending alarm information in response to the fact that the current computing resources of all first deployment nodes in the target deployment node set do not meet the preset computing resource condition.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program, wherein the computer program realizes the method of any one of claims 1-7 when executed by a processor.
CN202210634043.XA 2022-06-06 2022-06-06 Application deployment method, apparatus, electronic device and medium for distributed system Pending CN114911494A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210634043.XA CN114911494A (en) 2022-06-06 2022-06-06 Application deployment method, apparatus, electronic device and medium for distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210634043.XA CN114911494A (en) 2022-06-06 2022-06-06 Application deployment method, apparatus, electronic device and medium for distributed system

Publications (1)

Publication Number Publication Date
CN114911494A true CN114911494A (en) 2022-08-16

Family

ID=82770674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210634043.XA Pending CN114911494A (en) 2022-06-06 2022-06-06 Application deployment method, apparatus, electronic device and medium for distributed system

Country Status (1)

Country Link
CN (1) CN114911494A (en)

Similar Documents

Publication Publication Date Title
US11842221B2 (en) Techniques for utilizing directed acyclic graphs for deployment instructions
US11233873B2 (en) Dynamic weighting for cloud-based provisioning systems
CN111279320B (en) API repository implementing microservice configuration and management
US10503493B2 (en) Distributed versioning of applications using cloud-based systems
US11036696B2 (en) Resource allocation for database provisioning
CN114008605A (en) Big data application lifecycle management
EP4009170B1 (en) Data management
US11755337B2 (en) Techniques for managing dependencies of an orchestration service
CN112925651A (en) Application resource deployment method, device, electronic equipment and medium
US11281510B2 (en) Intelligent scaling in microservice-based distributed systems
KR20150132155A (en) Diagnostics storage within a multi-tenant data center
CN115292026A (en) Management method, device and equipment of container cluster and computer readable storage medium
EP4094149A1 (en) Updating code in distributed version control system
WO2021150435A1 (en) Techniques for utilizing directed acyclic graphs for deployment instructions
CN114647485A (en) Dynamic cloud deployment for Robotic Process Automation (RPA) robots
US9513948B2 (en) Automated virtual machine provisioning based on defect state
CN114091672B (en) Distributed model reasoning method and device, electronic equipment and medium
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
WO2021150306A1 (en) Techniques for detecting drift in a deployment orchestrator
US20220276901A1 (en) Batch processing management
CN114911494A (en) Application deployment method, apparatus, electronic device and medium for distributed system
CN113126928A (en) File moving method and device, electronic equipment and medium
CN114730258A (en) User interface techniques for infrastructure orchestration services
US11953972B2 (en) Selective privileged container augmentation
CN115454647A (en) Data processing method and device, equipment and medium

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