Automatic deployment management method and system for distributed system test environment

Through automated deployment management methods, hardware device information tables and test scenario information tables are used to automatically match hardware devices to achieve rapid deployment and verification of distributed systems, solving the problem of inefficient testing caused by limited hardware resources, and improving the degree of automation and reliability reduces the risk of configuration errors.

CN118981435APending Publication Date: 2024-11-19HENAN BRILLIANT URBAN RAIL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411137524.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

With limited hardware resources, the deployment of distributed system test environment requires a lot of time and labor, resulting in inefficient testing and the same operation needs to be repeated after each deployment, which increases the risk of configuration errors and affects the quality of the software.

Method used

By configuring the hardware device information table and the test scenario information table, the deployment management method is automated, including hardware device association scripts, distribution programs, recovery data scripts, configuration node scripts and verification scripts, and automatically matches the hardware device based on the hardware device information and test scenario information. Automatically deploy and verify distributed systems to enable rapid start and shutdown, and reduce manual intervention.

Benefits of technology

It improves the degree of automation and reliability of the distributed system test environment, reduces the probability of configuration errors, improves testing efficiency, saves hardware resources, realizes automated deployment and visual progress monitoring, and enhances problem discovery and processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981435A_ABST
    Figure CN118981435A_ABST
Patent Text Reader

Abstract

The invention provides an automatic deployment management method for a distributed system test environment, which comprises the following steps of: configuring a management hardware equipment information table which comprises equipment information of all hardware equipment, and the equipment information at least comprises a brand, a model, an operating system, an IP (Internet Protocol) address, an equipment state and a storage path; a test scene information table is configured and managed, the test scene information table comprises scene information of all test scenes, and the scene information at least comprises distributed site rule information, scene hardware equipment information and script configuration; starting a target test scene, calling script information, distributed site rule information based on the target test scene, scene hardware equipment information and a hardware equipment information table according to script configuration, associating matched hardware equipment for the target test scene, and automatically deploying a distributed system; closing the target test scene, and releasing the hardware equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an automated deployment management method for a test environment, and in particular to an automated deployment management method and system for a distributed system test environment. Background Art

[0002] Currently, many large business systems use distributed deployment, which means that data is stored in multiple independent machines and devices. In different scenarios, the brand and model of the equipment, the required quantity, and the operating system are different, and the corresponding test programs and business data are also different. As a tester, each scenario needs to be tested continuously. If an environment is deployed for each scenario, a large amount of money will be required to purchase equipment. The reality is that the company cannot ensure that the corresponding hardware equipment is configured for each scenario. In the company's limited hardware equipment environment, testers need to test each scenario, which takes a lot of time, manual communication to determine the available equipment, assemble it into a distributed architecture, and then configure the relevant test programs and data according to the device type, start the test platform, verify whether the test environment is available, and finally test it.

[0003] Each time a scenario is configured, the above series of operations need to be repeated. If it is found that the test platform cannot be enabled after the deployment is completed, a lot of time will be needed to check whether the configuration process is correct, which consumes a lot of testing time and reduces testing efficiency. It is likely to lead to insufficient testing and the software quality cannot be guaranteed.

[0004] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the invention

[0005] The purpose of the present invention is to address the deficiencies of the prior art and thus provide an automated deployment management method and system for a distributed system test environment.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is: A first aspect provides an automated deployment management method for a distributed system test environment, comprising: Configuration management hardware device information table, the hardware information table includes device information of all hardware devices, the device information includes at least brand, model, operating system, IP address, device status, storage path; Configuration management test scenario information table, the test scenario information table includes scenario information of all test scenarios, the scenario information includes at least distributed site rule information, scenario hardware device information and script configuration; the script configuration includes configuring hardware device association script, distributing program and data script, restoring data script, configuring node script, starting program script and verifying the execution order of script; Start the target test scenario, call the script information, associate the target test scenario with matching hardware devices based on the scenario information and hardware device information table of the target test scenario, and automatically deploy the distributed system; Close the target test scenario and release the hardware device.

[0007] Further, starting the target test scenario, calling the script information, associating the target test scenario with matching hardware devices based on the scenario information and the hardware device information table, and automatically deploying the distributed system include: Call the hardware device association script to query the hardware device information table, find the hardware device that meets the scenario hardware device information of the target test scenario, and automatically set the directory for storing the test program and business data for the hardware device according to the storage path of the device information; Call the distribution program and data script to automatically distribute the test program and business data to the directory configured by the hardware device, and automatically detect whether the test program and business data are distributed successfully; Call the data recovery script to restore business data and test programs to the database; According to the distributed site rule information, call the node configuration script to deploy the node information of each site; Call the startup program script to start the test program distributed in the above steps in each hardware device; Call the verification script to check whether the key services of the distributed system are running normally to verify whether the system is deployed correctly.

