Cloud Stream Database Continuous Integration

1. Introduction to Devops

DevOps is a complete workflow for IT operation and maintenance, based on IT automation and continuous integration ( CI ), continuous deployment ( CD ), to optimize all aspects of program development, testing, system operation and maintenance. Think of DevOps as the intersection of development (software engineering), technical operations, and quality assurance ( QA ).   

CI Continuous Integration : Developers will frequently commit code to the trunk, and these new commits need to go through a compilation and automated test flow for verification before they are finally merged into the trunk. Continuous Integration ( CI ) is the process of automatically detecting, pulling, building and (in most cases) unit testing after source code changes. The goal of continuous integration is to quickly ensure that newly committed changes by developers are good and suitable for further use in the codebase. The process execution and theoretical practice of CI allows us to determine whether the new code and the old code are properly integrated.

CD generally includes Continuous Delivery Continuous Delivery and Continuous Deployment Continuous Deployment .

Continuous Delivery refers to  the automated process of building and unit testing and integration testing in CI , which automatically releases the verified code to the repository. For an efficient continuous delivery process, it is important to ensure that CI is built into the development pipeline. The goal of continuous delivery is to have a codebase that is ready to deploy to production.   

Continuous deployment refers to an extension of automatically releasing production-ready builds to code repositories. Continuous deployment can automatically release applications to production.

 

2. Continuous Integration of Yunxi Database

 Operating platform

Inspur cloud software development service provides developers with DevOps -related cloud services, and realizes R&D tool support and one-stop service for the whole process from " development- > test- > release- > operation and maintenance " . The service is ready to use, and functions such as code hosting, code quality control, pipeline management, code compilation, image construction, application deployment, testing, and release can be implemented in the cloud anytime, anywhere. It is convenient for developers to build and deliver products quickly and reliably, and closely link development and operation and maintenance work.

At present, Yunxi Database has created a pipeline based on Inspur cloud software development service, which connects the links in the process of continuous integration and continuous release, and realizes the process from code development, quality inspection, compilation and construction, application deployment, application testing to product release and delivery. Through, the pipeline is automatically executed according to user-defined processes and tasks, and the execution progress / results / reports / logs of the pipeline can be viewed at any time. The application of the pipeline has passed the automated construction (including compilation, deployment, and automated testing) through the submission of each member. ) to verify that integration errors are detected as early as possible. Shorten the delivery cycle and improve the delivery efficiency.

Yunxi Database Pipeline

                          

 

 

Main tools : gitlab , docker , Kubernetes , benchmarksql , system test automation test tool (written based on python ), jepsen test tool (based on open source jepsen test tool adaptation), fatigue test tool, scenario test tool ( written based on Python 

Main items : This pipeline includes code semantic checking, compilation, unit testing, integration testing, system testing, conformance testing, fatigue testing, scenario testing and deployment.

Semantic check : Start the container by executing the script in the source package and call it for semantic testing.

Compile : Start the container to compile by executing the script in the source package.

Unit testing : Start the container for unit testing by executing the script in the source package.

Integration testing : Start the container for integration testing by executing the script in the source package.

System test : execute the command to use the compiled binary file to start a 3 -node database cluster; call the automated test script to perform system test on the deployed cluster , and generate a test report in HTML format after the test is completed;

Conformance test:

    1 ) Restart a 3 - node cluster, use benchmarksql to perform a TPCC test with 1000 warehouses and 3000 concurrent for 3 hours , check the consistency result every half an hour, if the check fails, the program exits; the test time defaults to 3 hours, which can be passed command line parameters Custom settings, the test data uses the backup store by default, and the data can be reloaded through command line parameters.

    2 ) Package the compiled binary file into the container, start 6 containers, 1 as the control node and 5 as the data node; execute the jepsen test tool test script to execute the consistency test; Access detailed test results via browser.

Fatigue test : Send a large number of database access requests to the database for a long time by executing the automated test program to verify the reliability of the database system operation, generate html test reports for key indicators, and email alarm notifications when a certain indicator exceeds the threshold.

Scenario testing : It is mainly aimed at the different requirements of the database in the application scenarios of the database in different industries. The database is tested in a targeted manner, and the scenario automated test program is executed to load the test data of each application scenario for testing.

Deployment : Execute the pipeline script to package the compiled binary into the image and push it to the image repository. The binary package is deployed to the kubernetes test environment and pre-release environment through HELM , and the tester performs further testing work.

{{o.name}}
{{m.name}}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324120822&siteId=291194637