DevOps construction process-taking container cloud project as an example
From the perspective of enterprise user container cloud construction needs, the relationship between container cloud construction and DevOps is very strong. DevOps requires integration of development, testing, operation and maintenance to achieve the goals of agile development, agile deployment and agile production. DevOps, from planning, coding, construction, testing, release, deployment, and operation and monitoring, is to close the wall between the agile development department and the operation and maintenance department to form a closed loop.
Through the overall consideration of container cloud solutions and microservice architecture, DevOps is divided into the following processes
Continuous integration: The code developed by the developer is delivered to the entire part of the software, and integration is frequently performed to quickly find problems.
Continuous delivery: Deploy the tested code to the "class production environment" on the integrated code.
Continuous deployment: The delivered code is automatically deployed to the production environment after passing the review.
Continuous monitoring: Through professional monitoring software (such as Prometheus, etc.), according to the previously set monitoring strategy, monitor the operation of business applications and system platforms to form monitoring reports and monitoring displays.
Continuous feedback: Perform data analysis based on the results of monitoring, and provide suggested solutions, such as application-specific monitoring, and the ability to elastically scale applications.
Continuous improvement: Based on the feedback, start a new improvement planning process.
When building
DevOps, it is important to consider the following points:
CI / CD DevOps based on WinGarden container
Through constructing CI / CD-based DevOps based on containers, and through continuous integration / continuous delivery, consider implementing processes such as planning process automation, resource selection automation, code quality control automation, and construction automation. With the help of the corresponding tool chain, we can improve the responsiveness to business needs and agile development capabilities:
In the automation of resource selection, it can be combined with the existing IaaS resource layer of the enterprise to realize the automation of resource application. The container or microservice can be deployed on the docking cloud platform. It can also be combined with the multi-tenant capability of the cloud platform to achieve resource isolation. When the application is deployed, it is automatically selected in its project group or designated resource pool.
Code quality control automation. After the developers have finished writing, they submit to SVN or Git, check the code bugs by integrating findbugs in Jenkins, and implement automatic code quality inspection with the help of tools such as Sonar.
After building automation, the image is built after the container cloud is adopted. After the code review is complete, the build process is automatically started. You can use Jenkins-based tools to support the creation of multiple pipelines, such as Maven projects, multiple Stage Docker projects, and traditional
Docker projects. It can integrate many tools such as SVN or Git, Sonar, Maven, etc. It is a very convenient way to build automation.
After the image is built, upload it to the image warehouse. The development work has come to an end, you need to prepare a test environment for testing. If the test is completed without problems, it can be automatically delivered to the production mirror warehouse.
Container-based continuous delivery team collaboration
Enterprise developers only need to pay attention to the core code level, and the subsequent testing, building, integration, deployment and other processes can be automated by the WinGarden platform. The WinGarden platform recognizes and controls the version through the mirror tag, and realizes grayscale release and rollback.
In container-based continuous delivery practices, images are passed between people with different functions.
Developer: Frequent submission of continuous integration, through continuous compilation, packaging, testing, image construction, automated acceptance testing and other links, to generate a list of testable candidate images.
Tester: From the list of candidate test images, select the target image to be tested, mark it as the test version, and automatically deploy the image to be tested to the acceptance test environment, complete the manual exploratory test, and mark the pre-released image as tested version.
Operation and maintenance personnel: Select the image from the pre-release image list to deploy to the pre-release environment, and mark it as the release version after verification and release to the production environment.
Ability to continuously monitor and centrally analyze
Logs and monitoring are important basic capabilities to determine whether the operation is normal during business operations. Continuous monitoring is to realize the health check capabilities at all levels of the platform, including the infrastructure layer, platform layer, and application layer. The infrastructure layer is the so-called IaaS layer, which includes storage, network, computing resources, etc .; the platform layer is the capabilities of the container cloud platform, such as Docker engine, container orchestration and scheduling, service discovery, load balancing, etc .; the application layer needs to implement the application Monitor and check the progress, use of resources, network traffic, etc. and collect logs. Continuous monitoring is the automation of log collection and health check monitoring.
For the infrastructure layer, not only can unified monitoring and display of computing, storage, and network resources, but also unified monitoring and management of applications such as databases and middleware. The WinGarden container cloud is based on the industry's most advanced Prometheus solution, which provides comprehensive monitoring of containers and applications, provides user-defined personalized monitoring views, and supports alarm methods such as email and SMS. The service is automatically automated through pre-designed monitoring strategies Telescopic. Log collection and analysis is based on the industry's most advanced EFK solution, enabling dual collection of system logs and container logs.
Through the centralized monitoring and pre-alarm capabilities of the infrastructure layer, platform layer and application layer, the application service can be improved, the full life cycle management of business applications can be achieved, and automation can be achieved at all stages to improve efficiency and responsiveness. .