[0008] Further, the hardware device association script is called to query the hardware device information table to find out the hardware devices that meet the scene hardware device information of the target test scene, including: Query the hardware device information table, preliminarily screen the hardware devices whose brands, models, and operating systems meet the scene hardware device information, and further filter out the hardware devices with an idle status from the previous step results, and determine whether the number of hardware devices is greater than or equal to the number of hardware in the test scenario information. If so, find the hardware devices that meet the scene hardware device information of the target test scenario, otherwise, stop starting the target test scenario.

[0009] Furthermore, after finding the hardware device that meets the scenario hardware device information of the target test scenario, before calling the distribution program and data script to automatically distribute the test program and business data to the configured directory of the hardware device, check whether the IP address of the hardware device is communicating normally. If the detection result is normal communication, call the distribution program and data script again.

[0010] Furthermore, the scene information also includes scene status. When the scene is in the startup process, the scene status is configured as starting; when the scene is not started, the scene status is configured as not started; when the scene startup fails, the scene status is configured as startup failure; when the scene startup is successful and is being used, the scene status is configured as in use.

[0011] Furthermore, when the target test scenario is enabled, the script execution progress and the execution results of each script are visually displayed according to the script configuration. At the same time, the script execution progress and the execution results of each script are saved as scenario startup log information, and report information is generated based on the scenario startup log information after the scenario startup is completed.

[0012] A second aspect provides an automated deployment management system for a distributed system test environment, including: User configuration module, used for basic system information configuration and management, including configuration and management of hardware device information table, configuration and management of test scenario information table, and configuration and management of script information; The hardware information table includes the device information of all hardware devices, and the device information includes at least brand, model, operating system, IP address, device status, and storage path; the test scenario information table includes the scenario information of all test scenarios, and the scenario information includes at least distributed site rule information, scenario hardware device information, and script configuration; the script configuration includes configuring the execution order of the hardware device association script, distributing program and data script, restoring data script, configuring node script, starting program script, and verifying script; Interface calling module, used to call the script information of the target test scenario; A logic processing module, configured to call corresponding script information through the interface calling module based on the script configuration of the target test difference, associate matching hardware devices for the target test scenario based on the distributed site rule information, scenario hardware device information and hardware device information table of the target test scenario, and automatically deploy a distributed system; The information display module is used to display information on the page, including the hardware device information table, the test scenario information table, and the scenario startup log information.

[0013] Compared with the prior art, the present invention has outstanding substantive features and significant progress. Specifically, the present invention monitors the status of hardware devices in real time based on a hardware device information table, and automatically deploys a test environment for a target test scenario on limited hardware resources based on a test scenario information table and call script information. Each target test scenario can be quickly started and shut down, with a high degree of automation, flexible and reliable configuration, and the entire process is automated without the need for manual deployment of the test environment, thereby improving the degree of automation in the deployment of the distributed system test environment, improving reliability, and improving test efficiency.

[0014] The deployment progress is visualized, and log records are saved at each process node, which improves the timeliness of problem discovery and processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of the automated deployment management method according to Embodiment 1 of the present invention.

[0016] Figure 2 It is a schematic diagram of the interface of the hardware device information table in Example 1 of the present invention.

[0017] Figure 3 It is a schematic diagram of the interface of the test scenario information table in Example 1 of the present invention.

[0018] Figure 4 It is a flow chart of scene startup in an embodiment of the present invention.

[0019] Figure 5 It is a structural diagram of the automated deployment management system in Example 2. DETAILED DESCRIPTION

[0020] The technical solution of the present invention is further described in detail below through specific implementation methods.

[0021] The present invention first configures and manages the device information of all hardware devices, and the device information includes at least the brand, model, operating system, IP address, device status, and storage path; then configures and manages the scenario information of multiple sets of test scenarios, and the scenario information includes at least distributed site rule information, scenario hardware device information, and script configuration; monitors the device status of hardware devices in real time, and when a target test scenario is enabled, calls the corresponding script information according to the script configuration of the target test scenario, automatically selects available hardware devices based on the scenario hardware device information, distributes test programs and business data to each hardware device, and then configures the site information according to the distributed site rule information, and finally starts the platform service.

