CN111008141A - Automatic incremental deployment test environment method - Google Patents

Automatic incremental deployment test environment method Download PDF

Info

Publication number
CN111008141A
CN111008141A CN201911257868.9A CN201911257868A CN111008141A CN 111008141 A CN111008141 A CN 111008141A CN 201911257868 A CN201911257868 A CN 201911257868A CN 111008141 A CN111008141 A CN 111008141A
Authority
CN
China
Prior art keywords
deployment
executing
environment
redis
following
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911257868.9A
Other languages
Chinese (zh)
Inventor
周华艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Unicloud Nanjing Digital Technology Co Ltd
Original Assignee
Unicloud Nanjing Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Unicloud Nanjing Digital Technology Co Ltd filed Critical Unicloud Nanjing Digital Technology Co Ltd
Priority to CN201911257868.9A priority Critical patent/CN111008141A/en
Publication of CN111008141A publication Critical patent/CN111008141A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of incremental deployment test environments, in particular to an automatic incremental deployment test environment method, which comprises the following steps of 1: redis rollback, synchronizing online files; step 2: executing the following script and restarting a redis service; and step 3: rolling back the database; and 4, step 4: the script modifies the configuration file; and 5: jekins executes a construction task, replaces a target file, and starts service; step 6: and executing the shell script, separating the redis cache keys in a space form, and clearing the cache, so that the whole automatic increment deployment process is completed. The method has simple and practical principle and convenient operation, and can automatically output part of deployment links by disassembling the incremental environment deployment process, thereby improving the incremental deployment environment efficiency, reducing errors caused by manual modification, reducing deployment time and labor cost, and shortening the life cycle of multiple sets of environment deployment by multiplexing scripts.

Description

Automatic incremental deployment test environment method
Technical Field
The invention relates to the technical field of incremental deployment test environments, in particular to an automatic incremental deployment test environment method.
Background
Currently, the number of projects is increasing, the application delivery frequency is increasing, and the engineer often needs to spend huge cost and heart blood to complete the frequent application deployment work. The following "three more" challenges are commonly faced when systems are deployed: the deployment operation times are many, and the continuous delivery becomes a common pursuit of enterprises and is also the most core index of the IT service capability of the enterprises. When the deployment times are more, the predictability and the rollback performance of each deployment are the most basic guarantee; deployment environments are varied, enterprise IT infrastructures are clouded and dynamic, the deployment environments not only face the challenges of migration of the four environments of traditional development, test, launch and production (DTAP), but also are changed much more frequently in each environment (incremental and full deployment scenes are frequently appeared and switched), and very high requirements are brought to deployment repeatability; the deployment operators are many. With the popularization of automated deployment and continuous delivery, more and more people need to have the capability of executing deployment operation, which not only includes traditional development, testing and operation and maintenance personnel, but also includes company management personnel, even market and sales personnel need to have the requirement of rapidly deploying a set of system (for demonstration or other purposes) by themselves, which also requires that the deployment operation has good predictability and repeatability, and at present, when an incremental deployment environment is performed, pure manual rollback and incremental deployment environments including background services, databases and redis are mostly adopted.
However, the pure manual incremental deployment efficiency is extremely low, and particularly, when multiple sets of environment deployment are involved, due to the fact that the environment deployment cannot be multiplexed, time is long, more manpower is consumed, uncontrollable errors caused by human factors exist, the environment needs to be repositioned, and therefore the life cycle of the whole incremental environment deployment is prolonged. Accordingly, one skilled in the art provides an automated incremental deployment test environment method to address the problems set forth in the background above.
Disclosure of Invention
The invention aims to provide an automatic incremental deployment test environment method to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: an automated incremental deployment test environment method, comprising the steps of:
step 1: redis rollback, synchronizing online files;
step 2: executing the following script and restarting a redis service;
and step 3: rolling back the database, exporting the online environment database, after the execution of the test environment is finished, executing the following sql statement to replace the domain name of the test environment, then executing and developing the deployment to provide the sql statement, and completing incremental deployment of the database;
and 4, step 4: the script modifies the configuration file;
and 5: jekins executes a construction task, replaces a target file, and starts service;
step 6: and executing the shell script, separating the redis cache keys in a space form, and clearing the cache, so that the whole automatic increment deployment process is completed.
As a still further scheme of the invention: synchronizing the online files in the step 1 refers to synchronizing the online redis files to a test environment and inputting the passwords of the online environment server after executing the following commands;
as a still further scheme of the invention: the specific method of the step 4 comprises the following steps:
s1, providing a configuration file according to the development;
and S2, writing and executing the following shell script, and modifying the configuration file by using the sed command.
As a still further scheme of the invention: and the sed in the S2 is processed in a row unit, and is used for replacing, deleting, adding and selecting data.
As a still further scheme of the invention: the Key in step 6 must not exceed 1024 bytes.
Compared with the prior art, the invention has the beneficial effects that: the method has simple and practical principle and convenient operation, and can automatically output part of deployment links by disassembling the incremental environment deployment process, thereby improving the incremental deployment environment efficiency, reducing errors caused by manual modification, reducing deployment time and labor cost, and shortening the life cycle of multiple sets of environment deployment by multiplexing scripts.
Drawings
FIG. 1 is a schematic structural diagram of an automated incremental deployment test environment method.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, in an embodiment of the present invention, an automated incremental deployment test environment method includes the following steps:
step 1: redis rollback, synchronizing online files;
step 2: executing the following script and restarting a redis service;
and step 3: rolling back the database, exporting the online environment database, after the execution of the test environment is finished, executing the following sql statement to replace the domain name of the test environment, then executing and developing the deployment to provide the sql statement, and completing incremental deployment of the database;
and 4, step 4: the script modifies the configuration file;
and 5: jekins executes a construction task, replaces a target file, and starts service;
step 6: and executing the shell script, separating the redis cache keys in a space form, and clearing the cache, so that the whole automatic increment deployment process is completed.
Further, synchronizing the online files in step 1 means synchronizing the online redis files to a test environment and inputting the online environment server password after executing the following command;
further, the specific method of step 4 comprises the following steps:
s1, providing a configuration file according to the development;
and S2, writing and executing the following shell script, and modifying the configuration file by using the sed command.
Further, sed in S2 is processed in units of rows, and is used to replace, delete, add, and select data.
Further, the Key in step 6 must not exceed 1024 bytes.
In summary, the following steps: the method has simple and practical principle and convenient operation, and can automatically output part of deployment links by disassembling the incremental environment deployment process, thereby improving the incremental deployment environment efficiency, reducing errors caused by manual modification, reducing deployment time and labor cost, and shortening the life cycle of multiple sets of environment deployment by multiplexing scripts.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (5)

