A container-based sandbox environment management and configuration automatic synchronization method and system
By using environment coding to create a sandbox test environment on the container cluster and synchronizing configuration and applications, the problem of inconsistent environment configurations in the project management life cycle is solved, development efficiency is improved, test operation and maintenance costs are reduced, and the accuracy of the benchmark environment is ensured. sex and timeliness.
Patent Information
- Application Number
- CN202410734581.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The existing technology cannot effectively synchronize the configuration and application of the container sandbox environment in the project management life cycle, resulting in problems such as prone development processes, low development efficiency, and high test and operation costs.
Create a sandbox test environment by using environment encoding as a namespace on the container cluster, and deploy configurations and applications copied from the baseline environment in the sandbox test environment to achieve automatic synchronization of configurations and applications to ensure that the sandbox test environment is consistent with the baseline environment consistency and synchronize parsing information to the baseline environment at the end of the project.
It improves development efficiency, reduces failures in the development process, reduces test operation and maintenance costs, and ensures the accuracy and timeliness of the benchmark environment.
Smart Images

Figure CN118312278B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to a container-based sandbox environment management and configuration automatic synchronization method and system. Background Art
[0002] During the entire life cycle of a project, it is necessary to manage the applications and configurations used in the project. When a project starts, it is essential to ensure that the applications and configurations used are precisely consistent with the versions of the production environment. This is not only related to the stability and reliability of the project, but is also an important guarantee for team collaboration efficiency and development quality. When the project ends, the resources used in the project need to be recycled. Any minor changes may trigger a chain reaction, resulting in more complicated steps to restore the production environment. Therefore, improving the project management process is of great significance.
[0003] In the existing project management process, it is necessary to use the supporting development and testing environment along with the project life cycle. With the increase in the number of projects and rapid iterations, there have been problems such as inconsistent environment configuration, difficult dependency management, inconsistent deployment, difficulty in reproducing, waste of resources, and difficulty in debugging and troubleshooting. The deployment process requires manual operation, the environment deployment time is long, and there is a lack of repeatability and portability. Users also need to quickly create a demonstration test environment. The demonstration environment is quickly created and destroyed, and the maintenance cost is high. Therefore, the management of the development and testing environment is very important.
[0004] The container management platform provides strong support for project development and testing. In the existing container management platform, there is no function to synchronize with the project management life cycle, and it is impossible to manage the consistency of the application version and configuration version contained in the project and keep it consistent with the baseline environment, which makes it easy for problems to occur in the project development process and increases the communication cost of development, testing and operation and maintenance. For example, the prior art discloses a continuous integration method based on container virtualization. By adopting container virtualization technology, the invention can be deployed without interference in a single machine environment and can be horizontally expanded more conveniently. However, this method fails to uniformly manage the environment required for development and testing in the project management life cycle, and cannot synchronize the configuration and application in the container's sandbox environment, resulting in low development efficiency. Summary of the invention
[0005] In order to solve the problems in the above-mentioned prior art that the development process is prone to failure, the development efficiency is low, and the test and operation and maintenance costs are high, the present invention proposes a container-based sandbox environment management and configuration automatic synchronization method and system, which effectively reduces the failures in the development process, improves the development efficiency, and reduces the test and operation and maintenance costs.
[0006] In order to achieve the above technical effects, the technical solution of the present invention is as follows:
[0007] A container-based sandbox environment management and configuration automatic synchronization method includes the following steps:
[0008] S1. The user fills in the project-related information on the iteration page and determines the environment code based on the project-related information;
[0009] S2. Use the environment code as a namespace on the container cluster and create a sandbox test environment based on the namespace;
[0010] S3. Deploy the configuration and application copied from the baseline environment in the sandbox test environment;
[0011] S4. After the deployment is completed, click on the project to be successfully launched on the iteration page, publish the basic launch information of the project, and preliminarily recover the sandbox test environment;
[0012] S5. After the initial recovery of the sandbox test environment is completed, the basic online information is parsed to obtain parsed information, and the parsed information is synchronized to the benchmark environment to complete the final recovery of the sandbox test environment.
[0013] Preferably, the project related information includes the project name, project launch time and project management personnel, and the pinyin of the project name is used as the environment code.
[0014] Preferably, the configuration copied from the reference environment and deployed in the sandbox test environment is the latest published configuration, and the application copied from the reference environment and deployed in the sandbox test environment is the latest published version of the application.
[0015] Preferably, the preliminary recovery of the sandbox test environment includes: preliminary recovery of resources of the sandbox test environment by uninstalling configurations and applications deployed in the sandbox test environment.
[0016] Preferably, the basic online information is an online operation document published by a user, and the online operation document is configured and parsed to obtain parsed information, wherein the parsed information includes the configuration and database script corresponding to the online operation document.
[0017] The present invention also proposes a container-based sandbox environment management and configuration automatic synchronization system, including:
[0018] The iteration management module is used to create an iteration page, where the user fills in the project-related information on the iteration page and determines the environment code based on the project-related information; when closing the iteration page, click on the project successfully launched on the iteration page, fill in the basic online information of the project, and preliminarily recycle the sandbox test environment;
[0019] An environment management module is used to use the environment code as a namespace on the container cluster, create a sandbox test environment according to the namespace, and copy the configuration and application of the baseline environment by accessing the configuration management module;
[0020] Configuration management module, used to save the configuration and application of the benchmark environment;
[0021] The application management module is used to obtain the application of the baseline environment required by the user from the configuration management module, and transmit the application of the baseline environment required by the user to the deployment management module;
[0022] A deployment management module is used to deploy the application of the benchmark environment required by the user in the sandbox test environment, and access the iteration management module to close the iteration page after the deployment is completed;
[0023] A configuration synchronization module is used to deploy the configuration of the benchmark environment required by the user in the sandbox test environment to synchronize the configuration of the sandbox test environment, and after the initial recovery of the sandbox test environment is completed, parse the basic online information to obtain the parsed information, synchronize the parsed information to the benchmark environment, and complete the final recovery of the sandbox test environment.
[0024] Preferably, the environment management module includes an environment management function submodule, an environment replication function submodule and an environment destruction function submodule;
[0025] The environment management function submodule is used to create the sandbox test environment and run the benchmark environment;
[0026] The environment copy function submodule is used to copy configuration and application from the reference environment;
[0027] The environment destruction function submodule is used to uninstall the resources of the sandbox test environment.
[0028] Preferably, the configuration management module includes a configuration management functional submodule, a configuration replication functional submodule and a configuration uninstallation functional submodule;
[0029] The configuration management function submodule is used to create or modify the configuration and application of the baseline environment, save the configuration and application of the baseline environment and the configuration and application deployed in the sandbox test environment;
[0030] Configuration copy function submodule, used to copy and generate new configuration in the saved configuration;
[0031] The configuration uninstallation function submodule is used to uninstall the configuration that has been deployed in the sandbox test environment.
[0032] Preferably, the deployment management module includes a deployment service function submodule and an uninstallation service function submodule;
[0033] A deployment function submodule, used to deploy the application of the benchmark environment required by the user in the sandbox test environment;
[0034] The deployment and uninstallation function submodule is used to uninstall applications that have been deployed in the sandbox test environment.
[0035] Preferably, the deployment management module includes a configuration parsing function submodule, a task execution function submodule, and a timing function submodule;
[0036] The parsing function submodule is used to parse the basic online information to obtain parsed information;
[0037] The task execution function submodule is used to trigger the commands required to execute when synchronizing the configuration of the sandbox test environment;
[0038] The timing function submodule is used to periodically back up the baseline configuration from the baseline environment.
[0039] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0040] The present invention proposes a container-based sandbox environment management and configuration automatic synchronization method and system. First, in the early stage of a project, by using environment coding as a namespace on a container cluster, the namespace is used as an identifier of an isolated environment when creating a sandbox test environment to solve the problem of environmental independence. Developers use the sandbox test environment of the container to quickly and automatically build a development environment, which allows developers to work in the same environment, reduce manual operations, maintain consistency with a benchmark environment, avoid problems caused by inconsistent development environments, and improve development efficiency and code quality; then in the testing phase, testers use a sandbox test environment that is consistent with the benchmark environment to perform unit testing, integration testing, and system testing to ensure that the sandbox test environment is consistent with the benchmark environment, thereby better discovering and repairing software defects, improving software quality and stability, and reducing testing and operation costs; finally, at the end of the project, the basic online information is parsed to obtain parsed information, and the parsed information is synchronized to the benchmark environment to ensure the accuracy and timeliness of the benchmark environment and reduce failures in the development process. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flow chart showing a container-based sandbox environment management and configuration automatic synchronization method proposed in an embodiment of the present invention;
[0042] Figure 2 The effect diagram of the online operation document directory hierarchy of the read proposed by the embodiment of the present invention is as follows:
[0043] Figure 3A block diagram of a container-based sandbox environment management and configuration automatic synchronization system proposed in an embodiment of the present invention is shown;
[0044] Figure 4 A working principle diagram of a container-based sandbox environment management and configuration automatic synchronization system proposed in an embodiment of the present invention is shown;
[0045] Figure 5 A diagram showing a first operation interface proposed in an embodiment of the present invention;
[0046] Figure 6 A diagram showing a second operation interface proposed in an embodiment of the present invention;
[0047] Figure 7 A diagram showing a third operation interface proposed in an embodiment of the present invention;
[0048] Figure 8 A fourth operation interface diagram proposed in an embodiment of the present invention is shown;
[0049] Fig. 9 It shows the fifth operation interface diagram proposed in the embodiment of the present invention. DETAILED DESCRIPTION
[0050] The accompanying drawings are only used for illustrative purposes and are not to be construed as limiting the present application;
[0051] It is understandable to those skilled in the art that some well-known contents may be omitted in the drawings;
[0052] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0053] Example 1
[0054] like Figure 1 As shown, this embodiment proposes a container-based sandbox environment management and configuration automatic synchronization method, including the following steps:
[0055] S1. The user fills in the project-related information on the iteration page and determines the environment code based on the project-related information;
[0056] In S1, the project related information includes the project name, project launch time and project management personnel, and the pinyin of the project name is used as the environment code;
[0057] S2. Use the environment code as a namespace on the container cluster and create a sandbox test environment based on the namespace;
[0058] S3. Deploy the configuration and application copied from the baseline environment in the sandbox test environment;
[0059] In S3, the configuration copied from the reference environment and deployed in the sandbox test environment is the latest published configuration, and the application copied from the reference environment and deployed in the sandbox test environment is the latest published version of the application.
[0060] S4. After the deployment is completed, click on the project to be successfully launched on the iteration page, publish the basic launch information of the project, and preliminarily recover the sandbox test environment;
[0061] In S4, the preliminary recovery of the sandbox test environment includes: preliminary recovery of the resources of the sandbox test environment by uninstalling the configuration and application deployed in the sandbox test environment.
[0062] S5. After the initial recovery of the sandbox test environment is completed, the basic online information is parsed to obtain parsed information, and the parsed information is synchronized to the benchmark environment to complete the final recovery of the sandbox test environment.
[0063] In S5, the basic online information is the online operation document published by the user, and the online operation document is configured and parsed to obtain parsed information, which includes the configuration and database script corresponding to the online operation document. Among them, the online operation document contains iteration information, project information, online applications, configuration and scripts of online applications, and steps that operation and maintenance personnel need to perform when going online. The configuration parsing function captures the configuration and script of the online application in the online document, saves it to the configuration management module, and waits for the configuration synchronization tool to synchronize. The specific configuration parsing process of the online operation document includes:
[0064] 1) Based on the current iteration name condition, the interface of the online operation document is called through the network, or the online operation file information of the current iteration (the online operation document contains iteration information, project information, online applications, configuration and scripts of online applications, and steps that operation and maintenance personnel need to perform when going online. The configuration parsing function captures the configuration and scripts of online applications in the online document);
[0065] 2) Obtain the online operation file information, traverse the file directory information, and find the directory name at the database script level;
[0066] 3) Read the files in the current database script directory, and generate the executed SQL format files in sequence according to DDL, DML, and DCL through file streaming;
[0067] 4) Get the online operation file information and traverse the file directory information, see Figure 2 , find the name of the directory at the configuration file level;
[0068] 5) Read the files in the current configuration file directory and generate executable YAML format files in turn;
[0069] 6) According to the SQL files and YAML files obtained in steps 3 and 5, transfer these files to the specified machine through network transmission;
[0070] 7) Execute the SQL script commands on the machines in step 6 in sequence;
[0071] 8) Complete SQL synchronization;
[0072] In this embodiment, first, in the early stage of the project, by using the environment code as the namespace on the container cluster, the namespace is used as the identifier of the isolated environment when creating the sandbox test environment to solve the problem of environment independence. Developers use the sandbox test environment of the container to quickly and automatically build the development environment, which allows developers to work in the same environment, reduce manual operations, maintain consistency with the benchmark environment, avoid problems caused by inconsistent development environments, and improve development efficiency and code quality; then in the testing phase, testers use the sandbox test environment that is consistent with the benchmark environment to perform unit testing, integration testing, and system testing to ensure that the sandbox test environment is consistent with the benchmark environment, so as to better discover and repair software defects, improve software quality and stability, and reduce testing and operation costs; finally, at the end of the project, the basic online information is parsed to obtain parsed information, and the parsed information is synchronized to the benchmark environment to ensure the accuracy and timeliness of the benchmark environment and reduce failures in the development process.
[0073] Example 2
[0074] See also Figure 3 and Figure 4 This embodiment proposes a container-based sandbox environment management and configuration automatic synchronization system, including:
[0075] Iteration management module, used to create iteration pages, see Figure 5 , the user fills in the project related information on the iteration page, and determines the environment code based on the project related information; when closing the iteration page, clicks on the project successfully launched on the iteration page, fills in the basic online information of the project, and preliminarily recycles the sandbox test environment;
[0076] The created iteration page can be viewed in the iteration list. When the user needs to close the iteration page, enter from the iteration list and click Go Online to complete it. During the initial recovery of the sandbox test environment, the iteration management module accesses the configuration management module through the program to uninstall the configuration of the test environment, accesses the deployment management module through the program to uninstall the deployed application, and accesses the environment management module through the program to recycle the environment.
[0077] An environment management module is used to use the environment code as a namespace on the container cluster, create a sandbox test environment according to the namespace, and copy the configuration and application of the baseline environment by accessing the configuration management module;
[0078] The namespace is used as an identifier for the isolated environment. The iteration contains the user's online operation documents and is associated with the configuration to be synchronized in the configuration management module.
[0079] The configuration management module is used to save the configuration and applications of the baseline environment; it is also used to save the deployed configuration and applications of the sandbox test environment. The configuration includes the configuration of using the container service name to access other applications. Using the container service name in the same namespace can directly access the corresponding service. The baseline configuration and the sandbox test environment configuration are consistent. If the user needs to change the corresponding configuration, he can also enter the configuration management module to modify it. The synchronized configuration is the latest configuration that has been released, and the user does not need to select the corresponding version of the configuration.
[0080] The application management module is used to obtain the application of the baseline environment required by the user from the configuration management module, and transmit the application of the baseline environment required by the user to the deployment management module;
[0081] The deployment management module is used to deploy the applications of the benchmark environment required by the user in the sandbox test environment. The applications include database middleware, redis, nginx, rabbitmq, etc. Redis represents a data structure server, which is used to store temporary data in the sandbox test environment, improve application performance as a cache layer, or implement complex functions such as message queues and distributed locks; nginx is a high-performance HTTP and reverse proxy server. In the sandbox test environment, Nginx is usually used as a static resource server, load balancer or API gateway to help distribute and forward requests to the backend application server; RabbitMQ is an open source message broker and queue server. In the sandbox test environment, RabbitMQ is used to implement asynchronous communication between applications, decouple services, and improve the scalability and fault tolerance of the system; the version of the deployed application is the latest released version, and the user does not need to select the version. After the deployment is completed, the domain name provided by the container can be used to access the corresponding sandbox test environment; after the deployment is completed, access the iteration management module to close the iteration page;
[0082] The configuration synchronization module is used to deploy the configuration of the baseline environment required by the user in the sandbox test environment to synchronize the configuration of the sandbox test environment, and after the initial recovery of the sandbox test environment is completed, parse the basic online information to obtain the parsed information, synchronize the parsed information to the baseline environment, and complete the final recovery of the sandbox test environment. Among them, the online operation document contains iteration information, project information, online applications, configuration and scripts of online applications, and steps that operation and maintenance personnel need to perform when going online. The configuration parsing function captures the configuration and scripts of online applications in the online document, saves them to the configuration management module, and waits for the configuration synchronization tool to synchronize.
[0083] Here, users use the iteration management module to manage iterations that need to be released and associated environments, create iteration pages, save project-related information on iteration pages, and online operation documents, and configurations that need to be synchronized to the baseline environment; users use the environment management module to manage the sandbox test environment and baseline environment within the system. The sandbox test environment is the environment used by users. The baseline environment is updated with the iteration release of the project and keeps the latest progress. The baseline environment and sandbox test environment include deployed applications and configurations. The baseline environment and sandbox test environment are created and run on a container cluster, and the container namespace is used to keep the environment independent. The sandbox test environment is an environment used by testers for the purpose of testing requirements. The baseline environment is an independent environment that keeps the latest code, configuration, and data. Other environments are used in this way. The deployed configurations in the sandbox test environment and the benchmark environment are copied out; users manage the deployed configurations in the sandbox test environment and the benchmark environment through the configuration management module, which not only saves the application configurations in the benchmark environment and the sandbox test environment, but also saves the configurations released by users when the iteration is launched; users manage the applications in the project through the application management module, which saves the application code and related properties, including the managers, groups, and related descriptions; users manage the applications deployed in the sandbox test environment through the deployment management module, and the deployed applications are based on containerization and deployed in the container cluster; users synchronize the configurations and data of the benchmark environment and the sandbox test environment through the configuration synchronization module. When users start iteration, they synchronize the configurations from the benchmark environment to the sandbox test environment created by the users. When users close iteration, they synchronize the configurations in the online operation documents written by the users to the benchmark environment.
[0084] In this embodiment, first, in the early stage of the project, the environment code is determined by using the iteration management module. The environment management module uses the environment code as a namespace on the container cluster and uses the namespace as an identifier of the isolated environment when creating the sandbox test environment to solve the problem of environment independence. Developers use the sandbox test environment of the container to quickly and automatically build the development environment, which allows developers to work in the same environment, reduce manual operations, maintain consistency with the benchmark environment, avoid problems caused by inconsistent development environments, and improve development efficiency and code quality; then in the testing phase, the application management module obtains the application of the benchmark environment required by the user from the configuration management module, and deploys the application of the benchmark environment required by the user in the sandbox test environment through the deployment management module, so that testers can use the sandbox test environment that is consistent with the benchmark environment to perform unit testing, integration testing and system testing, ensuring that the sandbox test environment is consistent with the benchmark environment, so as to better discover and repair software defects, improve the quality and stability of the software, and reduce the cost of testing and operation and maintenance; finally, at the end of the project, the basic online information is parsed to obtain parsed information, and the parsed information is synchronized to the benchmark environment to ensure the accuracy and timeliness of the benchmark environment and reduce failures in the development process.
[0085] Example 3
[0086] The environment management module includes an environment management function submodule, an environment replication function submodule and an environment destruction function submodule;
[0087] The environment management function submodule is used to create the sandbox test environment, run the benchmark environment, and bind the project, sandbox test environment and benchmark environment;
[0088] The environment copy function submodule is used to copy configurations and applications from the reference environment, thereby creating a new environment, which is a sandbox test environment created based on the reference environment.
[0089] The environment destruction function submodule is used to recycle resources and uninstall the resources of the sandbox test environment as the user project life cycle ends.
[0090] The configuration management module includes a configuration management function submodule, a configuration replication function submodule and a configuration uninstallation function submodule;
[0091] The configuration management function submodule is used to create or modify the configuration and application of the benchmark environment, save the configuration and application of the benchmark environment and the configuration and application deployed in the sandbox test environment; the configuration includes yaml configuration and database, and also saves the data scripts and configurations published by users.
[0092] The configuration copy function submodule is used to copy and generate a new configuration in the saved configuration. The new configuration includes the function of synchronizing the published changed configuration to other configurations. The new configuration can be copied and modified independently.
[0093] The configuration uninstallation function submodule is used to uninstall the configuration that has been deployed in the sandbox test environment.
[0094] The application management module includes:
[0095] The application management function submodule is used to create and modify applications, and save the relevant attributes of the application, including the manager, group, and related descriptions.
[0096] The application uninstallation function submodule is used to uninstall the application created from the application management function submodule.
[0097] The deployment management module includes a deployment service function submodule and an uninstallation service function submodule;
[0098] A deployment function submodule, used to deploy the application of the benchmark environment required by the user in the sandbox test environment;
[0099] The deployment and uninstallation function submodule is used to uninstall applications that have been deployed in the sandbox test environment.
[0100] The deployment management module includes a configuration parsing function submodule, a task execution function submodule, and a timing function submodule;
[0101] The parsing function submodule parses the basic online information to obtain parsing information. The specific operation is: parse the online operation document published by the user to obtain parsing information, and the parsing information is the configuration required for the online operation document.
[0102] The task execution function submodule is used to trigger the commands required to execute when synchronizing the configuration of the sandbox test environment; the commands include commands for creating and destroying the namespace of the container cluster, commands for creating, copying and destroying configurations, commands for deploying applications to the sandbox test environment in the container cluster, commands for updating the application version, and commands for parsing the required configuration from the online operation documents released by the user.
[0103] The timing function submodule is used to periodically back up the baseline configuration from the baseline environment.
[0104] Example 4
[0105] This embodiment proposes an application method of a container-based sandbox environment management and configuration automatic synchronization system, including the following steps:
[0106] 1) The user creates an iteration page and fills in the project-related information on the iteration page. The user publishes the address of the online operation document. The operation interface is as follows: Figure 5 .
[0107] 2) The program executes on the container cluster using the environment code as the namespace, creates a sandbox test environment based on the namespace, and uses the pinyin of the iterated project name as the environment code to create the namespace;
[0108] 3) The program executes commands to copy configuration and deploy applications from the baseline environment;
[0109] 4) The program deploys the corresponding applications and configurations in the corresponding container cluster environment, such as the operation interface Figure 6 List of deployed applications and undeployed applications for the sandbox test environment, such as the operation interface Figure 7 A list of configurations that have been copied for this test environment;
[0110] 5) The user project is successfully launched, and the online operation documents including configuration and scripts are released;
[0111] 6) The user executes the close iteration operation, the program executes the command to recycle the sandbox environment resources, and notifies the configuration automatic synchronization module, such as the operation interface Figure 8 This is the page that users need to open when closing an iteration. When the user clicks "Complete Online", the iteration closing process is triggered.
[0112] 7) The configuration automatic synchronization system parses the online documents and synchronizes the published configurations and scripts to the baseline environment, such as the operation interface Fig. 9 The list on the left is the configuration parsed from the configuration automatic synchronization module to the configuration management module.
[0113] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A container-based sandbox environment management and configuration automatic synchronization method, It is characterized in that The following steps are involved: S1. The user fills in the project-related information on the iteration page, and determines the environment code according to the project-related information; wherein the user manages the iterations to be released and launched through the iteration management module, associates the iteration environment, creates an iteration page, and saves the project-related information on the iteration page, wherein the project-related information includes the project name, the project launch time, and the project manager, and determining the environment code according to the project-related information specifically includes: using the pinyin of the project name as the environment code; S2. Use the environment code as a namespace on the container cluster and create a sandbox test environment based on the namespace; the namespace is used as an identifier of the isolated environment, and the iteration includes the user's online operation document and is associated with the configuration to be released and synchronized in the configuration management module; S3. Deploy the configuration and application copied from the benchmark environment in the sandbox test environment; wherein the configuration copied from the benchmark environment deployed in the sandbox test environment is the latest configuration that has been released; the application copied from the benchmark environment deployed in the sandbox test environment is the latest published version of the application, and the user does not need to select the version. After the deployment is completed, the domain name provided by the container is used to access the corresponding sandbox test environment; the user manages the sandbox test environment and the benchmark environment in the system through the environment management module, maintains the latest progress version, and the benchmark environment and the sandbox test environment are created and run on the container cluster; S4. After the deployment is completed, click on the project to be successfully launched on the iteration page, publish the basic launch information of the project, and preliminarily recycle the sandbox test environment, including: preliminarily recycle the resources of the sandbox test environment by uninstalling the deployed configuration and application operations of the sandbox test environment; when the user closes the iteration, synchronize the configuration in the online operation document written by the user to the baseline environment; S5. After the initial recovery of the sandbox test environment is completed, the basic online information is parsed to obtain parsed information, and the parsed information is synchronized to the benchmark environment to complete the final recovery of the sandbox test environment; wherein, the basic online information is an online operation document published by the user, and the online operation document contains iteration information, project information, online applications, configuration and scripts of online applications, and steps required to be performed by operation and maintenance personnel when going online. The online operation document is configured and parsed to obtain parsed information, and the parsed information includes the configuration and database script corresponding to the online operation document; the specific configuration parsing process of the online operation document includes: 1) Call the interface of the online operation document through the network according to the current iteration name condition, or the online operation file information of the current iteration; 2) Obtain the online operation file information, traverse the file directory information, and find the directory name at the database script level; 3) Read the files in the current database script directory, and generate the executed SQL format files in sequence according to DDL, DML, and DCL through file streaming; 4) Obtain the online operation file information, traverse the file directory information, and find the name of the configuration file level directory; 5) Read the files in the current configuration file directory and generate executable YAML format files in turn; 6) According to the SQL format file obtained in step 3) and the YAML format file obtained in step 5), the SQL format file and the YAML format file are transmitted to the designated machine through the network transmission method; 7) Execute the SQL script commands on the machines specified in step 6) in sequence; 8) Complete SQL synchronization.
2. A container-based sandbox environment management and configuration automatic synchronization system, It is characterized in that include: The iteration management module is used to create an iteration page, and the user fills in the project-related information on the iteration page, and determines the environment code according to the project-related information; wherein, the user manages the iterations that need to be released and launched through the iteration management module, and the iteration-associated environment saves the project-related information of the iteration page, and the project-related information includes the project name, the project launch time and the project management personnel, and the environment code is determined according to the project-related information, specifically including: using the pinyin of the project name as the environment code; when closing the iteration page, click on the project successfully launched on the iteration page, fill in the basic launch information of the project, and preliminarily recycle the sandbox test environment, including: preliminarily recycle the resources of the sandbox test environment by uninstalling the deployed configuration and application operations of the sandbox test environment; when the user closes the iteration, the configuration in the online operation document written by the user is synchronized to the baseline environment; The environment management module is used to use the environment code as a namespace on the container cluster, create a sandbox test environment according to the namespace, and copy the configuration and application of the baseline environment by accessing the configuration management module; the namespace is used as the identifier of the isolated environment, and the iteration contains the user's online operation document and is associated with the configuration to be released and synchronized in the configuration management module; Configuration management module, used to save the configuration and application of the benchmark environment; The application management module is used to obtain the application of the baseline environment required by the user from the configuration management module, and transmit the application of the baseline environment required by the user to the deployment management module; A deployment management module is used to deploy the application of the benchmark environment required by the user in the sandbox test environment, and access the iteration management module to close the iteration page after the deployment is completed; wherein the configuration copied from the benchmark environment deployed in the sandbox test environment is the latest configuration that has been released; the application copied from the benchmark environment deployed in the sandbox test environment is the latest published version of the application, and the user does not need to select a version. After the deployment is completed, the domain name provided by the container is used to access the corresponding sandbox test environment; the user manages the sandbox test environment and the benchmark environment in the system through the environment management module, and maintains the latest progress version. The benchmark environment and the sandbox test environment are created and run on the container cluster; The configuration synchronization module is used to deploy the configuration of the benchmark environment required by the user in the sandbox test environment to synchronize the configuration of the sandbox test environment, and after the initial recovery of the sandbox test environment is completed, parse the basic online information to obtain the parsed information, synchronize the parsed information to the benchmark environment, and complete the final recovery of the sandbox test environment, wherein the basic online information is the online operation document released by the user, and the online operation document contains iteration information, project information, online applications, configuration and scripts of online applications, and steps that operation and maintenance personnel need to perform when going online. The online operation document is configured and parsed to obtain parsed information, and the parsed information includes the configuration and database script corresponding to the online operation document; the specific configuration parsing process of the online operation document includes: 1) Call the interface of the online operation document through the network according to the current iteration name condition, or the online operation file information of the current iteration; 2) Obtain the online operation file information, traverse the file directory information, and find the directory name at the database script level; 3) Read the files in the current database script directory, and generate the executed SQL format files in sequence according to DDL, DML, and DCL through file streaming; 4) Obtain the online operation file information, traverse the file directory information, and find the name of the configuration file level directory; 5) Read the files in the current configuration file directory and generate executable YAML format files in turn; 6) According to the SQL format file obtained in step 3) and the YAML format file obtained in step 5), the SQL format file and the YAML format file are transmitted to the designated machine through the network transmission method; 7) Execute the SQL script commands on the machines specified in step 6) in sequence; 8) Complete SQL synchronization.
3. The container-based sandbox environment management and configuration automatic synchronization system according to claim 2, It is characterized in that The environment management module includes an environment management function submodule, an environment replication function submodule and an environment destruction function submodule; The environment management function submodule is used to create the sandbox test environment and run the benchmark environment; The environment copy function submodule is used to copy configuration and application from the reference environment; The environment destruction function submodule is used to uninstall the resources of the sandbox test environment.
4. The container-based sandbox environment management and configuration automatic synchronization system according to claim 2, It is characterized in that The configuration management module includes a configuration management function submodule, a configuration replication function submodule and a configuration uninstallation function submodule; The configuration management function submodule is used to create or modify the configuration and application of the baseline environment, save the configuration and application of the baseline environment and the configuration and application deployed in the sandbox test environment; Configuration copy function submodule, used to copy and generate new configuration in the saved configuration; The configuration uninstallation function submodule is used to uninstall the configuration that has been deployed in the sandbox test environment.
