Help Center/ ServiceStage/ User Guide/ Component Management/ Managing Advanced Settings of a VM-Deployed Component
Updated on 2024-09-27 GMT+08:00

Managing Advanced Settings of a VM-Deployed Component

ServiceStage allows you to configure the following advanced settings for VM-deployed components:

  • Adding a Component Environment Variable

    Environment variables are set in the container running environment and can be modified during Upgrading a Single Component after component deployment to ensure application flexibility. Environment variables set for a component are local environment variables and take effect only for this component.

    If you add an application environment variable to the application where the component is located and the name of the application environment variable is the same as that of the component environment variable in the application, the application environment variable is shielded by the component environment variable and does not take effect for the component. For details about how to add application environment variables, see Managing Application Environment Variables.

  • Binding a Microservice Engine

    Microservice engines (ServiceComb engines) can be bound to VM-deployed components with a Java or Tomcat technology stack.

    Microservice Engine is a one-stop management platform for microservice solutions. After microservice components are connected to CSE, you can use service registry, service governance, and configuration management of CSE. In this way, you can focus on service development and improve product delivery efficiency and quality.

Adding a Component Environment Variable

  1. Click Add Environment Variable.
  2. Enter a key and value.

    The key must be unique in a component. Enter 1 to 64 characters. Do not start with a digit or period (.). Only use letters, digits, underscores (_), hyphens (-), and periods (.).

Binding a Microservice Engine

  1. Click Bind Microservice Engine.
  2. Select a microservice engine instance that has been bound in the environment and click OK.

    If no microservice engine instance is bound to the environment, click Add one and add a microservice engine instance to the environment. For details, see Managing Basic Resources.

    After a component developed based on ServiceComb 2.7.8 or later or Spring Cloud Huawei 1.10.4-2021.0.x or later is connected to a microservice engine, the following attributes are injected into the properties parameter of the MicroServiceInstance parameter when a microservice instance is created in the microservice engine:
    1. CAS_APPLICATION_ID: ID of the application to which the component belongs.
    2. CAS_COMPONENT_NAME: component name.
    3. CAS_ENVIRONMENT_ID: ID of the component deployment environment.
    4. CAS_INSTANCE_ID: component instance ID.
    5. CAS_INSTANCE_VERSION: component instance version.

    For details about the MicroServiceInstance parameter, see MicroServiceInstance.