Business system deployment method and device, electronic equipment and storage medium
By starting deployment scripts and uploading configuration files and installation packages on the deployment management node, the automated deployment of the business system is achieved, solving the problems of long deployment time and error-prone in the existing technology, and improving deployment efficiency.
Patent Information
- Application Number
- CN202311554266.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2025-05-20
AI Technical Summary
The existing technology lacks automated deployment methods suitable for all basic components and business module components of the business system, resulting in long deployment time and prone to human errors.
Start the deployment script through the deployment management node, obtain the configuration files of the components according to the deployment planning table, and upload them and the installation package to the node to be deployed, and start the installation thread for automatic deployment.
It realizes the automatic deployment of the entire process of the business system, saves deployment time, improves deployment efficiency, and reduces the occurrence of human errors.
Smart Images

Figure CN120020707A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computers, and in particular, to a method and device for deploying a business system, an electronic device, and a storage medium. Background Art
[0002] In the research and development of software application system projects, with the increasing requirements for business continuity, relevant application systems and middleware are all deployed in a multi-node cluster to ensure the high availability of the application system and achieve continuous business even when a single node of the application system fails. In the deployment stage of the project, engineers need to deploy the middleware and application systems required by the project in a multi-node cluster (at least 3 nodes, and even dozens of nodes in large systems, generally 1 node is 1 server). Taking a certain application system project as an example, in addition to installing basic components such as a Java Development Kit (JDK), a database, a Remote Dictionary Server (Redis), a load balancing component, and a service registration and discovery middleware, engineers also need to deploy the modules required for the application system to run, perform system initialization configuration, etc. Moreover, for multi-node devices, the installation and deployment process of the application system takes a lot of time, and human errors are likely to occur during the installation and deployment process, resulting in problems.
[0003] Currently, there is no automated deployment method that can adapt to all basic components and business module components of the application system. Although corresponding automated deployment methods have been proposed for some modules, when it comes to the deployment of all modules of the overall application system project, manual deployment is often required. Summary of the Invention
[0004] To solve the above technical problems, embodiments of the present application provide a method and device for deploying a business system, an electronic device, and a storage medium.
[0005] In a first aspect, embodiments of the present application provide a method for deploying a business system. The deployment method is applied to a deployment management node, and the method includes:
[0006] Start a deployment script; the deployment script includes the names of at least one component to be deployed of the business system to be deployed;
[0007] Obtain configuration files of the at least one component to be deployed according to the parameters included in the deployment plan table;
[0008] Upload the configuration files of the at least one component to be deployed and the installation packages of the at least one component to be deployed to at least one node to be deployed;
[0009] Start an installation thread and deploy the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed.
[0010] In a second aspect, an embodiment of the present application provides a deployment device for a business system. The deployment device is applied to a deployment management node and includes:
[0011] A start unit for starting a deployment script; the deployment script includes the names of at least one component to be deployed of the business system to be deployed;
[0012] A processing unit for obtaining the configuration file of the at least one component to be deployed according to the parameters included in the deployment plan table;
[0013] An upload unit for uploading the configuration file of the at least one component to be deployed and the installation package of the at least one component to be deployed to at least one node to be deployed;
[0014] A deployment unit for starting an installation thread and deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes: a memory and a processor. A computer-executable instruction is stored on the memory, and when the processor runs the computer-executable instruction on the memory, the deployment method of the business system described in the first aspect embodiment can be implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which an executable instruction is stored, and when the executable instruction is executed by a processor, the deployment method of the business system described in the first aspect embodiment is implemented.
[0017] The technical solution of the embodiment of the present application is to start a deployment script by using a deployment management node; the deployment script includes the names of at least one component to be deployed of the business system to be deployed; obtain the configuration file of the at least one component to be deployed according to the parameters included in the deployment plan table; upload the configuration file of the at least one component to be deployed and the installation package of the at least one component to be deployed to at least one node to be deployed; start an installation thread and deploy the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed. In this way, the whole process of automatic deployment of the business system can be realized, the deployment time of the business system can be saved, and the deployment efficiency of the business system can be improved. Description of the Drawings
[0018] Figure 1It is a diagram of the manual deployment steps for a business system;
[0019] Figure 2 It is a schematic flowchart of a deployment method for a business system provided by an embodiment of the present application Figure 1 ;
[0020] Figure 3 It is a schematic flowchart of a deployment method for a business system provided by an embodiment of the present application Figure 2 ;
[0021] Figure 4 It is a schematic flowchart of a deployment method for a business system provided by an embodiment of the present application Figure 3 ;
[0022] Figure 5 It is a schematic flowchart of a deployment method for a business system provided by an embodiment of the present application Figure 4 ;
[0023] Figure 6 It is a schematic flowchart of a deployment method for a business system provided by an embodiment of the present application Figure 5 ;
[0024] Figure 7 It is a schematic diagram of the automated deployment steps for a business system provided by an embodiment of the present application;
[0025] Figure 8 It is a schematic diagram of the component upload process provided by an embodiment of the present application;
[0026] Figure 9 It is a schematic diagram of the deployment process for components to be deployed provided by an embodiment of the present application;
[0027] Figure 10 It is a schematic diagram of the structural composition of a deployment device for a business system provided by an embodiment of the present application;
[0028] Figure 11 It is a schematic diagram of the hardware structural composition of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are only some of the embodiments of this application, rather than all of them. Usually, the components of the embodiments of this application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents the selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative efforts fall within the scope of protection of this application.
[0030] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be redefined and explained in subsequent drawings.
[0031] The term "and / or" in this document merely describes an association relationship and indicates that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, both A and B exist simultaneously, and B exists alone. Additionally, the term "at least one" in this document means any one of multiple types or any combination of at least two of multiple types. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set composed of A, B, and C.
[0032] Figure 1 It is a diagram of the manual deployment steps for a business system, as Figure 1 shown, and the manual deployment steps include:
[0033] S101: Log in to the server to be deployed.
[0034] Taking the system to be deployed as a Web system as an example, log in to the server of the Web system to be deployed and start the deployment operation of the Web system. After logging in to the server to be deployed, determine whether to use the online installation method or the offline installation method according to the network situation and installation requirements. If the online installation is adopted, step S102 is executed; if the offline installation is adopted, step S103 is executed.
[0035] S102: Download and install each basic component and related dependency packages through commands such as wget, yum, and rpm.
[0036] For online installation, download and install each basic component and its related dependency programs through commands such as wget, yum, and rpm.
[0037] S103: Upload the offline packages of each basic component through sftp and perform offline installation.
[0038] For offline installation, the offline packages of each basic component and dependent programs downloaded in advance need to be uploaded to the server to be deployed through the sftp service, and then installed manually in ways such as rpm.
[0039] S104: Modify the configuration file, configure the environment variables, and start the basic components.
[0040] After the installation of the basic components is completed, modify the corresponding configuration file, configure the environment variables, paths, etc., and then start each basic component to complete the construction of the basic environment for the Web system to run.
[0041] S105: Upload the installation packages of each business component for installation.
[0042] Upload each business module (Business A, Business B, Business C, Business D) to the server to be deployed, and then run the installation script of each module to complete the installation of the business module.
[0043] Figure 1 Most of the deployment methods shown require manual participation. When there are many components to be deployed, it will take a lot of time. At the same time, manual deployment requires modifying the configurations of multiple components, with a large workload, being error-prone, and extremely inefficient.
[0044] In order to improve the deployment efficiency of the business system, corresponding automated deployment methods have been proposed for many components, but basically they are for one or a few components, and there is no automated deployment method for all components in the business system.
[0045] The deployment of the business system is mostly done manually, which is time-consuming and laborious, and various problems will occur during the deployment process. For a complex business system, if both the basic components and business modules are fully deployed manually, it will take at least one day to complete the deployment and system debugging. Many components have also proposed corresponding automated deployment solutions, but basically they are for specific several components and cannot meet the requirements of business automated deployment.
[0046] The technical solution of the embodiment of the present application can achieve the full-process automated deployment of the business system, can save the deployment time of the business system, and improve the deployment efficiency of the business system. It should be noted that the business system in the embodiment of the present application can be either a highly available Web application system or a single-machine deployed business system. The technical solution of the embodiment of the present application provides an automated deployment method that supports both the deployment of highly available Web application systems and single-machine deployment, and can achieve the full automation of the application system deployment process.
[0047] Figure 2 It is a schematic flowchart of a deployment method for a business system provided by an embodiment of the present application Figure 1 , as Figure 2 shown, the method includes:
[0048] S201: Start the deployment script.
[0049] In the embodiment of the present application, the automated deployment method of the above business system is executed by a deployment management node; exemplarily, the deployment management node may specifically be a server that executes the deployment management of the business system.
[0050] In the embodiment of the present application, the business system may also be referred to as an application system or a platform project, etc.
[0051] In the embodiment of the present application, the deployment script includes the names of at least one component to be deployed of the business system to be deployed.
[0052] In the embodiment of the present application, the user manually modifies the deployment script according to the components that need to be deployed in the business system; each component that needs to be deployed is manually added to the deployment script. For example, if the business system needs to deploy component A, component B, component C, and component D, the names or identification information of the above components are added to the deployment script. The deployment management node starts the deployment work of the business system by starting the deployment script and reading the names or identifications of the components included in the deployment script.
[0053] Here, each component in the deployment script is called a component to be deployed, or a module to be deployed. Each component to be deployed in the deployment script may specifically be an application module to be deployed and its dependent components.
[0054] S202: Obtain the configuration file of the at least one component to be deployed according to the parameters included in the deployment plan table.
[0055] In the embodiment of the present application, the user also needs to modify the deployment plan table according to the actual situation and deployment requirements of the business system deployment. The deployment plan table includes the basic information of the business system to be deployed, such as the address information of the deployment environment, account information (including account number and account password, etc.), the deployment path information of each component to be deployed, and the virtual address information of each component to be deployed, etc.
[0056] Exemplarily, the deployment plan table may be in any form of a table. For example, the deployment plan table may be in the Excel (a spreadsheet) format, which is convenient for users to fill in, modify, and view, etc.
[0057] In the embodiment of the present application, the deployment plan table includes the deployment information of all components that need to be deployed in the business system. According to the parameter information included in the deployment plan table, the deployment configuration files of each component to be deployed in the business system can be obtained respectively, also referred to as configuration files; when the deployment management node deploys the components to be deployed in the business system, it mainly deploys each component to be deployed according to the configuration file of each component to be deployed.
[0058] S203: Upload the configuration files of the at least one component to be deployed and the installation packages of the at least one component to be deployed to at least one node to be deployed.
[0059] In the embodiments of the present application, to achieve the automated deployment of the business system, an automated deployment toolkit is also set up, and the offline installation packages of the components to be deployed are included in the automated deployment toolkit.
[0060] In the embodiments of the present application, the deployment management node can obtain the list of components to be deployed in the business system according to the start-up script or each component to be deployed in the business system included in the deployment plan table. After that, according to the list of components to be deployed, the deployment management node starts multiple threads and uploads the offline installation packages of the components in the list of components to be deployed to each node to be deployed.
[0061] In the embodiments of the present application, each node to be deployed can specifically be each server to be deployed.
[0062] S204: Start the installation thread and deploy the at least one component to be deployed on the at least one node to be deployed according to the configuration files of the at least one component to be deployed.
[0063] In the embodiments of the present application, the number of nodes to be deployed can be 1. When the number of nodes to be deployed is one, single-machine deployment of the business system is performed. If the number of nodes to be deployed is multiple, cluster deployment of the business system is performed.
[0064] The deployment management node can deploy each component to be deployed on each node to be deployed according to the configuration files of each component to be deployed by starting the installation thread.
[0065] In some embodiments, the deployment management node uploads the installation packages of the at least one component to be deployed to at least one node to be deployed in a parallel upload manner.
[0066] In some embodiments, the deployment management node deploys the at least one component to be deployed in parallel on the at least one node to be deployed according to the configuration files of the at least one component to be deployed.
[0067] In the embodiments of the present application, when the deployment management node uploads the installation packages of each component to be deployed to multiple nodes to be deployed, it can adopt a parallel upload method and start multiple threads to upload the installation packages of each component to be deployed to multiple nodes to be deployed at the same time. Similarly, the deployment management node can deploy each component to be deployed on multiple nodes to be deployed in parallel.
[0068] The embodiments of the present application adopt a multi-threaded parallel upload method to upload the installation packages of each component to be deployed to multiple nodes to be deployed, and adopt a multi-threaded parallel installation method to deploy the components to be deployed on multiple nodes to be deployed, which can significantly improve the deployment efficiency of the business system and shorten the deployment time of the business system.
[0069] In the technical solution of the embodiments of the present application, the user sets up the startup script and the deployment plan table in advance, and places the offline installation packages of each component to be deployed in the automated deployment toolkit. Subsequently, the deployment management node can realize the full-process automated deployment of the business system. The technical solution of the embodiments of the present application is an automated deployment method that supports both the deployment of high-availability Web application systems and single-machine deployment, and can realize the full automation of the application system deployment process.
[0070] Figure 3 It is a schematic flow of a deployment method for a business system provided by an embodiment of the present application Figure 2 , such as Figure 3 shown, the method includes:
[0071] S301: Start the deployment script.
[0072] S302: Obtain the configuration file of the at least one component to be deployed according to the parameters included in the deployment plan table.
[0073] In the embodiments of the present application, step S301 and step S302 can be executed according to the above step S201 and step S202, which will not be elaborated here.
[0074] S303: Determine the deployment environment type of the business system according to the deployment environment parameters in the deployment plan table.
[0075] In the embodiments of the present application, the deployment environment type includes one of the following: cluster deployment environment, single-machine deployment environment.
[0076] In the embodiments of the present application, the deployment plan table includes deployment environment parameters, which are used to indicate whether the deployment environment of the business system is a cluster deployment environment, also known as a high-availability environment.
[0077] S304: Generate a deployment instruction corresponding to the deployment environment type of the business system.
[0078] If the environment to be deployed is a single-machine deployment environment, a single-machine deployment instruction is generated; if the environment to be deployed is a high-availability environment, a cluster deployment instruction is generated.
[0079] S305: In response to the deployment instruction, obtain the configuration file corresponding to the deployment environment type of the at least one component to be deployed according to the parameters included in the deployment plan table.
[0080] In the embodiments of the present application, the deployment management node starts to deploy the business system in response to the generated single-machine deployment instruction or cluster deployment instruction (the instruction mainly includes the list of modules to be deployed). The deployment management node can generate a list of components to be deployed according to the deployment component requirements in the deployment instruction.
[0081] In the embodiments of the present application, the configuration files corresponding to the single-machine deployment environment and the cluster deployment environment are not completely the same.
[0082] For example, the configuration file in the cluster deployment environment contains the address information of all servers in the cluster, and the single-machine template only has the address information of a single server; the configuration file in the cluster deployment environment contains the high-availability IP information of the database, the registry, and the load balancer, and the configuration file in the single-machine deployment environment does not have this configuration; the Redis in the configuration file of the cluster deployment environment is in a three-master and three-slave cluster state, and the configuration file in the single-machine deployment environment is in a single-machine state, etc.
[0083] S306: Upload the configuration files of the at least one component to be deployed and the installation packages of the at least one component to be deployed to at least one node to be deployed.
[0084] S307: Start the installation thread and deploy the at least one component to be deployed on the at least one node to be deployed according to the configuration files of the at least one component to be deployed.
[0085] In the embodiments of the present application, the above steps S306 and S307 can be executed with reference to the above steps S203 and S204, and will not be elaborated here.
[0086] In some embodiments, when the deployment environment type is a cluster deployment environment, the above step S305 includes:
[0087] For each component to be deployed, read the deployment configuration parameters of the component to be deployed in the deployment plan table, and use the deployment configuration parameters of the component to be deployed to replace the deployment configuration parameters in the cluster configuration file template of the component to be deployed to obtain the cluster configuration file of the component to be deployed.
[0088] In some embodiments, when the deployment environment type is a single-machine deployment environment, the above step S305 includes:
[0089] For each component to be deployed, read the deployment configuration parameters of the component to be deployed in the deployment plan table, and use the deployment configuration parameters of the component to be deployed to replace the deployment configuration parameters in the single-machine configuration file template of the component to be deployed to obtain the single-machine configuration file of the component to be deployed.
[0090] In the case where the deployment environment type is determined to be a cluster deployment environment, according to the cluster deployment method, various parameters in the deployment plan table are read. The parameters include cluster IP information, file locations of the database and each service deployed on the server, port information, service path information configured by each middleware, etc., and parameter substitution is performed on the configuration file templates in each component. Since there are certain differences between the configuration files for single-machine and cluster deployments of most components (for example, the cluster deployment configuration file template contains all cluster IP information, the single-machine template only has the IP information of a single server, the cluster deployment template contains the high-availability IP information of the database, registry, and load balancer, which is not configured in the single-machine template, the Redis in the cluster deployment configuration template file is in a three-master and three-slave cluster state, and the single-machine deployment configuration template file is in a single-machine state, etc.), the cluster deployment template is used for cluster deployment, and the single-machine deployment template is used for single-machine deployment.
[0091] Upload the modified configuration files of each component to each server to be deployed, and replace the native default configuration file templates of each component in each server to be deployed.
[0092] The technical solution of the embodiment of the present application can obtain a configuration file corresponding to the deployment environment type according to the deployment environment type, and perform a deployment operation corresponding to the deployment environment type.
[0093] The business system in the embodiment of the present application can be either a highly available Web application system or a single-machine deployed business system. The technical solution of the embodiment of the present application is an automated deployment method that supports both the deployment of highly available Web application systems and single-machine deployments, and can realize the full automation of the application system deployment process, thereby saving the deployment time of the business system and improving the deployment efficiency of the business system.
[0094] Figure 4 Schematic flow of a deployment method for a business system provided by an embodiment of the present application Figure 3 , as Figure 4 shown, the method includes:
[0095] S401: Start the deployment script.
[0096] S402: Read the address information of at least one node to be deployed in the deployment plan table.
[0097] S403: Determine whether there is an elastic address for each node to be deployed in the at least one node to be deployed according to the address information.
[0098] S404: For the node to be deployed with an elastic address among the nodes to be deployed, determine the actual address corresponding to the elastic address of the node to be deployed with the elastic address.
[0099] In the embodiments of the present application, the deployment plan table includes the address information of each to-be-deployed node in at least one to-be-deployed node of the business system; according to the address information of each to-be-deployed node, it can be determined whether each to-be-deployed node has an elastic address, such as an elastic IP address; for a to-be-deployed node with an elastic address, it is necessary to map its corresponding elastic address to the actual address.
[0100] S405: Write the actual address corresponding to the to-be-deployed node with the elastic address into the configuration file of the at least one to-be-deployed component.
[0101] For a to-be-deployed node with an elastic address, write the actual address corresponding to the elastic address into the configuration file of each to-be-deployed component; correspondingly, for a to-be-deployed node without an elastic address, write the address of the to-be-deployed node in the deployment plan table into the configuration file of each to-be-deployed component.
[0102] S406: Upload the configuration file of the at least one to-be-deployed component and the installation package of the at least one to-be-deployed component to at least one to-be-deployed node according to the elastic address of the at least one to-be-deployed node.
[0103] When the deployment management node uploads the installation package and the installation package of the to-be-deployed component to at least one to-be-deployed node, for a to-be-deployed node with an elastic address, upload the configuration file and the installation package according to its elastic IP; for a to-be-deployed node without an elastic address, upload the configuration file and the installation package according to the address of the to-be-deployed node in the deployment plan table. Here, the configuration file of the to-be-deployed component includes the elastic address and the actual address of the to-be-deployed node with the elastic address.
[0104] S407: Start the installation thread and deploy the at least one to-be-deployed component on the at least one to-be-deployed node according to the configuration file of the at least one to-be-deployed component.
[0105] The above step S407 can be executed with reference to the above step S204 and will not be elaborated here.
[0106] Since when deploying the business system, there may be a situation where when some environments exist due to security factors and do not expose the actual physical IP externally, but use the elastic IP to expose externally, it may cause errors in the corresponding parameters in the configuration file during the deployment process, resulting in the failure of the deployment.
[0107] The embodiments of the present application can take into account the situation that some nodes to be deployed have elastic addresses. By mapping the elastic addresses to the actual addresses one by one, it can enable the nodes to be deployed to achieve the automated deployment of the business system through the deployment method of the embodiments of the present application regardless of whether they have elastic addresses, avoiding the problem that the automated deployment process fails due to the existence of elastic addresses in the nodes to be deployed, and meeting the security requirements during the deployment of the business system. The embodiments of the present application are also applicable to the deployment of business systems in nodes to be deployed without elastic addresses.
[0108] The technical solution of the embodiments of the present application can achieve full automation of the application system deployment process, thereby saving the deployment time of the business system and improving the deployment efficiency of the business system.
[0109] Figure 5 It is a schematic flow of a deployment method for a business system provided by an embodiment of the present application Figure 4 , such as Figure 5 shown, the method includes:
[0110] S501: Start the deployment script.
[0111] S502: Obtain the configuration files of the at least one component to be deployed according to the various parameters included in the deployment plan table.
[0112] S503: Upload the configuration files of the at least one component to be deployed and the installation packages of the at least one component to be deployed to at least one node to be deployed.
[0113] In the embodiments of the present application, steps S501, S502, and step S503 can be executed according to the above steps S201 to step S203, which will not be elaborated here.
[0114] S504: For each node to be deployed, determine whether each component to be installed in the at least one component to be deployed has dependent components according to the configuration files of each component to be installed in the at least one component to be deployed.
[0115] In the embodiments of the present application, the number of the dependent components is one or more.
[0116] In the embodiments of the present application, the configuration files of the at least one component to be deployed include dependent component information corresponding to the components to be deployed.
[0117] S505: For each component to be installed with dependent components, execute the installation of the dependent components of the component to be installed and the installation of the component to be installed according to a predetermined strategy.
[0118] For each component to be installed with dependent components, when installing the component to be installed, it is necessary to complete the installation of the component to be installed in combination with the installation situation of its dependent components.
[0119] For example, if component A (specifically, a certain application A) has dependent components B, C, and E (for example, many applications need to depend on MySQL, Redis, and Nginx to run properly), then components B, C, and E need to be installed first. After the basic operating environment is configured, component A is installed.
[0120] In some embodiments, step S505 above includes:
[0121] a1. For each component to be installed that has dependent components, detect whether all the dependent components of the component to be installed are deployed on the node to be deployed;
[0122] a2. In the case where it is detected that all the dependent components of the component to be installed are deployed on the node to be deployed, install the component to be installed on the node to be deployed.
[0123] If component A has dependent components B, C, and E, detect whether components B, C, and E have been deployed on the node to be deployed. If B, C, and E have all been deployed, then directly install application A.
[0124] In some embodiments, step S505 above includes:
[0125] b1. In the case where it is detected that at least some of the dependent components of the component to be installed are not deployed on the node to be deployed, detect whether each component in the at least some dependent components is a component to be deployed in the list of components to be deployed of the business system;
[0126] b2. In the case where all of the at least some dependent components belong to the components to be deployed in the list of components to be deployed, abort the installation of the component to be installed;
[0127] b3. In the case where it is detected that the at least some dependent components have been installed on the node to be deployed, install the component to be installed on the node to be deployed.
[0128] If component A has dependent components B, C, and E, detect whether components B, C, and E have been deployed on the node to be deployed. If component B has been deployed on the node to be deployed and components C and E have not been deployed, then perform the detection of components C and E.
[0129] Perform the detection of components C and E, and check whether there are components C and E in the list of components to be deployed; if both are present, then the installation of component A is paused and waits for the installation of components C and E to end. Component A restarts the installation task regularly. When it is detected that both components C and E have been deployed on the node to be deployed, then continue to start the installation of component A.
[0130] In some embodiments, the above step S505 includes:
[0131] c1. When there is a first dependent component among the at least partially dependent components that does not belong to the to-be-deployed component list of the to-be-deployed components, and there is a second dependent component that belongs to the to-be-deployed component list of the to-be-deployed components, abort the installation of the to-be-installed component;
[0132] c2. Detect whether the first dependent component exists in the local library of the automated deployment package; if it exists, add the first dependent component to the to-be-deployed component list;
[0133] c3. When it is detected that the to-be-deployed node has completed the installation of the first dependent component, further detect whether the to-be-deployed node has completed the installation of the second dependent component;
[0134] c4. When it is detected that the to-be-deployed node has completed the installation of the second dependent component, install the to-be-installed component on the to-be-deployed node.
[0135] If component A has related dependent components B, C, and E, detect whether components B, C, and E have been deployed on the to-be-deployed node. If component B has been deployed on the to-be-deployed node and components C and E have not been deployed, then perform the detection of components C and E.
[0136] If it is detected that component C is in the to-be-deployed component list and component E is not in the to-be-deployed component list, then the installation of component A is paused, and only component E is detected. Check whether component E exists in the local library of the automated deployment package. If component E exists, add component E to the to-be-deployed component list and create a new deployment task for component E. Component A restarts the installation task at regular intervals. When it is detected that both C and E have been deployed in the to-be-deployed environment, then continue to start the installation.
[0137] In some embodiments, the above step S505 includes:
[0138] d1. When there is a first dependent component among the at least partially dependent components that does not belong to the to-be-deployed component list of the to-be-deployed components, detect whether the first dependent component exists in the local library of the automated deployment package;
[0139] d2. If it does not exist, terminate the installation of the to-be-installed component and return a prompt message indicating that the installation of the to-be-installed component has failed to the user terminal.
[0140] If component A has related dependent components B, C, and E, detect whether components B, C, and E have been deployed on the to-be-deployed node. If components B and C have been deployed on the to-be-deployed node and component E has not been deployed, then perform the detection of component E.
[0141] If component E does not exist in the list of components to be deployed and also does not exist in the local library of the automated deployment package, it indicates that component E cannot be automatically obtained for installation, and component A cannot be successfully installed and run. Then, the deployment task of component A is cancelled, and a corresponding error prompt message is returned to the user.
[0142] In the embodiments of the present application, the installation is terminated only when the dependent component is not installed, not in the list of components to be deployed, and does not exist in the local library.
[0143] In the embodiments of the present application, after receiving the installation instruction of component A, the deployment management node installs component A in parallel on multiple nodes to be deployed.
[0144] In some embodiments, for each node to be deployed, for each component to be installed that does not have a dependent component, install the component to be installed on the node to be deployed.
[0145] For the component to be deployed that does not have any dependent components, it means that the component to be deployed can run independently, and the component to be deployed can be directly installed on each node to be deployed.
[0146] In the embodiments of the present application, this module can detect the component to be deployed, determine whether its dependent components are installed, and thus decide whether to install the component, which can solve the problem of installation failure caused by component dependency issues during the deployment of multiple components in a business system. In the embodiments of the present application, by detecting and judging the dependent components during the deployment of each component, the deployment order of the components is determined, reducing the possibility of errors during component deployment and improving the deployment success rate.
[0147] The technical solution of the embodiments of the present application can realize the full automation of the application system deployment process, thereby saving the deployment time of the business system and improving the deployment efficiency of the business system.
[0148] Figure 6 It is a schematic flowchart of a deployment method for a business system provided by the embodiments of the present application Figure 5 , as Figure 6 shown, the method includes:
[0149] S601: For each component to be deployed, when the installation of the component to be deployed is completed on all the nodes to be deployed in the at least one node to be deployed, start the component to be deployed on all the nodes to be deployed, and establish a cluster of the component to be deployed.
[0150] For example, after component A is installed, start component A on each node to be deployed respectively. After the start is completed, establish the cluster of component A respectively.
[0151] S602: For each component to be deployed, in the case where the installation of the component to be deployed is completed, add the component to the component installation completion list.
[0152] For example, after the cluster of component A is successfully established, add component A to the list of successfully installed components.
[0153] S603: Match the list of components to be deployed of the business system with the component installation completion list to determine whether there are components to be deployed that are not installed.
[0154] S604: If there are, return a prompt message of the components to be deployed that are not installed in the business system to the user terminal; if not, return a prompt message indicating that the deployment of the business system is completed to the user terminal.
[0155] Match the list of successfully installed components with the list of components to be deployed. If all components in the list of components to be deployed are installed, return the installation completion result to the user. If there are components in the list of components to be deployed that are not successfully installed, return the relevant error information to the user for processing.
[0156] The technical solution of the embodiment of the present application can use the component completion list to determine whether all components of the business system have been installed. If there are components that are not installed, the components that are not installed can be tried to be installed again. If the installation of the components still cannot be achieved, the information of the components that are not successfully installed is returned to the user.
[0157] The technical solution of the embodiment of the present application can avoid the situation of missing component installation when installing all components of the business system, and can feedback a prompt message to the user when some components cannot be installed, so that the user can supplement or modify the information required for component deployment or the installation package in a timely manner based on the prompt message.
[0158] Next, a specific embodiment is used to illustrate the process of the deployment management node for automatically deploying the business system.
[0159] In the embodiment of the present application, to achieve the full-process automatic deployment of the business system, the deployment management node may include 4 modules, namely, a deployment method verification module, a component upload module, a component installation control module, and a component installation module. The specific functions of each module are as follows:
[0160] Deployment method verification module: Verify whether the automatic deployment method of the business system is cluster deployment or single-machine deployment and whether there is an elastic IP. If the deployment method is single-machine deployment, the subsequent steps are all deployed in single-machine mode, otherwise, it is default to be deployed in cluster mode.
[0161] Component upload module: Multithreadedly and in parallel upload each component of the business system to each server to be deployed.
[0162] Component installation control module: During the deployment process of each component, control the installation process and sequence of each component through its dependency detection with other components.
[0163] Component installation module: Start the installation program on each server to be deployed, and complete the installation of the component and the startup of the service.
[0164] Figure 7 The figure is a schematic diagram of the automated deployment steps of a business system provided by an embodiment of the present application. The automated deployment steps are executed by the deployment management node using each module, as Figure 7 shown, the automated deployment steps include:
[0165] S701: Modify the deployment plan table according to the deployment requirements.
[0166] The user modifies the deployment plan table according to the actual situation and requirements of the deployment. The table is generally in Excel format for the convenience of the user to fill in and view. The table contains the basic information for the deployment of the highly available environment, including the IP addresses (including elastic IP and real IP) of the deployment environment, account / password, application deployment path, virtual IP addresses of each component, etc.
[0167] S702: Modify the deployment script according to the module to be deployed.
[0168] The user manually modifies the deployment startup script according to the modules to be deployed in the business system, and manually adds the names of the modules to be deployed to the startup script. Taking the business system as a Web system as an example, if this Web system needs to deploy applications A, B, C, and D, then add the module names of these applications to the startup script. When starting the script, the program will automatically read and deploy these applications in parallel.
[0169] Both the above step S701 and step S702 are implemented manually. The administrator fills in the deployment plan table and the deployment script according to each component required by the business system.
[0170] S703: Determine whether there is an elastic IP.
[0171] S704: Map the elastic IP to the actual IP.
[0172] After starting the deployment script, the deployment method verification module first determines whether there is an elastic IP in the environment to be deployed according to the deployment plan table. If the elastic IP does not exist, no processing is performed. If the elastic IP exists, the elastic IP is mapped to the actual IP.
[0173] S705: Read the deployment method from the deployment plan table.
[0174] The deployment method verification module reads the parameter value of "Whether it is cluster deployment" in the deployment plan table to determine whether the environment to be deployed is a highly available environment. If the environment to be deployed is a single-machine environment, the single-machine deployment instruction is run. If it is a highly available environment, the cluster deployment instruction is run.
[0175] S706: Start cluster deployment.
[0176] In the case of running the cluster deployment instruction, start the cluster deployment of each component of the business system.
[0177] S707: Start single-machine deployment.
[0178] In the case of running the cluster deployment instruction, start the single-machine deployment of each component of the business system.
[0179] The above step S301 and step S707 are both implemented through the deployment method verification module in the deployment management node.
[0180] Figure 8 This is the schematic diagram of the component upload process provided by the embodiment of the present application. Figure 8 For the component upload process of the cluster deployment method, as Figure 8 shown, the component upload process includes the following steps:
[0181] S801: Receive the deployment instruction.
[0182] Receive the cluster deployment instruction (the instruction mainly includes the list of modules to be deployed), and start the cluster deployment.
[0183] S802: Generate the list of components to be deployed according to the deployment instruction.
[0184] Generate the list of components to be deployed according to the deployment component requirements in the deployment instruction.
[0185] S803: Parallel upload the offline component installation packages in the list of components to be deployed.
[0186] According to the list of components to be deployed, enable multi-threading, and parallel upload the component offline installation packages (the offline installation packages are already provided in the automated deployment toolkit) in the list of components to be deployed to each server to be deployed.
[0187] S804: Modify the configuration files of each component according to the deployment plan table.
[0188] According to the cluster deployment method, read various parameters in the deployment plan table. The parameters include cluster IP information, file locations of the database and each service deployed on the server, port information, service path information configured by each middleware, etc., and perform parameter substitution on the configuration file templates in each component. Since there are certain differences in the configuration files for single-machine and cluster deployments of most components (for example, the cluster deployment configuration file template contains all cluster IP information, the single-machine template only has the IP information of a single server, the cluster deployment template contains the high-availability IP information of the database, registry, and load balancer, which is not configured in the single-machine template, the Redis in the cluster deployment configuration template file is in a three-master and three-slave cluster state, and the single-machine deployment configuration template file is in a single-machine state, etc.), the cluster deployment template is used for cluster deployment, and the single-machine deployment template is used for single-machine deployment.
[0189] S805: Upload the modified configuration files of each component to each server to be deployed.
[0190] Upload the modified configuration files of each component to each server to be deployed, and replace the original default configuration file templates of each component.
[0191] Start the installation thread and prepare to install components such as Component A, Component B, Component C, and Component D.
[0192] Figure 9 This is a schematic diagram of the deployment process of the components to be deployed provided by the embodiment of the present application. As Figure 9 shown, the installation and deployment process of Application A by the deployment management node includes the following steps:
[0193] S901: Detect whether Application A has dependent components.
[0194] In response to the deployment instruction of Application A, the component installation control module determines whether there are relevant dependent components for the to-be-deployed Application A through the dependency table in the configuration file of Application A.
[0195] S9022: Install Application A.
[0196] If Application A does not have any dependent components, that is, it means that Application A can run independently, then directly pass Application A to the component installation module for installation.
[0197] After receiving the installation instruction of Application A, the component installation module installs Application A in parallel on multiple servers to be deployed.
[0198] S9021: Detect whether the dependent components B, C, and E have been installed.
[0199] If the component installation control module detects that application A has dependent components B, C, and E (for example, many applications need to depend on MySQL, Redis, and Nginx to run properly), then components B, C, and E need to be installed first. After the basic running environment is configured, application A is installed.
[0200] The component installation control module detects whether components B, C, and E have been deployed on the server to be deployed. If components B, C, and E have all been deployed, then application A is directly passed to the component installation module for installation.
[0201] S903: Whether components C and E that are not installed are in the installation task.
[0202] If it is detected in step S9021 that component B has been deployed on the server to be deployed, and components C and E have not been deployed, then components C and E are detected. Check whether components C and E are in the list of components to be deployed. If both are present, the installation of application A is paused, waiting for the installation of components C and E to end. Application A restarts the installation task at regular intervals. When it is detected that both components C and E have been deployed in the environment to be deployed, the installation of application A continues.
[0203] S904: Check whether component E is in the local library.
[0204] If component C is in the list of components to be deployed and component E is not in the list of components to be deployed, then the installation of application A is paused, and only component E is detected to check whether component E exists in the local library of the automated deployment package.
[0205] S905: The deployment of application A stops, and an error message is output to the user.
[0206] If component E does not exist in the list of components to be deployed and component E also does not exist in the local library of the automated deployment package (the local library exists in the automated deployment toolkit and is a full set of component offline installation packages and related dependency packages prepared in advance by the user according to the project deployment needs), it means that component E cannot be automatically obtained for installation, and application A cannot be successfully installed and run. Then the deployment task of application A is cancelled, and the corresponding error prompt message is returned to the user. In the automated deployment process of the business system, the application will only terminate the installation when the dependent component is not installed, not in the list of components to be deployed, and does not exist in the local library.
[0207] S906: Add component E to the list of components to be deployed.
[0208] If component E exists, add component E to the list of components to be deployed and create a new deployment task for component E.
[0209] S907: The installation of application A stops and restarts at regular intervals.
[0210] Application A schedules a restart of the installation task. When it is detected that both C and E are successfully deployed in the environment to be deployed, the installation of Application A continues.
[0211] S908: Application A starts and establishes a cluster environment for Application A.
[0212] After Application A is installed, start A on each server to be deployed respectively. After the startup is completed, establish the cluster of Application A respectively.
[0213] S909: Add Application A to the list of successfully installed components.
[0214] After the cluster of Application A is successfully established, add Application A to the list of successfully installed components.
[0215] In the embodiments of the present application, the list of successfully installed components can be matched with the list of components to be deployed. If all components in the list of components to be deployed are successfully installed, the installation completion result is returned to the user. If there are components in the list of components to be deployed that are not successfully installed, the relevant error information is returned to the user for processing.
[0216] The business system in the embodiments of the present application can be either a highly available Web application system or a single-machine deployed application system. The deployment method of the business system in the embodiments of the present application supports both the deployment of highly available Web application systems and the automated deployment method of single-machine deployment, and can realize the automated deployment of basic components and business modules in relatively complex Web systems.
[0217] The technical solution of the embodiments of the present application can be applied to the automated deployment of business systems in various industries and various types. Taking a medical business system facing the medical industry and serving the informatization and intelligent construction of the medical industry as an example, this medical business system involves basic components such as mysql, redis, keepalived, nginx, nacos, docker, etc. The business modules involve solutions, sales support, unified authentication, application and service management, monitoring and alarming, ability opening, etc. It has a complex structure, many application middleware, a cumbersome deployment process, and strong component dependencies. When deploying this medical business system on multiple servers in multiple regions (such as servers in multiple hospitals in multiple provinces), using the deployment method provided by the embodiments of the present application can realize the automated deployment of the medical business system with multiple middleware and business modules, significantly improve the deployment efficiency, shorten the deployment time from several days originally required to within a few hours, significantly shorten the deployment time, and save labor costs.
[0218] Figure 10 It is a schematic structural composition diagram of a deployment device for a business system provided by the embodiments of the present application. The deployment device is applied to a deployment management node, such as Figure 10As shown, the deployment device 1000 includes:
[0219] A startup unit 1001 for starting a deployment script; the deployment script includes the names of at least one component to be deployed in the business system to be deployed.
[0220] A processing unit 1002 for obtaining configuration files of the at least one component to be deployed according to various parameters included in a deployment plan table.
[0221] An upload unit 1003 for uploading the configuration files of the at least one component to be deployed and the installation packages of the at least one component to be deployed to at least one node to be deployed.
[0222] A deployment unit 1004 for starting an installation thread and deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration files of the at least one component to be deployed.
[0223] In some embodiments, the deployment device further includes:
[0224] A first determination unit for determining the deployment environment type of the business system according to the deployment environment parameters in the deployment plan table; wherein, the deployment environment type includes one of the following: a cluster deployment environment, a single-machine deployment environment.
[0225] A generation unit for generating a deployment instruction corresponding to the deployment environment type of the business system.
[0226] Correspondingly, the deployment unit is for: in response to the deployment instruction, obtaining configuration files corresponding to the deployment environment type of the at least one component to be deployed according to various parameters included in the deployment plan table.
[0227] In some embodiments, when the deployment environment type is a cluster deployment environment, the processing unit is for: for each component to be deployed, reading the deployment configuration parameters of the component to be deployed in the deployment plan table, and using the deployment configuration parameters of the component to be deployed to replace the deployment configuration parameters in the cluster configuration file template of the component to be deployed to obtain the cluster configuration file of the component to be deployed.
[0228] In some embodiments, when the deployment environment type is a single-machine deployment environment, the processing unit is for: for each component to be deployed, reading the deployment configuration parameters of the component to be deployed in the deployment plan table, and using the deployment configuration parameters of the component to be deployed to replace the deployment configuration parameters in the single-machine configuration file template of the component to be deployed to obtain the single-machine configuration file of the component to be deployed.
[0229] In some embodiments, the processing unit is configured to: read the address information of at least one node to be deployed in the deployment planning table; determine whether each node to be deployed in the at least one node to be deployed has an elastic address according to the address information; for the node to be deployed having an elastic address among the nodes to be deployed, determine the actual address corresponding to the elastic address of the node to be deployed having the elastic address; and write the actual address corresponding to the node to be deployed having the elastic address into the configuration file of the at least one component to be deployed.
[0230] In some embodiments, the uploading unit is configured to: upload the configuration file of the at least one component to be deployed and the installation package of the at least one component to be deployed to at least one node to be deployed according to the elastic address of the at least one node to be deployed.
[0231] In some embodiments, the configuration file of the at least one component to be deployed includes dependency component information corresponding to the component to be deployed. The deployment unit is configured to: for each node to be deployed, determine whether each component to be installed in the at least one component to be deployed has a dependency component according to the configuration file of each component to be installed in the at least one component to be deployed; the number of dependency components is one or more; for each component to be installed having a dependency component, execute the installation of the dependency component of the component to be installed and the installation of the component to be installed according to a predetermined policy.
[0232] In some embodiments, the deployment unit is configured to: for each component to be installed having a dependency component, detect whether all the dependency components of the component to be installed are deployed on the node to be deployed; in the case where it is detected that all the dependency components of the component to be installed are deployed on the node to be deployed, install the component to be installed on the node to be deployed.
[0233] In some embodiments, the deployment unit is configured to: in the case where it is detected that at least some of the dependency components of the component to be installed are not deployed on the node to be deployed, detect whether each component in the at least some dependency components is a component to be deployed in the list of components to be deployed of the business system; in the case where all of the at least some dependency components belong to the components to be deployed in the list of components to be deployed, abort the installation of the component to be installed; in the case where it is detected that the at least some dependency components are installed on the node to be deployed, install the component to be installed on the node to be deployed.
[0234] In some embodiments, the deployment unit is configured to: when there is a first dependent component among the at least partially dependent components that does not belong to the to-be-deployed component list of the to-be-deployed components, and there is a second dependent component that belongs to the to-be-deployed component list of the to-be-deployed components, abort the installation of the to-be-installed component; detect whether the first dependent component exists in the local library of the automated deployment package; if it exists, add the first dependent component to the to-be-deployed component list; when it is detected that the to-be-deployed node has completed the installation of the first dependent component, further detect whether the to-be-deployed node has completed the installation of the second dependent component; when it is detected that the to-be-deployed node has completed the installation of the second dependent component, install the to-be-installed component on the to-be-deployed node.
[0235] In some embodiments, the deployment unit is configured to: when there is a first dependent component among the at least partially dependent components that does not belong to the to-be-deployed component list of the to-be-deployed components, detect whether the first dependent component exists in the local library of the automated deployment package; if it does not exist, terminate the installation of the to-be-installed component and return a prompt message indicating that the installation of the to-be-installed component has failed to the user terminal.
[0236] In some embodiments, the configuration file of the at least one to-be-deployed component includes dependent component information corresponding to the to-be-deployed component. The deployment unit is configured to: for each to-be-deployed node, determine whether each to-be-installed component has a dependent component according to the configuration file of each to-be-installed component among the at least one to-be-deployed component; the number of dependent components is one or more; for each to-be-installed component that does not have a dependent component, install the to-be-installed component on the to-be-deployed node.
[0237] In some embodiments, the deployment unit is configured to: for each to-be-deployed component, when all the to-be-deployed nodes among the at least one to-be-deployed node have completed the installation of the to-be-deployed component, start the to-be-deployed component on all the to-be-deployed nodes and establish a cluster of the to-be-deployed component.
[0238] In some embodiments, the deployment unit is configured to: for each to-be-deployed component, when the installation of the to-be-deployed component is completed, add the to-be-deployed component to the component installation completed list.
[0239] In some embodiments, the deployment unit is configured to: match the to-be-deployed component list of the business system with the component installation completed list to determine whether there is an uncompleted to-be-deployed component in the to-be-deployed component list; if there is, return a prompt message of the uncompleted to-be-deployed component in the business system to the user terminal; if not, return a prompt message indicating that the business system deployment is completed to the user terminal.
[0240] In some embodiments, the uploading unit is configured to: upload the installation packages of the at least one component to be deployed to at least one node to be deployed in a parallel uploading manner.
[0241] In some embodiments, the deployment unit is configured to: deploy the at least one component to be deployed to the at least one node to be deployed in parallel according to the configuration files of the at least one component to be deployed.
[0242] Those skilled in the art should understand that Figure 10 the implementation functions of the units in the deployment device of the service system shown can be understood with reference to the relevant descriptions of the foregoing deployment method of the service system. Figure 10 The functions of the units in the deployment device of the service system shown can be implemented by a program running on a processor or by specific logic circuits.
[0243] An embodiment of the present application further provides an electronic device. Figure 11 It is a schematic hardware structure diagram of the electronic device according to the embodiment of the present application. As Figure 11 shown, the electronic device includes: a communication component 1103 for data transmission, at least one processor 1101, and a memory 1102 for storing a computer program that can run on the processor 1101. Each component in the terminal is coupled together through a bus system 1104. It can be understood that the bus system 1104 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in Figure 11 all kinds of buses are labeled as the bus system 1104.
[0244] Wherein, when the processor 1101 executes the computer program, it at least executes Figures 1 to 9 the steps of the method shown in any one of the embodiments.
[0245] It can be understood that the memory 1102 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory), an electrically erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), a ferromagnetic random access memory (FRAM, ferromagnetic random access memory), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM, Compact Disc Read-Only Memory); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM, Random Access Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as a static random access memory (SRAM, Static Random Access Memory), a synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory), a dynamic random access memory (DRAM, Dynamic Random Access Memory), a synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), a double data rate synchronous dynamic random access memory (DDR SDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), an enhanced synchronous dynamic random access memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), a sync link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and a direct rambus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 1102 described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memories.
[0246] The methods disclosed in the embodiments of the present application above can be applied to or implemented by the processor 1101. The processor 1101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 1101 or by instructions in the form of software. The above-mentioned processor 1101 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 1101 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. Combining the steps of the methods disclosed in the embodiments of the present application, it can be directly embodied as being executed by the hardware decoding processor, or executed by the combination of the hardware and software modules in the decoding processor. The software module may be located in the storage medium, and this storage medium is located in the memory 1102. The processor 1101 reads the information in the memory 1102 and combines its hardware to complete the steps of the foregoing method.
[0247] In an exemplary embodiment, the electronic device can be implemented by one or more application-specific integrated circuits (ASICs, Application Specific Integrated Circuits), DSPs, programmable logic devices (PLDs, Programmable Logic Devices), complex programmable logic devices (CPLDs, Complex Programmable Logic Devices), FPGAs, general-purpose processors, controllers, MCUs, microprocessors (Microprocessors), or other electronic components, and is used to execute the deployment method of the foregoing service system.
[0248] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. The characteristic is that when the program is executed by a processor, it is at least used to execute Figures 1 to 9 the steps of the methods shown in any of the embodiments. The computer-readable storage medium may specifically be a memory. The memory may be the memory 1102 as Figure 11 shown.
[0249] Among the technical solutions described in the embodiments of the present application, they can be combined arbitrarily without conflict.
[0250] In several embodiments provided by this application, it should be understood that the disclosed methods and intelligent devices can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the displayed or discussed components can be through some interfaces. The indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.
[0251] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0252] In addition, each functional unit in the embodiments of this application can be all integrated in a second processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
[0253] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application.
Claims
1. A method for deploying a business system, characterized in that: The deployment method is applied to deploy a management node, and the method includes: Start a deployment script; the deployment script includes the name of at least one component to be deployed of the business system to be deployed; Obtaining a configuration file of the at least one component to be deployed according to various parameters included in the deployment planning table; Uploading a configuration file of the at least one component to be deployed and an installation package of the at least one component to be deployed to at least one node to be deployed; An installation thread is started to deploy the at least one component to be deployed on the at least one node to be deployed according to a configuration file of the at least one component to be deployed.
2. The method according to claim 1, characterized in that Before obtaining the configuration file of the at least one component to be deployed according to the parameters included in the deployment planning table, the method further includes: Determine the deployment environment type of the business system according to the deployment environment parameters in the deployment planning table; wherein the deployment environment type includes one of the following: cluster deployment environment, stand-alone deployment environment; Generate a deployment instruction corresponding to the deployment environment type of the business system; Accordingly, obtaining the configuration file of the at least one component to be deployed according to the parameters included in the deployment planning table includes: In response to the deployment instruction, a configuration file corresponding to the deployment environment type and to the at least one component to be deployed is obtained according to various parameters included in the deployment planning table.
3. The method according to claim 2, characterized in that In the case where the deployment environment type is a cluster deployment environment, obtaining a configuration file corresponding to the deployment environment type of the at least one component to be deployed according to various parameters included in the deployment planning table includes: For each component to be deployed, the deployment configuration parameters of the component to be deployed in the deployment planning table are read, and the deployment configuration parameters of the component to be deployed are used to replace the deployment configuration parameters in the cluster configuration file template of the component to be deployed to obtain the cluster configuration file of the component to be deployed.
4. The method according to claim 2, characterized in that: In the case where the deployment environment type is a stand-alone deployment environment, obtaining a configuration file corresponding to the deployment environment type of the at least one component to be deployed according to various parameters included in the deployment planning table includes: For each component to be deployed, the deployment configuration parameters of the component to be deployed in the deployment planning table are read, and the deployment configuration parameters of the component to be deployed are used to replace the deployment configuration parameters in the stand-alone configuration file template of the component to be deployed to obtain the stand-alone configuration file of the component to be deployed.
5. The method according to any one of claims 1 to 4, characterized in that The step of obtaining the configuration file of the at least one component to be deployed according to the parameters included in the deployment planning table includes: Reading address information of at least one node to be deployed in the deployment planning table; Determining whether each of the at least one node to be deployed has an elastic address according to the address information; For a node to be deployed having an elastic address among the nodes to be deployed, determining an actual address corresponding to the elastic address of the node to be deployed having the elastic address; The actual address corresponding to the node to be deployed having the elastic address is written into the configuration file of the at least one component to be deployed.
6. The method according to claim 5, characterized in that The uploading the configuration file of the at least one component to be deployed and the installation package of the at least one component to be deployed to at least one node to be deployed includes: The configuration file of the at least one component to be deployed and the installation package of the at least one component to be deployed are uploaded to the at least one node to be deployed according to the elastic address of the at least one node to be deployed.
7. The method according to claim 1, characterized in that The configuration file of the at least one component to be deployed includes dependent component information corresponding to the component to be deployed, and the deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed includes: For each node to be deployed, determine whether each component to be installed has a dependent component according to a configuration file of each component to be installed in the at least one component to be deployed; the number of the dependent components is one or more; For each component to be installed that has dependent components, the dependent components of the component to be installed and the installation of the component to be installed are executed according to a predetermined strategy.
8. The method according to claim 7, characterized in that The method of executing the dependent components of each component to be installed and the installation of the component to be installed according to a predetermined strategy for each component to be installed that has dependent components includes: For each component to be installed that has dependent components, detect whether all dependent components of the component to be installed are deployed on the node to be deployed; When it is detected that all dependent components of the component to be installed are deployed on the node to be deployed, the component to be installed is installed on the node to be deployed.
9. The method according to claim 8, characterized in that The method of executing the dependent components of each component to be installed and the installation of the component to be installed according to a predetermined strategy for each component to be installed that has dependent components includes: In the case of detecting that the node to be deployed has deployed at least some of the dependent components of all the dependent components that have not deployed the component to be installed, detecting whether each component in the at least some of the dependent components is a component to be deployed in the list of components to be deployed of the business system; In the case that the at least some dependent components all belong to the components to be deployed in the list of components to be deployed, suspending the installation of the components to be installed; When it is detected that the node to be deployed has completed installation of at least part of the dependent components, the component to be installed is installed on the node to be deployed.
10. The method according to claim 9, characterized in that The method of executing the dependent components of each component to be installed and the installation of the component to be installed according to a predetermined strategy for each component to be installed that has dependent components includes: If there is a first dependent component that does not belong to the components to be deployed in the list of components to be deployed among the at least some of the dependent components, and if there is a second dependent component that belongs to the components to be deployed in the list of components to be deployed, suspending the installation of the component to be installed; Detect whether the first dependent component exists in the local library of the automated deployment package; if so, add the first dependent component to the list of components to be deployed; In the case of detecting that the node to be deployed has completed the installation of the first dependent component, further detecting whether the node to be deployed has completed the installation of the second dependent component; When it is detected that the second dependent component is installed on the node to be deployed, the component to be installed is installed on the node to be deployed.
11. The method according to claim 9, characterized in that The method of executing the dependent components of each component to be installed and the installation of the component to be installed according to a predetermined strategy for each component to be installed that has dependent components includes: In the case that there is a first dependent component in the at least some dependent components that does not belong to the components to be deployed in the list of components to be deployed, detecting whether the first dependent component exists in the local library of the automated deployment package; If it does not exist, the installation of the component to be installed is terminated, and a prompt message indicating that the installation of the component to be installed has failed is returned to the user terminal.
12. The method according to claim 1, characterized in that The configuration file of the at least one component to be deployed includes dependent component information corresponding to the component to be deployed, and the deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed includes: For each node to be deployed, determine whether each component to be installed has dependent components according to the configuration file of each component to be installed in the at least one component to be deployed; the number of the dependent components is one or more; For each component to be installed that does not have a dependent component, install the component to be installed on the node to be deployed.
13. The method according to any one of claims 7 to 12, characterized in that The step of deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed further includes: For each component to be deployed, when all nodes to be deployed in the at least one node to be deployed have completed the installation of the component to be deployed, the component to be deployed is started on all nodes to be deployed, and a cluster of the component to be deployed is established.
14. The method according to claim 13, characterized in that The step of deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed further includes: For each component to be deployed, when the installation of the component to be deployed is completed, the component to be deployed is added to the component installation completion list; Matching the list of components to be deployed of the business system with the list of components installed, and determining whether there are any components to be deployed that have not been installed in the list of components to be deployed; If it exists, prompt information of the components to be deployed that have not been installed in the business system is returned to the user terminal; if it does not exist, prompt information of the business system deployment completion is returned to the user terminal.
15. The method according to any one of claims 1 to 4, characterized in that The uploading the installation package of the at least one component to be deployed to at least one node to be deployed includes: Uploading the installation package of the at least one component to be deployed in parallel to at least one node to be deployed in a parallel uploading manner; The deploying the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed comprises: Deploy the at least one component to be deployed in parallel on the at least one node to be deployed according to the configuration file of the at least one component to be deployed.
16. A deployment device for a business system, characterized in that: The deployment device is applied to deploy a management node, and the deployment device includes: A startup unit, used to start a deployment script; the deployment script includes the name of at least one component to be deployed of the business system to be deployed; A processing unit, configured to obtain a configuration file of the at least one component to be deployed according to various parameters included in the deployment planning table; An uploading unit, configured to upload a configuration file of the at least one component to be deployed and an installation package of the at least one component to be deployed to at least one node to be deployed; The deployment unit is used to start an installation thread and deploy the at least one component to be deployed on the at least one node to be deployed according to the configuration file of the at least one component to be deployed.
17. An electronic device, characterized in that: The electronic device comprises: a memory and a processor, wherein the memory stores computer executable instructions, and the processor can implement any one of claims 1 to 15 when executing the computer executable instructions on the memory.
18. A computer storage medium, characterized in that: The storage medium stores executable instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 15.