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.
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.
- For details about environment variables of an application, see Managing Environment Variables of an Application.
- For details about environment variables of a component, see Adding an Environment Variable of a Component (container-deployed components) or Adding an Environment Variable of a Component (VM-deployed components).
Adding an Environment Variable
- Log in to ServiceStage.
- Choose Environment Management. The Environment Management page is displayed.
- Click the target environment. The Overview page is displayed.
- 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.
- 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:
- Make the changed environment variables take effect for a specified component deployed in the environment by Upgrading a Component in Single-batch Release Mode.
- Make the changed environment variables take effect for multiple or all specified components deployed in the environment by Upgrading Components in Batches.
Editing an Environment Variable
- Log in to ServiceStage.
- Choose Environment Management. The Environment Management page is displayed.
- Click the target environment. The Overview page is displayed.
- Click Environment Variables.
- 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.
- Click Confirm in the Operation column of the environment variable.
After environment variables of an environment are changed, you can:
- Make the changed environment variables take effect for a specified component deployed in the environment by Upgrading a Component in Single-batch Release Mode.
- Make the changed environment variables take effect for multiple or all specified components deployed in the environment by Upgrading Components in Batches.
Deleting an Environment Variable
- Log in to ServiceStage.
- Choose Environment Management.
- Click the target environment. The Overview page is displayed.
- 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.
- 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:
- Make the changed environment variables take effect for a specified component deployed in the environment by Upgrading a Component in Single-batch Release Mode.
- Make the changed environment variables take effect for multiple or all specified components deployed in the environment by Upgrading Components in Batches.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot