Software deployment method and device

By dividing the deployment stages in the electronic device cluster, using grayscale deployment and random selection of devices, the device operation problems caused by software deployment are solved, and an efficient and reliable software deployment process is achieved, reducing the occurrence of failures.

CN110413287BActive Publication Date: 2025-09-02BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910698706.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-31
Publication Date
2025-09-02
Estimated Expiration
2039-07-31

AI Technical Summary

Technical Problem

When deploying software in an electronic device cluster, it may cause device operation problems or even server services that cannot be operated normally, and it is difficult for the existing technology to effectively avoid large-scale failures.

Method used

By dividing the deployment stages, a grayscale deployment method is used to set target device parameters for different subsets of electronic devices, randomly select and deploy electronic devices, and software changes and verification are performed in each stage to ensure that the software is successfully run and then deploy in the next stage. If necessary, rollback operations are performed, and finally, full deployment is carried out with pre-set concurrency numbers.

Benefits of technology

It effectively avoids large-scale errors in multiple electronic devices, ensures the success rate of software deployment, reduces the number of failures in a short period of time, and lays the foundation for full deployment through precise testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110413287B_ABST
    Figure CN110413287B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a software deployment method and apparatus. The method can be applied to the field of cloud computing, and a specific implementation of the method includes: in response to receiving a software deployment request for indicating the deployment of target software in an electronic device cluster, determining the parameter value of the target device parameter of the electronic device to be deployed; deploying the target software to the electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment stages, and the deployed electronic devices have the parameter value of the target device parameter. The embodiments of the present application can avoid large-scale error reporting of multiple electronic devices through grayscale deployment. At the same time, by setting parameter values, the deployment effects of various electronic devices can be accurately tested to lay the foundation for the full deployment of electronic devices. In addition, by setting different deployment stages, the number of failures of electronic devices in a short period of time can be reduced as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, specifically to the field of Internet technology, and more particularly to a software deployment method and apparatus. Background Art

[0002] With the development of internet technology, more and more internet companies have a large number of electronic devices. The various parameters of these electronic devices may vary. Therefore, the application effect of the same software may vary greatly.

[0003] Deploying a certain software in an electronic device may cause some operational problems of the electronic device, or even cause some services on the server to not operate normally. Summary of the Invention

[0004] The embodiments of the present application provide a software deployment method and apparatus.

[0005] In a first aspect, an embodiment of the present application provides a software deployment method, comprising: in response to receiving a software deployment request for indicating deployment of target software in an electronic device cluster, determining parameter values ​​of target device parameters of the electronic device to be deployed; deploying the target software to electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment stages, and the deployed electronic devices have parameter values ​​of the target device parameters.

[0006] In some embodiments, determining the parameter values ​​of the target device parameters of the electronic devices to be deployed includes: for one of the deployment stages, determining the target device parameters of the deployment stage and the parameter values ​​of the target device parameters of the deployment stage; and for one of the deployment stages, the subset of electronic devices deployed in the deployment stage is obtained in the following manner: from the electronic device cluster, from the electronic devices that have the parameter values ​​of the target device parameters of the deployment stage, randomly selecting a target number of electronic devices as the subset of electronic devices deployed in the deployment stage.

[0007] In some embodiments, the target software is deployed through the following steps: for each deployment stage, the following software operations are performed: using the target software, software changes are made to electronic devices in the subset of electronic devices to be deployed in that deployment stage; in response to a successful software change, it is verified whether the changed software runs successfully; in response to a successful run, the software operation is performed on electronic devices in the subset of electronic devices to be deployed in the next deployment stage.

[0008] In some embodiments, the method further includes: in response to determining that the software change of one of the electronic devices is unsuccessful or the changed software does not run successfully, performing a rollback operation on the one of the electronic devices, or redeploying the target software on the one of the electronic devices.

[0009] In some embodiments, the method further includes: in response to the successful execution of the software operation in each deployment stage, performing the software change on other electronic devices in the electronic device cluster with a preset concurrency number, wherein the number of other electronic devices is greater than the number of electronic devices in the at least one electronic device subset.

[0010] In some embodiments, the target device parameters include at least one of the following: kernel version, hardware attributes, including specified hardware and tenant attributes, and each electronic device to be deployed has one or two target device parameters.

[0011] In a second aspect, an embodiment of the present application provides a software deployment device, comprising: a determination unit, configured to determine the parameter value of a target device parameter of an electronic device to be deployed in response to receiving a software deployment request for instructing deployment of target software in an electronic device cluster; a deployment unit, configured to deploy the target software to electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment stages, and the deployed electronic devices have the parameter value of the target device parameter.

[0012] In some embodiments, the determination unit is further configured to: for one of the deployment stages, determine the target device parameters of the deployment stage and the parameter values ​​of the target device parameters of the deployment stage; and for one of the deployment stages, the subset of electronic devices deployed in the deployment stage is obtained in the following manner: from the electronic device cluster, from the electronic devices that have the parameter values ​​of the target device parameters of the deployment stage, randomly select a target number of electronic devices as the subset of electronic devices deployed in the deployment stage.

[0013] In some embodiments, the target software is deployed through the following steps: for each deployment stage, the following software operations are performed: using the target software, software changes are made to electronic devices in the subset of electronic devices to be deployed in that deployment stage; in response to a successful software change, it is verified whether the changed software runs successfully; in response to a successful run, the software operation is performed on electronic devices in the subset of electronic devices to be deployed in the next deployment stage.

[0014] In some embodiments, the device also includes: a supplement unit, configured to perform a rollback operation on one of the electronic devices, or redeploy the target software on one of the electronic devices in response to determining that the software change of one of the electronic devices is unsuccessful or the changed software is not successfully run.

[0015] In some embodiments, the device also includes: a full deployment unit, configured to perform the software changes on other electronic devices in the electronic device cluster with a preset concurrency number in response to the successful execution of the software operation in each deployment stage, wherein the number of other electronic devices is greater than the number of electronic devices in the at least one electronic device subset.

[0016] In some embodiments, the target device parameters include at least one of the following: kernel version, hardware attributes, including specified hardware and tenant attributes, and each electronic device to be deployed has one or two target device parameters.

[0017] In a third aspect, an embodiment of the present application provides an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement a method as in any embodiment of the software deployment method.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method such as any embodiment of the software deployment method.

[0019] The software deployment solution provided in the embodiment of the present application first determines the parameter values ​​of the target device parameters of the electronic device to be deployed in response to receiving a software deployment request for instructing to deploy the target software in the electronic device cluster. Afterwards, the target software is deployed to the electronic devices in at least one electronic device subset in the electronic device cluster, wherein the deployment stages corresponding to different electronic device subsets are different, and the deployed electronic devices have the parameter values ​​of the target device parameters. The embodiment of the present application can avoid large-scale error reporting of multiple electronic devices through grayscale deployment. At the same time, by setting parameter values, the deployment effects of various electronic devices can be accurately tested to lay the foundation for the full deployment of electronic devices. In addition, by setting different deployment stages, the number of failures of electronic devices in a short period of time can be reduced as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0021] Figure 1is an exemplary system architecture diagram to which the present application may be applied;

[0022] Figure 2 is a flowchart of an embodiment of a software deployment method according to the present application;

[0023] Figure 3 is a schematic diagram of an application scenario of the software deployment method according to the present application;

[0024] Figure 4 is a flowchart of another embodiment of a software deployment method according to the present application;

[0025] Figure 5 is a structural diagram of an embodiment of a software deployment device according to the present application;

[0026] Figure 6 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0027] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0028] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the software deployment method or software deployment apparatus of the present application can be applied.

[0030] like Figure 1 As shown, system architecture 100 may include electronic devices to be deployed 101, 102, and 103, a network 104, and a central control electronic device 105. Network 104 is used to provide a medium for communication links between electronic devices to be deployed 101, 102, and 103 and electronic device 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0031] A user (such as a network operation and maintenance personnel) can use the central control electronic device 105 or other electronic devices to control the central control electronic device 105 and interact with the electronic devices to be deployed 101, 102, 103 through the network 104 to receive or send messages, etc. The electronic devices to be deployed 101, 102, 103 and the central control electronic device 105 can be in the same electronic device cluster.

[0032] The electronic devices to be deployed 101, 102, 103 and the central control electronic device 105 can be servers that provide various services, such as backend servers that support terminal devices. The central control electronic device 105 can analyze and process the received software deployment request and deploy the target software to at least one of the electronic devices to be deployed 101, 102, 103.

[0033] It should be understood that Figure 1 The number of electronic devices and networks in the embodiment is merely illustrative. Any number of electronic devices and networks may be provided according to implementation requirements.

[0034] Continue to refer Figure 2 , shows a process 200 of an embodiment of a software deployment method according to the present application. The software deployment method includes the following steps:

