×
Community Blog How to Enable the Continuous Release of Applications

How to Enable the Continuous Release of Applications

This article discusses continuous release, including construction paths and practices on the cloud.

By Alibaba Cloud ECS

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:

  1. A Summary of Continuous Release
  2. Construction Paths of Continuous Release
  3. Continuous Release Practices on the Cloud
  4. Continuous Release of Applications

A Summary of Continuous Release

1

We often encounter many problems during release:

  1. Due to the long release time, errors will frequently occur during manual deployment, and the release problem needs to be corrected manually.
  2. Due to the large differences in various environments, there is no similar production environment, resulting in prominent environmental problems. Due to the unstable environment, it is impossible to judge the online situation in the first deployment.
  3. When the cluster is released, we need to modify the configurations of each environment manually since the environment of these clusters is different from each other. As such, the configuration nodes are almost uncontrollable. If the production environment configuration is modified, the risk is high.
  4. When multiple development collaborations and frequent updates occur during the release, mutual blocking occurs. As such, the collaboration costs of O&M, development, and testing are high.

2

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.

3

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.

Construction Paths of Continuous Release

4

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.

Continuous Release Practices on the Cloud

5

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.

6

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.

7

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.

Continuous Release of Applications

8

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.

9

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.

Q&A

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.

0 1 0
Share on

Alibaba Cloud Community

1,042 posts | 256 followers

You may also like

Comments

Alibaba Cloud Community

1,042 posts | 256 followers

Related Products