Skip to main content
Version: v0.4

Environment

Note: Since v0.4.0, environment introduces Environment Type to enhance management.

An environment is the target of service deployment. A project may contain multiple environments.

Environment Type

Note: Custom environment type is not supported at present.

Before v0.4.0, the isolation between different environments is not guaranteed, which means we will run into the below problems.

  • A production-purpose Connector can be referenced by an environment intended for testing.
  • A common developer can deploy a service into production-purpose environment.

Starting with v0.4.0, each environment declares its purpose by its type, thus preventing that User without the ability to operate (write) on that Environment Type from operating the environment. It is worth noting that Connector also needs to declare what Environment Type it applies to.

The system has 3 built-in environment types, which are Development, Staging and Production.

  • Development and Staging environments can be operated by any User.
  • Production environment can only be operated by Manager and Administrator, General User stays in read-only.

By using environment types, we can get the following isolation features.

  • The environment can only reference the same type of Connector.
  • The project members can only operate the environments of the type that their roles can operate, otherwise, they will be treated as project Viewer.

View the Environment List

  1. Click Application Management on the left navigation bar. By default, the first project view will be displayed. The project can be switched via the top-level breadcrumb.
  2. The environment list under this project can be viewed in the Environment tab.
  3. You can enter keywords in the search bar of the environment list page to quickly search for related environments.

Create an Environment

  1. Access the list page through the action of viewing the environment list.
  2. Click New Environment, enter the name to identify your environment. The environment name should be unique, so you can easily find it in the environment list.

qs-create-env

  1. Add Environment tags and Environment description based on the actual environment.
  2. Choose proper Environment type.
  3. Add a connector, click Add Connector, select the connector used in the environment, and finally click the Confirm button.
  4. Click the Save button to save the environment configuration, and then you can use this environment in Application Management.

qs-create-env2

Edit Environment

  1. Access the list page through the action of viewing the environment list.
  2. Select the environment that you need to edit and click the Edit button.
  3. Modify the environment configuration as needed, and add or delete connectors.
  4. Click the Save button to save the environment configuration.

app-env-edit

Manage Services

Within the environment, you can manage the services, including adding services, deleting services, and modifying service configurations.

  1. Click Application Management in the navigation bar, switch to the corresponding project, and select the environment that needs to be managed.
  2. View the list of services in the environment under the "Services" tab.
  3. Click New Service, select the service that needs to be added, fill in the corresponding information, and click the Save button to complete the addition of services.
  4. Click the Delete operation in the service list to delete services in the environment.

For more details on service management, please refer to Services and Resources.

Dependency Graph

Different services within an environment may depend on each other. The dependencies between services can be viewed through the dependency graph. The dependency graph shows all services and their resources. You can perform operations on resources by clicking the top-right corner of the resource icon. For example, you can view logs or execute terminals on container resources.

For more detailed information on dependency graphs, please refer to Dependency Graph.

app-env-graph

app-env-graph-res

Environment Variables

Environment variables are key-value pairs stored in the environment and can be referenced in the services in the environment. Environment variables are used when creating or editing deployment services and when using related parameters in the configuration module. The variables in the current environment can only be used in the current environment, and the variables in different environments are independent of each other.

If a variable with the same name exists in the project or globally, the variable value defined in the environment will override the project or global variable value.

app/env-var

Usage: When creating a service, enter ${var.Environment Variable Name} in the input box where the variable is needed.

For more detailed information on variables, please refer to Variables.

Clone Environment

In some cases, you may need to create an environment that is identical to an existing one, in which case you can use the Clone Environment feature. Cloning an environment allows you to quickly create a new environment based on the configuration and services of the existing one.

  1. Click Application Management -> Environment on the navigation bar to enter the environment list.
  2. In the environment list, select the environment that needs to be cloned and click Clone.

app-env-clone

  1. Configure the name, description, tags, etc., of the cloned environment, and select connectors.
  2. If needed, modify the configuration of services in the cloned environment. Click to select the service, modify the service configuration in the pop-up window, click Confirm to save the alteration, and then click Save to complete the cloning of the environment.

app-env-clone-details

  1. Once the cloned environment is created, you can use this environment in Application Management. The cloned services will also be automatically deployed in sequence according to the dependencies, and you can view the service status in the service list.

app-env-clone-deploy

Delete Environment

  1. Click Application Management -> Environment in the navigation bar to enter the environment list.
  2. Ensure no services depend on this environment, select the environment you need to delete and click Delete to complete the deletion.