Automatic deployment method and device
Through automated deployment methods, the deployment server uses the deployment server to obtain device information and user commands to generate configuration files, simulate and filter effective devices, solve the problems of inefficiency and error-prone existing deployment methods, realize efficient and accurate application software deployment, and reduce costs .
Patent Information
- Application Number
- CN202011575332.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2040-12-28
Smart Images

Figure CN112579108B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an automatic deployment method and device. Background Art
[0002] Currently, when deploying application software, usually a manual method is used to log in to each virtual machine or physical machine that needs to be deployed one by one to deploy the corresponding application software; or a script method is used to manually adjust the script content and parameters on each virtual machine or physical machine for deployment.
[0003] The existing manual deployment or script deployment methods are limited by the limitations of manual operations, and have problems such as low deployment efficiency, prone to errors, and different technical levels of operators. Summary of the invention
[0004] In view of this, the main purpose of the present invention is to provide an automated deployment method and device, which can effectively improve deployment efficiency and accuracy.
[0005] In order to achieve the above object, the technical solution proposed in the embodiment of the present invention is:
[0006] An automated deployment method, comprising:
[0007] The deployment server obtains system environment information of each device to be deployed;
[0008] Receive the user's installation configuration command, and according to the installation configuration command, determine the installation configuration module required for the current deployment and display the corresponding configuration template, and generate a configuration file for the installation configuration module according to the configuration parameters entered by the user in the configuration template;
[0009] According to the configuration files of all the installation configuration modules and the system environment information, using a preset deployment tool, create an automated deployment task, and generate corresponding simulated deployment scripts and actual deployment scripts;
[0010] Based on the connectivity between the to-be-deployed device and the deployment server and the simulated deployment script, a valid deployment device is selected from the to-be-deployed devices in a simulated deployment manner;
[0011] The actual deployment script is executed to deploy the corresponding application software on the effective deployment device.
[0012] Preferably, selecting a valid deployment device from the to-be-deployed devices includes:
[0013] For each of the devices to be deployed, testing whether the deployment server is connected to the device to be deployed;
[0014] For each of the devices to be deployed that are connected to the deployment server, using the simulated deployment script, simulating deployment of corresponding application software on the device to be deployed in the deployment server;
[0015] The device to be deployed that is successfully deployed is used as the valid deployed device.
[0016] Preferably, the method further comprises:
[0017] During the execution of the actual deployment script, the deployment query instruction of the user is received, and the deployment progress, result and deployment exception information of the corresponding application software are displayed.
[0018] Preferably, the method further comprises:
[0019] After the actual deployment script is executed, the deployment server triggers the effective deployment device to modify the link address of the application software to the address of the preset test environment;
[0020] The effective deployment device simulates and executes a call flow according to the modified link address, and determines whether the service system of the application software in the effective deployment device is available according to the simulation execution result.
[0021] Preferably, the link address includes a database address and a call link address.
[0022] An automatic deployment device, arranged in a deployment server, comprises:
[0023] An information acquisition unit, used to acquire system environment information of each device to be deployed;
[0024] A configuration file generating unit, configured to receive an installation configuration command from a user, and according to the installation configuration command, determine an installation configuration module to be used in the current deployment and display a corresponding configuration template, and generate a configuration file for the installation configuration module according to configuration parameters input by the user in the configuration template;
[0025] A simulation deployment unit, used to create an automated deployment task and generate corresponding simulation deployment scripts and actual deployment scripts based on the configuration files of all the installation configuration modules and the system environment information using a preset deployment tool;
[0026] An effective device screening unit, configured to select effective deployment devices from the devices to be deployed in a simulated deployment manner based on the connectivity between the devices to be deployed and the deployment server and the simulated deployment script;
[0027] The actual deployment unit is used to execute the actual deployment script to deploy the corresponding application software on the effective deployment device.
[0028] Preferably, the effective device screening unit is specifically used to select effective deployment devices from the devices to be deployed, including:
[0029] For each of the devices to be deployed, testing whether the deployment server is connected to the device to be deployed;
[0030] For each of the devices to be deployed that are connected to the deployment server, using the simulated deployment script, simulating deployment of corresponding application software on the device to be deployed in the deployment server;
[0031] The device to be deployed that is successfully deployed is used as the valid deployed device.
[0032] Preferably, the actual deployment unit is further used to receive a deployment query instruction from a user during the execution of the actual deployment script, and to display the deployment progress, results and deployment exception information of the corresponding application software.
[0033] The present application also discloses an automated deployment device, including a processor and a memory;
[0034] The memory stores an application program executable by the processor, which is used to enable the processor to execute the automatic deployment method as described above.
[0035] The present application also discloses a computer-readable storage medium, in which computer-readable instructions are stored. The computer-readable instructions are used to execute the automated deployment method as described above.
[0036] It can be seen from the above technical solution that the automated deployment method and device proposed in the present invention, based on the user's installation configuration command, determines the installation configuration module required for the current deployment, and generates the corresponding configuration file using the configuration template corresponding to each installation configuration module. In this way, the configuration efficiency and accuracy of the deployment can be effectively improved, and the problem of manual configuration being prone to errors can be avoided. In addition, after creating an automated deployment task based on the configuration file, the corresponding simulated deployment script is first used to simulate the deployment to screen out the effectively deployed devices, and then the actual deployment script is executed to deploy the corresponding application software in the effectively deployed devices. In this way, the effectiveness of the deployment can be ensured. Therefore, the above-mentioned embodiments can effectively improve the accuracy and efficiency of the deployment and reduce the manpower and time costs of the deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the process of the automated deployment method according to an embodiment of the present invention;
[0038] Figure 2 Schematic diagram of the structure of an automated deployment device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] Figure 1 FIG. 1 is a flow chart of an automated deployment method according to an embodiment of the present invention. Figure 1 As shown, the automated deployment method implemented in this embodiment mainly includes:
[0041] Step 101: The deployment server obtains system environment information of each device to be deployed.
[0042] This step is used to obtain system environment information from each device to be deployed, so as to create an automated deployment task based on the system environment information of each device to be deployed in subsequent steps.
[0043] Specifically, the device to be deployed may be a virtual machine or a physical device.
[0044] In actual applications, the deployment server can obtain the system environment information of the device to be deployed (including the network address, port, and hardware and software system environment information of the device) through an automatic discovery mechanism.
[0045] Step 102: Receive the user's installation configuration command, and according to the installation configuration command, determine the installation configuration module required for the current deployment and display the corresponding configuration template, and generate a configuration file for the installation configuration module according to the configuration parameters entered by the user in the configuration template.
[0046] In this step, the user can specify the installation configuration module required for the current deployment through the installation configuration command (specifically, it can be entered through the web interface). In this way, the deployment server can know the installation configuration module required for the current deployment based on the installation configuration command entered by the user, and can generate a corresponding configuration file for each installation configuration module based on the parameters entered by the user, so as to create automated deployment tasks based on these configuration files in subsequent steps.
[0047] Here, the installation configuration module and the configuration template corresponding to each installation configuration module can be set by a person skilled in the art according to the deployment needs of the actual application scenario, and can be stored in a preset configuration management library. The configuration template will include information such as the initialization version and configuration parameters. The user can select the installation configuration module to be used through the web interface. The configuration template can be used to generate configuration files in a standardized manner, thereby improving the accuracy and efficiency of configuration file generation, and further improving the overall deployment efficiency and success rate of business applications.
[0048] In one implementation, the installation configuration module may specifically include three categories: business type, platform type, and infrastructure type.
[0049] Among them, the service types include: integrated virtual network (IVPN), reject calls, telecommunications anti-fraud (IMSFZ) and simultaneous ringing and other service modules;
[0050] Platform types include: service control point (SCF), service management point (SMP), signaling collection and other modules;
[0051] The infrastructure modules include: MYSQL, INFORMIX, NGINX, REDIS, DOCKER and other database inter-ware modules.
[0052] The above installation configuration module is only used for exemplary description and is not limited thereto in practical applications.
[0053] In this step, the template and the parameters entered by the user in the template are combined to obtain the corresponding configuration file.
[0054] Step 103: Create an automated deployment task based on the configuration files of all the installation configuration modules and the system environment information using a preset deployment tool, and generate corresponding simulated deployment scripts and actual deployment scripts.
[0055] In this step, an existing deployment tool may be used to create an automated deployment task. Specifically, the Ansible automated operation and maintenance tool may be used to create the task, but the present invention is not limited thereto.
[0056] In this step, two sets of scripts need to be generated based on the automated deployment task, namely, the simulated deployment script and the actual deployment script. The simulated deployment script is used to screen out valid devices that can be deployed to improve the effectiveness of the deployment.
[0057] The specific method for generating the above script based on the automated deployment task is known to those skilled in the art and will not be described in detail here.
[0058] Step 104: Based on the connectivity between the to-be-deployed device and the deployment server and the simulated deployment script, a simulated deployment method is adopted to select a valid deployment device from the to-be-deployed devices.
[0059] In this step, in order to ensure the effectiveness of the actual deployment, it is necessary to select valid deployment devices by executing a simulated deployment script before the actual deployment.
[0060] In one implementation, the following method may be used to select a valid deployment device from the devices to be deployed:
[0061] Step 1041: For each of the devices to be deployed, test whether the deployment server is connected to the device to be deployed.
[0062] Here, considering that the actual execution time span from step 101 to step 104 is relatively large, during which the connectivity status between the deployment server and each device to be deployed may change, it is necessary to determine the connectivity between the deployment server and each device to be deployed before executing the simulated deployment script to ensure the effectiveness of the deployment.
[0063] Step 1042: For each of the devices to be deployed that are connected to the deployment server, use the simulated deployment script to simulate deployment of corresponding application software on the device to be deployed in the deployment server.
[0064] This step can be used to filter out devices that cannot be deployed with corresponding services due to reasons such as the mismatch between the system environment and the deployment task configuration requirements.
[0065] Step 1043: The to-be-deployed device that has been successfully deployed in simulation is used as the valid deployed device.
[0066] Step 105: execute the actual deployment script to deploy the corresponding application software on the effective deployment device.
[0067] In one implementation, in order to facilitate users to grasp the deployment status and handle abnormal situations at any time, users can obtain the current deployment status and abnormal situations through the deployment query command on the web interface, as follows:
[0068] During the execution of the actual deployment script, the deployment query instruction of the user is received, and the deployment progress, result and deployment exception information of the corresponding application software are displayed.
[0069] In one embodiment, after the actual deployment script is executed, the following steps can be used to test the connectivity and stability of the service call after the overall deployment of the application software:
[0070] Step x1: After the actual deployment script is executed, the deployment server triggers the effective deployment device to modify the link address of the application software to the address of the preset test environment.
[0071] Specifically, the link address includes a database address and a call link address.
[0072] Step x2: the effective deployment device simulates and executes a call flow according to the modified link address, and determines whether the service system of the application software in the effective deployment device is available according to the simulation execution result.
[0073] Based on the above solution, it can be seen that the above method embodiment can effectively reduce labor costs, time costs, and deployment accuracy and success rate. The above technical effects are further described below in conjunction with the implementation of the above embodiment in a specific application scenario.
[0074] Taking a telecom intelligent network's call rejection device cloudification project as an example, the project hosts are distributed across seven regions, with as many as 2,000 virtual machines. By deploying based on the above method implementation example, the implementation period can be reduced from the original 2 months to 2 weeks, greatly improving efficiency.
[0075] During the planning phase, it is necessary to determine the number of virtual machines, network planning, and the IP addresses and ports of core network elements. In this project, 2,000 virtual machines (all with 4-core CPU, 8G memory, and 100G hard disk) were used. After the virtual machines are allocated at the IAAS layer, deployment can begin.
[0076] Description of the time cost of the deployment phase:
[0077] 1. Obtain the system environment information of all devices to be deployed (including virtual machine and host related information) through automatic discovery strategy, which takes about 1 day.
[0078] 2. Generate the configuration files of each installation configuration module required for the deployment task through the configuration management library of the web interface, which takes about 2 hours.
[0079] 3. Create an automated deployment task, add hosts in batches for each module, and complete the creation of the deployment task. It takes about 2 hours to complete.
[0080] 4. Test host connectivity and simulate running test tasks, which takes about 3 hours.
[0081] 5. Execute the actual deployment script, which takes about 8 hours.
[0082] 6. Check the deployment task results through the web interface and handle abnormal items, which takes about 2 days
[0083] 7. After completion, use automated performance test scripts to test the call connectivity and stability of the entire service and handle abnormal problems. The debugging cycle is about 10 days.
[0084] Corresponding to the above method embodiment, the embodiment of the present invention provides an automatic deployment device, which is arranged in a deployment server, such as Figure 2 As shown, the device comprises:
[0085] The information acquisition unit 201 is used to acquire the system environment information of each device to be deployed.
[0086] The configuration file generation unit 202 is used to receive the user's installation configuration command, and according to the installation configuration command, determine the installation configuration module required for the current deployment and display the corresponding configuration template, and generate the configuration file of the installation configuration module according to the configuration parameters entered by the user in the configuration template.
[0087] The simulation deployment unit 203 is used to create an automated deployment task based on the configuration files of all the installation configuration modules and the system environment information using a preset deployment tool, and generate corresponding simulation deployment scripts and actual deployment scripts.
[0088] The valid device screening unit 204 is configured to select valid deployment devices from the devices to be deployed in a simulated deployment manner based on the connectivity between the devices to be deployed and the deployment server and the simulated deployment script.
[0089] The actual deployment unit 205 is used to execute the actual deployment script to deploy the corresponding application software on the effective deployment device.
[0090] Preferably, the effective device screening unit 204 is specifically used to select effective deployment devices from the devices to be deployed, including:
[0091] For each of the devices to be deployed, testing whether the deployment server is connected to the device to be deployed;
[0092] For each of the devices to be deployed that are connected to the deployment server, using the simulated deployment script, simulating deployment of corresponding application software on the device to be deployed in the deployment server;
[0093] The device to be deployed that is successfully deployed is used as the valid deployed device.
[0094] In one embodiment, the actual deployment unit 205 is further configured to receive a deployment query instruction from a user during the execution of the actual deployment script, and display the deployment progress, result, and deployment exception information of the corresponding application software.
[0095] Corresponding to the above method embodiment, the embodiment of the present invention further provides an automatic deployment device disclosed in the present application, including a processor and a memory;
[0096] The memory stores an application program executable by the processor, which is used to enable the processor to execute the automatic deployment method as described above.
[0097] The memory may be implemented as various storage media such as an electrically erasable programmable read-only memory (EEPROM), a flash memory (Flash memory), and a programmable program read-only memory (PROM). The processor may be implemented as including one or more central processing units or one or more field programmable gate arrays, wherein the field programmable gate array integrates one or more central processing unit cores. Specifically, the central processing unit or the central processing unit core may be implemented as a CPU or an MCU.
[0098] It should be noted that not all steps and modules in the above processes and structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The division of each module is only for the convenience of describing the functional division adopted. In actual implementation, a module can be implemented by multiple modules, and the functions of multiple modules can also be implemented by the same module. These modules can be located in the same device or in different devices.
[0099] The hardware modules in each embodiment can be implemented mechanically or electronically. For example, a hardware module may include a specially designed permanent circuit or logic device (such as a dedicated processor, such as an FPGA or ASIC) for performing a specific operation. The hardware module may also include a programmable logic device or circuit (such as a general-purpose processor or other programmable processor) temporarily configured by software to perform a specific operation. As for whether to implement the hardware module mechanically, or using a dedicated permanent circuit, or using a temporarily configured circuit (such as configured by software), it can be decided based on cost and time considerations.
[0100] The embodiment of the present invention also provides a machine-readable storage medium, storing instructions for making a machine perform a method as described in the present application. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for realizing the function of any of the embodiments described in the above embodiments is stored, and the computer (or CPU or MPU) of the system or device reads out and executes the program code stored in the storage medium. In addition, the operating system etc. operated on the computer can also be completed part or all of the actual operation by instructions based on the program code. The program code read out from the storage medium can also be written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then the CPU etc. installed on the expansion board or expansion unit are made to perform part and all of the actual operation based on the instructions of the program code, thereby realizing the function of any of the embodiments described in the above embodiments.
[0101] Storage media implementations for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, program code can be downloaded from a server computer or cloud via a communication network.
[0102] In this article, "schematic" means "serving as an example, an example or an illustration", and any diagram or implementation method described as "schematic" in this article should not be interpreted as a more preferred or more advantageous technical solution. In order to make the drawings concise, only the parts related to the present invention are schematically shown in each figure, and do not represent the actual structure of the product. In addition, in order to make the drawings concise and easy to understand, in some figures, only one of the parts with the same structure or function is schematically drawn, or only one of them is marked. In this article, "one" does not mean that the number of the relevant parts of the present invention is limited to "only one", and "one" does not mean that the number of the relevant parts of the present invention is "more than one". In this article, "upper", "lower", "front", "back", "left", "right", "inside", "outside", etc. are only used to indicate the relative position relationship between the relevant parts, rather than to limit the absolute position of these relevant parts.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An automated deployment method, characterized in that: include: The deployment server obtains system environment information of each device to be deployed; Receive the user's installation configuration command, and according to the installation configuration command, determine the installation configuration module required for the current deployment and display the corresponding configuration template, and generate a configuration file for the installation configuration module according to the configuration parameters entered by the user in the configuration template; According to the configuration files of all the installation configuration modules and the system environment information, using a preset deployment tool, create an automated deployment task, and generate corresponding simulated deployment scripts and actual deployment scripts; Based on the connectivity between the to-be-deployed device and the deployment server and the simulated deployment script, a valid deployment device is selected from the to-be-deployed devices in a simulated deployment manner; The selecting of the valid deployment device from the devices to be deployed comprises: for each device to be deployed, testing whether the deployment server is connected to the device to be deployed; for each device to be deployed that is connected to the deployment server, using the simulation deployment script to simulate the deployment of the corresponding application software to the device to be deployed in the deployment server; and using the device to be deployed that has successfully been simulated and deployed as the valid deployment device; The actual deployment script is executed to deploy the corresponding application software on the effective deployment device.
2. The method according to claim 1, characterized in that The method further comprises: During the execution of the actual deployment script, the deployment query instruction of the user is received, and the deployment progress, result and deployment exception information of the corresponding application software are displayed.
3. The method according to claim 1, characterized in that The method further comprises: After the actual deployment script is executed, the deployment server triggers the effective deployment device to modify the link address of the application software to the address of the preset test environment; The effective deployment device simulates and executes a call flow according to the modified link address, and determines whether the service system of the application software in the effective deployment device is available according to the simulation execution result.
4. The method according to claim 3, characterized in that The link address includes a database address and a call link address.
5. An automated deployment device, characterized in that: Set in the deployment server, including: An information acquisition unit, used for the deployment server to acquire system environment information of each device to be deployed; A configuration file generating unit, configured to receive an installation configuration command from a user, and according to the installation configuration command, determine an installation configuration module to be used in the current deployment and display a corresponding configuration template, and generate a configuration file for the installation configuration module according to configuration parameters input by the user in the configuration template; A simulation deployment unit, used to create an automated deployment task and generate corresponding simulation deployment scripts and actual deployment scripts based on the configuration files of all the installation configuration modules and the system environment information using a preset deployment tool; The effective device screening unit is used to select effective deployment devices from the devices to be deployed by means of simulated deployment based on the connectivity between the devices to be deployed and the deployment server and the simulated deployment script; the selection of effective deployment devices from the devices to be deployed includes: for each device to be deployed, testing whether the deployment server is connected to the device to be deployed; for each device to be deployed connected to the deployment server, using the simulated deployment script to simulate the deployment of corresponding application software to the device to be deployed in the deployment server; and using the device to be deployed that has successfully been simulated and deployed as the effective deployment device; The actual deployment unit is used to execute the actual deployment script to deploy the corresponding application software on the effective deployment device.
6. The device according to claim 5, characterized in that The actual deployment unit is further used to receive a user's deployment query instruction during the execution of the actual deployment script, and display the deployment progress, results and deployment exception information of the corresponding application software.
7. An automated deployment device, characterized in that: including a processor and a memory; The memory stores an application program executable by the processor, which is used to enable the processor to execute the automated deployment method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored therein, and the computer-readable instructions are used to execute the automated deployment method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Private cloud IaaS platform construction method
CN104468791A
Application deployment method and device, computer equipment and storage medium
CN109901842A
Project deployment method and articulated naturality web system
CN109960513A
Cloud simulation and validation system
US20200349041A1
Anti-malware installation deployment simulator
US9021453B1