[0022] When you need to switch the target test scenario, you only need to close the target test scenario and then start another target test scenario to quickly configure a new test environment.

[0023] This embodiment takes the deployment of a distributed system consisting of one main site and two secondary sites as an example, and gives in detail the steps of the automated deployment management method of the distributed system test environment. In the distributed system, the main site uses a server with an oracle operating system and a Solaris operating system, a front-end machine with a MOXA operating system and a RedHat7.6 version, and a workstation with an HP Z2 operating system and a RedHat7.6 version to form a system; the two secondary sites each use an integrated machine with an HP Z2 operating system and a RedHat7.6 version to form a system.

[0024] Example 1 This embodiment provides an automated deployment management method for a distributed system test environment, including: The configuration management hardware device information table includes the device information of all hardware devices, and the device information includes at least brand, model, operating system, IP address, device status, and storage path.

[0025] like Figure 2 As shown, the hardware devices include servers, front-end processors and workstations; the device information includes the brand, model, operating system, device status, IP address of each hardware device, and in some embodiments, it can also be the hardware device configuration, username / password, and database username / password.

[0026] Among them, the number of servers, front-end processors and workstations is at least one.

[0027] Furthermore, the device status includes three states: unavailable, idle, and in use. When the device network cannot communicate, the device status is marked as "unavailable"; when the device network communication is normal and the hardware device is not involved in the test, the device status is marked as "idle"; when the device network communication is normal and the hardware device is involved in the test, the device status is marked as "in use". It should be noted that when the device status is "in use", the test scenarios in which the hardware device participates will be further displayed.

[0028] Real-time monitoring of the device status of hardware devices can provide real-time information on the use of hardware resources, maximize the utilization of hardware devices, reduce the number of hardware resource configurations, and save costs.

[0029] A configuration management test scenario information table includes scenario information of all test scenarios, and the scenario information includes at least distributed site rule information, scenario hardware device information, and script configuration.

[0030] like Figure 3As shown, the scene information includes scene name, scene status, operation and basic operation. The basic operation includes distributed site rule information, scene hardware device information and script configuration. The operation includes startup options; the basic operation includes editing, deleting, viewing detailed configuration and script configuration; Viewing detailed configuration means viewing the distributed site rule information and scene hardware device information; The distributed site rule information includes the number of primary sites and secondary sites and the names of the included hardware devices, and the scene hardware information includes the brand, operating system, quantity, program address and data address of the hardware device; The script configuration includes the order of scripts to be executed. The purpose of the script configuration is to ensure that the key business of each step can be automatically deployed after the target test scenario is started. The script includes configuring hardware device association scripts, distributing programs and data scripts, restoring data scripts, configuring nodes scripts, starting program scripts, and verification scripts.

[0031] When testing is required, the script information is called according to the script configuration, and the matching hardware devices are associated with the target test scenario based on the distributed site rule information, scenario hardware device information and hardware device information table of the target test scenario, and the distributed system is automatically deployed.

[0032] Further, such as Figure 4 As shown, starting the target test scenario, calling the script information, associating the target test scenario with the matching hardware device based on the scenario information and the hardware device information table, and automatically deploying the distributed system include: Step S1, calling the hardware device association script to query the hardware device information table, find out the hardware device that meets the scenario hardware device information of the target test scenario, and automatically set a directory for storing test programs and business data for the hardware device.

[0033] Specifically, the hardware device association script is called to query the hardware device information table to find the hardware devices that meet the scene hardware device information of the target test scene, including: Query the hardware device information table, preliminarily screen the hardware devices whose brands, models, and operating systems are consistent with the scene hardware device information, and further filter out the hardware devices with an idle status from the results of the previous step, and determine whether the number of hardware devices is greater than or equal to the number of hardware in the scene hardware device information. If so, find the hardware devices that meet the scene hardware device information of the target test scenario, otherwise, stop starting the target test scenario.

[0034] Automatically setting a directory for storing test programs and business data for the hardware device includes establishing a test program storage directory and a business data storage directory at corresponding locations of the hardware device according to the storage path in the device information.

[0035] Step S2, calling the distribution program and data script to automatically distribute the test program and business data to the directory configured by the hardware device, and automatically detecting whether the test program and business data are distributed successfully.

[0036] It should be noted that after finding the hardware device that meets the scene hardware device information of the target test scenario, before calling the distribution program and data script to automatically distribute the test program and business data to the configured directory of the hardware device, check whether the IP address of the hardware device and the program address and data address in the corresponding scene hardware information in the target scenario communicate normally. If the detection result is normal communication, call the distribution program and data script.

