How to achieve continuous release of applications
01 Continuous release summary
In the process of publishing, we often encounter many problems:
1. During manual deployment, due to the long publishing time, frequent errors will occur, and the publishing problem needs to be corrected manually;
2. When the environment is decoupled, there is no similar production environment due to the large differences among the environments, which leads to the prominent environmental problems. Due to the unstable environment, it is impossible to judge the online situation during the first deployment;
3. When publishing a cluster, it needs to be modified manually because of the different configurations of each environment. At this time, the configuration of nodes is almost uncontrollable. If the production environment configuration is modified directly, the risk is relatively high;
4. When publishing, there will be multiple development cooperation and frequent updates, and mutual blocking will occur. At this time, the cooperation costs of operation and maintenance, development and testing are very high.
We hope that in the process of continuous release, we can achieve multi-person development, simple deployment, stable environment, continuous automated verification, rapid iteration of functions, support the setting of release mode, and ensure functional stability. When there is a problem during the release, it can quickly roll back to the stable version and quickly feed back the problem.
Measurement often directly affects team behavior. If you select the number of lines of code as the indicator of developers, developers will not write the code very succinctly for the sake of performance. This phenomenon is called Hawthorne effect.
During the delivery process, cycle time can be selected as the measurement. Cycle time refers to the time from the beginning of development to the final delivery.
For example, in resource preparation, the period from the beginning of preparation of environmental resources to the full availability of the environment is the cycle time of resource preparation. Now in the cloud, after you apply for a budget, you can purchase it directly online, greatly shortening the resource procurement cycle.
Release effectiveness refers to the period from functional development verification, preparation for release to delivery to customers. It includes the preparation time of the release, the configuration time of the release environment, the grayscale time, the speed of the release of feedback issues, and so on.
02 Continuous release of construction path
In order to shorten the cycle time, the whole process needs to be automated. The environment, software package, network configuration, infrastructure, external services and other functions are all included in the version management from the construction, deployment, testing, release and other aspects.
When publishing applications, you need to prepare the running environment required by the software, configure the required infrastructure, external service dependencies, etc. Software delivery can be completed by running the software into the installation environment and configuring the required data and status.
In terms of version management, including requirements documents, test scripts, automation cases, network configuration, database creation, upgrade, initialization, rollback, etc., version management is required.
In addition, the team needs to reach consensus. In the process of continuous release, the team should follow the release specification, continuously improve the whole process, and ensure that the risk is controllable.
03 Practice of continuous release on cloud
Next, let's talk about the relevant steps of continuous release. In terms of environment preparation, input templates and use existing templates or customized templates to describe the cloud environment. Any input parameters to perform automated deployment. Finally, check the completion of the deployment of each resource and conduct subsequent management.
This resource preparation process is suitable for enterprises to quickly go to the cloud and deploy in batches on demand. Applications need rapid replication of resources and use existing resources to quickly build applications.
In terms of continuous construction, you need to package and upload the code package that provides services to OSS. The user can pull the corresponding software package by entering the relevant environment parameters. Then, pull the corresponding package information to ECS through operation and maintenance scheduling. The cloud assistant starts the application and provides external services by executing the corresponding deployment script.
When the business continues to expand and the machine cannot support the service, it can quickly provide the expansion and contraction of the machine through elastic scaling to achieve automatic deployment.
In terms of continuous release, it is mainly based on the rolling upgrade of elastic scaling. First, close the expansion and contraction activities, and then group the instances to put them in standby state. The corresponding instance will not provide external services during the publishing process. After publishing, the instance exits the standby mode and provides external services.
Rolling upgrade is suitable for canary release, blue-green release, batch release and other capabilities. Create the software package in the operation and maintenance choreography, create the expansion group and add the ECS instance, and perform the rolling upgrade task.
04 Application continuous release
Next, let's talk about the release principles in the process of continuous release. Application publishing is a low-risk, frequent, low-cost, rapid and predictable process.
In this process, it is necessary to achieve scripting, versioning, replaying and feedback. In terms of automation, we should realize automated deployment, automated testing and automated feedback.
In terms of management, we should improve version management, dependency management, environment management and configuration management. Realize fast rollback, rapid repeated release and traceability. In case of problems, it can continuously improve, iterate frequently, feedback quickly and shorten the production cycle.
Improving the traceability and observability of life cycle delivery can make the release more effective.
As shown in the figure above, the related services for continuous release mainly include cloud, environment preparation, code construction, automatic deployment, and continuous release.
In terms of environment preparation, cloud resource products such as ros, terraform, ecs, acs and oss can be used to prepare the environment. During code construction, application configuration management can be performed through acms and erdc cloud effects.
In terms of automatic deployment, you can deploy and build through edas or OSS. In terms of continuous release, you can customize the deployment pipeline through rdc cloud effect and conduct continuous release through autoscaling.
Q&A link, user question and answer
Q1 Hawthorne effect is due to the fact that the subjects realized that they were being studied, which brought artificial effects. Can we completely avoid this situation after cloud automation?
A: It is necessary to determine which measurement method is better for continuous release. Assuming that the measurement indicator is a wrong indicator, the Hawthorne effect will lead to deviation in the results. If the measurement indicators are credible, the Hawthorne effect will make the indicators better and better.
Q2 is due to the resource related, data related, control related and other related issues involved in pipeline deployment. How to efficiently solve the possible problems?
A: Pipeline deployment is generally deployed in applications. When setting applications, you need to set resource data permissions. In addition, access control capabilities on the cloud can also be used to strengthen.
In the process of publishing, we often encounter many problems:
1. During manual deployment, due to the long publishing time, frequent errors will occur, and the publishing problem needs to be corrected manually;
2. When the environment is decoupled, there is no similar production environment due to the large differences among the environments, which leads to the prominent environmental problems. Due to the unstable environment, it is impossible to judge the online situation during the first deployment;
3. When publishing a cluster, it needs to be modified manually because of the different configurations of each environment. At this time, the configuration of nodes is almost uncontrollable. If the production environment configuration is modified directly, the risk is relatively high;
4. When publishing, there will be multiple development cooperation and frequent updates, and mutual blocking will occur. At this time, the cooperation costs of operation and maintenance, development and testing are very high.
We hope that in the process of continuous release, we can achieve multi-person development, simple deployment, stable environment, continuous automated verification, rapid iteration of functions, support the setting of release mode, and ensure functional stability. When there is a problem during the release, it can quickly roll back to the stable version and quickly feed back the problem.
Measurement often directly affects team behavior. If you select the number of lines of code as the indicator of developers, developers will not write the code very succinctly for the sake of performance. This phenomenon is called Hawthorne effect.
During the delivery process, cycle time can be selected as the measurement. Cycle time refers to the time from the beginning of development to the final delivery.
For example, in resource preparation, the period from the beginning of preparation of environmental resources to the full availability of the environment is the cycle time of resource preparation. Now in the cloud, after you apply for a budget, you can purchase it directly online, greatly shortening the resource procurement cycle.
Release effectiveness refers to the period from functional development verification, preparation for release to delivery to customers. It includes the preparation time of the release, the configuration time of the release environment, the grayscale time, the speed of the release of feedback issues, and so on.
02 Continuous release of construction path
In order to shorten the cycle time, the whole process needs to be automated. The environment, software package, network configuration, infrastructure, external services and other functions are all included in the version management from the construction, deployment, testing, release and other aspects.
When publishing applications, you need to prepare the running environment required by the software, configure the required infrastructure, external service dependencies, etc. Software delivery can be completed by running the software into the installation environment and configuring the required data and status.
In terms of version management, including requirements documents, test scripts, automation cases, network configuration, database creation, upgrade, initialization, rollback, etc., version management is required.
In addition, the team needs to reach consensus. In the process of continuous release, the team should follow the release specification, continuously improve the whole process, and ensure that the risk is controllable.
03 Practice of continuous release on cloud
Next, let's talk about the relevant steps of continuous release. In terms of environment preparation, input templates and use existing templates or customized templates to describe the cloud environment. Any input parameters to perform automated deployment. Finally, check the completion of the deployment of each resource and conduct subsequent management.
This resource preparation process is suitable for enterprises to quickly go to the cloud and deploy in batches on demand. Applications need rapid replication of resources and use existing resources to quickly build applications.
In terms of continuous construction, you need to package and upload the code package that provides services to OSS. The user can pull the corresponding software package by entering the relevant environment parameters. Then, pull the corresponding package information to ECS through operation and maintenance scheduling. The cloud assistant starts the application and provides external services by executing the corresponding deployment script.
When the business continues to expand and the machine cannot support the service, it can quickly provide the expansion and contraction of the machine through elastic scaling to achieve automatic deployment.
In terms of continuous release, it is mainly based on the rolling upgrade of elastic scaling. First, close the expansion and contraction activities, and then group the instances to put them in standby state. The corresponding instance will not provide external services during the publishing process. After publishing, the instance exits the standby mode and provides external services.
Rolling upgrade is suitable for canary release, blue-green release, batch release and other capabilities. Create the software package in the operation and maintenance choreography, create the expansion group and add the ECS instance, and perform the rolling upgrade task.
04 Application continuous release
Next, let's talk about the release principles in the process of continuous release. Application publishing is a low-risk, frequent, low-cost, rapid and predictable process.
In this process, it is necessary to achieve scripting, versioning, replaying and feedback. In terms of automation, we should realize automated deployment, automated testing and automated feedback.
In terms of management, we should improve version management, dependency management, environment management and configuration management. Realize fast rollback, rapid repeated release and traceability. In case of problems, it can continuously improve, iterate frequently, feedback quickly and shorten the production cycle.
Improving the traceability and observability of life cycle delivery can make the release more effective.
As shown in the figure above, the related services for continuous release mainly include cloud, environment preparation, code construction, automatic deployment, and continuous release.
In terms of environment preparation, cloud resource products such as ros, terraform, ecs, acs and oss can be used to prepare the environment. During code construction, application configuration management can be performed through acms and erdc cloud effects.
In terms of automatic deployment, you can deploy and build through edas or OSS. In terms of continuous release, you can customize the deployment pipeline through rdc cloud effect and conduct continuous release through autoscaling.
Q&A link, user question and answer
Q1 Hawthorne effect is due to the fact that the subjects realized that they were being studied, which brought artificial effects. Can we completely avoid this situation after cloud automation?
A: It is necessary to determine which measurement method is better for continuous release. Assuming that the measurement indicator is a wrong indicator, the Hawthorne effect will lead to deviation in the results. If the measurement indicators are credible, the Hawthorne effect will make the indicators better and better.
Q2 is due to the resource related, data related, control related and other related issues involved in pipeline deployment. How to efficiently solve the possible problems?
A: Pipeline deployment is generally deployed in applications. When setting applications, you need to set resource data permissions. In addition, access control capabilities on the cloud can also be used to strengthen.
Related Articles
-
A detailed explanation of Hadoop core architecture HDFS
Knowledge Base Team
-
What Does IOT Mean
Knowledge Base Team
-
6 Optional Technologies for Data Storage
Knowledge Base Team
-
What Is Blockchain Technology
Knowledge Base Team
Explore More Special Offers
-
Short Message Service(SMS) & Mail Service
50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00