Upgrade verification method and device, equipment, medium and program product
Through the upgrade verification method of automated deployment scripts and data comparison, the problems of low efficiency and poor accuracy of Neutron system upgrade verification are solved, and efficient and accurate automated upgrade verification are achieved.
Patent Information
- Application Number
- CN202510345026.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-17
AI Technical Summary
In the prior art, during the upgrade process of the Neutron system of the public cloud, due to the regeneration and issuance of gateway data, unknown problems are prone to failure, and the manual verification of operation and maintenance personnel takes time and is prone to misoperation, resulting in low efficiency and low accuracy of upgrade verification.
Provides an automated upgrade verification method, which generates a test verification environment by obtaining pre- and post-upgraded installation packages, configuration files and database backup files, calls automatic deployment scripts to generate a test verification environment, obtains gateway data, and compares it to obtain upgrade verification results.
Through automated deployment scripts and data comparison, upgrade verification without manual participation is achieved, avoiding the time-consuming and prone to misoperation caused by manual operations, and improving the efficiency and accuracy of upgrade verification.
Smart Images

Figure CN120166036A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of public cloud network upgrade, and in particular to an upgrade verification method, device, equipment, medium and program product. Background Art
[0002] Neutron is an important component of the public cloud. It is a software system or platform used to manage and monitor network resources, services, and devices. It has complex functions and a wide coverage, and needs to be frequently upgraded to meet the needs of the constantly iterating network functions. During the upgrade process, all gateway data will be regenerated and sent down. Unknown problems often occur during the sending process, resulting in upgrade failures. In severe cases, network functions will be interrupted, causing large-scale network failures. Usually, operation and maintenance personnel need to perform verification before the upgrade to avoid upgrade failures. Before the upgrade, the operation and maintenance personnel will prepare idle gateway servers, and upgrade the gateway nodes separately without publishing routes to verify whether there are any abnormalities in the delivery of gateway server data configuration. If there are any abnormalities, the upgrade needs to be interrupted and the cause needs to be found out.
[0003] However, the existing upgrade verification is completed manually by operation and maintenance personnel, which has the problems of long verification time and easy operation errors, resulting in low efficiency and low accuracy of upgrade verification. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides an upgrade verification method, device, equipment, medium and program product.
[0005] A first aspect of an embodiment of the present disclosure provides an upgrade verification method, including:
[0006] In response to the user's target operation, obtaining a first installation package before upgrading corresponding to the target operation and a configuration file and a database backup file corresponding to the computer room to be upgraded;
[0007] Calling an automatic deployment script so that the automatic deployment script performs service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file, and the database backup file, and generates a test verification environment;
[0008] Based on the gateway proxy type corresponding to the target operation, determine the target gateway corresponding to the gateway proxy type, and obtain the first gateway data before the upgrade corresponding to the target gateway;
[0009] Obtain an upgraded second installation package, build an upgraded environment based on the second installation package, and generate upgraded second gateway data;
[0010] An upgrade verification operation is performed based on the first gateway data and the second gateway data to obtain an upgrade verification result.
[0011] The second aspect of the embodiments of the present disclosure provides an upgrade verification device, including:
[0012] An information acquisition module, configured to obtain a first installation package before upgrade corresponding to a target operation, a configuration file corresponding to a computer room to be upgraded, and a database backup file in response to a target operation of a user;
[0013] An environment construction module, configured to call an automatic deployment script, so that the automatic deployment script performs a service deployment operation on a control node and a gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file, and the database backup file, and generates a test verification environment;
[0014] A first data generation module, configured to determine a target gateway corresponding to a gateway proxy type based on the gateway proxy type corresponding to the target operation, and obtain first gateway data before upgrade corresponding to the target gateway;
[0015] A second data generation module, configured to obtain a second installation package after upgrade, construct an environment after upgrade based on the second installation package, and generate second gateway data after upgrade;
[0016] An upgrade verification module, configured to perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result.
[0017] The third aspect of the embodiments of the present disclosure provides an electronic device, including:
[0018] A processor;
[0019] A memory, configured to store executable instructions;
[0020] Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the upgrade verification method provided in the first aspect above.
[0021] The fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the upgrade verification method provided in the first aspect above.
[0022] The fifth aspect of the embodiments of the present disclosure provides a computer program product, where the computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the upgrade verification method as described in the first aspect above is implemented.
[0023] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:
[0024] The upgrade verification method, device, equipment, medium and program product provided by the embodiments of the present disclosure can, in response to a user's target operation, obtain a first installation package before upgrade corresponding to the target operation, as well as a configuration file and a database backup file corresponding to the computer room to be upgraded; call an automatic deployment script to enable the automatic deployment script to perform service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file and the database backup file, and generate a test verification environment; after generating the test verification environment, based on the gateway proxy type corresponding to the target operation, determine a target gateway corresponding to the gateway proxy type, and obtain first gateway data before upgrade corresponding to the target gateway; then, obtain a second installation package after upgrade, build an environment after upgrade based on the second installation package, and generate second gateway data after upgrade; perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result. Thus, it is possible to automatically build a test verification environment through the automatic deployment script, obtain the first gateway data and the second gateway data corresponding to before and after upgrade respectively, and then perform an upgrade verification operation according to the first gateway data and the second gateway data to obtain an upgrade verification result, without manual participation, avoiding the problems of long time consumption and easy misoperation caused by manual operations, and improving the efficiency and accuracy of upgrade verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.
[0026] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0027] Figure 1 is a flowchart of an upgrade verification method provided by an embodiment of the present disclosure;
[0028] Figure 2 is a flowchart of another upgrade verification method provided by an embodiment of the present disclosure;
[0029] Figure 3 is a schematic structural diagram of an upgrade verification device provided by an embodiment of the present disclosure;
[0030] Figure 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] To better understand the above objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0032] In the following description, numerous specific details are set forth to facilitate a thorough understanding of the present disclosure. However, the present disclosure may be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.
[0033] It should be understood that the various steps recorded in the method embodiments of the present disclosure may be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0034] It should be noted that, in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising the element.
[0035] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".
[0036] Generally speaking, Neutron is an important part of the public cloud. It is a software system or platform for managing and monitoring network resources, services and devices. It has complex functions and wide coverage, and needs to be frequently upgraded to meet the constantly iterating network functions. During the upgrade process, all gateway data will be regenerated and issued. Unknown problems often occur during the issuance process, resulting in upgrade failures. In severe cases, network functions will be interrupted, causing large-scale network failures. Usually, operation and maintenance personnel need to do verification before upgrading to avoid upgrade failures. Before upgrading, operation and maintenance personnel will prepare idle gateway servers, and upgrade gateway nodes separately without publishing routes to verify whether there are any abnormalities in the issuance of gateway server data configuration. If there are any abnormalities, the upgrade needs to be interrupted and the cause needs to be found out. However, the existing upgrade verification is manually completed by the operation and maintenance personnel, and there are problems such as long verification time and easy misoperation, resulting in low efficiency and low accuracy of upgrade verification. In response to this problem, the embodiment of the present disclosure provides an upgrade verification method, which is described below in conjunction with specific embodiments.
[0037] Figure 1 It is a flowchart of an upgrade verification method provided by an embodiment of the present disclosure. The method can be executed by an upgrade verification device. The upgrade verification device can be implemented in software and / or hardware. The upgrade verification device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc.
[0038] like Figure 1 As shown, the upgrade verification method provided in this embodiment includes the following steps.
[0039] S110. In response to a target operation of the user, obtain a first installation package before upgrading corresponding to the target operation and a configuration file and a database backup file corresponding to the computer room to be upgraded.
[0040] In the disclosed embodiments, the target operation may include the selection operation of the computer room area identification corresponding to the upgrade verification, the network component version type and the gateway agent type, the filling operation of the download path of the first installation package before the upgrade, the selection operation of the task execution step, etc.
[0041] The computer room area identifier may be identification information used to identify the area where the computer room is located, for example, it may be a region_code corresponding to the computer room.
[0042] The network component version type is the neutron version type, which can include neutron_vpc, neutron_1b, etc.
[0043] The gateway proxy types can include tgw_agent, pgw_agent, vgw_agent, nat_agent, sgw_agent, Ibaas_agent, tengine_agent, and so on.
[0044] The task execution steps can include one or more of updating the test environment configuration, i.e., updating the configuration file update_env, updating the installation package download path update_package_url, preparing the configuration files related to the test prepare_config_file, copying the configuration files to the target test nodes copy_config_file, deploying the neutron service deploy_neutron, importing the database files import_mysql, synchronizing the redis data sync_redis, and starting the rpc service start_rpc. The steps to be executed can be selected according to the actual situation.
[0045] The first installation package is the installation package corresponding to the network management component to be upgraded and verified.
[0046] The configuration files and database backup files corresponding to the computer room to be upgraded are files that are pre-exported from a preset database such as a MySQL database and stored in a specific format in the target directory.
[0047] Specifically, in response to the user's target operation, the electronic device obtains the configuration files and database backup files corresponding to the computer room to be upgraded that correspond to the computer room area identifier from the preset database based on the computer room area identifier corresponding to the target operation. At the same time, it downloads the first installation package based on the download path of the first installation package before the upgrade filled in, and thus obtains the first installation package.
[0048] S120. Call the automatic deployment script to enable the automatic deployment script to perform service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, configuration files, and database backup files, and generate a test verification environment.
[0049] In the embodiments of the present disclosure, the automatic deployment script is a script that is pre-set and can implement automatic deployment services.
[0050] Among them, the service deployment operations can include operations such as updating the configuration file, importing the database, synchronizing the redis data, and starting the remote procedure call service, i.e., starting the rpc service.
[0051] Specifically, the electronic device can call the automatic deployment script based on a preset interface, so that the automatic deployment script performs a configuration file update operation based on the first installation package, and at the same time imports the configuration file and the database backup file into a preset database such as a MySQL database, and synchronizes them to a redis database, and then starts the rpc service, thereby realizing the environment setup before the upgrade and generating a test verification environment.
[0052] S130. Based on the gateway proxy type corresponding to the target operation, determine the target gateway corresponding to the gateway proxy type, and obtain the first gateway data before the upgrade corresponding to the target gateway.
[0053] In the embodiments of the present disclosure, the first gateway data may include configuration information related to the target gateway, such as a Mac address, a routing address, and the like.
[0054] Specifically, after the electronic device generates a test verification environment, based on the gateway proxy type corresponding to the target operation, it determines the target gateway corresponding to the gateway proxy type and updates the underlying gateway service. Then, it calls the gateway proxy service corresponding to the target gateway to pull the gateway data from the control node, and thus obtains the first gateway data.
[0055] S140. Obtain the second installation package after the upgrade, perform environment setup after the upgrade based on the second installation package, and generate the second gateway data after the upgrade.
[0056] In the embodiments of the present disclosure, the second installation package may be downloaded based on the download path of the second installation package filled in by the user for the upgrade.
[0057] Specifically, the electronic device performs environment setup after the upgrade based on the computer room area identifier, network component version type, gateway proxy type, task execution steps, and the second installation package selected by the user. Among them, the implementation of performing environment setup after the upgrade based on the second installation package is similar to the above-mentioned specific implementation of generating a test verification environment, that is, environment setup before the upgrade, and will not be elaborated here; similarly, the specific implementation of generating the second gateway data after the upgrade is similar to the specific implementation of generating the first gateway data before the upgrade, and will not be elaborated here.
[0058] S150. Perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result.
[0059] Specifically, after the electronic device obtains the first gateway data and the second gateway data, it compares the first gateway data and the second gateway data to obtain a comparison result, and performs an upgrade verification operation based on the comparison result to obtain an upgrade verification result.
[0060] In the embodiments of the present disclosure, in response to a target operation of a user, a first installation package before upgrade corresponding to the target operation, a configuration file corresponding to the machine room to be upgraded, and a database backup file can be obtained; an automatic deployment script is called, so that the automatic deployment script performs a service deployment operation on a control node and a gateway server corresponding to the machine room to be upgraded based on the first installation package, the configuration file, and the database backup file, and generates a test verification environment; after the test verification environment is generated, based on the gateway proxy type corresponding to the target operation, a target gateway corresponding to the gateway proxy type is determined, and first gateway data before upgrade corresponding to the target gateway is obtained; then, a second installation package after upgrade is obtained, an environment after upgrade is built based on the second installation package, and second gateway data after upgrade is generated; an upgrade verification operation is performed based on the first gateway data and the second gateway data to obtain an upgrade verification result. Thus, a test verification environment can be automatically built through the automatic deployment script, the first gateway data and the second gateway data corresponding to before and after upgrade can be obtained, and then the upgrade verification operation is performed according to the first gateway data and the second gateway data to obtain the upgrade verification result, without manual participation, avoiding the problems of long time consumption and easy misoperation caused by manual operations, and improving the efficiency and accuracy of upgrade verification.
[0061] Based on the above embodiments of the present disclosure, the problem that operation and maintenance personnel do not understand new functions and the simulation verification is not perfect enough due to a relatively simple verification method can be overcome. At the same time, by selecting different gateway component version types and gateway proxy types, all types of gateway nodes and gateways of each version can be covered, reducing the burden on operation and maintenance personnel, discovering problems in advance before upgrade, and improving upgrade reliability.
[0062] In the embodiments of the present disclosure, before obtaining the first installation package before upgrade corresponding to the target operation, the configuration file corresponding to the machine room to be upgraded, and the database backup file in response to the target operation of the user, the upgrade verification method may further include: creating a first directory on the control node, the first directory including a first sub-directory and a second sub-directory, the first sub-directory being used to store the configuration file and the database backup file of the machine room corresponding to the control node; the second sub-directory being used to store the remote procedure call configuration file for the operation of the online area network service; creating a second directory on the gateway server, the second directory being used to store the gateway service operation configuration file corresponding to the gateway server.
[0063] In the embodiments of the present disclosure, a preset middleware service is pre-deployed on the control node. The preset middleware service includes a MySQL service, a rabbitmq service, and a redis service. The preset middleware service can be pre-deployed in the form of all-in-one.
[0064] The gateway server is pre-deployed with gateway service software corresponding to the operation of the gateway service, but does not run, and places the gateway service software version and startup script involved in a specified directory.
[0065] The number of gateway servers can be one or more, and one or more gateway servers can be classified based on functions.
[0066] The first directory is used to store the data of the computer room corresponding to the control node, and can include information such as the area identifier corresponding to the computer room and the service type.
[0067] The first sub-directory can be the data directory, and the configuration files and database backup files of the computer room corresponding to the control node stored therein can be understood as the configuration files and database backup files of this computer room exported from the online environment. Among them, the database backup file can be understood as a file in the mysql database.
[0068] The second sub-directory can be the rpc directory, and the remote procedure call configuration files for the operation of the online regional network service stored therein can be understood as the rpc configuration files for the operation of the online regional network service, that is, the online regionneutron service.
[0069] The second directory is used to store the data of the computer room corresponding to the gateway server, and can include information such as the area identifier corresponding to the computer room and the service type. For different gateway types, directories corresponding to the gateway types are created, respectively used to store the configuration files for the operation of the gateway services corresponding to the gateway types.
[0070] Specifically, the electronic device can create the first directory on the control node based on a preset program, and store the configuration files and database backup files of this computer room exported from the online environment corresponding to the control node in the first sub-directory; store the remote procedure call configuration files for the operation of the online regional network service in the second sub-directory; at the same time, create the second directory on the gateway server based on a preset program, and store the gateway service operation configuration files corresponding to the gateway server in the second directory.
[0071] In the embodiments of the present disclosure, it is possible to create directories for storing the data of the corresponding computer rooms on the control node and the gateway server in advance, which is convenient for information search and the construction of the pre-upgrade environment, and improves the efficiency and accuracy of environment construction.
[0072] In the embodiments of the present disclosure, obtaining the configuration files and database backup files corresponding to the computer room to be upgraded may specifically include: obtaining the configuration files and database backup files corresponding to the computer room to be upgraded from the first sub-directory based on the area identifier of the computer room corresponding to the target operation.
[0073] Obtain the first installation package before upgrade corresponding to the target operation, which may specifically include: downloading the first installation package based on the download path of the first installation package.
[0074] In the embodiments of the present disclosure, the configuration file and the database backup file corresponding to the computer room to be upgraded can be obtained from the first sub-directory through the computer room area identifier, which improves the efficiency of data acquisition. At the same time, the method of downloading the first installation package by filling in the download path of the first installation package can improve the convenience of installation package download and the flexibility of different installation package selection.
[0075] In the embodiments of the present disclosure, an automatic deployment script is called to enable the automatic deployment script to perform service deployment operations on the control node and the gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file, and the database backup file, and generate a test verification environment. Specifically, it may include: calling the automatic deployment script, orchestrating the automatic deployment script based on a preset automated deployment tool to obtain at least one task, and performing service deployment operations based on the at least one task to generate a test verification environment, where the at least one task includes updating the configuration file, importing the database, synchronizing redis data, and starting the remote procedure call service.
[0076] In the embodiments of the present disclosure, the preset automated deployment tool may be Jenkinsjob.
[0077] Specifically, the electronic device can call the automatic deployment script and orchestrate the automatic deployment script based on a preset automated deployment tool to obtain at least one task. After obtaining the at least one task, execute the at least one task to complete the service deployment, and then generate a test verification environment.
[0078] Among them, the operation of deploying based on at least one task execution service specifically may include: First, update the configuration file. Updating the configuration file means, for the control node side, obtaining the remote procedure call configuration file for the operation of the online regional network service from the second sub-directory corresponding to the control node, and updating the remote procedure call configuration file in the first installation package based on the remote procedure call configuration file for the operation of the online regional network service. The updated port information, login username information, password and other information are matched with the online middleware service; at the same time, for the gateway server side, update the proxy configuration file related to the remote procedure call service, that is, the rpc service, in the gateway server. Second, import the database. Importing the database means reading the configuration file and the database backup file of the computer room corresponding to the control node in the first directory of the control node, and automatically importing them into the preset MySQL database. Third, synchronize the redis database. Synchronizing the redis database means synchronizing the data imported into the preset MySQL database to the redis database. Finally, start the remote procedure call service, that is, start the rpc service to complete the construction of the test verification environment.
[0079] In the embodiments of the present disclosure, at least one task can be obtained by means of orchestration through a preset automated deployment tool, and at least one task is executed to make the service deployment process flow, improving the speed of service deployment.
[0080] In the embodiments of the present disclosure, based on the gateway proxy type corresponding to the target operation, determine the target gateway corresponding to the gateway proxy type, and obtain the first gateway data before upgrade corresponding to the target gateway. Specifically, it may include: obtaining the gateway version information before upgrade, building the gateway service corresponding to the target gateway based on the gateway version information before upgrade, and starting the gateway proxy service corresponding to the gateway proxy type in the gateway server after the construction is completed; calling the gateway proxy service to enable the gateway proxy service to pull the first gateway data corresponding to the target gateway from the control node.
[0081] Specifically, the electronic device obtains the gateway version information before upgrade from the second directory of the gateway server, builds the gateway service corresponding to the target gateway based on the gateway version information before upgrade, starts the gateway service after the construction is completed, and starts the gateway proxy service corresponding to the gateway proxy type in the gateway server. Call the gateway proxy service to enable the gateway proxy service to pull the first gateway data corresponding to the target gateway from the control node, and thus obtain the first gateway data.
[0082] In the embodiments of the present disclosure, the construction of the gateway service can be automatically performed, and the gateway proxy service corresponding to the gateway proxy type is called to obtain the first gateway data, realizing the automated deployment of the gateway service and improving the efficiency of gateway service deployment.
[0083] In the embodiments of the present disclosure, an upgrade verification operation is performed based on the first gateway data and the second gateway data to obtain an upgrade verification result, which may specifically include: comparing the first gateway data and the second gateway data to obtain a comparison result; when the comparison result meets the preset requirements, determining that the upgrade verification result is verification successful; when the comparison result does not meet the preset requirements, determining that the upgrade verification result is verification failed.
[0084] In the embodiments of the present disclosure, the electronic device can automatically compare the gateway data before and after the upgrade to obtain a comparison result, and obtain the upgrade verification result according to the comparison result, realizing the automatic comparison of the gateway data and improving the efficiency and accuracy of the comparison result.
[0085] Figure 2 is a flowchart of another upgrade verification method provided by the embodiments of the present disclosure, as Figure 2 shown, the upgrade verification method may include the following steps:
[0086] S210. Create a first directory at the control node. The first directory includes a first sub-directory and a second sub-directory. Store the configuration file and the database backup file of the computer room corresponding to the control node in the first sub-directory; store the remote procedure call configuration file for running the online regional network service in the second sub-directory.
[0087] S220. Create a second directory at the gateway server, and store the gateway service running configuration file corresponding to the gateway server in the second directory.
[0088] S230. In response to the target operation of the user, obtain the configuration file and the database backup file of the computer room to be upgraded from the first sub-directory based on the computer room area identifier corresponding to the target operation; download the first installation package based on the download path of the first installation package corresponding to the target operation.
[0089] S240. Invoke the automatic deployment script, orchestrate the automatic deployment script based on the preset automatic deployment tool to obtain at least one task, and perform a service deployment operation based on the at least one task to generate a test verification environment, where the at least one task includes updating the configuration file, importing the database, synchronizing redis data, and starting the remote procedure call service.
[0090] S250. Based on the gateway proxy type corresponding to the target operation, determine the target gateway corresponding to the gateway proxy type, obtain the gateway version information before the upgrade, build the gateway service corresponding to the target gateway based on the gateway version information before the upgrade, and start the gateway proxy service corresponding to the gateway proxy type in the gateway server after the build is completed.
[0091] S260. Invoke the gateway proxy service to enable the gateway proxy service to pull the first gateway data corresponding to the target gateway from the control node.
[0092] S270. Obtain the second installation package after the upgrade, build the environment after the upgrade based on the second installation package, and generate the second gateway data after the upgrade.
[0093] S280. Perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result.
[0094] It should be noted that the specific implementation manners of steps S210 - S280 are similar to the implementation manners of the relevant steps in the above embodiments of the present disclosure, and will not be elaborated herein.
[0095] In the embodiments of the present disclosure, a first directory for storing the computer room data corresponding thereto can be created at the control node, and a second directory for storing the computer room data corresponding thereto can be created at the gateway server. Then, in response to the target operation of the user, the configuration file corresponding to the target operation can be obtained from the first directory and the second directory based on the target operation, and the automatic deployment script can be called. The automatic deployment script is orchestrated based on a preset automatic deployment tool to obtain at least one task, and a service deployment operation is performed based on the at least one task to generate a test verification environment, improving the efficiency of generating the test verification environment. Further, the first gateway data corresponding to the target gateway before the upgrade is pulled from the control node by the gateway proxy service corresponding to the gateway proxy type corresponding to the target operation, and the second installation package is obtained. The environment after the upgrade is built and the second gateway data after the upgrade is generated, and the first gateway data and the second gateway data are compared to obtain an upgrade verification result. Thus, the upgrade verification operation can be realized in an automated manner without manual participation, avoiding the problems of long time consumption and easy misoperation caused by manual operations, and improving the efficiency and accuracy of the upgrade verification.
[0096] Figure 3 It is a schematic structural diagram of an upgrade verification device provided by an embodiment of the present disclosure.
[0097] In the embodiments of the present disclosure, the upgrade verification device can be set in an electronic device and is understood as some functional modules in the above-mentioned electronic device. Specifically, the electronic device can be a server or a terminal. Among them, the terminal specifically includes a mobile phone, a computer, a tablet computer, etc., which are not limited herein.
[0098] As Figure 3 shown, the upgrade verification device 300 can include an information acquisition module 310, an environment building module 320, a first data generation module 330, a second data generation module 340, and an upgrade verification module 350.
[0099] The information acquisition module 310 can be used to obtain the first installation package before the upgrade corresponding to the target operation, as well as the configuration file and database backup file corresponding to the computer room to be upgraded, in response to the target operation of the user.
[0100] The environment setup module 320 can be used to call an automatic deployment script, so that the automatic deployment script performs service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, configuration file, and database backup file, and generates a test verification environment.
[0101] The first data generation module 330 can be used to determine a target gateway corresponding to the gateway proxy type based on the gateway proxy type corresponding to the target operation, and obtain the first gateway data before the upgrade corresponding to the target gateway.
[0102] The second data generation module 340 can be used to obtain the second installation package after the upgrade, perform environment setup after the upgrade based on the second installation package, and generate the second gateway data after the upgrade.
[0103] The upgrade verification module 350 can be used to perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result.
[0104] In the embodiments of the present disclosure, it is possible to obtain the first installation package before the upgrade corresponding to the target operation, as well as the configuration file and database backup file corresponding to the computer room to be upgraded, in response to the target operation of the user; call an automatic deployment script, so that the automatic deployment script performs service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, configuration file, and database backup file, and generates a test verification environment; after generating the test verification environment, determine a target gateway corresponding to the gateway proxy type based on the gateway proxy type corresponding to the target operation, and obtain the first gateway data before the upgrade corresponding to the target gateway; then, obtain the second installation package after the upgrade, perform environment setup after the upgrade based on the second installation package, and generate the second gateway data after the upgrade; perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result. Thus, it is possible to automatically set up a test verification environment through the automatic deployment script, obtain the first gateway data and the second gateway data corresponding to before and after the upgrade respectively, and then perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result, without manual intervention, avoiding the problems of long time consumption and easy misoperation caused by manual operations, and improving the efficiency and accuracy of upgrade verification.
[0105] In some embodiments of the present disclosure, the upgrade verification device 300 may further include a directory creation module.
[0106] The directory creation module can be used to create a first directory on the control node before obtaining the first installation package before the upgrade corresponding to the target operation, the configuration file and the database backup file corresponding to the machine room to be upgraded in response to the target operation of the user. The first directory includes a first sub-directory and a second sub-directory. The first sub-directory is used to store the configuration file and the database backup file of the machine room corresponding to the control node; the second sub-directory is used to store the remote procedure call configuration file for the operation of the online area network service.
[0107] Create a second directory on the gateway server, and the second directory is used to store the gateway service operation configuration file corresponding to the gateway server.
[0108] In some embodiments of the present disclosure, the information acquisition module 310 can be specifically used to obtain the configuration file and the database backup file corresponding to the machine room to be upgraded from the first sub-directory based on the machine room area identifier corresponding to the target operation.
[0109] The target operation includes the operation of filling in the download path of the first installation package before the upgrade.
[0110] The information acquisition module 310 can be specifically used to download the first installation package based on the download path of the first installation package.
[0111] In some embodiments of the present disclosure, the environment construction module 320 can be specifically used to call the automatic deployment script, orchestrate the automatic deployment script based on the preset automatic deployment tool to obtain at least one task, and perform service deployment operations based on the at least one task to generate a test verification environment, where the at least one task includes updating the configuration file, importing the database, synchronizing redis data, and starting the remote procedure call service.
[0112] In some embodiments of the present disclosure, the first data generation module 330 can be specifically used to obtain the gateway version information before the upgrade, build the gateway service corresponding to the target gateway based on the gateway version information before the upgrade, and start the gateway proxy service corresponding to the gateway proxy type in the gateway server after the build is completed;
[0113] Call the gateway proxy service so that the gateway proxy service pulls the first gateway data corresponding to the target gateway from the control node.
[0114] In some embodiments of the present disclosure, the upgrade verification module 350 can be specifically used to compare the first gateway data and the second gateway data to obtain a comparison result;
[0115] When the comparison result meets the preset requirements, determine that the upgrade verification result is verification successful;
[0116] When the comparison result does not meet the preset requirements, determine that the upgrade verification result is verification failed.
[0117] It should be noted that Figure 3 The upgrade verification device 300 shown can execute each step in the above method embodiments, and implement each process and effect in the above method embodiments, which will not be elaborated here.
[0118] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
[0119] In the embodiments of the present disclosure, Figure 4 The electronic device shown can be a server or a terminal. Among them, the terminal specifically includes a mobile phone, a computer, a tablet computer, etc., which are not limited here.
[0120] Such as Figure 4 shown, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.
[0121] Specifically, the above-mentioned processor 410 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present disclosure.
[0122] The memory 420 may include a mass storage for information or instructions. By way of example and not limitation, the memory 420 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 420 may include a removable or non-removable (or fixed) medium. In a suitable case, the memory 420 may be inside or outside the integrated gateway device. In a specific embodiment, the memory 420 is a non-volatile solid-state memory. In a specific embodiment, the memory 420 includes a read-only memory (ROM). In a suitable case, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0123] The processor 410 reads and executes the computer program instructions stored in the memory 420 to perform the steps of the upgrade verification method provided by the embodiments of the present disclosure.
[0124] In one example, the electronic device may further include a transceiver 430 and a bus 440. Among them, as Figure 4 shown, the processor 410, the memory 420, and the transceiver 430 are connected through the bus 440 and complete communication with each other.
[0125] The bus 440 includes hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side BUS (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. In a suitable case, the bus 440 may include one or more buses.
[0126] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the upgrade verification method provided by the embodiments of the present disclosure.
[0127] The above storage medium may include, for example, a memory 420 for computer program instructions, and the above instructions may be executed by a processor 410 of an electronic device to complete the upgrade verification method provided by the embodiments of the present disclosure. Optionally, the storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0128] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the upgrade verification method provided by the embodiments of the present disclosure is implemented, and each process and effect in the above embodiments of the present disclosure can be achieved. Details are not described herein again.
[0129] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will conform to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. An upgrade verification method, characterized in that: include: In response to a target operation of the user, obtaining a first installation package before upgrading corresponding to the target operation and a configuration file and a database backup file corresponding to the computer room to be upgraded; Calling an automatic deployment script so that the automatic deployment script performs service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file, and the database backup file, and generates a test verification environment; Based on the gateway proxy type corresponding to the target operation, determining a target gateway corresponding to the gateway proxy type, and acquiring first gateway data before upgrading corresponding to the target gateway; Obtaining an upgraded second installation package, building an upgraded environment based on the second installation package, and generating upgraded second gateway data; An upgrade verification operation is performed based on the first gateway data and the second gateway data to obtain an upgrade verification result.
2. The method according to claim 1, characterized in that Before obtaining the first installation package before upgrading corresponding to the target operation and the configuration file and database backup file corresponding to the computer room to be upgraded in response to the target operation of the user, the method further includes: Create a first directory on the control node, the first directory includes a first subdirectory and a second subdirectory, the first subdirectory is used to store configuration files and database backup files of the computer room corresponding to the control node; the second subdirectory is used to store remote procedure call configuration files for running online regional network services; A second directory is created on the gateway server, where the second directory is used to store a gateway service operation configuration file corresponding to the gateway server.
3. The method according to claim 2, characterized in that Obtain the configuration files and database backup files corresponding to the computer room to be upgraded, including: Based on the computer room area identifier corresponding to the target operation, obtain the configuration file and database backup file corresponding to the computer room to be upgraded from the first subdirectory; The target operation includes a download path filling operation of the first installation package before the upgrade; obtaining the first installation package before the upgrade corresponding to the target operation includes: The first installation package is downloaded based on the download path of the first installation package.
4. The method according to claim 1, characterized in that: The calling of the automatic deployment script so that the automatic deployment script performs service deployment operations on the control node and the gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file and the database backup file to generate a test verification environment includes: Call the automatic deployment script, orchestrate the automatic deployment script based on a preset automatic deployment tool, obtain at least one task, perform service deployment operations based on the at least one task, and generate a test verification environment, wherein the at least one task includes updating a configuration file, importing a database, synchronizing redis data, and starting a remote procedure call service.
5. The method according to claim 1, characterized in that The determining, based on the gateway proxy type corresponding to the target operation, a target gateway corresponding to the gateway proxy type, and acquiring first gateway data before upgrading corresponding to the target gateway, comprises: Obtaining gateway version information before upgrading, building a gateway service corresponding to the target gateway based on the gateway version information before upgrading, and starting the gateway proxy service corresponding to the gateway proxy type in the gateway server after building is completed; The gateway proxy service is called so that the gateway proxy service pulls the first gateway data corresponding to the target gateway from the control node.
6. The method according to claim 1, characterized in that The performing an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result includes: Comparing the first gateway data with the second gateway data to obtain a comparison result; When the comparison result meets the preset requirements, determining the upgrade verification result as verification success; When the comparison result does not meet the preset requirement, the upgrade verification result is determined to be a verification failure.
7. An upgrade verification device, characterized in that: include: An information acquisition module, configured to respond to a target operation of a user and acquire a first installation package before upgrading corresponding to the target operation and a configuration file and a database backup file corresponding to the computer room to be upgraded; An environment building module, used to call an automatic deployment script so that the automatic deployment script performs service deployment operations on the control node and gateway server corresponding to the computer room to be upgraded based on the first installation package, the configuration file and the database backup file, and generates a test verification environment; A first data generating module is used to determine, based on the gateway proxy type corresponding to the target operation, a target gateway corresponding to the gateway proxy type, and obtain first gateway data before upgrading corresponding to the target gateway; A second data generating module, used to obtain an upgraded second installation package, build an upgraded environment based on the second installation package, and generate upgraded second gateway data; An upgrade verification module is used to perform an upgrade verification operation based on the first gateway data and the second gateway data to obtain an upgrade verification result.
8. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the upgrade verification method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the upgrade verification method described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the upgrade verification method according to any one of claims 1 to 6 is implemented.