[0037] For example, test programs and business data use svn for version control, and detect whether the IP address of the hardware device communicates normally with the program address and data address in the corresponding scene hardware information in the target scene. Specifically, it depends on whether the hardware device can normally access the svn directory where the test program and business data are located. The specific verification process can be verified using the svn command or other methods.

[0038] The test program refers to the system service program to be executed by the hardware device in the target test scenario, such as the system service program to be executed by the server corresponding to the main site, or the system service program to be executed by the front-end.

[0039] Step S3, call the data recovery script to restore the business data and test program to the database. The purpose of this step is to restore the business data and test program distributed on the hardware device to the database again, and compare them with the original business data and test program already in the database to ensure that the business data and test program on the hardware device are correct, that is, to ensure that the test environment has been configured with the test program and business data, and to ensure that the test environment can operate normally.

[0040] Step S4: Call the node configuration script to deploy node information of each site according to the distributed site rule information, such as establishing communication between hardware devices corresponding to the primary site, and establishing communication between the primary site and the secondary site.

[0041] Step S5, calling the startup program script to start the test program distributed through the above steps in each hardware device.

[0042] Step S6, calling the verification script to check whether the key services of the distributed system are running normally, so as to verify whether the system is deployed correctly.

[0043] Specifically, it includes calling the verification script, using the ping command to check whether the network communication between hardware devices is normal, verifying whether the data communication between the main site and the secondary site is normal by querying the database information, and verifying whether the control command issuance function is normal by parsing the communication data packet information.

[0044] After the test results are obtained, close the target test scene and release the hardware device.

[0045] Since the test scenarios and the matching hardware brands, models, operating systems, test programs, and business data are set in advance according to requirements, the entire configuration process can be automated by calling scripts, reducing the probability of errors in the configuration process, improving the accuracy of the test, and automatically deploying a complete distributed system test environment.

[0046] Furthermore, the scene information also includes the scene status. When the scene is in the startup process, the scene status is configured as the startup status; when the scene is not started, the scene status is configured as the not started status; when the scene startup fails, the scene status is configured as the startup failure status; when the scene startup is successful and is being used, the scene status is configured as the in-use status.

[0047] Specifically, the unstarted state means that the scene is in an idle state and can be started; the starting state means that the scene is starting step by step according to the rules; the failed start state means that the scene fails to start, and relevant personnel can quickly find the problem based on the startup report and log information, which improves the timeliness of problem discovery and processing efficiency; the in-use state means that the scene is in use, and the associated hardware devices are running normally. The scene in use displays the tester currently using it, so that other testers can plan their test content according to the usage scenario.

[0048] Furthermore, when the test scenario is closed and the hardware resources are released, the status of the scenario is displayed as: not started, and the hardware devices associated with it shut down system-related services, releasing hardware device resources, and the hardware resource status is changed to: idle. At this time, the hardware resources can be associated with other scenarios for use.

[0049] Furthermore, when the target test scenario is enabled, the script execution progress and the execution results of each script are visually displayed according to the script configuration. At the same time, the script execution progress and the execution results of each script are saved as scenario startup log information, and report information is generated based on the scenario startup log information after the scenario startup is completed.

[0050] like Figure 4 As shown, it can be seen that scenario 2 is currently being started, and the hardware configuration, distribution of programs and data, and recovery of data for scenario 2 have been executed normally, and the node configuration step is being executed.

[0051] If any step fails to execute, the scenario startup is considered to have failed and the startup process is terminated. The execution process is intuitive and visualized, and the execution results are logged, which improves the efficiency of relevant personnel in finding problems.

[0052] Example 2 This embodiment provides an automated deployment management system for a distributed system test environment. Figure 5 As shown, including: User configuration module, used for basic system information configuration and management, including configuration and management of hardware device information table, configuration and management of test scenario information table, and configuration and management of script information; The hardware information table includes the device information of all hardware devices, and the device information includes at least brand, model, operating system, IP address, device status, and storage path; the test scenario information table includes the scenario information of all test scenarios, and the scenario information includes at least distributed site rule information, scenario hardware device information, and script configuration; the script information includes hardware device association scripts, distribution program and data scripts, recovery data scripts, configuration node scripts, startup program scripts, and verification scripts; Interface calling module, used to call the script information of the target test scenario; A logic processing module, configured to call corresponding script information through the interface calling module based on the script configuration of the target test difference, associate matching hardware devices for the target test scenario based on the distributed site rule information, scenario hardware device information and hardware device information table of the target test scenario, and automatically deploy a distributed system; The information display module is used to display information on the page, including the hardware device information table, the test scenario information table, and the scenario startup log information.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.

