Design and Implementation of an Environment Management Platform for Testing Environments
This article analyzes common problems with testing environments in fast‑iterating internet companies, compares several deployment strategies, and presents a comprehensive environment management platform that automates resource allocation, service configuration, and host mapping to improve efficiency, stability, and resource utilization.
Introduction The author frequently asks interviewees about factors that affect product quality and work efficiency, finding that most complain about poor testing environments leading to insufficient integration testing and online bugs. Rapid business adjustments in internet companies require fast iteration, demanding coordinated efforts from PM, RD, and QA, as well as reliable testing environments.
Problem Analysis Using a typical multi‑layer architecture (Nginx, Tomcat, RPC services, Redis, MySQL, etc.), the article outlines four common testing‑environment setups, each with its own advantages and drawbacks regarding resource sharing, maintenance cost, and availability.
Solution Overview To eliminate the limitations of existing approaches, the author proposes a platform that provides on‑demand, isolated testing environments without manual setup, ensuring stable dependencies, easy resource reclamation, and high utilization.
Platform Architecture The system consists of a central platform and distributed Agent nodes. The platform issues commands (environment initialization, recycling, service deployment, synchronization) while Agents execute them and return results. Detailed module functions are described below.
1. Service Management Module Manages Tomcat configurations, Nginx files, RPC service settings, and deployment order. Screenshots illustrate creating new Tomcat services, Nginx files, and RPC services.
2. Machine Management Module Handles all servers used for environment deployment, categorizing them into dynamic test machines, stable test environments, and stable sandbox environments, each with corresponding resource views and status indicators.
3. Host Management Module Manages domain‑to‑IP mappings for databases, caches, and third‑party services, automatically updating host files on allocated machines.
4. Environment Request Module Allows users to instantly obtain a dedicated test environment, select Tomcat and RPC services, configure machines, and automatically allocate resources. The process includes screenshots of service selection and machine configuration.
Practical Results The platform now supports all business lines, managing over 60 Tomcat services, 200+ RPC services, 150+ servers, and serving more than 300 users.
Future Outlook Planned improvements include real‑time synchronization with CI pipelines, better machine‑usage monitoring, integration with the Falcon monitoring system, and adopting Docker for dynamic resource and component management.
转转QA
In the era of knowledge sharing, discover 转转QA from a new perspective.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.