You can use the lightweight configuration center in an on-premises environment for service registration, discovery, and configuration management when you develop and test applications. These features are still available after you deploy applications to EDAS. This topic describes how to download the lightweight configuration center package, and then start and verify the lightweight configuration center.
Before you start
The light-weight configuration center has been updated to the lightweight configuration center. The lightweight configuration center is compatible with the light-weight configuration center and provides additional support for Nacos.
Feature | Light-weight configuration center | Lightweight configuration center |
---|---|---|
Configuration management by using Application Configuration Management (ACM) | Supported | Supported |
Service registration and discovery by using Application Naming Service (ANS) | Supported | Supported |
Service registration, discovery, and configuration management for High-speed Service Framework (HSF) applications | Supported | Supported |
Service registration, discovery, and configuration management by using Nacos | Not supported | Supported |
- You can directly switch from the light-weight configuration center to the lightweight configuration center.
- Nacos supports all the features in the preceding table.
Prerequisites
- Java Development Kit (JDK) 1.8 or later is downloaded. The environment variable
JAVA_HOME
is configured. - Ports 8080, 8848, and 9600 are not in use.
Note
- The lightweight configuration center occupies ports 8080, 8848, and 9600. We recommend that you install and start the lightweight configuration center on a dedicated machine. If you use the lightweight configuration center on an on-premises machine, use other ports.
- The lightweight configuration center does not support Dubbo 3.0.
Step 1: Download the lightweight configuration center package
- Windows:
- Download the lightweight configuration center package.
- Decompress the package to an on-premises directory.
- UNIX or macOS:
- Run the
wget http://edas.oss-cn-hangzhou.aliyuncs.com/edas-res/edas-lightweight-server-1.0.0.tar.gz
command to download the lightweight configuration center package. - Run the
tar -zvxf edas-lightweight-server-1.0.0.tar.gz
command to decompress the package.
Notice The lightweight configuration center can be used only for development and testing in an on-premises environment. Do not use the lightweight configuration center in the production environment. If you expose the lightweight configuration center to the Internet, use an IP address-based access policy for access control. - Run the
Step 2: Start the lightweight configuration center
Step 3: Configure hosts in the on-premises development environment
Configure the hosts of the lightweight configuration center on the machine where you
want to develop and test applications by using the lightweight configuration center.
To be specific, in the Domain Name System (DNS) or the hosts file, configure the jmenv.tbsite.net
domain name to point to the IP address of the machine on which the lightweight configuration
center is started.
- Open the hosts file.
- Windows operating system: C:\Windows\System32\drivers\etc\hosts
- UNIX or macOS operating system: /etc/hosts
- Add the configuration of the lightweight configuration center.
- If you start the lightweight configuration center on a machine whose IP address is
192.168.1.100, add
192.168.1.100 jmenv.tbsite.net
to the hosts file. - If you start the lightweight configuration center on an on-premises machine, change
the preceding IP address and add
127.0.0.1 jmenv.tbsite.net
to the hosts file.
- If you start the lightweight configuration center on a machine whose IP address is
192.168.1.100, add
Verify the result
- Availability of the lightweight configuration center.
- Functionality of the lightweight configuration center, including configuration management, service registration, and namespaces. Namespaces are available only if you previously used Nacos.
- On-premises machine
Enter the URL
http://127.0.0.1:8080
of the lightweight configuration center in the address bar of a browser and press the ENTER key. - Independent machine
Enter the URL
http://Machine IP address:8080
of the lightweight configuration center in the address bar of a browser and press the ENTER key.
jmenv.tbsite.net:8080
.
The following figure shows the homepage of the lightweight configuration center.
If the homepage cannot appear, view the boot log logs/start.log
in the installation directory to identify the cause of failed startup and fix the
bug.
The lightweight configuration center provides features such as service registration, discovery, configuration management, and namespaces. Namespaces are available only if you previously used Nacos.
- If you previously used the light-weight configuration center or Nacos, you can directly verify the functionality based on the business logic after you start the lightweight configuration center.
- If you use the lightweight configuration center for the first time, you must add and modify configurations in your application after you start the lightweight configuration center. We recommend that you verify the functionality by referring to the application development documents for specific features.