Claims

1. An automated deployment management method for a distributed system test environment, characterized in that: Configuration management hardware device information table, the hardware information table includes device information of all hardware devices, the device information includes at least brand, model, operating system, IP address, device status, storage path; Configuration management test scenario information table, the test scenario information table includes scenario information of all test scenarios, the scenario information includes at least distributed site rule information, scenario hardware device information and script configuration; the script configuration includes configuring hardware device association script, distributing program and data script, restoring data script, configuring node script, starting program script and verifying the execution order of script; Start the target test scenario, call the script information according to the script configuration, associate the target test scenario with the matching hardware devices based on the distributed site rule information, scenario hardware device information and hardware device information table of the target test scenario, and automatically deploy the distributed system; Close the target test scenario and release the hardware device.

2. The method for automated deployment management of a distributed system test environment according to claim 1, characterized in that: Start the target test scenario, call the script information, associate the target test scenario with the matching hardware device based on the scenario information and hardware device information table of the target test scenario, and automatically deploy the distributed system including: Call the hardware device association script to query the hardware device information table, find the hardware device that meets the scenario hardware device information of the target test scenario, and automatically set the directory for storing the test program and business data for the hardware device according to the storage path of the device information; Call the distribution program and data script to automatically distribute the test program and business data to the directory configured by the hardware device, and automatically detect whether the test program and business data are distributed successfully; Call the data recovery script to restore business data and test programs to the database; According to the distributed site rule information, call the node configuration script to deploy the node information of each site; Call the startup program script to start the test program distributed in the above steps in each hardware device; Call the verification script to check whether the key services of the distributed system are running normally to verify whether the system is deployed correctly.

3. The method for automated deployment management of a distributed system test environment according to claim 1, characterized in that: Call the hardware device association script to query the hardware device information table to find the hardware devices that meet the scene hardware device information of the target test scenario, including: Query the hardware device information table, preliminarily screen the hardware devices whose brands, models, and operating systems are consistent with the scene hardware device information, and further filter out the hardware devices with an idle status from the results of the previous step, and determine whether the number of hardware devices is greater than or equal to the number of hardware in the scene hardware device information. If so, find the hardware devices that meet the scene hardware device information of the target test scenario, otherwise, stop starting the target test scenario.

4. The method for automated deployment management of a distributed system test environment according to claim 1, characterized in that: After finding the hardware device that meets the scenario hardware device information of the target test scenario, before calling the distribution program and data script to automatically distribute the test program and business data to the configured directory of the hardware device, check whether the IP address of the hardware device is communicating normally. If the detection result is normal communication, call the distribution program and data script again.

5. The method for automated deployment management of a distributed system test environment according to claim 1, characterized in that: The scene information also includes a scene state. When the scene is in the startup process, the scene state is configured as being in the startup process; when the scene is not started, the scene state is configured as not started. When the scene fails to start, the scene status is configured as failed to start; when the scene starts successfully and is being applied, the scene status is configured as in use.

6. The method for automated deployment management of a distributed system test environment according to claim 1, characterized in that: When the target test scenario is enabled, the script execution progress and the execution results of each script are also visualized according to the script configuration. The script execution progress and the execution results of each script are saved as scenario startup log information, and report information is generated based on the scenario startup log information after the scenario startup is completed.

7. An automated deployment management system for a distributed system test environment, characterized in that: include: User configuration module, used for basic system information configuration and management, including configuration and management of hardware device information table and test scenario information table; The hardware information table includes the device information of all hardware devices, and the device information includes at least brand, model, operating system, IP address, device status, and storage path; the test scenario information table includes the scenario information of all test scenarios, and the scenario information includes at least distributed site rule information, scenario hardware device information, and script configuration; the script configuration includes configuring the execution order of the hardware device association script, distributing program and data script, restoring data script, configuring node script, starting program script, and verifying script; Interface calling module, used to call the script information of the target test scenario; A logic processing module, configured to call corresponding script information through the interface calling module based on the script configuration of the target test difference, associate matching hardware devices for the target test scenario based on the distributed site rule information, scenario hardware device information and hardware device information table of the target test scenario, and automatically deploy a distributed system; The information display module is used to display information on the page, including the hardware device information table, the test scenario information table, and the scenario startup log information.