1. An automated incremental deployment test environment method, comprising the steps of:
step 1: redis rollback, synchronizing online files;
step 2: executing the following script and restarting a redis service;
and step 3: rolling back the database, exporting the online environment database, after the execution of the test environment is finished, executing the following sql statement to replace the domain name of the test environment, then executing and developing the deployment to provide the sql statement, and completing incremental deployment of the database;
and 4, step 4: the script modifies the configuration file;
and 5: jekins executes a construction task, replaces a target file, and starts service;
step 6: and executing the shell script, separating the redis cache keys in a space form, and clearing the cache, so that the whole automatic increment deployment process is completed.
2. The method according to claim 1, wherein the step 1 of synchronizing the online file refers to synchronizing the online redis file to the test environment and entering a password of the online environment server after executing the following command.
3. The method for automated incremental deployment of test environments of claim 1, wherein the specific method of step 4 comprises the following steps:
s1, providing a configuration file according to the development;
and S2, writing and executing the following shell script, and modifying the configuration file by using the sed command.
4. The method according to claim 3, wherein the sed in the S2 is processed in a row unit for replacing, deleting, adding and selecting data.
5. The method according to claim 1, wherein the Key in step 6 must not exceed 1024 bytes.
CN201911257868.9A 2019-12-10 2019-12-10 Automatic incremental deployment test environment method Pending CN111008141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911257868.9A CN111008141A (en) 2019-12-10 2019-12-10 Automatic incremental deployment test environment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911257868.9A CN111008141A (en) 2019-12-10 2019-12-10 Automatic incremental deployment test environment method

Publications (1)

Publication Number Publication Date
CN111008141A true CN111008141A (en) 2020-04-14

Family

ID=70115081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911257868.9A Pending CN111008141A (en) 2019-12-10 2019-12-10 Automatic incremental deployment test environment method

Country Status (1)

Country Link
CN (1) CN111008141A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813683A (en) * 2020-07-14 2020-10-23 深圳前海移联科技有限公司 Universal automatic software test environment synchronization method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539487A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Method for testing system based on cloud platform and evaluating reliability
CN106815052A (en) * 2017-01-10 2017-06-09 南威软件股份有限公司 A kind of method of the rapid deployment system for being adapted to multi-environment configuration

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539487A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Method for testing system based on cloud platform and evaluating reliability
CN106815052A (en) * 2017-01-10 2017-06-09 南威软件股份有限公司 A kind of method of the rapid deployment system for being adapted to multi-environment configuration

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WORKDSZ: "持续集成之⑤:jenkins结合脚本实现代码自动化部署及一键回滚至上一版本", 《HTTPS://BLOG.CSDN.NET/WORKZ/ARTICLE/DETAILS/77947870》 *
乄陆柒: "jenkins+gitlab实现自动化部署平台", 《HTTPS://BLOG.CSDN.NET/C13891506947》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813683A (en) * 2020-07-14 2020-10-23 深圳前海移联科技有限公司 Universal automatic software test environment synchronization method
CN111813683B (en) * 2020-07-14 2023-10-03 深圳前海移联科技有限公司 Universal automatic synchronization method for software testing environment

Similar Documents

Publication Publication Date Title
CN109460349B (en) Test case generation method and device based on log
CN101241467B (en) Automatized white box test system and method facing to WEB application
CN105868343B (en) Database migration method and system
CN110019138B (en) Automatic transfer table space migration method and system based on Zabbix
CN105843707B (en) Database quick recovery method and equipment
CN107609188B (en) Data synchronization verification method based on golden gate
CN107203617B (en) The online migratory system of mysql and method based on MHA
CN112380180A (en) Data synchronization processing method, device, equipment and storage medium
CN102508919B (en) Data processing method and system
CN105677465B (en) The data processing method and device of batch processing are run applied to bank
CN108984725A (en) Cross-gatekeeper data synchronization method
CN106528070A (en) Data table generation method and equipment
CN105138685A (en) HBase-oriented performance testing system
CN105608126A (en) Method and apparatus for establishing secondary indexes for massive databases
CN102306200A (en) Device and method for concurrently applying incremental data manipulation statements
CN109150964B (en) Migratable data management method and service migration method
CN104317957A (en) Open platform and system for processing reports and report processing method
CN113961546B (en) Real-time query library design method supporting online analysis and statistics
CN115146000A (en) Database data synchronization method and device, electronic equipment and storage medium
CN111008141A (en) Automatic incremental deployment test environment method
CN111177173A (en) System and method for realizing data synchronization optimization processing under big data environment
CN114048188A (en) Cross-database data migration system and method
CN111782618B (en) Data synchronization system
CN115373889A (en) Method and device for data comparison verification and data repair in data synchronization
EP3182278A1 (en) System for automatic preparation of integrated development environments

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200414