This is the third day of my participation in the November Update Challenge. For details of the event, please check: 2021 Last Update Challenge
One, dubbo-admin installation
1. Environmental preparation
dubbo-admin is a project with separate front and back ends. The front end uses vue, the back end uses springboot, and installing dubbo-admin is actually deploying the project. We will install dubbo-admin on the development environment. To ensure that the development environment has jdk, maven, nodejs
Install node** (ignore if the current machine is already installed)**
Because the front-end project is developed with vue, node.js needs to be installed. Node.js comes with npm, and we will start it through npm later.
download link
https://nodejs.org/en/
复制代码
2. Download Dubbo-Admin
Enter github and search for dubbo-admin
https://github.com/apache/dubbo-admin
复制代码
download:
3. Unzip the downloaded zip package to the specified folder (unzip to that folder at will)
4. Modify the configuration file
After decompression, we enter the ...\dubbo-admin-develop\dubbo-admin-server\src\main\resources directory and find the application.properties configuration file for configuration modification
Modify zookeeper address
# centers in dubbo2.7
admin.registry.address=zookeeper://192.168.149.135:2181
admin.config-center=zookeeper://192.168.149.135:2181
admin.metadata-report.address=zookeeper://192.168.149.135:2181
复制代码
admin.registry.address registry center admin.config-center configuration center admin.metadata-report.address metadata center
5. Package the project
Execute the packaging command in the dubbo-admin-develop directory
mvn clean package
复制代码
6. Start the backend
switch to directory
dubbo-Admin-develop\dubbo-admin-distribution\target>
复制代码
Execute the following command to start dubbo-admin. The dubbo-admin background is built by SpringBoot.
java -jar .\dubbo-admin-0.1.jar
复制代码
7. Front-end and back-end
Execute the command in the dubbo-admin-ui directory
npm run dev
复制代码
8. Access
browser input. Username and password are both root
http://localhost:8081/
复制代码
2. Simple use of dubbo-admin
Note: Dubbo Admin [Service Mock] [Service Statistics] will be released in subsequent versions. …
In the above steps, we have entered the main interface of Dubbo-Admin. In the [Quick Start] chapter, we have defined service producers and service consumers. Let's find these two services from the Dubbo-Admin management interface.
1. Click Service Query
2. Query results
A: The input query condition com.itheima.service.UserService
B: Search type, mainly divided into three types of query: [by service name] [by IP address] [by application]
C: search result
3.1.4 dubo-adminView Details
We view the specific details of service.UserService (service provider), including [metadata information]
1) Click Details
Viewed from the [Details] interface, it is mainly divided into 3 areas
Area A: It mainly contains basic server-side information such as service name, application name, etc.
Area B: mainly contains some basic information of producers and consumers
C area: metadata information, pay attention to the above picture, the metadata information is empty
We need to open our producer configuration file and add the following configuration
<!-- 元数据配置 -->
<dubbo:metadata-report address="zookeeper://192.168.149.135:2181" />
复制代码
Restart the producer, open Dubbo-Admin again
So our metadata information comes out