Updated on 2023-11-08 GMT+08:00

Development Environment Planning

The purpose of planning the development environment is to ensure that developers can better work in parallel, reduce dependencies, reduce the workload of environment setup, and reduce the risks of bringing the production environment online.

The purpose of managing the development environment is to better develop, test, and deploy services.

Figure 1 Development environment

Based on the project experience, the development environment is planned according to Figure 1:

  • Set up a local development environment on the intranet. The advantage of the local development environment is that each service or developer can set up a minimum function set environment that meets their requirements to facilitate log viewing and code debugging. The local development environment greatly improves the code development efficiency and reduces the deployment and debugging time. The disadvantage of local development environment is the low integration. When the integration and joint commissioning are required, it is difficult to ensure environment stability.
  • The cloud-based test environment is a relatively stable integration test environment. After the local development and test are complete, each service domain deploys the services in its own domain to the cloud test environment and can invoke services in other domains for integration tests. Based on the service scale, the cloud test environment can be further divided into the α, β, and γ test environments. These test environments are integrated in ascending order. Generally, the γ test environment must be managed in the same way as the production environment to ensure environment stability.
  • The production environment is a formal service environment. It needs to support dark upgrade, online joint commissioning, and traffic diversion to minimize the impact of upgrade faults on services.
  • In the cloud-based test environment, the public IP addresses of CSE and middleware can be opened, or network interconnection can be implemented. In this way, the middleware on the cloud can be used to replace the local environment, reducing the time for developers to install the environment. This situation also belongs to the local development environment on the intranet where microservices run in the local development environment. Microservices deployed in containers on the cloud and those deployed on the local development environment cannot access each other. To avoid conflicts, the cloud-based test environment is used only as the local development environment.