Private deployment method of business system and related device

Through containerized transformation and variable value rendering technology, the problem of low deployment efficiency of traditional physical machines is solved, efficient and accurate privatized deployment of business systems is achieved, and deployment efficiency and effectiveness are improved.

CN119109777APending Publication Date: 2024-12-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310676090.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2024-12-10

Smart Images

  • Figure CN119109777A_ABST
    Figure CN119109777A_ABST
Patent Text Reader

Abstract

The invention discloses a privatized deployment method of a service system and a related device, containerization transformation is performed on an application program of the service system to obtain a first to-be-deployed file set of the service system, and in this way, resources on which the application program running the service system depends are packaged into a container mirror image, so that subsequent efficient deployment of the service system is facilitated. Performing variable value rendering on first to-be-deployed files in the first to-be-deployed file set by using variable value files in the variable value file set of the private environment through a package manager of the container arrangement engine to obtain second to-be-deployed files matched with the private environment to form a second to-be-deployed file set of the business system; according to the mode, the first to-be-deployed file is rendered into the second to-be-deployed file matched with the private environment, so that a service system can be accurately deployed in the private environment subsequently. In the privatization environment, the service system is deployed through the second to-be-deployed file set, and the privatization deployment efficiency and the privatization deployment effect of the service system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a privatization deployment method of a business system and related devices. Background Art

[0002] With the rapid development of private cloud, there is an increasing demand for privatized deployment of business systems. Privatized deployment of business systems can avoid data leakage of business systems, customize personalized scenarios of business systems, or ensure stable operation of business systems.

[0003] In the related art, the private deployment method of the business system refers to: implementing the private deployment of the business system on a physical machine by directly running the application binary or script of the business system on a traditional physical machine.

[0004] However, the above method deploys the business system through the privatization of physical machines, which has problems such as long machine preparation time, low machine resource utilization, and high machine configuration cost, resulting in low efficiency and poor effect of privatization deployment of the business system. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a method and related devices for privatization deployment of a business system, which can improve the efficiency and effect of privatization deployment of the business system.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] On the one hand, an embodiment of the present application provides a privatization deployment method of a business system, the method comprising:

[0008] Performing containerization transformation on an application of a business system to obtain a first set of files to be deployed for the business system;

[0009] By means of a package manager of a container orchestration engine, a variable value rendering is performed on a first file to be deployed in the first set of files to be deployed according to a variable value file in a variable value file set of a privatized environment, so as to obtain a second set of files to be deployed for the business system; and a second file to be deployed in the second set of files to be deployed matches the privatized environment;

[0010] In the privatized environment, the business system is deployed according to the second set of files to be deployed.

[0011] On the other hand, an embodiment of the present application provides a privatization deployment device for a business system, the device comprising: a transformation unit, a rendering unit, and a deployment unit;

[0012] The transformation unit is used to perform containerization transformation on the application of the business system to obtain a first set of files to be deployed for the business system;

[0013] The rendering unit is used to render the variable value of the first file to be deployed in the first set of files to be deployed according to the variable value file in the variable value file set of the privatization environment through the package manager of the container orchestration engine, so as to obtain the second set of files to be deployed of the business system; the second file to be deployed in the second set of files to be deployed matches the privatization environment;

[0014] The deployment unit is used to deploy the business system according to the second set of files to be deployed in the privatized environment.

[0015] On the other hand, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:

[0016] The memory is used to store a computer program and transmit the computer program to the processor;

[0017] The processor is configured to execute the method described in any one of the preceding aspects according to instructions in the computer program.

[0018] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in any one of the aforementioned aspects.

[0019] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, which, when executed on a computer device, enables the computer device to implement the method described in any of the above aspects.

[0020] It can be seen from the above technical scheme that, first, the application of the business system is containerized to obtain the first set of files to be deployed in the business system. The containerization transformation method can package the resources that the application of the business system depends on into a container image, which is convenient for the subsequent efficient deployment of the business system in a privatized environment. Then, through the package manager of the container orchestration engine, the variable value file in the variable value file set of the privatized environment is used to render the variable value of the first file to be deployed in the first set of files to be deployed, and the second set of files to be deployed in the second set of files to be deployed matches the privatized environment; the variable value rendering method makes the first file to be deployed in the first set of files to be deployed render into the second file to be deployed that matches the privatized environment to form the second set of files to be deployed, which is convenient for the subsequent accurate deployment of the business system in the privatized environment. Finally, in the privatized environment, the business system is deployed through the second set of files to be deployed to meet the privatized deployment requirements of the business system. Based on this, the method performs privatized deployment of the business system through the containerization transformation method and the variable value rendering method, and the operation is simpler and more convenient, which improves the efficiency and effect of privatized deployment of the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technical members in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 A schematic diagram of the system architecture of a privatized deployment method of a business system provided in an embodiment of the present application;

[0023] Figure 2 A flowchart of a privatization deployment method for a business system provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of a process for obtaining a first set of files to be deployed from a container file set provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of performing resource management on a stateless service through a first workload provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of performing resource management on a stateful service through a second workload provided in an embodiment of the present application;

[0027] Figure 6A schematic diagram of resource management for stateless services and stateful services provided in an embodiment of the present application;

[0028] Figure 7 A schematic diagram of rendering variable values ​​of template files in a template file set by using variable value files in a variable value file set provided by an embodiment of the present application;

[0029] Figure 8 A schematic diagram of a variable value placeholder in a template file corresponding to a stateless service rendered by a configuration variable value in a variable value file provided in an embodiment of the present application;

[0030] Fig. 9 A schematic diagram of a variable value placeholder in a template file corresponding to a stateful service rendered by a configuration variable value in a variable value file provided in an embodiment of the present application;

[0031] Fig.10 A schematic diagram of base deployment and service deployment in a private environment provided in an embodiment of the present application;

[0032] Fig.11 A schematic diagram of the overall process of deploying a business system in a privatized environment provided in an embodiment of the present application;

[0033] Fig.12 A structural diagram of a privatization deployment device for a business system provided in an embodiment of the present application;

[0034] Fig.13 A structural diagram of a server provided in an embodiment of the present application;

[0035] Fig.14 A structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0037] At present, the business system is privately deployed on the physical machine by directly running the application binary or script of the business system on the traditional physical machine to meet the private deployment needs of the business system. However, after research, it was found that the private deployment of the business system on the physical machine has problems such as long machine preparation time, low machine resource utilization, and high machine configuration cost, which leads to low efficiency and poor effect of private deployment of the business system.

