Software deployment method, device, electronic device, storage medium and program product
By using upgrader components and container runtime components in software deployment, and extracting and identifying software copies based on static dispatch conditions, the mirror management pressure caused by software deployment in the existing technology is solved, and a more flexible and efficient basic library is achieved. Upgrade and mirror management.
Patent Information
- Application Number
- CN202410275968.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-03-11
AI Technical Summary
Due to the unified image distribution, the existing software deployment solution has strongly bound upstream dependencies with complete applications, which requires the image to be updated one by one when upgrading the basic library. The process is complex and inefficient, which increases the pressure of image management.
By calling the upgrader component, the installation package is extracted to the target location of the host file system based on the conditions of static dispatch, a software copy is formed, and an identification protocol is generated so that the component during the container runtime scans and selects the target software copy that meets the software deployment requirements, and finally generates a hanging Load resolutions to start the business container and complete the software deployment.
The upstream dependency is decoupled from complete applications, making the basic library upgrade more flexible and efficient, simplifying mirror management, and reducing the pressure of mirror management caused by software deployment.
Smart Images

Figure CN118012453B_ABST
Abstract
Description
Background Art
[0002] With the rapid expansion of information technology needs, the demand for computer equipment and computer software in all walks of life is increasing. The software involves reasonable deployment issues before use. Software deployment solutions include image file distribution, container images, and software file sharing. Among them, container images are a software deployment solution that implements software deployment through container clusters combined with upstream dependencies. Upstream dependencies refer to non-business-specific upstream libraries selected by software engineering operators based on their actual needs during the actual software development process. The current software deployment solution is distributed through a unified image, which strongly binds the upstream dependency to the complete application. If the upstream basic library needs to be upgraded due to vulnerabilities, etc., various images need to be updated one by one. The update process is complicated and inefficient, which leads to great pressure on image management.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The purpose of the present disclosure is to provide a software deployment method, a software deployment device, an electronic device and a computer-readable storage medium, which can at least to some extent improve the problem of high pressure on image management caused by software deployment in related technologies.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0006] According to one aspect of the present disclosure, a software deployment method is provided, comprising: in response to an acquired installation package of software to be deployed, calling an upgrader component to extract the installation package to a corresponding target location in a host file system based on statically assigned conditions to form a software copy; generating an identification protocol based on the statically assigned conditions and software deployment requirements; in response to an acquired business container startup request, calling a container runtime component to scan a directory of the software copy based on the identification protocol to obtain a target software copy that meets the software deployment requirements; generating a mount resolution for the target software copy to start the business container based on the mount protocol to complete software deployment.
[0007] In one embodiment, in response to obtaining an installation package of the software to be deployed, calling an upgrader component to extract the installation package to a corresponding target location in a host file system based on statically dispatched conditions to form a software copy, including: in response to the obtained installation package, calling the upgrader component to obtain the statically dispatched conditions; calculating the target location of the software copy in the host file system according to the statically dispatched conditions and a pre-negotiated software copy extraction directory format; extracting the installation package to the target location to form the software copy.
[0008] In one embodiment, after extracting the directory format of the software copy according to the statically assigned conditions and the pre-negotiated software copy and calculating the target location of the software copy in the host file system, the method further includes: detecting whether the installation package has been deployed on the host file system based on the target location; and when it is detected that the installation package has not been deployed, calling the upgrader component to generate the software copy.
[0009] In one embodiment, the method further includes: configuring a configuration scheme description interface in the software copy, wherein the configuration scheme description interface is used to provide configuration description information of the software copy to the container runtime component.
[0010] In one embodiment, an identification protocol is generated based on the statically assigned conditions and software deployment requirements, including: determining the deployment version number of the software copy based on the statically assigned conditions; configuring the deployment version number and the statically assigned conditions based on a pre-negotiated software copy extraction directory format to generate the identification protocol; wherein the identification protocol is used to enable the directory path where the software copy is located to be identified and distinguished by the container runtime component.
[0011] In one embodiment, in response to an acquired business container startup request, a container runtime component is called to scan the directory of the software copy based on the identification protocol to obtain a target software copy that meets the software deployment requirements, including: in response to the startup request, calling the container runtime component to load a file system bundle to create an isolated file system environment that depends on the software copy; parsing the file system bundle based on the identification protocol to scan the directory of the software copy to obtain a target software copy that meets the software deployment requirements.
[0012] In one embodiment, the file system bundle is parsed based on the identification protocol to scan the directory of the software copy to obtain a target software copy that meets the software deployment requirements, including: calling a startup tool at the container runtime to scan the directory and configuration scheme description interface of the software copy through the file system bundle based on the identification protocol to confirm the configuration items for software configuration of the business container; and selecting the best software copy as the target software copy based on the configuration items for software configuration and the deployment version number specified by the user.
[0013] In one embodiment, generating a mount resolution of the target software copy includes mapping a copy directory of the target software copy to an internal directory of the business container to obtain a mount path of the target software copy; calling a startup tool during the container runtime to configure the business container based on the software deployment requirements to obtain software configuration information; and generating a read-only mount resolution of the target software copy based on the mount path and the software configuration information.
[0014] In one embodiment, in response to obtaining the installation package of the software to be deployed, calling the upgrader component to extract the installation package to the corresponding target location in the host file system based on statically dispatched conditions to form a software copy, and also includes: naming the directory of the software copy based on the statically dispatched conditions, and the statically dispatched conditions include at least one of the software copy's number, version number, dependencies, running operating system, and computing device used.
[0015] According to another aspect of the present disclosure, a software deployment device is provided, including: an extraction module, for responding to an acquired installation package of the software to be deployed, calling an upgrader component to extract the installation package to a corresponding target location in a host file system based on statically assigned conditions to form a software copy; a generation module, for generating an identification protocol based on the statically assigned conditions and software deployment requirements; a scanning module, for responding to an acquired business container startup request, calling a container runtime component to scan a directory of the software copy based on the identification protocol to obtain a target software copy that meets the software deployment requirements; and a deployment module, for generating a mount resolution of the target software copy to start the business container based on the mount protocol to complete software deployment.
[0016] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above-mentioned software deployment methods by executing the executable instructions.
[0017] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned software deployment methods is implemented.
[0018] According to another aspect of the present disclosure, a computer program product is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned software deployment methods is implemented.
[0019] The software deployment solution provided by the embodiment of the present disclosure is based on configuring two core components, namely, an updater and a container runtime, and uses the host file system as an interactive interface. The software copy is generated based on the morphological allocation behavior by calling the updater component, and the business container is configured by combining the container runtime component through the scanning result of the directory of the software copy to configure the mount path mapping. The configuration scheme can correspond to the specific needs of the deployed software. By using the updater component according to the rules of the static dispatch conditions, the installation package is extracted to the target location in the host file system. Different deployment behaviors can correspond to different software copies, which is conducive to achieving the decoupling between upstream dependencies and complete applications. Further, by identifying the rules defined in the protocol, the target software copy that meets the software deployment requirements is selected, and the mount resolution of the target software copy is generated to start the business container based on the mount protocol to complete the software deployment. After the target software copy is determined, the mount resolution is generated according to the mount protocol. According to the provisions of the mount resolution, the required resources are mounted in the business container, so that the upgrade of the upstream basic library becomes more flexible and efficient, which is conducive to simplifying image management and reducing the image management pressure caused by software deployment.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0022] Figure 1 A schematic diagram showing a software deployment system structure in an embodiment of the present disclosure;
[0023] Figure 2 A flowchart showing a software deployment method in an embodiment of the present disclosure is shown;
[0024] Figure 3A schematic diagram showing another software deployment method in an embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram showing the formation of a software copy in a software deployment solution in an embodiment of the present disclosure;
[0026] Figure 5 A flowchart showing another software deployment method in an embodiment of the present disclosure is shown;
[0027] Figure 6 A schematic block diagram showing a software deployment solution in an embodiment of the present disclosure;
[0028] Figure 7 A schematic block diagram of a software deployment system in an embodiment of the present disclosure is shown;
[0029] Figure 8 A schematic diagram showing a software deployment device in an embodiment of the present disclosure;
[0030] Fig. 9 A schematic diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0032] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0033] As the scale of software continues to expand, the cost of maintaining software is increasing, and the demand for secondary development using existing upstream dependencies is also increasing. However, the current mainstream software deployment solutions are almost all distributed through unified images, which treat upstream dependencies and complete applications equally. They are relatively mechanical and rigid, and cannot flexibly meet the needs of upstream dependencies for deployment, upgrading, and independent maintenance. Suppose a SaaS service provider specializes in providing C++-based software development and operation and maintenance service solutions, and one day a basic library used by the manufacturer has a vulnerability that needs to be upgraded. At this time, the business deployed on the SaaS service provider's server is often not just one customer's business, but includes a variety of different images, including different operating systems and software configurations, which makes it complicated, laborious, and inefficient to update various images one by one.
[0034] In addition, although the uniformity of container images can ensure high consistency of business, the layer structure of the image is still relatively mechanical, and it is difficult to give full play to the reuse function of the layer in the file system bundling design in the face of upstream dependency deployment scenarios. When the image requires a large number of dependent libraries, each time a software is updated, a new layer will be added to the file system bundling of the original image. The order of these layers is highly related to the order of the update behavior, and reuse is more complicated; when multiple software depends on the same configuration file, and the content of the configuration file is not completely fixed, the damage caused to the reuse of the layer structure is even more significant.
[0035] Again, if the user needs three independent dependent software, each with three versions, then a single base image will require at least nine layers and nine different images. Different installation configurations of the same version of some software will produce different behaviors. The installation of these different behaviors requires different tags on the image to distinguish them. With the increase in the number of software, differences in software deployment plans, and the number of different software versions, the resources occupied by establishing and maintaining images will also increase significantly. When a software has only one installation method in the old image, but a new requirement for installation in a different way is generated in the new image, the tag rules will often change, further increasing the complexity of maintenance.
[0036] In addition, during the container cluster deployment process, it is also very important to ensure container isolation. The existing container isolation solutions will have problems such as high complexity in conditions such as reuse of software files in the file system and upgrade deployment when different software coexists. If the isolation solution is not implemented, it will lead to problems such as asynchrony of files within the software. Therefore, it is necessary to reduce complexity while ensuring isolation during the deployment process.
[0037] The solution provided in this application can reduce the probability of the above problems occurring in software deployment.
[0038] Figure 11 is a schematic diagram of a computer system provided by an exemplary embodiment of the present application. The system includes: a plurality of terminals 120 and a server cluster 140.
[0039] The terminal 120 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an e-book reader, smart glasses, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a smart home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or the terminal 120 may also be a personal computer (PC), such as a laptop computer and a desktop computer.
[0040] The terminal 120 may be installed with an application for providing software deployment.
[0041] The terminal 120 is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0042] The server cluster 140 is a server, or is composed of several servers, or is a virtualization platform, or is a cloud computing service center. The server cluster 140 is used to provide background services for applications that provide software deployment. Optionally, the server cluster 140 undertakes the main computing work, and the terminal 120 undertakes the secondary computing work; or, the server cluster 140 undertakes the secondary computing work, and the terminal 120 undertakes the main computing work; or, the terminal 120 and the server cluster 140 adopt a distributed computing architecture for collaborative computing.
[0043] In some optional embodiments, the server cluster 140 is used to store software deployment program information.
[0044] Optionally, the client of the application installed in different terminals 120 is the same, or the client of the application installed on the two terminals 120 is the client of the same type of application of different control system platforms. Based on the different terminal platforms, the specific form of the client of the application may also be different, for example, the application client may be a mobile client, a PC client or a World Wide Web (Web) client.
[0045] Those skilled in the art will appreciate that the number of the terminals 120 may be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or a greater number. The embodiment of the present application does not limit the number and device type of the terminals.
[0046] Optionally, the system may also include a management device ( Figure 1 (not shown), the management device is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0047] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0048] The software deployment method in this example implementation will be described in more detail below with reference to the accompanying drawings and embodiments.
[0049] like Figure 2 As shown, a software deployment method according to an embodiment of the present disclosure is applied to a server, comprising:
[0050] Step S202, in response to the obtained installation package of the software to be deployed, calling the upgrader component to extract the installation package to a corresponding target location in the host file system based on the static dispatch condition to form a software copy.
[0051] Among them, the installation package is input into the input file of the upgrader component, and the corresponding software copy is output. The content of the installation package depends on the actual needs of software deployment, including but not limited to the necessary files for software operation and description information of the extraction method. In addition, if a configuration file needs to be generated, it can also be generated based on the installation package.
[0052] The upgrader component is used to download the latest installation package from a remote or local software repository and apply it to the software environment in the container, thereby implementing the software update operation in the container.
[0053] The files of the installation package are extracted to the host file system to form software copies with different static dispatch conditions and placed in different directories. The software copies can be different software or the same software, can have different version numbers, or can be configured with the same version number but different specific versions. In this disclosure, the software copies need to comply with the following two points:
[0054] First, if two installation packages have different static dispatch conditions, including but not limited to version numbers, integrated third-party components, adopted protocols and interface differences, etc., two different copies must be formed. If the two installation packages behave the same, two copies will not be generated.
[0055] Secondly, the directory where the replica is located needs to meet the pre-negotiated rules. It needs to be recognized and distinguished by the container runtime components. This rule is the identification protocol. The identification protocol can be a simple number or a combination of various factors such as the version number and dependent library in the software replica.
[0056] By generating software copies based on static dispatch conditions, it is possible to be compatible with the installation of different software, different versions of the same software, and different configurations of the same version, including but not limited to differences in dependent libraries, computing devices (such as CPU, GPU of Nvidia or AMD, etc.), etc., by simply packaging different software copies and modifying the behavior of the startup tool of the container runtime component.
[0057] Exemplarily, static dispatch is a behavior at compile time, and dynamic dispatch is a behavior at run time. Software copies are formed based on static dispatch, that is, in software development, software copies are generated by compiling and building different static types. The conditions for static dispatch of software copies are the rules for dividing different software copies. During the software upgrade process, the software copies are mapped from the static dispatch conditions to the corresponding release directory based on dynamic dispatch to be extracted to the corresponding target location in the host file system.
[0058] For example, the conditions for static dispatching can be formulated based on the following aspects:
[0059] File type: Assign files to corresponding target locations based on their types (such as executable files, configuration files, library files, etc.).
[0060] File name and path: Extract the file to the corresponding target location according to the file name and path information. For example, extract the file named "index.html" to the root directory of the web server.
[0061] File attributes: Dispatch files to appropriate destinations based on their attributes (such as permissions, owner, timestamp, etc.).
[0062] File Dependencies: Taking into account the dependencies between files, the dependent files are extracted to the target location required by the dependent files.
[0063] By pre-configuring the conditions for static dispatch, you can ensure that files are correctly extracted and organized during the upgrade process so that the software copy works as expected in the host file system.
[0064] Step S204: Generate an identification protocol based on the statically assigned conditions and software deployment requirements.
[0065] Among them, software deployment requirements refer to various requirements or demands of software during the deployment process, such as required resources, configuration items, dependencies, etc.
[0066] The identification protocol refers to a protocol or agreement generated by the container runtime environment based on static dispatch conditions after receiving software deployment requirements. The identification protocol is used to identify the target software copy required for each business container.
[0067] Step S206 , in response to the acquired business container startup request, the container runtime component is called to scan the directory of the software copy based on the identification protocol to obtain the target software copy that meets the software deployment requirements.
[0068] Among them, the container runtime is an implementation that complies with the OCI (Open Container Initiative) Runtime specification. It refers to the software component responsible for creating and managing containers. It provides a set of APIs and tools for creating, starting, stopping and destroying containers, as well as managing resource isolation and access control between containers and host machines.
[0069] For example, through the scanning operation of the container runtime component, as long as the target software copy can be scanned, it can be mounted, thereby generating as few copies as possible. The same software with the same configuration and the same version in different containers will mount the same copy on the host machine, consuming little resources. Even different images with different file system structures only need one copy.
[0070] Step S208, generating a mount resolution of the target software copy to start the business container based on the mount protocol to complete the software deployment.
[0071] Mounting refers to associating external files, directories, or volumes with paths within a container so that the container can access these resources. The mount protocol is used to define and describe how to perform mount operations. It specifies the mounting method, path, permissions, and other related information.
[0072] During the software deployment process, the target software copy is run by starting the business container to implement software deployment.
[0073] In addition, based on static dispatch, software copies to be deployed with different versions, different configurations or different software can be generated. Different software copies are isolated from each other and will not affect each other. During the software deployment process, it is also beneficial to ensure the isolation between containers. Whether it is a single software upgrade or an overall environment upgrade, there is no need to repackage the image file. When new software is needed or the software configuration is modified or the software version is upgraded, the process of processing and distributing images is omitted (at the same time, the operation of image management is reduced to facilitate deployment). After the updater component updater completes the software update and installation, the new container started by the container runtime component runtime is the latest configuration.
[0074] In this embodiment, based on the configuration of two core components, namely, the updater and the container runtime, the host file system is used as the interactive interface, and the software copy is generated based on the morphological allocation behavior by calling the updater component. The business container is configured by scanning the directory of the software copy in combination with the container runtime component to configure the mount path mapping. The configuration scheme can correspond to the specific needs of the deployed software. By using the updater component according to the rules of the statically assigned conditions, the installation package is extracted to the target location in the host file system. Different deployment behaviors can correspond to different software copies, which is conducive to achieving the decoupling between upstream dependencies and complete applications. Further, by identifying the rules defined in the protocol, the target software copy that meets the software deployment requirements is selected, and the mount resolution of the target software copy is generated to start the business container based on the mount protocol to complete the software deployment. After determining the target software copy, a mount resolution is generated according to the mount protocol. According to the provisions of the mount resolution, the required resources are mounted in the business container, so that the upgrade of the upstream basic library becomes more flexible and efficient, which is conducive to simplifying image management and reducing the image management pressure caused by software deployment.
[0075] Furthermore, the identification protocol of the container runtime can be adapted according to the conditions of static dispatch. When new requirements for installation in different ways arise in new images, it is often possible to generate tag rules that can ensure that the changed tags can still be recognized by the container runtime, thereby reducing the complexity of container maintenance.
[0076] In one embodiment, in response to the installation package of the software to be deployed being obtained, calling the upgrader component to extract the installation package to a corresponding target location in the host file system based on the static dispatch condition to form a software copy, further comprising:
[0077] The condition of static dispatch is naming the directory of the software copy, and the condition of static dispatch includes at least one of the number of the software copy, version number, dependency, running operating system and used computing device.
[0078] The numbering of the software copy refers to assigning a unique number to each software copy to identify the copy.
[0079] Version numbers are used to identify the version of a copy of software and to distinguish one version from another.
[0080] Dependencies are used to list other components or libraries that your copy of software depends on.
[0081] The operating system you are running is the operating system environment required for a given copy of the software.
[0082] The computing device used is used to describe the type or architecture of computing device required for the software copy to run.
[0083] Based on this information, the software copies can be placed in the corresponding directories, and the directories can be named in a form that contains statically assigned conditional information for subsequent identification and management.
[0084] Exemplarily, the conditions of static dispatch can be involved in the directory naming of the installation package of the software copy. For example, assuming that the conditions include device type and upstream dependent libraries, then for the same version 1.0, if it is based on Nvidia GPU and depends on CUDA, the software copy will be released to nvidia / cuda / 1.0, if it is based on AMD GPU and depends on ROCm, the software copy will be released to amd / rocm / 1.0, and if it is based on AMD GPU and depends on Vulkan, the software copy will be released to amd / vulkan / 1.0.
[0085] like Figure 3 As shown, in one embodiment, in response to the installation package of the software to be deployed being obtained, the upgrader component extracts the installation package to a corresponding target location in the host file system based on the static dispatch condition to form a software copy, including:
[0086] Step S302: In response to the obtained installation package, call the upgrader component to obtain the static dispatch condition.
[0087] The upgrader component includes an updater main program and a series of additional components and interfaces, among which the interface for obtaining the installation package and the updater main program are both necessary parts. After obtaining the installation package, the updater main program obtains the installation information provided by the installation package.
[0088] Step S304, calculating the target location of the software copy in the host file system according to the statically allocated conditions and the pre-negotiated software copy extraction directory format.
[0089] Among them, the statically assigned conditions provide a series of information for describing and identifying the characteristics and attributes of the formed software copy. This information can be used to determine the extraction directory format of the software copy. By combining the information in the statically assigned conditions, the directory name of the target location can be generated according to the pre-agreed directory naming rules to execute the extraction process of the software copy and form the software copy. Regardless of whether the updater is deployed in a container or virtual machine environment, the software copy needs to be accessible from the host file system.
[0090] Once installed, this copy of the software generally does not need to be modified, but it needs to be executed, so read and execute permissions are required, but write permissions are not necessarily required.
[0091] Exemplarily, the updater component updater main program needs to parse the installation package first to obtain information about the software copy, such as the name, version, dependencies, etc. of the copy. At the same time, the pre-agreed directory format specifies the location where the software copy should be stored in the file system and the format of the file name. The updater main program calculates the target location where the software copy should be extracted based on this information, extracts the copy from the installation package and copies it to this location.
[0092] The extraction process may require some additional operations, such as creating necessary folders, setting file permissions, updating configuration files, etc. Ultimately, the updater will copy all necessary files to the target location and perform the necessary operations to ensure that the software copy can run properly.
[0093] In short, the updater main program can determine where to extract the software copy based on the information in the installation package and the pre-agreed directory format, and perform the corresponding extraction process to create a complete software copy.
[0094] Step S306: extract the installation package to a target location based on the static allocation condition to form a software copy.
[0095] The installation package is extracted from the specified location, placed and configured according to the pre-agreed target location, and finally a software copy that can be run on the target host is generated. This process is usually part of software deployment and is used to introduce the software into the target environment.
[0096] In this embodiment, by agreeing on a unified directory naming rule, different software copies can be easily identified and managed. At the same time, the pre-agreed directory format can also make the extraction directory of the software copy more orderly and standardized, which is convenient for subsequent maintenance and updating. The software copy is placed in an appropriate directory to decouple it from other software or components for easy management and deployment. According to the conditions of static dispatch, the installation package is extracted from the acquired location and placed at the target location, so as to separate the software copy from the original image, thereby simplifying the image management process.
[0097] like Figure 4 As shown, the extraction location of the software copy on the host file system is determined based on the static allocation conditions, the installation package 402 is extracted to generate the software copy 404, and the program body 4022 and configuration tool 4024 in the installation package correspondingly generate the program body 4042 and configuration tool 4044.
[0098] A software configuration item 406 is generated based on the configuration tool 4044 , and the container runtime 408 performs software configuration based on the software configuration item 406 .
[0099] In one embodiment, after extracting the directory format of the software copy according to the statically assigned conditions and the pre-negotiated software copy and calculating the target location of the software copy in the host file system, it also includes: detecting whether the installation package has been deployed on the host file system based on the target location; and when it is detected that the installation package has not been deployed, calling the upgrader component to generate the software copy.
[0100] Among them, an implementation method for detecting whether the installation package is deployed based on the target location includes: checking whether there is a corresponding directory at the target location of the host file system. If there is a corresponding directory, it indicates that the installation package has been deployed. By detecting whether the installation package has been deployed on the host file system, the installation package can be applied to multiple containers.
[0101] like Figure 5 As shown, the software copy extraction process based on the upgrader component includes:
[0102] Step S502 , calculating the target location of the software copy in the host file system according to the statically allocated conditions and the pre-negotiated software copy extraction directory format.
[0103] Step S504, detect whether there is a pre-negotiated software directory at the target location to detect whether the installation package has been deployed on the host file system. If "yes", go to step S506, if "no", go to step S508.
[0104] Step S506, end the process.
[0105] Step S508: calling the upgrader component to extract the installation package into the pre-negotiated directory.
[0106] Step S510, updating and validating the directory of the software copy.
[0107] In addition, those skilled in the art will appreciate that if the directory of the software copy cannot directly reflect the conditions for static dispatch, detecting whether the installation package is deployed based on the target location can be implemented in another way, including: deploying a data table structure at the target location or an area associated with the target location, and recording the conditions for static dispatch in the data table structure; based on this deployment method, if the conditions for static dispatch increase, relevant information can be added by directly and silently modifying the table structure, without the need for downstream users to perceive it.
[0108] The data table structure may be a data table in a database, an Excel table, or a CSV (Comma-Separated Values) file.
[0109] In this embodiment, during the software deployment process, the properties and behaviors of the software copy are determined according to specific rules or information, and whether the installation package has been deployed is determined by checking whether the installation package has already been deployed in the host file system. When it is detected that the installation package has not been deployed in the host file system, the target location of the software copy in the host file system is calculated and generated according to the pre-agreed directory naming rules and the information in the statically assigned conditions, which can ensure that the installation package will not be deployed repeatedly and can be correctly deployed in the host file system in the agreed manner.
[0110] In one embodiment, the method further includes: configuring a configuration scheme description interface in the software copy, where the configuration scheme description interface is used to provide configuration description information of the software copy to the container runtime component.
[0111] In this embodiment, a configuration scheme description interface is configured in the software copy. The purpose of the configuration scheme description interface is to provide the container runtime component with configuration description information of the software copy so that the container runtime component can correctly call the software copy according to the configuration description information. By using the configuration scheme description interface in the software copy for configuration, it can be ensured that the software copy has the correct configuration information at runtime, and the role of the configuration scheme description interface is to provide the container runtime component with the configuration description information so that the container runtime component can correctly manage and run the software copy.
[0112] In one embodiment, the identification protocol is generated based on statically assigned conditions and software deployment requirements, including:
[0113] Determines the deployment version number of a software copy based on statically dispatched conditions.
[0114] The deployment version number of the software copy is determined by checking the static dispatch conditions of the software, which can be obtained from the metadata, configuration files or other relevant information of the software.
[0115] Based on the pre-negotiated software copy extraction directory format, the deployment version number and the static dispatch conditions are configured and processed to generate an identification protocol, which is used to enable the directory path where the software copy is located to be identified and distinguished by the container runtime component.
[0116] Among them, the condition of static dispatch itself is to generate different versions of software copies. In the extracted directory format of the software copy, according to the pre-negotiated rules, combined with the deployment version number and the condition of static dispatch, configuration processing is performed to generate an identification protocol. The identification protocol is an identifier or label that enables the container runtime component to identify and distinguish the directory paths where different software copies are located.
[0117] In this embodiment, by determining the deployment version number based on the installation information, and performing configuration processing to generate an identification protocol according to a pre-negotiated directory format and statically assigned conditions, the container runtime component can accurately identify and distinguish the directory paths where different software copies are located, thereby ensuring reliable identification of the target software copy.
[0118] In one embodiment, in response to the acquired business container startup request, calling the container runtime component to scan the directory of the software copy based on the identification protocol to obtain the target software copy that meets the software deployment requirements includes:
[0119] In response to the launch request, the container runtime component is called to load the file system bundle to create an isolated file system environment that relies on the software copy.
[0120] Among them, the file system bundle, namely the FilesystemBundle in the OCI (Open Container Initiative) standard, is part of the container runtime specification, which is used to describe the structure of the container image file system and how to load it into the container runtime. The Filesystem Bundle usually contains one or more elements, such as metadata and configuration files used to configure the container runtime, such as startup parameters and mount points.
[0121] In addition, the ultimate goal of the entire deployment solution is to ensure that the deployed software is executed correctly on the business container. The file system bundle of the business container depends on the required software copy. If the required software copy does not exist or has problems and cannot be deployed, the runtime component will report an error and the container's file system bundle will be destroyed.
[0122] The file system bundle is parsed based on the identification protocol to scan the directory of the software copy and obtain the target software copy that meets the software deployment requirements.
[0123] In this embodiment, when a start request reaches the container runtime component, the container runtime component will be called to perform the operation of loading the file system bundle. The file system bundle contains the operating environment and software copy required by the container. By loading the file system bundle, the container runtime component will create an isolated file system environment. This environment is independent of the host operating system and can provide the file system and other resources required by the container, so that the container can run in this isolated file system environment and can rely on the required software copy. This isolated environment can ensure that the mutual influence between the container and the host operating system and other containers is minimized, while ensuring that the software copy inside the container can operate normally.
[0124] Furthermore, through the configured identification protocol, the container runtime component can accurately identify and distinguish the directory paths where different software copies are located. The container runtime component will scan the file system and bundle the scan for the target software copy that meets the software deployment requirements. This process may include operations such as finding specified files, checking file version numbers or other attributes. After scanning and screening, the container runtime component obtains the target software copy that meets the software deployment requirements. This target software copy can be one or more, depending on specific needs. This process helps to ensure that the software copy can be deployed and run correctly and can meet user needs and requirements.
[0125] In one embodiment, parsing the file system bundle based on the identification protocol to scan the directory of the software copy to obtain the target software copy that meets the software deployment requirements includes:
[0126] The startup tool of the container runtime is called to scan the directory and configuration scheme description interface of the software copy through the file system bundle based on the identification protocol to confirm the configuration items for software configuration of the business container.
[0127] The startup tool is a tool responsible for starting and managing the business container during the software deployment process. It can be a prestart hook, or a hook executed before other containers are created, or a binary tool released by the software publisher, or a specified script, etc.
[0128] Exemplarily, the startup tool can implement targeted configuration for different images, and the call of the startup tool needs to be completed before mounting the target software copy directory.
[0129] It is understandable to those skilled in the art that due to the specific differences in the specific deployment requirements of software on different images (for example, some need to be deployed in / usr / lib, some in / usr / lib / x86_64-linux-gnu, and users may also specify other paths themselves, such as directories under / usr / local / lib or / opt), the startup tool can provide a considerable degree of flexibility. It obtains several data required for configuration from the configuration scheme description interface provided by the software copy. These data may include various different contents such as parameter settings and scripts for generating parameter settings.
[0130] In addition, the configuration items used for software configuration can be understood as configuration items required to determine the conditions for static dispatch according to predefined rules, such as file type, file name, file path, file attributes, etc.
[0131] The best statically dispatched conditional software copy is selected as the target software copy based on the configuration items for the software configuration and the deployment version number specified by the user.
[0132] The best statically dispatched conditional software copy can be understood as selecting the best software copy according to the static dispatching condition and the version number specified by the user, that is, the target software copy that meets the condition and matches the required version number.
[0133] In this embodiment, during the deployment process, the configuration items used by the business container for software configuration are confirmed based on the results of the file system bundle scan. These configuration items may include configuration files, environment variables, dependency library paths, etc. According to the rules defined in the identification protocol, the results of the bundle scan are matched and parsed with the input conditions, and the required version number can be specified during software deployment to select the best statically dispatched conditional software copy. This version number can be in the form of a number, a label, a hash value, etc. Based on the configuration items used for software configuration and the deployment version number specified by the user, the best statically dispatched conditional software copy is selected from all eligible software copies as the target software copy, which can optimize the reuse of file system bundles, reduce unnecessary resource overhead, and improve deployment efficiency. At the same time, it can also enhance the reusability of the layer structure and reduce the maintenance cost of the application.
[0134] In one embodiment, generating a mount resolution of the target software copy includes: mapping a copy directory of the target software copy to an internal directory of a business container to obtain a mount path of the target software copy.
[0135] The target software copy directory is specified in the startup configuration of the service container, and is mapped to a directory inside the service container. This directory can be any path in the container, and is used to store files and data of the target software copy.
[0136] Exemplarily, after the startup tool (if any) is executed, a mount resolution is generated and passed to the runtime main program. The runtime main body will integrate the mount path specified by the -v option and the configuration plan passed by the software copy and the hook, and execute the mount. The mount of the software copy is read-only mount to prevent the business container from accidentally modifying the software copy and causing large-scale failure of the software in the cluster. At the same time, such isolation ensures the feasibility of hot updates. Obviously, the startup tool must be executed before the directory to be mounted on the container is mounted.
[0137] The startup tool of the container runtime is called to configure the business container based on the software deployment requirements to obtain the software configuration information.
[0138] The startup tool of the container runtime is used to perform the configuration operation of the business container. The configuration includes setting the environment variables, network configuration, resource restrictions, etc. of the container.
[0139] Furthermore, according to the software deployment requirements and the parameters specified by the user, the configuration information of the software is generated. This information may include database connection information, port number, log output path, etc. According to specific requirements, this configuration information can be obtained from configuration files, command line parameters or other sources.
[0140] Generates a read-only mount resolution for the target software copy based on the mount path and software configuration information.
[0141] Among them, the mount resolution of the target software copy is generated in combination with the mount path and software configuration information of the target software copy. The mount resolution refers to determining the specific mount point and configuration parameters of the target software copy in the business container. This process can be carried out according to specific needs and rules when the container is running.
[0142] In this embodiment, the directory of the target software copy is mapped to the inside of the business container, and the container is configured according to the software deployment requirements. At the same time, a read-only mount resolution of the target software copy is generated according to the mount path and software configuration information. This ensures that the target software copy is correctly mounted in the business container and configured as required to achieve normal operation and use of the software. In order to ensure that the upgrade does not affect the availability of existing containers, different versions will generate several copies. The differences in versions include but are not limited to differences in version numbers. Read-only mounting can prevent the occurrence of accidental modifications. In principle, existing copies cannot be overwritten, thereby ensuring that the upgrade does not affect the running business, so that zero-interruption update deployment methods such as rolling updates can be performed normally.
[0143] like Figure 6 As shown, the software deployment solution of the present disclosure includes an upgrader 602 , a host file system 606 , and a container runtime 606 .
[0144] Among them, the upgrader main program 6022 extracts the installation package based on the static allocation conditions to obtain the software copy set 6042.
[0145] Before starting the business container 608, the file system bundle 6044 is loaded through the dependency relationship on the software copy set, and based on the call of the configuration scheme description interface in the software copy set 6042 by the startup tool 6062, the configuration information of the software copy is obtained and the mounting path is determined.
[0146] The startup tool 6062 generates a mount resolution based on the mount path and the target software copy, and passes it to the container runtime main program 6064. The container runtime main program 6064 configures and starts the business container 608 based on the mount resolution.
[0147] like Figure 7 As shown, according to another embodiment of the present disclosure, a software deployment solution includes:
[0148] Step S702 , in response to the acquired business container start request, calling the container runtime component to load the file system bundle to create an isolated file system environment that depends on the software copy.
[0149] Step S704 , calling the startup tool of the container runtime to scan the directory and configuration scheme description interface of the software copy through the file system binding based on the identification protocol to confirm the configuration items for software configuration of the business container.
[0150] Step S706 , selecting the best software copy as the target software copy based on the configuration items used for the software configuration and the deployment version number specified by the user.
[0151] Step S708: Map the copy directory of the target software copy to the internal directory of the business container to obtain the mount path of the target software copy.
[0152] Step S710: calling a startup tool during container runtime to configure a business container based on software deployment requirements to obtain software configuration information.
[0153] Step S712: Generate a read-only mount resolution of the target software copy based on the mount path and the software configuration information.
[0154] Step S714: Start the business container based on the read-only mount protocol to complete the software deployment.
[0155] The following takes the deployment of an inference cluster and the provision of an inference service interface as an example to illustrate the application scenario of the software deployment solution, so as to further illustrate the software deployment solution of the present disclosure.
[0156] Assuming that the reasoning service interface includes different business interfaces implemented by different frameworks, the deployment object is explained with a focus on the deployment of the upstream dependency library of the software.
[0157] Among them, the upstream dependent libraries include but are not limited to the unified computing device architecture CUDA library, etc.
[0158] In the related technology, the operation and maintenance department needs to package different images separately for different business interfaces. If a business wants to update any part of the software, whether it is the upstream dependency or the business application itself, it needs to package more images for this update, no matter how small the update is. For modern online businesses, non-isolated file sharing solutions are completely unrealistic, which will result in downtime for maintenance when updates are needed.
[0159] To deploy CUDA based on the software deployment solution disclosed in the present invention, the required CUDA library files (such as libcuda.so, libcudart.so, etc.) can be packaged into the installation package, and an existing CUDA image can be determined as the base image.
[0160] In the basic image, CUDA library files all exist in the form of mount points. Based on the container runtime implementation disclosed in the present invention, the prestart hook (or other startup tools that can be executed at the right time) can scan all such CUDA files in the container after the file system bundle is established, form a mount resolution, and mount the desired CUDA library version. Alternatively, it can also not be mounted, but a software copy can be mounted as a whole, and all such soft links can be pointed to the corresponding files in the software copy in the prestart hook. The container runtime component Runtime and the updater component updater can be placed in a dedicated pod on each cluster and managed uniformly with the business container.
[0161] Furthermore, if multiple software are deployed at the same time, such as deploying PyTorch and TensorFlow at the same time, the basic logic is the same as deploying a single software. For example, the basic software copies of each version of PyTorch and TensowFlow are released to the host file system, and they do not interfere with each other (so there is no problem of adding order and reuse logic in the file system bundling layer). They can be mounted in the container at the same time during deployment. The startup tool can use two independent prestart hooks. The OCI standard clearly stipulates that all prestart hooks must be executed and must succeed. Failure to execute will cause the entire container creation to fail and all operations will be withdrawn. Therefore, the separate startup tool implementation can ensure the correctness of the deployment.
[0162] If you want to update to a new version of the CUDA library, you can use the original basic image and let the updater component updater pull the packaged new version of the CUDA installation package and extract it to another directory. The directory name can be the version number of the CUDA library. Then, update the container's yaml configuration file (it can also be an environment variable, etc., in short, it needs to be readable by the runtime) to specify the new CUDA library copy as the effective version, and trigger a rolling update or blue-green deployment. At this time, the new container started by the container runtime component runtime has the new version of CUDA. Since the deployment process does not affect the running business, it will not incur additional downtime maintenance costs like the traditional high-availability deployment architecture, and can achieve zero-interruption hot updates. This process does not involve image modification, so it does not involve image maintenance, creation, distribution, etc., as long as the updater releases software copies on all hosts involved in the cluster.
[0163] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0164] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0165] Refer to the following Figure 8 The software deployment apparatus 800 according to this embodiment of the present disclosure is described. Figure 8 The software deployment device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0166] The software deployment device 800 is in the form of a hardware module. The components of the software deployment device 800 may include but are not limited to: an extraction module 802, which is used to call the upgrader component in response to the obtained installation package of the software to be deployed to extract the installation package to the corresponding target location in the host file system based on the static dispatch conditions to form a software copy; a generation module 804, which is used to generate an identification protocol based on the static dispatch conditions and software deployment requirements; a scanning module 806, which is used to call the container runtime component in response to the obtained business container startup request to scan the directory of the software copy based on the identification protocol to obtain a target software copy that meets the software deployment requirements; a deployment module 808, which is used to generate a mount resolution of the target software copy to start the business container based on the mount protocol to complete the software deployment.
[0167] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0168] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0169] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 910 can perform the following steps: Figure 2 Steps S202 and S208 shown in , and other steps defined in the software deployment method of the present disclosure.
[0170] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .
[0171] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0172] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0173] The electronic device 900 may also communicate with one or more external devices 960 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 950. As shown, the network adapter 950 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0174] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0175] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0176] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0177] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0178] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0179] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0180] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0181] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0182] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0183] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A software deployment method, characterized in that: include: In response to the obtained installation package of the software to be deployed, calling the upgrader component to extract the installation package to a corresponding target location in the host file system based on a statically assigned condition to form a software copy, wherein different statically assigned conditions correspond to different software copies, and the statically assigned conditions are formulated based on at least one of a file type, a file name and path, a file attribute, and a file dependency relationship; Generating an identification protocol based on the statically assigned conditions and software deployment requirements, including: determining a deployment version number of the software copy based on the statically assigned conditions; configuring the deployment version number and the statically assigned conditions based on a pre-negotiated software copy extraction directory format to generate the identification protocol; wherein the identification protocol is used to enable the directory path where the software copy is located to be identified and distinguished by a container runtime component; In response to the acquired business container startup request, calling the container runtime component to scan the directory of the software copy based on the identification protocol to obtain the target software copy that meets the software deployment requirements, including: in response to the startup request, calling the container runtime component to load the file system bundle to create an isolated file system environment that depends on the software copy, calling the startup tool of the container runtime component to scan the directory and configuration scheme description interface of the software copy through the file system bundle based on the identification protocol to confirm the configuration items for software configuration of the business container; selecting the best software copy as the target software copy based on the configuration items for software configuration and the deployment version number specified by the user; Generate a mount resolution of the target software copy to start the business container based on the mount protocol to complete software deployment, including: mapping the copy directory of the target software copy to the internal directory of the business container to obtain the mount path of the target software copy; calling the startup tool of the container runtime component to configure the business container based on the software deployment requirements to obtain software configuration information; generate a mount resolution of the target software copy based on the mount path and the software configuration information.
2. The software deployment method according to claim 1, characterized in that: In response to the obtained installation package of the software to be deployed, calling the upgrader component to extract the installation package to a corresponding target location in the host file system based on the static dispatch condition to form a software copy, including: In response to the obtained installation package, calling the upgrader component to obtain the static dispatch condition; Calculate the target location of the software copy in the host file system according to the statically assigned conditions and the pre-negotiated software copy extraction directory format; The installation package is extracted to the target location to form the software copy.
3. The software deployment method according to claim 2, characterized in that: After extracting the directory format of the software copy according to the statically assigned conditions and the pre-negotiated software copy and calculating the target location of the software copy in the host file system, the method further includes: Detecting whether the installation package has been deployed on the host file system based on the target location; When it is detected that the installation package has not been deployed, the upgrader component is called to generate the software copy.
4. The software deployment method according to claim 1, characterized in that: Also includes: A configuration scheme description interface is configured in the software copy, and the configuration scheme description interface is used to provide configuration description information of the software copy to the container runtime component.
5. The software deployment method according to any one of claims 1 to 4, characterized in that: In response to the obtained installation package of the software to be deployed, calling the upgrader component to extract the installation package to a corresponding target location in the host file system based on the static dispatch condition to form a software copy, further comprising: A directory of the software copies is named based on the conditions of the static assignment.
6. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the software deployment method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Docker-based automatic software deployment method and device
CN110032376A