[0035] Step 201 : In response to receiving a software deployment request for instructing to deploy target software in an electronic device cluster, determining parameter values ​​of target device parameters of electronic devices to be deployed.

[0036] In this embodiment, the execution subject of the software deployment method (eg Figure 1 The server or terminal device shown in the figure can receive the software deployment request and determine the parameter values ​​of the target device parameters of the electronic device to be deployed. Specifically, the software deployment request instructs the execution subject to deploy the target software in the electronic device cluster. The deployment initiator can use the terminal device to initiate the software deployment request through the API (Application Programming Interface), command line terminal interface, or web terminal interface.

[0037] The target device parameter may be one or more device parameters of pre-specified electronic devices in the electronic device cluster to be deployed. In addition, it is understood that the parameter value of the device parameter here may be represented by a numerical value or by other means.

[0038] Step 202 : deploying target software to electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment phases, and the deployed electronic devices have parameter values ​​of target device parameters.

[0039] In this embodiment, the execution entity can deploy target software to electronic devices in the electronic device cluster. Specifically, the deployment process can be divided into multiple deployment phases, with each deployment phase deploying a subset of electronic devices. The electronic device subset consists of some of the electronic devices in the electronic device cluster. The electronic device subset can be determined in real time during the deployment of the target software. For example, the electronic devices to be deployed in each deployment phase can be determined during the deployment process of each deployment phase. Furthermore, the electronic device subset can be determined before the target software is deployed.

[0040] In practice, during the deployment process, the execution entity may select electronic devices having the parameter values ​​of the target device parameters from the electronic device cluster as electronic devices in the electronic device subset, and deploy the target software to the electronic devices in the electronic device subset.

[0041] In some optional implementations of this embodiment, the target device parameters include at least one of the following: kernel version, hardware attributes, including specified hardware and tenant attributes, and each electronic device to be deployed may have one or two target device parameters.

[0042] Specifically, the kernel version refers to the version of the kernel in the electronic device, and its parameter value can be the version number. The parameter value of the hardware attribute can be the hardware model of the electronic device, specifically the machine model of the electronic device as a whole, or the model of a certain component. Including specified hardware can indicate whether the electronic device contains a special hardware, such as whether it contains a GPU card or whether it contains an FPGA card, etc. The tenant here refers to the user device that requests a service or computer computing resources. Different categories of tenant attributes can be used as different parameter values. For example, the parameter values ​​of tenant attributes can include: computing performance sensitive, storage performance sensitive, and network performance sensitive.

[0043] In these implementations, the execution entity can test the effectiveness of the deployed software on a variety of device parameters and parameter values. Furthermore, these implementations employ a smaller number of target device parameters for each deployed electronic device, introducing fewer variables and making it easier to determine the cause if deployment fails.

[0044] In some optional implementations of this embodiment, the execution entity may deploy the target software through the following steps:

[0045] For each deployment stage, the following software operations are performed: using the target software, software changes are made to the electronic devices in the subset of electronic devices to be deployed in that deployment stage; in response to a successful software change, it is verified whether the changed software runs successfully; in response to a successful run, software operations are performed on the electronic devices in the subset of electronic devices to be deployed in the next deployment stage.

[0046] In these optional implementations, the execution entity can use the target software to perform software changes on electronic devices in the subset of electronic devices. The software change here can be an operation to change the software on the electronic device, such as software installation or software update. In practice, after the software change is successful, the execution entity can verify whether the changed software runs successfully. For example, if the software is a service provided by a server, if the service cannot be started after the change, the changed software fails to run. If the service starts normally and no errors are reported within a certain period of time, it can be determined that the operation is successful.

[0047] After executing the software operation on the deployment stage, the execution subject may execute the software operation on the electronic device of the next deployment stage in response to the successful execution of the software deployed on the electronic device of the deployment stage.

[0048] These implementations can verify whether the changed software runs successfully based on the changed software, thereby determining whether the target software is successfully deployed on the electronic device.

[0049] In some optional application scenarios of these implementations, the above method may further include:

[0050] In response to determining that the software change of one of the electronic devices is unsuccessful or the changed software is not successfully executed, a rollback operation is performed on the electronic device, or the target software is redeployed on the electronic device.

[0051] In these optional application scenarios, if a software change on an electronic device fails, or the changed software fails to run successfully, the execution entity can roll back the software or redeploy the target software. If the technician determines that the target software needs repair, they can perform a repair and update. After the rollback, or if redeployment still fails, the execution entity can deploy the repaired and updated target software to the electronic device.

[0052] In practice, a rollback operation involves rolling back an electronic device that has already deployed the target software to an undeployed state, thereby restoring the electronic device's functionality in a timely manner. Re-deploying the target software to an electronic device involves repeating the deployment to that device to prevent deployment failures due to random factors.

[0053] In some optional application scenarios of these implementations, the above method may also include: in response to the successful execution of software operations in each deployment stage, performing software changes on other electronic devices in the electronic device cluster with a preset concurrency number, wherein the number of other electronic devices is greater than the number of electronic devices in at least one electronic device subset.

[0054] In these optional application scenarios, the execution entity can perform software changes on electronic devices other than those in the aforementioned subsets of electronic devices. That is, the target software can be used to perform software changes on electronic devices that are not deployed with the target software. Specifically, the software changes can be performed on the aforementioned other electronic devices according to a pre-set concurrency number. For example, if the concurrency number is 10, the software changes will be performed on 10 electronic devices simultaneously during the software change process.

[0055] The electronic equipment in these application scenarios is fully deployed at a certain concurrency rate to avoid widespread errors caused by simultaneous changes. Furthermore, in these application scenarios, fewer electronic devices are deployed first, allowing for a smaller number of machines to test the deployment and better prevent large-scale failures in the electronic equipment cluster.

[0056] Continue to see Figure 3 , Figure 3 This is a schematic diagram of an application scenario of the software deployment method according to this embodiment. Figure 3 In the application scenario, the execution subject 301 can respond to receiving a software deployment request 302 for instructing to deploy target software in an electronic device cluster, i.e., a server cluster including 100 servers, and determine that the target device parameters of the electronic device to be deployed are the kernel version and the inclusion of specified hardware, and the corresponding parameter values ​​303 are kernel version number 1.0.3, kernel version number 2.0.5, and the inclusion of a GPU card. The execution subject 301 deploys target software 304 to the electronic devices in two subsets of electronic devices in the electronic device cluster. For example, in the first deployment phase, the electronic device subset consisting of three electronic devices with parameter values ​​of kernel version number 1.0.3 and three electronic devices with parameter values ​​of kernel version number 2.0.5 is deployed, and in the second deployment phase, the electronic device subset consisting of three electronic devices including a GPU card is deployed. The two electronic device subsets correspond to two deployment phases respectively, and the nine deployed electronic devices have the parameter values ​​303 of the target device parameters.

[0057] The methods provided in the above embodiments of this application can avoid widespread error reporting across multiple electronic devices by implementing grayscale deployments divided into different deployment phases. Furthermore, by setting parameter values, the deployment effects of various electronic devices can be accurately tested, laying the foundation for full deployment of electronic devices. Furthermore, by setting different deployment phases, the number of electronic device failures within a short period of time can be minimized.

[0058] Further references Figure 4 , which shows a process 400 of another embodiment of a software deployment method. The process 400 of the software deployment method includes the following steps:

[0059] Step 401 : In response to receiving a software deployment request for instructing to deploy target software in an electronic device cluster, for one deployment phase, determining a target device parameter of the deployment phase and a parameter value of the target device parameter of the deployment phase.

[0060] In this embodiment, the execution subject of the software deployment method (eg Figure 1 The server or terminal device shown in the figure can determine the target device parameters and parameter values ​​of the electronic device to be deployed in one of the deployment stages in response to receiving the software deployment request. The above steps of determining the target device parameters and parameter values ​​can be performed for each deployment stage.

[0061] In practice, the above execution entity can not only determine the target device parameters and parameter values ​​to be deployed in each deployment stage, but also determine the number of deployment stages, the number of electronic devices to be deployed corresponding to each target device parameter in each deployment stage, and so on.

[0062] Step 402, for one of the deployment phases, the subset of electronic devices deployed in the deployment phase is obtained by randomly selecting a target number of electronic devices from the electronic device cluster that have parameter values ​​of the target device parameters of the deployment phase as the subset of electronic devices deployed in the deployment phase.

[0063] In this embodiment, the execution entity may randomly select a target number of electronic devices from the electronic devices in the electronic device cluster that have the target device parameter value for each parameter value of the electronic device in one of the deployment phases to form one of the electronic device subsets. The execution entity may determine in advance or in real time the number of electronic devices to be deployed that have each parameter value for the deployment phase as the target number.

[0064] In practice, when selecting electronic devices, all electronic devices with the aforementioned parameter values ​​are equally qualified, and the execution entity can randomly select from them. For example, if 100 devices are running the target version 1.0.1, the execution entity can randomly select two devices from the target version to be deployed in the first deployment phase.

[0065] Step 403 : deploying target software to electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment phases, and the deployed electronic devices have parameter values ​​of target device parameters.

[0066] In this embodiment, the execution entity can deploy the target software to the electronic devices in the electronic device cluster. Specifically, the deployment can be divided into multiple stages, with each stage deploying a subset of electronic devices. The electronic device subset consists of some of the electronic devices in the electronic device cluster. The electronic device subset can be determined by selecting the electronic devices in the subset in real time during the target software deployment process, or it can be determined before the target software is deployed.

[0067] In this embodiment, the random selection of eligible electronic devices by the execution entity allows for multi-stage deployment involving a small number of devices to better demonstrate the effectiveness of deploying target software on electronic devices with specific parameter values, avoiding the discrepancies between deployed and non-deployed devices that might arise from selecting electronic devices according to specific rules. Furthermore, the relatively small number of target device parameters for each electronic device introduces fewer variables, making it easier to determine the cause of unsuccessful deployment.

[0068] Further references Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a software deployment device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0069] like Figure 5 As shown, the software deployment apparatus 500 of this embodiment includes: a determination unit 501 and a deployment unit 502. The determination unit 501 is configured to, in response to receiving a software deployment request for instructing deployment of target software in an electronic device cluster, determine the parameter value of a target device parameter of an electronic device to be deployed; and the deployment unit 502 is configured to deploy the target software to electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment stages, and the deployed electronic devices have the parameter value of the target device parameter.

[0070] In some embodiments, the determination unit 501 of the software deployment apparatus 500 may receive a software deployment request and determine parameter values ​​of target device parameters of the electronic device to be deployed. Specifically, the software deployment request instructs the execution subject to deploy the target software in the electronic device cluster. The deployment initiator may use a terminal device to initiate the software deployment request through an API, a command line terminal interface, or a web terminal interface.

[0071] In some embodiments, the deployment unit 502 can deploy the target software to the electronic devices in the electronic device cluster. Specifically, the deployment can be divided into multiple stages, with each stage deploying a subset of electronic devices. The electronic device subset consists of some of the electronic devices in the electronic device cluster. The electronic device subset can be determined by selecting the electronic devices in the subset in real time during the process of deploying the target software, or it can be determined before the target software is deployed.

[0072] In some optional implementations of this embodiment, the determination unit is further configured to: for one of the deployment stages, determine the target device parameters of the deployment stage and the parameter values ​​of the target device parameters of the deployment stage; and for one of the deployment stages, the subset of electronic devices deployed in the deployment stage is obtained in the following manner: from the electronic device cluster, a target number of electronic devices that have the parameter values ​​of the target device parameters of the deployment stage are randomly selected as the subset of electronic devices deployed in the deployment stage.

[0073] In some optional implementations of this embodiment, the target software is deployed through the following steps: for each deployment stage, the following software operations are performed: using the target software, software changes are made to electronic devices in the subset of electronic devices to be deployed in that deployment stage; in response to a successful software change, it is verified whether the changed software runs successfully; in response to a successful run, the software operation is performed on electronic devices in the subset of electronic devices to be deployed in the next deployment stage.

[0074] In some optional implementations of this embodiment, the device also includes: a supplement unit, configured to perform a rollback operation on one of the electronic devices, or redeploy the target software on one of the electronic devices in response to determining that the software change of one of the electronic devices is unsuccessful or the changed software is not successfully run.

[0075] In some optional implementations of this embodiment, the device also includes: a full deployment unit, configured to perform the software changes on other electronic devices in the electronic device cluster with a preset concurrency number in response to the successful execution of the software operation in each deployment stage, wherein the number of other electronic devices is greater than the number of electronic devices in the at least one electronic device subset.

[0076] In some optional implementations of this embodiment, the target device parameters include at least one of the following: kernel version, hardware attributes, including specified hardware and tenant attributes, and each electronic device to be deployed may have one or two target device parameters.

[0077] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0078] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0079] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium of the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wire, optical cable, RF (radio frequency), etc., or any suitable combination thereof.

