Updated on 2024-09-27 GMT+08:00

Binding a Microservice Engine

Cloud Service 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.

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.

Prerequisites

A microservice engine has been managed in the environment of the container-deployed component. For details, see Managing Basic Resources.

Binding a Microservice Engine

  1. Choose Cloud Service Settings > Microservice Engine.
  2. Click Bind Microservice Engine.
  3. Select a microservice engine instance that has been bound in the environment.

    • Components of the Java, Tomcat, Python, PHP, Node.js and Docker technology stacks can be bound to the ServiceComb engine.
    • 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.

  4. Click OK.
  5. (Optional) If a ServiceComb engine is bound, specify Addons.

    • Mesher

      Enter the listening port number of the application process to enable multi-language access to service mesh. You can use Mesher to connect components that are not developed in the microservice framework to the ServiceComb engine.

      • For non-microservice components developed using Java, Tomcat, or Docker, you can enable Mesher and use Mesher to connect the components to the ServiceComb engine for microservice registry and discovery.
      • For components developed using Python, PHP, or Node.js, forcibly enable Mesher and connect the components to the ServiceComb engine for microservice registry and discovery.
    • Sermant Injector

      Sermant Agent can be automatically mounted using the Sermant Injector plug-in installed in CCE in the component deployment environment. In this way, components can be connected to the ServiceComb engine though Sermant Agent. For details about how to install the Sermant Injector plug-in, see Installing Sermant Injector.

      Enable Dynamic Configuration is selected by default. If you use the dynamic configuration provided by Sermant, the dynamic configuration of the bound ServiceComb engine injected by the microservice component does not take effect. If it is not selected, the dynamic configuration of the bound ServiceComb engine injected by the microservice component is used.

      By default, Spring Cloud and Dubbo are selected for Enable Registry Center so that Spring Cloud and Dubbo microservice components can use the registry capability provided by Sermant, and Engine is the ServiceComb engine that you select. The injected registry configuration of the bound ServiceComb engine does not take effect.

      If only Spring Cloud is selected for Enable Registry Center, Spring Cloud microservice components can use the registry capability provided by Sermant, and Engine is the ServiceComb engine that you select. Dubbo microservice components use the injected registry configuration of the bound ServiceComb engine.

      If only Dubbo is selected for Enable Registry Center, Dubbo microservice components can use the registry capability provided by Sermant, and Engine is the ServiceComb engine that you select. Spring Cloud microservice components use the injected registry configuration of the bound ServiceComb engine.

      If Spring Cloud and Dubbo are not selected for Enable Registry Center, microservice components use the injected registry configuration of the bound ServiceComb engine.

      If Spring Cloud or Dubbo is selected for Enable Registry Center, the ServiceComb engine bound to the component is used as the registry center engine by default.

      To change the registry center engine, move the cursor to the bound registry center engine, click , select another ServiceComb engine that has been managed in the component deployment environment, and click OK.