This article is from Alibaba DevOps Practice Guide written by Alibaba Cloud Yunxiao Team
Alibaba's governance solution for internal test environments has evolved over the past few years with multiple trial and error processes. The early iteration process of test environment governance is relatively long because the updates of test environment solutions involve a wide range of areas. This involves the overall policy adjustment of the full-procedure microservices and the overall changes of various middleware protocols (HTTP, RPC, and message) that affect the routing isolation capability. The implementation of the overall large-scale updates of a test environment solution may take years.
At the same time, as new technologies make it convenient to launch a test environment, the solution for the business side to use test environments is gradually becoming more multi-functional and diversified.
We need to keep pace with the evolution of business test environment solutions, accelerate the iteration of test environment governance, and reduce trial and error costs. To this goal, it is necessary to abstract the traffic routing of test environments to adapt to and meet the demands of various scenarios.
Several layers must be abstracted based on scenarios in which test environments are used and traffic routing. Routing protocols must be added to support routing orchestration and decoupled from business scenarios. The data layer and control layer are extended and implemented based on a unified routing protocol. The data layer provides extended routing capabilities (such as HTTP, RPC, message, and DB). The control layer offers environment-oriented and routing tools, provides orchestration capabilities for configuration management-oriented environment solutions on the user side, and enables developer-oriented environment use capabilities.
The traffic routing capability is the basis for parallel testing scenarios. The capability can create a private, isolated domain for multiple roles, such as developers and testers. Self-services can call commissioning traffic inside their private, isolated domains while traffic between isolated domains is separated and does not interfere with each other.
Next, let’s look at specific business scenarios to see what a routing model is.
The routing model consists of an isolated domain, degradation policy, and degradation conditions:
We can orchestrate and define the routing for a specific business scenario by combining the preceding three elements.
After analyzing Alibaba’s previous use cases of test environments, we can divide the environments into two categories: static environments and dynamic environments.
Static environments have fixed isolated domains. After an isolated domain is defined, the domain attributes will not be changed. Generally, the only actions are adding or deleting isolation units. Such isolated domains are relatively large in scale, providing backup service support with higher stability requirements. Developers need to maintain the stability of this type of environment, such as basic environments (backup environments that support the development and joint commissioning in microservice scenarios).
Failure Impact Factors of Production Environments | Failure Impact Factors of Static Environments |
User public opinion, capital loss, and decline rate | Application importance (dependent), R&D public opinions, upstream R&D activity, and affected joint commissioning traffic |
User public opinion, capital loss, and decline rate Application importance (dependent), R&D public opinions, upstream R&D activity, and affected joint commissioning traffic
The isolated domain to which a dynamic environment belongs is not stable, and it is often aggregated or split depending on the joint commissioning target. This kind of isolated domain is usually small in scale and used for temporary development, commissioning, and testing. They must adhere to the principle of applying on-demand and abandoning after use.
The core indicators of dynamic environments are the ability to activate with one click, activation success rate, and activation speed.
Activating multiple versions of test environments with multiple isolated domains costs developers in call access a lot. Therefore, developers must be able to access isolated domains from the development machines or terminals (PC browser or APP) with one click.
The development machine replaces and labels cloud resources in one click and routes call traffic to the local host. This allows developers to perform local joint commissioning. After the commissioning, the development machine can be removed with one click. The joint commissioning traffic returns to cloud resources.
You can access isolated domains through terminals, such as browsers and mobile terminals, in one click without configuration in a test environment, with multiple isolated domains. This way, massive configuration tasks, such as binding local domains with hosts, can be eliminated, and the development efficiency can be improved.
The mobile terminal can scan the QR code of an isolated domain to tag the route, achieving one-click access to the corresponding isolated domain. The PC browser can open the webpage address of the corresponding isolated domain to tag the route, achieving one-click access to the corresponding isolated domain.
In Alibaba, as the businesses are expanding and technology stacks are updating, the original pattern of using test environments on the business side has gradually been broken, becoming more multi-scenario, multi-functional, and diversified. How can we keep up with business development and meet the business requirements for new test environment scenarios? The key is the environment-based and routing model-based test environment solution.
Improving Test Efficiency - Alibaba DevOps Practice Guide Part 13
Application Environment Capabilities - Alibaba DevOps Practice Guide Part 15
1,011 posts | 247 followers
FollowAlibaba Cloud Community - February 8, 2022
Alibaba Cloud Community - February 15, 2022
Alibaba Cloud Community - March 1, 2022
Alibaba Cloud Community - February 6, 2022
Alibaba Cloud Community - February 5, 2022
Alibaba Cloud Community - February 8, 2022
1,011 posts | 247 followers
FollowAlibaba Cloud helps you create better IT services and add more business value for your customers with our extensive portfolio of cloud computing products and services.
Learn MoreAlibaba Cloud‘s Enterprise IT Governance solution helps you govern your cloud IT resources based on a unified framework.
Learn MoreAccelerate software development and delivery by integrating DevOps with the cloud
Learn MoreAn enterprise-level continuous delivery tool.
Learn MoreMore Posts by Alibaba Cloud Community