[0080] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0081] The units involved in the embodiments described in the present application may be implemented in software or in hardware. The described units may also be provided in a processor. For example, they may be described as: a processor comprising a determination unit and a deployment unit. The names of these units do not, in some cases, constitute a limitation on the units themselves. For example, the deployment unit may also be described as a "unit for deploying target software to electronic devices in at least one subset of electronic devices in a cluster of electronic devices."

[0082] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the device, the device: in response to receiving a software deployment request for instructing to deploy target software in an electronic device cluster, determines the parameter value of the target device parameter of the electronic device to be deployed; deploys the target software to the electronic devices in at least one electronic device subset in the electronic device cluster, wherein different electronic device subsets correspond to different deployment stages, and the deployed electronic devices have the parameter value of the target device parameter.

[0083] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A software deployment method, comprising: In response to receiving a software deployment request for instructing deployment of target software in the electronic device cluster, determining a parameter value of a target device parameter of the electronic device to be deployed; Deploying the target software to electronic devices in at least one subset of electronic devices in the electronic device cluster, wherein the deployment process is divided into a plurality of deployment phases, with one subset of electronic devices deployed in each deployment phase, and the deployed electronic devices having parameter values ​​of the target device parameters; The target software is deployed by following the steps below: For each deployment phase, performing the following software operations: using the target software, performing software changes on electronic devices in the subset of electronic devices to be deployed in the deployment phase; in response to a successful software change, verifying whether the changed software runs successfully; In response to the running being successful, executing the software operation on electronic devices in the subset of electronic devices to be deployed in the next deployment phase; In response to determining that the software of one of the electronic devices is not successfully changed or the changed software is not successfully executed, a rollback operation is performed on the one of the electronic devices, or the target software is redeployed on the one of the electronic devices.

