Help Center/ ServiceStage/ User Guide/ Environment Management/ Managing Environment Variables of an Environment
Updated on 2025-07-10 GMT+08:00

Managing Environment Variables of an Environment

Environment variables of an environment describe environment information and environment resource information, such as middleware credentials, connection information, and environment functions. Customers can use these variables to shield environment or resource differences, and switch components to different environments or run them using different cloud service resources without modification.

If the resources (DCS, RDS, ServiceComb, Nacos, and CSS) listed in Table 1 exist in the environment, ServiceStage writes the corresponding built-in and custom environment variables in the environment.

Table 1 Built-in and custom environment variables of an environment

Resource Type

Name

Description

Variable Source

Variable/Variable Reference Example

DCS

DISTRIBUTED_CACHE_TYPE

Distributed cache type.

Built-in

Redis

DISTRIBUTED_CACHE_NAME

Name of a DCS instance.

Built-in

dcs-test

DISTRIBUTED_CACHE_VERSION

Distributed cache version.

Built-in

5.0

DISTRIBUTED_CACHE_CLUSTER

Distributed cache cluster type.

Built-in

false

DISTRIBUTED_CACHE_HOST

Distributed cache address.

Built-in

192.168.0.136

DISTRIBUTED_CACHE_PORT

Distributed cache port.

Built-in

6379

DISTRIBUTED_SESSION_CLUSTER

Distributed session cluster type.

Built-in

false

DISTRIBUTED_SESSION_HOST

Distributed session address.

Built-in

192.168.0.136

DISTRIBUTED_SESSION_VERSION

Distributed session version.

Built-in

5.0

DISTRIBUTED_SESSION_TYPE

Distributed session type.

Built-in

Redis

DISTRIBUTED_CACHE_PASSWORD

Distributed cache password.

Custom

********

RDS

RELATIONAL_DATABASE_DB_TYPE

Cloud database type.

Built-in

MySQL

RELATIONAL_DATABASE_HOST

Cloud database address.

Built-in

172.16.0.185

RELATIONAL_DATABASE_CONNECTION_TYPE

Cloud database connection type.

Built-in

JNDI

RELATIONAL_DATABASE_PORT

Cloud database port.

Built-in

3306

RELATIONAL_DATABASE_NAME

Cloud database name.

Built-in

rds-pro

RELATIONAL_DATABASE_VERSION

Cloud database version.

Built-in

8.0

RELATIONAL_DATABASE_JNDI_NAME

Cloud database JNDI name.

Custom

jndi-u1

RELATIONAL_DATABASE_DB_USER

Cloud database account.

Custom

rds-u1

RELATIONAL_DATABASE_PASSWORD

Cloud database password.

Custom

********

ServiceComb

PAAS_CSE_CC_ENDPOINT

Address of the ServiceComb engine configuration center.

Built-in

https://192.168.0.31:30110,https://192.168.0.36:30110

PAAS_CSE_SC_ENDPOINT

Service center address of the ServiceComb engine.

Built-in

https://192.168.0.31:30100,https://192.168.0.36:30100

SERVICECOMB_SERVICE_PARAMETERS

ServiceComb engine service configuration.

Built-in

cas-instance-id:c3bee2c1-5174-4ed4-b4e0-2cfdd5b47357

PAAS_CSE_ENGINE_MGR_ENDPOINT

Address of the ServiceComb engine management node.

Built-in

Endpoint of the ServiceComb engine.

Obtain the value from Regions and Endpoints.

SERVICECOMB_SERVICE_PROPS

ServiceComb engine service configuration.

Built-in

cas-instance-id:c3bee2c1-5174-4ed4-b4e0-2cfdd5b47357

SERVICECOMB_ENGINE_NAME

ServiceComb engine name.

Built-in

cse-izq6rg

SERVICECOMB_INSTANCE_PROPS

ServiceComb engine instance configuration.

Built-in

affinity-tag:base,cas-instance-id:c3bee2c1-5174-4ed4-b4e0-2cfdd5b47357,cas_lane_tag:base

PAAS_CSE_DS_ENDPOINT

Dashboard center address of the ServiceComb engine.

Built-in

https://192.168.0.31:30109,https://192.168.0.36:30109

DYNAMIC_CONFIG_DYNAMICCONFIGTYPE

Type of the ServiceComb engine configuration center.

Built-in

KIE

DYNAMIC_CONFIG_SERVERADDRESS

Configuration center address of the ServiceComb engine.

Built-in

https://192.168.0.31:30110,https://192.168.0.36:30110

Nacos

REGISTER_SERVICE_REGISTERTYPE

Nacos engine service registry and discovery type.

Built-in

NACOS

REGISTER_SERVICE_ADDRESS

Service center address of the Nacos engine.

Built-in