[0038] The embodiment of the present application provides a privatization deployment method for a business system, which performs containerization transformation on the application of the business system to obtain a first set of files to be deployed for the business system. The containerization transformation method can package the resources that the application of the business system depends on into a container image, which is convenient for the subsequent efficient deployment of the business system in a privatized environment. Through the package manager of the container orchestration engine, the variable value of the first file to be deployed in the first set of files to be deployed is rendered with the variable value file in the variable value file set of the privatized environment to obtain a second set of files to be deployed for the business system, and the second file to be deployed in the second set of files to be deployed matches the privatized environment; the variable value rendering method enables the first file to be deployed in the first set of files to be deployed to be rendered as a second file to be deployed that matches the privatized environment to form a second set of files to be deployed, which is convenient for the subsequent accurate deployment of the business system in the privatized environment. Finally, in the privatized environment, the business system is deployed through the second set of files to be deployed to meet the privatization deployment requirements of the business system.

[0039] Next, the system architecture of the private deployment method of the business system will be introduced. Figure 1 , Figure 1 A schematic diagram of a system architecture of a privatized deployment method for a business system provided in an embodiment of the present application, wherein the system architecture includes a deployment device 100, and the deployment device 100 is used to execute the privatized deployment method for the business system.

[0040] Among them, the deployment device 100 can be a terminal or a server, and the terminal can include a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a vehicle terminal or an aircraft, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services, but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this. For example, the terminal and the server can be connected via a network, and the network can be a wired or wireless network.

[0041] The deployment device 100 performs containerization transformation on the application of the business system to obtain the first set of files to be deployed of the business system. As an example, the business system is business system X, and the applications of business system X include Application-1, Application-2, Application-3, ..., Application-n, where n is a positive integer; the deployment device 100 performs containerization transformation on Application-1, Application-2, Application-3, ..., Application-n of business system X respectively, and obtains the first set of files to be deployed of business system X including Application-1 file 1, Application-2 file 1, Application-3 file 1, ..., Application-n file 1.

[0042] The deployment device 100 uses the package manager of the container orchestration engine to render the variable values ​​of the first file to be deployed in the first file set to be deployed according to the variable value file in the variable value file set of the privatized environment, and obtains the second file set to be deployed for the business system; the second file to be deployed in the second file set to be deployed matches the privatized environment. As an example, the container orchestration engine is kubernetes, the package manager of kubernetes is Helm, the privatized environment is private server Y, and the variable value file set of private server Y includes Values-1.yaml, Values-2.yaml, Values-3.yaml, ..., Values-n.yaml; based on the above example, the deployment device 100 uses Helm to render the variable values ​​of Application-1 file 1 with Values-1.yaml to obtain Application-1 file 2 of business system X; uses Helm to render the variable values ​​of Application-2 file 1 with Values-2.yaml, Obtain Application-2 file 2 that matches private server Y; render variable values ​​of Application-3 file 1 using Values-3.yaml through Helm to obtain Application-3 file 2 that matches private server Y; …; render variable values ​​of Application-n file 1 using Values-n.yaml through Helm to obtain Application-n file 2 that matches private server Y; that is, the second set of files to be deployed for business system X includes Application-1 file 2, Application-2 file 2, Application-3 file 2, …, Application-n file 2.

[0043] The deployment device 100 deploys the business system according to the second set of files to be deployed in the privatized environment. As an example, based on the above example, the deployment device 100 deploys the business system X in the private server Y through Application-1 file 2, Application-2 file 2, Application-3 file 2, ..., Application-3 file n.

[0044] In other words, the above containerization transformation method can package the resources that the application program that runs the business system depends on into a container image, which is convenient for the subsequent efficient deployment of the business system in a privatized environment; the above variable value rendering method enables the first file to be deployed in the first set of files to be deployed to be rendered as a second file to be deployed that matches the privatized environment to form a second set of files to be deployed, which is convenient for the subsequent accurate deployment of the business system in a privatized environment; in a privatized environment, the business system is deployed through the second set of files to be deployed to meet the privatized deployment requirements of the business system. Based on this, the method performs privatized deployment of the business system through the containerization transformation method and the variable value rendering method, which is simpler and more convenient to operate, and improves the efficiency and effect of privatized deployment of the business system.

[0045] The privatization deployment method and related device of the business system provided in the embodiment of the present application involve a private cloud, which is a cloud infrastructure and software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within a data center. In addition to hardware resources, the creation of a private cloud generally also includes infrastructure as a service (IaaS) software for cloud devices.

[0046] It should be noted that in the embodiments of the present application, the computer device may be a server or a terminal, and the method provided in the embodiments of the present application may be executed by the terminal or the server alone, or by the terminal and the server in cooperation. Figure 1 The corresponding embodiments are mainly introduced by taking the server executing the method provided in the embodiments of the present application as an example.

[0047] In addition, when the method provided in the embodiment of the present application is executed by a terminal alone, the execution method is the same as Figure 1 The corresponding embodiments are similar, mainly replacing the server with a terminal. In addition, when the terminal and the server cooperate to execute the method provided in the embodiment of the present application, the steps that need to be reflected on the front-end interface can be executed by the terminal, and some steps that require background calculation and do not need to be reflected on the front-end interface can be executed by the server.

[0048] It should also be noted that in the specific implementation of the present application, the data in the first file set to be deployed, the variable value file set, and the second file set to be deployed may involve user information and other related data. When the above embodiments of the present application are applied to specific products or technologies, the user's separate consent is required, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0049] In addition, the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, audio and video, assisted driving, etc.

[0050] Next, the privatization deployment method of the business system provided by the embodiment of the present application will be described in detail by taking the deployment device executing the method provided by the embodiment of the present application as an example and combining the accompanying drawings. Figure 2 , Figure 2 A flowchart of a privatization deployment method of a business system provided in an embodiment of the present application, the method comprising:

[0051] S201: Containerize the application program of the business system to obtain a first set of files to be deployed for the business system.

[0052] In the related technologies, the business system is privately deployed on the physical machine by directly running the application binary or script of the business system on the traditional physical machine to meet the private deployment requirements of the business system. However, after research, it was found that the private deployment of the business system on the physical machine has problems such as long machine preparation time, low machine resource utilization, and high machine configuration cost, which leads to low efficiency and poor effect of private deployment of the business system.

[0053] Therefore, in an embodiment of the present application, in order to solve the above problems, first of all, considering that the container can package the resources that the running application depends on into a container image to meet the cross-platform portability of the application, isolation between processes, high efficiency of development and deployment, etc.; the application of the business system is containerized to obtain the first set of files to be deployed for the business system; that is, through the containerization transformation method, the resources that the application of the running business system depends on can be packaged into a container image, which is convenient for the subsequent efficient deployment of the business system in a privatized environment.

[0054] In the embodiment of the present application, when S201 is specifically implemented, first, the application of the business system is written as a container file for describing the application, and a container file set of the business system is obtained; then, a container image including resources that the application depends on is constructed according to the container file in the container file set, and a container image set of the business system is obtained, and the container image can be distributed to a variety of environments for deployment and operation of the application; finally, the application is successfully run through the container image in the container image set in different environments, and the business services in the application are uniformly managed through the preset workload of the container orchestration engine, so that the first set of files to be deployed in the business system can be obtained. Therefore, the present application provides a possible implementation method, and S201 can, for example, include the following S2011-S2013 (not shown in the figure):

[0055] S2011: Compile a container file for the application to obtain a container file set of the business system; the container file in the container file set is used to describe the application.

[0056] S2012: Build a container image according to the container file in the container file set to obtain a container image set for the business system; the container image in the container image set includes resources that the application depends on.

[0057] The resources that the application depends on may include all resources such as the root file system (rootfs), library (library), binary or script (including script interpreter) that the application depends on.

[0058] S2013: If the application is successfully run according to the container image in the container image set, resource management is performed on the business service in the application through the preset workload of the container orchestration engine to obtain a first set of files to be deployed.

[0059] Among them, successfully running an application according to a container image in a container image set means quickly pulling up a container environment through a container image in different environments to run the application, and the container environment is a separate and isolated environment, and the effect of running the application multiple times in different environments or the same environment is consistent.

[0060] As an example, see Figure 3 , Figure 3A flow chart of obtaining a first set of files to be deployed from a container file set is provided in an embodiment of the present application. The application container engine is Docker, the container orchestration engine is kubernetes, the business system is business system X, and the applications of business system X include Application-1, Application-2, Application-3, ..., Application-n, when n is a positive integer; first, Application-1 is written as a container file, i.e., Dockerfile-1, through Docker, Application-2 is written as a container file, i.e., Dockerfile-2, through Docker, Application-3 is written as a container file, i.e., Dockerfile-3, through Docker, ..., Application-n is written as a container file, i.e., Dockerfile-n, through Docker; then the container file set of business system X includes Dockerfile-1, Dockerfile-2, Dockerfile-3, ..., Dockerfile-n.

[0061] Then, a container image including the resources of Application-1 is built through Docker according to Dockerfile-1 as DockerImage-1, a container image including the resources of Application-2 is built through Docker according to Dockerfile-2 as DockerImage-2, a container image including the resources of Application-3 is built through Docker according to Dockerfile-3 as DockerImage-3, ..., a container image including the resources of Application-n is built through Docker according to Dockerfile-n as DockerImage-n; then the container image set of business system X includes DockerImage-1, DockerImage-2, DockerImage-3, ..., DockerImage-n.

[0062] Finally, in different environments, Application-1 is successfully run through DockerImage-1, Application-2 is successfully run through DockerImage-2, Application-3 is successfully run through DockerImage-3, ..., and Application-n is successfully run through DockerImage-n; through the preset workload of Kubernetes, the business services in Application-1, Application-2, Application-3, ..., Application-n are managed by resources respectively, and the first set of files to be deployed for business system X can be obtained, including Application-1 file 1, Application-2 file 1, Application-3 file 1, ..., Application-n file 1.

[0063] Among them, Docker is an open source application container engine that can package applications and dependent packages into a portable image so that they can be published on machines with Linux or Windows operating systems, and can also achieve virtualization; in the embodiment of the present application, containerd can also be used instead of Docker, which is separated from Docker and forms part of the open container interface standard. Kubernetes is an open source container orchestration engine that supports automated deployment, large-scale scalability, and application container management.

[0064] In the embodiment of the present application, when S2013 is specifically implemented, common business services are divided into stateless services and stateful services. Stateless services do not need to store persistent data locally, and the response results of multiple service instances to the same request are completely consistent, while stateful services need to store persistent data locally; although stateless services and stateful services can be uniformly managed through the preset workload of the container orchestration engine, considering that stateless services usually do not need to perform data persistence storage for the input data and output data of the container, while stateful services usually need to perform data persistence storage for the input data and output data of the container, it is necessary to perform resource management for stateless services and stateful services respectively through different workloads, and the specific implementation is as follows:

[0065] In the case where the business service includes a stateless service, a first workload of the container orchestration engine is selected to perform resource management on the stateless service to obtain a first set of files to be deployed; based on the number of copies configured for the stateless service by the second file to be deployed in the second set of files to be deployed obtained by subsequent execution of S202, the first workload creates and runs the first container group with the number of copies, and further considering that there is no need to store the input data and output data of the container persistently, and the response results of different first container groups to the same request are completely consistent, then the identifier of the first container group can be randomly generated, so that the deletion or addition of the first container group will not affect different first container groups. Wherein, when the number of copies of the first container group includes multiple first container groups, the multiple first container groups are load balanced by uniformly marking the services of the multiple first container groups; in addition, when it is necessary to reduce or expand the number of copies of the stateless service, by modifying the number of copies configured for the stateless service by the second file to be deployed, the first workload can correspondingly delete or increase the number of the running first container groups, so that the number of the first container groups running by the first workload matches the number of copies configured for the stateless service by the second file to be deployed.

[0066] Therefore, the present application provides a possible implementation method, when the business service includes a stateless service, the preset workload is a first workload; the step of performing resource management on the business service in the application through the preset workload of the container orchestration engine in S201 to obtain a first set of files to be deployed, for example, may include: performing resource management on the stateless service through the first workload to obtain a first set of files to be deployed; the number of first container groups running the first workload matches the number of copies of the second file to be deployed configured for the stateless service, and the identifier of the first container group is randomly generated.

[0067] As an example, see Figure 4 , Figure 4A schematic diagram of resource management of a stateless service through a first workload provided in an embodiment of the present application. The first workload is Deployment, and a Deployment mainly includes a version number (apiVersion), a resource type (kind), metadata (metadata), a resource-specific field (spec), and a resource status (status); wherein the metadata includes a name (name) and a namespace (namespace), etc., resource-specific fields include the number of replicas (replicas) and a selector (selector), etc., and the resource status includes the number of available replicas (readyReplicas). When kind is Deployment and replicas is 3, Deployment creates and runs three first container groups including pod-x, pod-y, and pod-z, wherein the pod identifiers x, y, and z are randomly generated; load balancing is performed between pod-x, pod-y, and pod-z through a service Service that uniformly labels pod-x, pod-y, and pod-z. In addition, when you need to reduce or expand the number of replicas for a stateless service, by modifying the replicas, the Deployment can make corresponding deletions or additions based on pod-x, pod-y, and pod-z, so that the number of pods running in the Deployment matches the replicas configured for the stateless service.

[0068] Among them, Deployment is a workload used to manage stateless services. It can manage multiple pods to achieve seamless migration, automatic expansion and contraction, automatic disaster recovery, one-click rollback, etc. Pod is the most basic resource management object in Kubernetes and is an abstract resource composed of a group of related containers.