2. The method according to claim 1, wherein Determining the parameter value of the target device parameter of the electronic device to be deployed includes: For one of the deployment phases, determining a target device parameter for the deployment phase and a parameter value of the target device parameter for the deployment phase; and For one of the deployment phases, the subset of electronic devices deployed in the deployment phase is obtained in the following manner: A target number of electronic devices are randomly selected from the electronic device cluster that have parameter values ​​of the target device parameters in the deployment phase as a subset of electronic devices deployed in the deployment phase.

3. The method according to claim 1, wherein The method further comprises: In response to the successful execution of the software operation in each deployment stage, the software change is performed on other electronic devices in the electronic device cluster with a preset concurrency number, wherein the number of the other electronic devices is greater than the number of electronic devices in the at least one electronic device subset.

4. The method according to claim 1, wherein The target device parameters include at least one of the following: kernel version, hardware attributes, including specified hardware and tenant attributes. Each electronic device to be deployed may have one or two target device parameters.

5. A software deployment device, comprising: a determining unit configured to determine a parameter value of a target device parameter of an electronic device to be deployed in response to receiving a software deployment request for instructing to deploy target software in an electronic device cluster; a deployment unit configured to deploy the target software to electronic devices in at least one subset of electronic devices in the electronic device cluster, wherein the deployment process is divided into a plurality of deployment phases, each deployment phase deploying one subset of electronic devices, and the deployed electronic devices have parameter values ​​of the target device parameters; Wherein, the deployment unit is further configured to: For each deployment phase, performing the following software operations: using the target software, performing software changes on electronic devices in the subset of electronic devices to be deployed in the deployment phase; in response to a successful software change, verifying whether the changed software runs successfully; In response to the running being successful, executing the software operation on electronic devices in the subset of electronic devices to be deployed in the next deployment phase; In response to determining that the software of one of the electronic devices is not successfully changed or the changed software is not successfully executed, a rollback operation is performed on the one of the electronic devices, or the target software is redeployed on the one of the electronic devices.

6. The device according to claim 5, wherein The determining unit is further configured to: For one of the deployment phases, determining a target device parameter for the deployment phase and a parameter value of the target device parameter for the deployment phase; and For one of the deployment phases, the subset of electronic devices deployed in the deployment phase is obtained in the following manner: A target number of electronic devices are randomly selected from the electronic device cluster that have parameter values ​​of the target device parameters in the deployment phase as a subset of electronic devices deployed in the deployment phase.

7. The device according to claim 5, wherein The device further comprises: The full deployment unit is configured to perform the software changes on other electronic devices in the electronic device cluster at a preset concurrency number in response to the successful execution of the software operation in each deployment stage, wherein the number of the other electronic devices is greater than the number of electronic devices in the at least one electronic device subset.

8. The device according to claim 5, wherein The target device parameters include at least one of the following: kernel version, hardware attributes, including specified hardware and tenant attributes. Each electronic device to be deployed may have one or two target device parameters.

9. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Container deployment method, special resource management terminal, and readable storage medium

    CN109213493A

  • Multi-environment application deployment method and device, storage medium and apparatus

    CN109656569A