The following article highlights a speech entitled How to Implement Continuous Application Release by Xiaoping Lin (an Alibaba Cloud Elastic Computing Technical Expert). This article is divided into four parts:
We often encounter many problems during release:
It is hoped that in continuous release, we can implement multi-person development, simple deployment, a stable environment, continuous and automatic verification, rapid iteration of features, and support for setting the release mode to ensure stable features. When a problem occurs during the release, it can quickly roll back to a stable version and offer feedback on the problem.
Metrics often directly affect team behavior. If the number of lines of code is selected as an indicator for developers, developers will not write concise codes for performance. This phenomenon is called the Hawthorne effect.
Cycle time is recommended as a metric during delivery. Cycle time refers to the period from the start of development to the final delivery.
For example, during resource preparation, the cycle time for resource preparation is the period from the start of environmental resource preparation to the time when the environment is fully available. Now, on the cloud, after applying for the budget, it can be bought directly online, shortening the resource procurement cycle.
Release performance is the period from functional development verification and preparation for release to delivery to customers. It includes the release preparation time, configuration time of the release environment, canary release time, and speed of releasing feedback.
The entire process must be automatized to shorten the cycle time. From aspects of construction, deployment, testing, and release, the environment, software packages, network configuration, infrastructure, and external services are all included in version management.
When releasing applications, we need to prepare the runtime environment for the software and configure the required infrastructure and external service dependencies. Software delivery can be completed by running the software into the installation environment and configuring the required data and state.
In terms of version management, items include requirements documents, test scripts, automation use cases, network configuration, database creation, upgrade, initialization, and rollback. All of them require version management.
Beyond that, the team needs to reach an agreement. During the continuous release process, the team must follow the release specifications and continuously improve the process to ensure that risks are manageable.
Next, let's talk about continuous release. In terms of environment preparation, enter template input and use existing or custom templates to describe the cloud environment. Configure parameters to implement automated deployment. Finally, check the deployment status of each resource and perform subsequent management.
This resource preparation process applies to enterprises that migrate to the cloud quickly or deploy in batches on demand. Applications require rapid replication of resources and use existing resources to build applications quickly.
We need to package and upload the code package that provides services to OSS for continuous construction. Users can pull the corresponding software package by entering relevant environmental parameters. Then, pull the corresponding package information to ECS through O&M orchestration. Cloud Assistant starts the application by executing the corresponding deployment script to provide external services.
When the service continues to expand, and the machine cannot support the service, we can use auto scaling to provide machine expansion quickly, thus realizing automated deployment.
Continuous release upgrades are mainly based on auto scaling rolling. First, disable the scaling activity and group the instances to let them into the standby state. The corresponding instance does not provide external services during the release process. After the release is completed, the instance exits the standby mode and provides external services.
Rolling upgrade is suitable for canary release, blue-green release, and batch release. Create a software package in O&M Orchestration. We have created a scaling group and added ECS instances. Execute a rolling update task.
Next, let's talk about the principles of the continuous release process. Application release is a low-risk, frequent, low-cost, rapid, and predictable process.
In this process, script, version, replay, and feedback are basic requirements. In terms of automation, it is important to implement automated deployment, testing, and feedback.
In terms of management, we must improve version, dependency, environment, and configuration management to realize fast rollback, fast repeated release, and traceability. When problems occur, applications can improve continuously, iterate frequently, and offer feedback quickly to shorten the production cycle.
Improving the traceability and observability of lifecycle delivery make the release effective.
As shown in the preceding figure, continuously released related services mainly include cloud migration, environment preparation, code construction, automated deployment, and continuous release.
In terms of environment preparation, we can prepare the environment with cloud resources (such as ROS, Terraform, ECS, ACS, and OSS). When building codes, we can use ACMS and ERDC Cloud DevOps to perform application configuration management.
For automated deployment, EDAS or OSS can be used to deploy and build. In terms of continuous release, RDC Cloud DevOps can be used to customize the deployment pipeline, and auto scaling can be used to perform the continuous release.
Q1: The Hawthorne effect is a type of reactivity in which individuals modify an aspect of their behavior in response to their awareness of being observed. Can we avoid this situation after automation on the cloud?
A1: We need to determine which measurement method is better for continuous releasing. Assuming that the metric is a false indicator, the Hawthorne effect will cause biased results. If the metric is credible, the Hawthorne effect will make the metric better.
Q2: Since pipeline deployment involves resource-related, data-related, and control-related issues, how can we efficiently solve the possible problems?
A2: Pipeline deployment is generally deployed in applications. When setting applications, we need to set resource data permissions. In addition, we can strengthen the efficiency using access control service on the cloud.
1,042 posts | 256 followers
FollowAlibaba Developer - November 17, 2021
Alibaba Cloud Community - February 4, 2022
Alibaba Container Service - September 19, 2024
Alibaba Clouder - March 20, 2020
Alibaba Clouder - January 4, 2021
Alibaba Clouder - January 11, 2021
1,042 posts | 256 followers
FollowHigh Performance Computing (HPC) and AI technology helps scientific research institutions to perform viral gene sequencing, conduct new drug research and development, and shorten the research and development cycle.
Learn MoreElastic and secure virtual cloud servers to cater all your cloud hosting needs.
Learn MoreAlibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.
Learn MoreA HPCaaS cloud platform providing an all-in-one high-performance public computing service
Learn MoreMore Posts by Alibaba Cloud Community