[0069] In the case where the business service includes a stateful service, the second workload of the container orchestration engine is selected to perform resource management on the stateful service to obtain the first set of files to be deployed; based on the number of copies of the second file to be deployed in the second set of files to be deployed obtained by subsequent execution of S202 for the stateful service configuration, the second workload creates and runs the second container group with the number of copies, and further considering the need to perform data persistence storage on the input data and output data of the container, the identifier of the second container group is fixedly generated, and the stability, integrity and consistency of the persistent data are ensured by the stability of the identifier of the second container group. Among them, when the second container group with the number of copies includes multiple second container groups, the multiple second container groups are load balanced by uniformly marking the services of the multiple second container groups; when the second container group is running, data persistence storage is also required, and the data persistence storage depends on the persistent volume corresponding to the persistent volume declaration; after the second container group is deleted, the persistent volume declaration and the persistent volume will not be automatically deleted to ensure the security of the persistent data. In addition, when it is necessary to reduce or expand the replicas of the stateful service, by modifying the number of replicas configured for the stateful service in the second to-be-deployed file, the second workload can correspondingly delete or increase the number of running second container groups, so that the number of second container groups running by the second workload matches the number of replicas configured for the stateful service in the second to-be-deployed file.

[0070] Therefore, the present application provides a possible implementation method, when the business service includes a stateful service, the preset workload is the second workload; in S201, resource management is performed on the business service in the application through the preset workload of the container orchestration engine to obtain a first set of files to be deployed, for example, it may include: resource management is performed on the stateful service through the second workload to obtain a first set of files to be deployed; the number of second container groups running by the second workload matches the number of replicas configured for the stateful service by the second file to be deployed, the identifier of the second container group is fixedly generated, and when the second container group runs, data is persistently stored according to the persistent volume corresponding to the persistent volume declaration, and the persistent volume declaration and the persistent volume are retained when the second container group is deleted.

[0071] As an example, see Figure 5 , Figure 5A schematic diagram of resource management of a stateful service through a second workload provided in an embodiment of the present application. The second workload is StatefulSet, and a StatefulSet mainly includes a version number (apiVersion), a resource type (kind), metadata (metadata), a resource-specific field (spec), and a resource status (status); wherein the metadata includes a name (name) and a namespace (namespace), etc., resource-specific fields include a service name (serviceName), the number of replicas (replicas) and a selector (selector), etc., and the resource status includes the number of available replicas (readyReplicas). When kind is StatefulSet and replicas is 3, StatefulSet creates and runs three second container groups including pod-0, pod-1, and pod-2, wherein the pod identifiers 0, 1, and 2 are fixedly generated; load balancing is performed between pod-0, pod-1, and pod-2 through a service Service that uniformly labels pod-0, pod-1, and pod-2. When pod-0, pod-1, and pod-2 are running, data persistence storage is required, and data persistence storage depends on the persistent volume (PersistentVolume, PV) corresponding to the persistent volume claim (PersistentVolumeClaim, PVC); after pod-0, pod-1, or pod-2 is deleted, PVC and PV will not be automatically deleted to ensure the security of persistent data. In addition, when it is necessary to reduce or expand the replicas of a stateful service, by modifying the replicas, StatefulSet can make corresponding deletions or additions based on pod-0, pod-1, and pod-2, so that the number of pods running by StatefulSet matches the replicas configured for the stateful service.

[0072] Among them, StatefulSet is a workload used to manage stateful services. It is essentially a variant of Deployment. The identity of the managed pod cannot be changed at will. PVC represents the underlying storage object abstracted for pod use, declaring the required storage capacity, node exclusive or shared, file system or block device, etc. PV represents the storage abstraction of the underlying hard disk and is associated with the real hard disk.

[0073] In summary, see Figure 6 , Figure 6A schematic diagram of resource management for stateless services and stateful services provided in the embodiment of the present application. Based on the above example, Kubernetes Deployment is selected to manage resources for stateless services. For details, see Figure 4 Specific instructions; select Kubernetes's StatefulSet to manage resources for stateful services. For specific instructions, see Figure 5 Specific instructions.

[0074] Based on the specific implementation method of S2013 above, the preset workload of the container orchestration engine can satisfy the resource management of both stateless services in business applications and stateful services in business applications, taking into account the uniformity of stateless services and stateful services, and realizing the uniformity of resource management of multiple business services; resource management of stateless services is performed through the first workload included in the preset workload, and resource management of stateful services is performed through the second workload included in the preset workload, taking into account the differences between stateless services and stateful services, and realizing the differences in resource management of multiple business services; and the use of the preset workload of the open source container orchestration engine, etc., has low development and maintenance costs; in addition, the preset workload of the container orchestration engine can flexibly control the number of container groups, with high resource utilization and strong elastic scaling capabilities.

[0075] S202: Rendering variable values ​​of the first file to be deployed in the first file set to be deployed according to the variable value file in the variable value file set of the privatization environment through the package manager of the container orchestration engine to obtain a second file set to be deployed for the business system; the second file to be deployed in the second file set to be deployed matches the privatization environment.

[0076] In an embodiment of the present application, after executing S201 to containerize the application of the business system to obtain the first set of files to be deployed for the business system, the first file to be deployed in the first set of files to be deployed can be uniformly managed through the package manager of the container orchestration engine, so that the variable values ​​in the managed first file to be deployed match the privatized environment, so as to facilitate the subsequent efficient and accurate deployment of the business system; then, it is necessary to render the first file to be deployed in the first set of files to be deployed into a second file to be deployed that matches the privatized environment using the variable value file in the variable value file set of the privatized environment, so as to obtain the second set of files to be deployed for the business system.

[0077] When S202 is specifically implemented, first, the variable values ​​in the first file to be deployed are abstracted into variable value placeholders through the package manager of the container orchestration engine to obtain a template file of the first file to be deployed; the template file can be used by variable value files of different environments to render variable values, which is highly flexible and applicable; then, the configuration variable values ​​in the variable value file are rendered to the variable value placeholders in the corresponding template file through the package manager to obtain a second file to be deployed that matches the privatized environment, and the second set of files to be deployed for the business system can be obtained. Therefore, the present application provides a possible implementation method, and S202 may include, for example, the following S2021-S2022 (not shown in the figure):

[0078] S2021: abstracting variable values ​​of a first file to be deployed in a first set of files to be deployed through a package manager to obtain a template file of the first file to be deployed, where the template file includes a placeholder for the variable value.

[0079] S2022: Rendering the configuration variable values ​​in the variable value file to the variable value placeholders in the corresponding template file through the package manager, obtaining the second file to be deployed to form a second file set to be deployed.