https://192.168.0.31:30100,https://192.168.0.36:30100

SPRING_CLOUD_NACOS_CONFIG_SERVERADDR

Service center address of the Nacos engine.

Built-in

https://192.168.0.31:30100,https://192.168.0.36:30100

SPRING_CLOUD_NACOS_DISCOVERY_SERVERADDR

Service center address of the Nacos engine.

Built-in

https://192.168.0.31:30100,https://192.168.0.36:30100

EUREKA_CLIENT_SERVICEURL_DEFAULTZONE

Eureka server registry address.

Built-in

https://192.168.1.30:8761/eureka/

DYNAMIC_CONFIG_DYNAMICCONFIGTYPE

Type of the Nacos engine configuration center.

Built-in

NACOS

DYNAMIC_CONFIG_SERVERADDRESS

Configuration center address of the Nacos engine.

Built-in

https://192.168.0.31:30100,https://192.168.0.36:30100

GaussDB

PAAS_GAUSSDB_VERSION

Version.

Built-in

8.200.0

PAAS_GAUSSDB_NAME

Name.

Built-in

gauss-ss

PAAS_GAUSSDB_ADDRESS

Connection address.

Built-in

192.168.0.178:8000,192.168.0.47:8000,192.168.0.166:8000

PAAS_GAUSSDB_DB_NAME

Database name.

Custom

cas

PAAS_GAUSSDB_DB_USER

Username.

Custom

root

PAAS_GAUSSDB_PASSWORD

Password.

Custom

******

RocketMQ

DISTRIBUTED_MESSAGE_ROCKETMQ_VERSION

Version.

Built-in

5.x

DISTRIBUTED_MESSAGE_ROCKETMQ_NAME

Name.

Built-in

rocketmq-ss

DISTRIBUTED_MESSAGE_ROCKETMQ_ADDRESS

Connection address.

Built-in

192.168.0.84:9093,192.168.0.212:9093,192.168.0.174:9093

DISTRIBUTED_MESSAGE_ROCKETMQ_USER

Username.

Custom

root

DISTRIBUTED_MESSAGE_ROCKETMQ_PASSWORD

Password.

Custom

******

CSS

PAAS_ELASTIC_SEARCH_VERSION

Version.

Built-in

7.10.2

PAAS_ELASTIC_SEARCH_NAME

Name.

Built-in

css_es

PAAS_ELASTIC_SEARCH_ADDRESS

Connection address.

Built-in

21.108.0.218:9200,21.108.0.88:9200,21.108.0.231:9200

PAAS_ELASTIC_SEARCH_HTTPS_ENABLE

Whether to enable HTTPS.

Built-in

true

PAAS_ELASTIC_SEARCH_USER

Username.

Custom

admin

PAAS_ELASTIC_SEARCH_PASSWORD

Password.

Custom

******

You can also add, edit, and delete custom environment variables of an environment.

Priority of environment variables of the component, application, and environment levels: component > application > environment.

Adding an Environment Variable

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Environment Variables > Add Environmental Variable and set variable parameters by referring to the following table.

    Exercise caution when inputting sensitive information in configuring environment variables, or encrypt sensitive information to avoid information leakage.

    Parameter

    Description

    Name

    Name of an environment variable.

    Enter 1 to 64 characters. Start with a letter, underscore (_), or hyphen (-). Only use letters, digits, underscores (_), hyphens (-), and periods (.).

    Variable/Variable Reference

    Value of a variable name.

  5. Click Confirm in the Operation column of the new environment variable.

    Type of the new environment variable is Custom, and Associated Object is the current environment. After environment variables of an environment are changed, you can:

Editing an Environment Variable

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Click Environment Variables.
  5. Click Edit in the Operation column of the custom environment variable to be edited and set parameters by referring to the following table.

    Exercise caution when inputting sensitive information in configuring environment variables, or encrypt sensitive information to avoid information leakage.

    Parameter

    Description

    Name

    Name of an environment variable.

    Enter 1 to 64 characters. Start with a letter, underscore (_), or hyphen (-). Only use letters, digits, underscores (_), hyphens (-), and periods (.).

    Variable/Variable Reference

    Value of a variable name.

  6. Click Confirm in the Operation column of the environment variable.

    After environment variables of an environment are changed, you can:

Deleting an Environment Variable

  1. Log in to ServiceStage.
  2. Choose Environment Management.
  3. Click the target environment. The Overview page is displayed.
  1. Click Environment Variables to delete a custom environment variable.

    • Single deletion: Click Delete in the Operation column of the target custom environment variable.
    • Batch deletion: Select the target custom environment variables and click Bulk Delete.

  2. Click OK.

    Delete environment variables as required to prevent component startup failures caused by missing environment variables when Upgrading a Single Component or Upgrading Components in Batches.

    After environment variables of an environment are changed, you can: