When you use Enterprise Distributed Application Service (EDAS) to deploy an application, you do not need to deploy a configuration center. However, if you want to set up a test environment to test the High-speed Service Framework (HSF) service, you can specify the address of a configuration center. You can specify the address when you start a service on an Elastic Compute Service (ECS) instance.

Install a configuration center

Select a server on which you want to install ConfigServer. For more information, see Start the light-weight configuration registry.

Modify the configuration on the application server

For example, Application A runs on an ECS instance. To point Application A to the ConfigServer that you create as a user, you must log on to the ECS instance and modify the following configurations:

  1. Modify the domain name of ECS.
    • {Public IP address of the light-weight configuration center} jmenv.tbsite.net
    • {Public IP address of the light-weight configuration center} addr-bj-internal.edas.aliyun.com
    Note The second domain name must be the same as the value of -Daddress.server.domain in home/admin/taobao-tomcat-produ**ction-7.0.59.3/bin/setenv.sh. on the ConfigServer.
  2. Modify the container configuration.

    You can modify the container configuration by using one of the following methods.

    • Modify the value of -Dconfigserver.client.port to 9600 in the /home/admin/taobao-tomcat-production-7.0.59.3/bin/setenv.sh file.
    • In the EDAS console, specify the JVM parameter -Dconfigserver.client.port=9600 and add the parameter -Dhsf.server.ip={Public IP address of the local ECS instance}.
  3. Clear the historical configurations.

    To prevent cache interference, clear the content from /home/admin/configclient/ before you start the application.

  4. Check whether the service is published.

    Check the /home/admin/configclient/logs/config.client.log file. The keywords [Register-ok] and [Publish-ok] indicate that the service is published. You can view the published service on the Callers tab of the lightweight configuration center.

    Click Details, and you will find {ecs public IP address}:12200?v=2.0&_TIMEOUT=3000&_IDLETIMEOUT=10&_p=hessian2&_SERIALIZETYPE=hessian.

Specify ConfigServer as the development environment.

  1. Modify the hosts file.

    Add the content {public IP address of the lightweight configuration center} jmenv.tbsite.net to the hosts file.

  2. Set the startup parameters.

    If you have multiple network interface controllers (NICs), you can specify the -Dhsf.server.ip parameter for the IP address that you want to register.

  3. Start the application.

    After the application is started, view the configclient log. The keywords [Register-ok] and [Data-received] indicate that the service call succeeds. You can verify calls between services based on the called service.