[0080] As an example, see Figure 7 , Figure 7A schematic diagram of rendering variable values ​​of template files in a template file set by using variable value files in a variable value file set provided in an embodiment of the present application. Based on the above example, the package manager of kubernetes is Helm, the privatization environment is private server Y, and the variable value file set of private server Y includes Values-1.yaml, Values-2.yaml, Values-3.yaml, ..., Values-n.yaml; first, the variable values ​​in Application-1 file 1 are abstracted into variable value placeholders through Helm according to the Go Template syntax, and the template file of Application-1 file 1 is Application-1.yaml; the variable values ​​in Application-2 file 1 are abstracted into variable value placeholders through Helm according to the Go Template syntax, and the template file of Application-2 file 1 is Application-2.yaml; the variable values ​​in Application-3 file 1 are abstracted into variable value placeholders through Helm according to the Go Template syntax, and the template file of Application-3 file 1 is Application-3.yaml; ...; the variable values ​​in Application-n file 1 are abstracted into variable value placeholders through Helm according to the Go Template syntax, and the template file of Application-n file 1 is Application-n.yaml.

[0081] Then, Helm renders the configuration variable values ​​in Values-1.yaml to the variable value placeholders in Application-1.yaml according to the Go Template syntax, and obtains the second file to be deployed that matches the privatized server Y, which is Application-1 file 2; Helm renders the configuration variable values ​​in Values-2.yaml to the variable value placeholders in Application-2.yaml according to the Go Template syntax, and obtains the second file to be deployed that matches the privatized server Y, which is Application-2 file 2; Helm renders the configuration variable values ​​in Values-3.yaml to the variable value placeholders in Application-3.yaml according to the Go Template syntax, and obtains the second file to be deployed that matches the privatized server Y, which is Application-3 file 2; ...; Helm renders the configuration variable values ​​in Values-n.yaml to the variable value placeholders in Application-n.yaml according to the Go Template syntax, and obtains the second file to be deployed that matches the privatized server Y, which is Application-n file 2. That is, the second set of files to be deployed of the business system X includes Application-1 file 2, Application-2 file 2, Application-3 file 2, ..., Application-n file 2, all of which are in yaml format and can be directly deployed in the privatized server Y.

[0082] Among them, the Go Template syntax is designed to provide a simple and powerful way to generate text output, using "{{" and "}}" as placeholders for variable values ​​in template files.

[0083] As an example, see Figure 8 , Figure 8 A schematic diagram of a variable value placeholder in a template file corresponding to a stateless service rendered by a configuration variable value in a variable value file is provided in an embodiment of the present application. Figure 4 On the basis of, for stateless services, Helm is used to render the configuration variable value nginx-deploy in the variable value file to the variable value placeholder {{.Values.global.name}} in the corresponding template file according to the Go Template syntax; Helm is used to render the configuration variable value 3 in the variable value file to the variable value placeholder {{.Values.global.replicas}} in the corresponding template file according to the Go Template syntax.

[0084] As an example, see Fig. 9 , Fig. 9 A schematic diagram of a variable value placeholder in a template file corresponding to a stateful service rendered by a configuration variable value in a variable value file is provided in an embodiment of the present application. Figure 5 On the basis of, for stateful services, Helm is used to render the configuration variable value nginx-sts in the variable value file to the variable value placeholder {{.Values.global.name}} in the corresponding template file according to the Go Template syntax; Helm is used to render the configuration variable value 3 in the variable value file to the variable value placeholder {{.Values.global.replicas}} in the corresponding template file according to the Go Template syntax.

[0085] S203: In the privatized environment, deploy the business system according to the second set of files to be deployed.

[0086] In the embodiment of the present application, after executing S202 to obtain the second set of files to be deployed for the business system, since the second files to be deployed in the second set of files to be deployed all match the privatized environment, the business system can be directly deployed in the privatized environment through the second set of files to be deployed to meet the privatized deployment requirements of the business system. This deployment method has high resource utilization, high degree of deployment automation, and short development iteration cycle, and can efficiently, accurately, and stably meet the privatized deployment requirements of the business system.

[0087] In the specific implementation of S203, if the second set of files to be deployed includes a base file set and a business file set, considering that in a privatized environment, the base components need to be deployed first and then the business components need to be deployed to realize the deployment of the business system in the privatized environment; based on this, first, it is necessary to perform base deployment based on the base file set in the privatized environment to obtain the base component set of the business system; then, in the privatized environment, the package manager of the container orchestration engine performs unified business deployment based on the business file set to obtain the business component set of the business system. Therefore, the present application provides a possible implementation method, when the second set of files to be deployed includes a base file set and a business file set, S203 may include the following S2031-S2032 (not shown in the figure):

[0088] S2031: In a privatized environment, the base is deployed according to the base file set to obtain the base component set of the business system.

[0089] Among them, deploying base components mainly refers to deploying base components such as container orchestration engine components, container image repository components, middleware components, and local persistent volume components. Therefore, the present application provides a possible implementation method. When the base file set includes container orchestration engine files, container image repository files, middleware files, and local persistent volume files, the base component set includes container orchestration engine components, container image repository components, middleware components, and local persistent volume components. Of course, in an embodiment of the present application, the base file set may also include other base files, and correspondingly, the base component set may also include other base components.

[0090] S2032: In the privatized environment, business deployment is performed according to the business file set through a package manager to obtain a business component set of the business system.

[0091] In the specific implementation of S2032, if the business file set includes multiple business files, when the business is deployed according to the business file set through the package manager, in order to further quickly, accurately, and stably deploy business components, it is also necessary to consider the dependencies between the multiple business files, and the business components set of the business system can be obtained by performing business deployment on the multiple business files according to the dependencies between the multiple business files. Therefore, the present application provides a possible implementation method, when the business file set includes multiple business files, S2032 may include, for example: in a privatized environment, the package manager is used to perform business deployment on the multiple business files according to the dependencies between the multiple business files, and multiple business components are obtained to form a business component set.

[0092] As an example, see Fig.10 , Fig.10A schematic diagram of base deployment and business deployment in a private environment provided for an embodiment of the present application. Based on the above example, the container orchestration engine file is a kubernetes file, and the local persistent volume file is a LocalPV file; Application-1 file 2, Application-2 file 2, Application-3 file 2, ... and Application-3 file n include kubernetes files, container image warehouse files, middleware files, LocalPV files and multiple business files. First, in private server Y, kubernetes deployment is performed according to the kubernetes file through Kubeadm to obtain the kubernetes component matching private server Y; container image warehouse deployment is performed according to the container image warehouse file through Harbor to obtain the container image warehouse component matching private server Y; middleware container image is used to perform middleware deployment according to the middleware file to obtain the middleware component matching private server Y; LocalPV deployment is performed according to the LocalPV file through the Controller to obtain the LocalPV component matching private server Y.

[0093] Then, in private server Y, multiple business files are deployed through Helm according to the dependency relationship between multiple business files, and multiple business components matching private server Y are obtained to form a business component set; for example, when the business file of Application-2 depends on the business file of Application-1, the business file of Application-2 is deployed relative to the business file of Application-1, and the business file of Application-3 can be deployed in parallel with the business file of Application-2; then the business file of Application-1 is deployed first to obtain the business component of Application-1 matching private server Y; then the business file of Application-2 is deployed to obtain the business component of Application-2 matching private server Y, and at the same time, the business file of Application-3 is deployed to obtain the business component of Application-3 matching private server Y, etc. That is, business system X includes kubernetes components, container image repository components, middleware components, LocalPV components and multiple business components.

[0094] Among them, Kubeadm is a tool for rapid deployment of kubernetes. Harbor is an open source container image repository designed for enterprise users. Middleware includes MariaDB / Kafka, etc. MariaDB is an open source relational database management system, and Kafka is a high-throughput distributed publish-subscribe messaging system. LocalPV is a local disk directory of the host machine that is directly used in kubernetes to persistently store the input and output data of the pod. The read and write performance of LocalPV is better than that of most remote storage (cloud disks); in the embodiment of the present application, the CSI (Container Storage Interface) interface of kubernetes can be used instead of LocalPV. CSI is an industry standard interface specification jointly formulated by Kubernetes, Docker, etc.

[0095] In addition, in the embodiment of the present application, in order to ensure the successful deployment of the business system in the privatized environment, and subsequently ensure the successful operation of the business system in the privatized environment, on the basis of determining the required resource amount of the second file set to be deployed through the amount of resources to be deployed of the second file set to be deployed and the amount of resources to be used of the business system; it is also necessary to judge whether the amount of idle resources provided by the privatized environment is greater than the required resource amount of the second file set to be deployed, if so, it means that the amount of idle resources provided by the privatized environment is sufficient relative to the required resource amount of the second file set to be deployed, and the business system can be directly deployed in the privatized environment according to the second file set to be deployed. Therefore, the present application provides a possible implementation method, S203, for example, may include: if the amount of idle resources provided by the privatized environment is greater than the required resource amount of the second file set to be deployed, in the privatized environment, the business system is deployed according to the second file set to be deployed; the required resource amount is determined according to the amount of resources to be deployed of the second file set to be deployed and the amount of resources to be used of the business system.

[0096] On the contrary, when it is determined that the idle resource amount provided by the privatized environment is less than or equal to the required resource amount of the second set of files to be deployed, it means that the idle resource amount provided by the privatized environment is not sufficient relative to the required resource amount of the second set of files to be deployed, and it is necessary to first expand the privatized environment to an expanded environment with more sufficient idle resources, and then deploy the business system according to the second set of files to be deployed in the expanded environment. Therefore, the present application provides a possible implementation method, and S203 may include the following S2033-S2034 (not shown in the figure):

[0097] S2033: If the amount of idle resources is less than or equal to the amount of required resources, resources of the privatized environment are expanded to obtain an expanded environment.

[0098] S2034: In the expansion environment, deploy the business system according to the second set of files to be deployed.

[0099] In addition, in the embodiment of the present application, after the business system is deployed in the privatized environment, when the business system in the privatized environment needs to be upgraded, it is only necessary to obtain the upgrade deployment file of the business system matching the privatized environment, and then the business system can be quickly upgraded in the privatized environment based on the upgrade deployment file through the package manager of the container orchestration engine. Therefore, the present application provides a possible implementation method, and the method may also include the following S1-S2 (not shown in the figure):

[0100] S1: Obtain the upgrade deployment file of the business system that matches the privatization environment.

[0101] S2: In a privatized environment, use the package manager to upgrade the business system according to the upgrade deployment file.

[0102] As an example, based on the above example, the upgrade deployment file of the business system X matching the privatized server Y is obtained, and in the privatized server Y, the business system X is quickly upgraded based on the upgrade deployment file through Helm.

[0103] In summary, for the specific implementation of S201-S203, see Fig.11 , Fig.11 This is a schematic diagram of the overall process of deploying a business system in a privatized environment provided by the embodiment of the present application. Based on the above example, the process of deploying a business system in a privatized environment is mainly divided into the following three stages: containerizing the application of the business system to obtain the first set of files to be deployed for the business system. For details, see Figure 3 Specific instructions; through the package manager of the container orchestration engine, the variable value file in the variable value file set of the privatized environment is used to render the variable value of the first file to be deployed in the first file set to be deployed, and the second file to be deployed is obtained to form the second file set to be deployed of the business system. For specific instructions, see Figure 7 In a privatized environment, deploy the business system through the second set of files to be deployed. For details, see Fig.10 Specific instructions.

[0104] It can be seen from the above technical scheme that, first, the application of the business system is containerized to obtain the first set of files to be deployed in the business system. The containerization transformation method can package the resources that the application of the business system depends on into a container image, which is convenient for the subsequent efficient deployment of the business system in a privatized environment. Then, through the package manager of the container orchestration engine, the variable value file in the variable value file set of the privatized environment is used to render the variable value of the first file to be deployed in the first set of files to be deployed, and the second set of files to be deployed in the second set of files to be deployed matches the privatized environment; the variable value rendering method makes the first file to be deployed in the first set of files to be deployed render into the second file to be deployed that matches the privatized environment to form the second set of files to be deployed, which is convenient for the subsequent accurate deployment of the business system in the privatized environment. Finally, in the privatized environment, the business system is deployed through the second set of files to be deployed to meet the privatized deployment requirements of the business system. Based on this, the method performs privatized deployment of the business system through the containerization transformation method and the variable value rendering method, and the operation is simpler and more convenient, which improves the efficiency and effect of privatized deployment of the business system.

[0105] It should be noted that, based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods.

[0106] based on Figure 2 Corresponding to the privatization deployment method of the business system provided in the embodiment, the embodiment of the present application also provides a privatization deployment device for the business system, see Fig.12 , Fig.12 A structural diagram of a privatization deployment device of a business system provided in an embodiment of the present application, wherein the privatization deployment device 1200 of the business system includes: a transformation unit 1201, a rendering unit 1202, and a deployment unit 1203;

[0107] The transformation unit 1201 is used to perform container transformation on the application of the business system to obtain a first set of files to be deployed in the business system;

[0108] The rendering unit 1202 is used to render the variable value of the first file to be deployed in the first file set to be deployed according to the variable value file in the variable value file set of the privatization environment through the package manager of the container orchestration engine, so as to obtain the second file set to be deployed of the business system; the second file to be deployed in the second file set to be deployed matches the privatization environment;

[0109] The deployment unit 1203 is used to deploy the business system according to the second file set to be deployed in the privatized environment.

[0110] In a possible implementation, the transformation unit 1201 is specifically configured to:

[0111] Compile container files for the application to obtain a container file set for the business system; the container files in the container file set are used to describe the application;

[0112] Build a container image based on the container files in the container file set to obtain a container image set for the business system; the container image in the container image set includes resources that the application depends on;

[0113] If the application is successfully run according to the container image in the container image set, resource management is performed on the business service in the application through the preset workload of the container orchestration engine to obtain the first set of files to be deployed.

[0114] In a possible implementation, when the business service includes a stateless service, the preset workload is the first workload; the transformation unit 1201 is specifically configured to:

[0115] The stateless service is resource managed through the first workload to obtain a first set of files to be deployed; the number of first container groups running the first workload matches the number of copies configured for the stateless service by the second file to be deployed, and the identifier of the first container group is randomly generated.

[0116] In a possible implementation, when the business service includes a stateful service, the preset workload is a second workload; and the transformation unit 1201 is specifically configured to:

[0117] The stateful service is resource managed through the second workload to obtain the first set of files to be deployed; the number of second container groups running by the second workload matches the number of replicas configured for the stateful service by the second file to be deployed, the identifier of the second container group is fixedly generated, and the second container group performs data persistent storage according to the persistent volume corresponding to the persistent volume declaration when running, and the persistent volume declaration and the persistent volume are retained when the second container group is deleted.

[0118] In a possible implementation, the rendering unit 1202 is specifically configured to:

[0119] Abstracting variable values ​​of the first file to be deployed in the first set of files to be deployed by a package manager to obtain a template file of the first file to be deployed, where the template file includes a placeholder for the variable value;

[0120] The configuration variable values ​​in the variable value file are rendered to the variable value placeholders in the corresponding template file through the package manager to obtain the second file to be deployed to form a second file set to be deployed.

[0121] In a possible implementation, when the second to-be-deployed file set includes a base file set and a service file set, the deployment unit 1203 is specifically configured to:

[0122] In a privatized environment, the base is deployed according to the base file set to obtain the base component set of the business system;

[0123] In a privatized environment, business deployment is performed according to the business file set through the package manager to obtain the business component set of the business system.

[0124] In a possible implementation, when the base file set includes a container orchestration engine file, a container image repository file, a middleware file, and a local persistent volume file, the base component set includes a container orchestration engine component, a container image repository component, a middleware component, and a local persistent volume component.

[0125] In a possible implementation, when the service file set includes multiple service files, in a privatized environment, the deployment unit 1203 is specifically configured to:

[0126] In a privatized environment, a package manager is used to deploy multiple business files according to the dependency relationship between the multiple business files to obtain a business component set.

[0127] In a possible implementation, the deployment unit 1203 is specifically configured to:

[0128] If the amount of idle resources provided by the privatized environment is greater than the amount of required resources of the second set of files to be deployed, the business system is deployed in the privatized environment according to the second set of files to be deployed; the amount of required resources is determined based on the amount of resources to be deployed of the second set of files to be deployed and the amount of resources to be used by the business system.

[0129] In a possible implementation, the deployment unit 1203 is specifically configured to:

[0130] If the amount of idle resources is less than or equal to the amount of required resources, expand the resources of the privatized environment to obtain an expanded environment;

[0131] In the capacity expansion environment, the business system is deployed according to the second set of files to be deployed.

[0132] In a possible implementation, the device further includes: an acquisition unit and an upgrade unit;

[0133] An acquisition unit, used to acquire an upgrade deployment file of a business system matching a privatization environment;

[0134] The upgrade unit is used to upgrade the business system according to the upgrade deployment file through the package manager in the privatization environment.

[0135] It can be seen from the above technical scheme that, first, the application of the business system is containerized to obtain the first set of files to be deployed in the business system. The containerization transformation method can package the resources that the application of the business system depends on into a container image, which is convenient for the subsequent efficient deployment of the business system in a privatized environment. Then, through the package manager of the container orchestration engine, the variable value file in the variable value file set of the privatized environment is used to render the variable value of the first file to be deployed in the first set of files to be deployed, and the second set of files to be deployed in the second set of files to be deployed matches the privatized environment; the variable value rendering method makes the first file to be deployed in the first set of files to be deployed render into the second file to be deployed that matches the privatized environment to form the second set of files to be deployed, which is convenient for the subsequent accurate deployment of the business system in the privatized environment. Finally, in the privatized environment, the business system is deployed through the second set of files to be deployed to meet the privatized deployment requirements of the business system. Based on this, the method performs privatized deployment of the business system through the containerization transformation method and the variable value rendering method, and the operation is simpler and more convenient, which improves the efficiency and effect of privatized deployment of the business system.

[0136] The present application also provides a computer device, which may be a server. Fig.13 , Fig.13 A structural diagram of a server provided in an embodiment of the present application, the server 1300 may have relatively large differences due to different configurations or performances, and may include one or more processors, such as a central processing unit (CPU) 1322, and a memory 1332, one or more storage media 1330 (such as one or more mass storage devices) storing application programs 1342 or data 1344. Among them, the memory 1332 and the storage medium 1330 can be short-term storage or permanent storage. The program stored in the storage medium 1330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1322 can be configured to communicate with the storage medium 1330 and execute a series of instruction operations in the storage medium 1330 on the server 1300.

[0137] The server 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358, and / or one or more operating systems 1341, such as Windows Server 2003, ... TM , Mac OS X TM , Unix TM ,Linux TM, FreeBSD TM etc.

[0138] In this embodiment, the central processor 1322 in the server 1300 may perform the following steps:

[0139] Containerize the application of the business system to obtain the first set of files to be deployed for the business system;

[0140] Through the package manager of the container orchestration engine, the variable value of the first file to be deployed in the first file set to be deployed is rendered according to the variable value file in the variable value file set of the privatization environment to obtain the second file set to be deployed of the business system; the second file to be deployed in the second file set to be deployed matches the privatization environment;

[0141] In the privatized environment, the business system is deployed according to the second set of files to be deployed.

[0142] The computer device provided in the embodiment of the present application may also be a terminal. Fig.14 , Fig.14 A structural diagram of a terminal provided for an embodiment of the present application. Taking a smartphone as an example, the smartphone includes: a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490 and other components. The input unit 1430 may include a touch panel 1431 and other input devices 1432, the display unit 1440 may include a display panel 1441, and the audio circuit 1460 may include a speaker 1461 and a microphone 1462. Those skilled in the art will appreciate that Fig.14 The structure of the smartphone shown in the figure does not constitute a limitation of the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0143] The memory 1420 can be used to store software programs and modules. The processor 1480 executes various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 1420. The memory 1420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the smartphone (such as audio data, a phone book, etc.), etc. In addition, the memory 1420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0144] The processor 1480 is the control center of the smartphone, which uses various interfaces and lines to connect various parts of the entire smartphone, and executes various functions of the smartphone and processes data by running or executing software programs and / or modules stored in the memory 1420, and calling data stored in the memory 1420. Optionally, the processor 1480 may include one or more processing units; preferably, the processor 1480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1480.

[0145] In this embodiment, the processor 1480 in the smartphone may perform the following steps:

[0146] Containerize the application of the business system to obtain the first set of files to be deployed for the business system;

[0147] Through the package manager of the container orchestration engine, the variable value of the first file to be deployed in the first file set to be deployed is rendered according to the variable value file in the variable value file set of the privatization environment to obtain the second file set to be deployed of the business system; the second file to be deployed in the second file set to be deployed matches the privatization environment;

[0148] In the privatized environment, the business system is deployed according to the second set of files to be deployed.

[0149] According to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed on a computer device, the computer device executes the methods provided in various optional implementations of the above embodiments.

[0150] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in various optional implementations of the above-mentioned embodiments.

[0151] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0152] The terms "first", "second", etc. in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0153] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0154] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0155] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0156] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store computer programs.

[0157] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technical members in the art should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for privatizing a business system, characterized in that: The method comprises: Performing containerization transformation on an application of a business system to obtain a first set of files to be deployed for the business system; By means of a package manager of a container orchestration engine, a variable value rendering is performed on a first file to be deployed in the first set of files to be deployed according to a variable value file in a variable value file set of a privatized environment, so as to obtain a second set of files to be deployed for the business system; and a second file to be deployed in the second set of files to be deployed matches the privatized environment; In the privatized environment, the business system is deployed according to the second set of files to be deployed.

2. The method according to claim 1, characterized in that: The containerizing of the application program of the business system to obtain a first set of files to be deployed of the business system includes: Compiling a container file for the application to obtain a container file set for the business system; the container files in the container file set are used to describe the application; Build a container image according to the container file in the container file set to obtain a container image set for the business system; the container image in the container image set includes resources that the application depends on; If the application is successfully run according to the container image in the container image set, resource management is performed on the business service in the application through the preset workload of the container orchestration engine to obtain the first set of files to be deployed.

3. The method according to claim 2, characterized in that When the business service includes a stateless service, the preset workload is a first workload; and performing resource management on the business service in the application through the preset workload of the container orchestration engine to obtain the first set of files to be deployed includes: The first set of files to be deployed is obtained by performing resource management on the stateless service through the first workload; the number of first container groups running by the first workload matches the number of copies configured for the stateless service by the second file to be deployed, and the identifier of the first container group is randomly generated.

4. The method according to claim 2, characterized in that: When the business service includes a stateful service, the preset workload is a second workload; and performing resource management on the business service in the application through the preset workload of the container orchestration engine to obtain the first set of files to be deployed includes: The stateful service is resource managed through the second workload to obtain the first set of files to be deployed; the number of second container groups running by the second workload matches the number of replicas configured for the stateful service by the second file to be deployed, the identifier of the second container group is fixedly generated, and the second container group performs data persistent storage according to the persistent volume corresponding to the persistent volume declaration when running, and the persistent volume declaration and the persistent volume are retained when the second container group is deleted.

5. The method according to claim 1, characterized in that The step of rendering the variable value of the first file to be deployed in the first set of files to be deployed according to the variable value file in the set of files to be deployed in the privatized environment through the package manager of the container orchestration engine to obtain the second set of files to be deployed for the business system includes: Abstracting variable values ​​of the first file to be deployed in the first set of files to be deployed by the package manager to obtain a template file of the first file to be deployed, wherein the template file includes a placeholder for variable values; The package manager renders the configuration variable values ​​in the variable value file to the variable value placeholders in the corresponding template file, and obtains the second file to be deployed to form the second file set to be deployed.

6. The method according to claim 1, characterized in that When the second set of files to be deployed includes a base file set and a business file set, deploying the business system according to the second set of files to be deployed in the privatized environment includes: In the privatized environment, base deployment is performed according to the base file set to obtain a base component set of the business system; In the privatized environment, the package manager performs service deployment according to the service file set to obtain the service component set of the service system.

7. The method according to claim 6, characterized in that When the base file set includes a container orchestration engine file, a container image repository file, a middleware file, and a local persistent volume file, the base component set includes a container orchestration engine component, a container image repository component, a middleware component, and a local persistent volume component.

8. The method according to claim 6, characterized in that When the business file set includes a plurality of business files, in the privatized environment, performing business deployment according to the business file set by the package manager to obtain the business component set of the business system includes: In the privatized environment, the package manager performs service deployment on the multiple business files according to the dependency relationship between the multiple business files, and obtains multiple business components to form the business component set.

9. The method according to claim 1, characterized in that: Deploying the business system according to the second set of files to be deployed in the privatized environment includes: If the amount of idle resources provided by the privatized environment is greater than the amount of required resources of the second set of files to be deployed, the business system is deployed in the privatized environment according to the second set of files to be deployed; the required amount of resources is determined based on the amount of resources to be deployed of the second set of files to be deployed and the amount of resources to be used of the business system.

10. The method according to claim 9, characterized in that Deploying the business system according to the second set of files to be deployed in the privatized environment includes: If the idle resource amount is less than or equal to the required resource amount, expanding the resources of the privatized environment to obtain an expanded environment; In the expansion environment, the business system is deployed according to the second set of files to be deployed.

11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: Acquire an upgrade deployment file of the business system that matches the privatization environment; In the privatized environment, the business system is upgraded according to the upgrade deployment file through the package manager.

12. A privatization deployment device for a business system, characterized in that: The device comprises: a transformation unit, a rendering unit and a deployment unit; The transformation unit is used to perform containerization transformation on the application of the business system to obtain a first set of files to be deployed for the business system; The rendering unit is used to render the variable value of the first file to be deployed in the first set of files to be deployed according to the variable value file in the variable value file set of the privatization environment through the package manager of the container orchestration engine, so as to obtain the second set of files to be deployed of the business system; the second file to be deployed in the second set of files to be deployed matches the privatization environment; The deployment unit is used to deploy the business system according to the second set of files to be deployed in the privatized environment.

13. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 11 according to the instructions in the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed on a computer device, the computer device executes the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed on a computer device, the computer device is caused to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method and architecture for standard and automatic deployment of power dispatching centralized control systems

    CN108052333A

  • Helm parameter batch configuration method based on template

    CN111338657A

  • Droplet execution engine for dynamic server application deployment

    US20110265081A1