Installation and simple use of dubbo-admin

dubbo-admin installation

1. Download and install node

dubbo-admin is a project that separates the front and back ends. Vue is used on the front end and springboot is used on the back end. Installing dubbo-admin is actually deploying the project. We install dubbo-admin on the development environment. To ensure that the development environment has jdk, maven, nodejs

Install node

Because the front-end project is developed with vue, you need to install node.js, node.js comes with npm, and we will start it through npm later

download link

https://nodejs.org/en/

Insert picture description here

Click Next all the way to install node (no need to care about the environment variable selection step, the first one is the default, it will be automatically added to the environment variable), use the following command to check whether the installation is successful

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-vz7bW69I-1610961439900)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118160925628.png)]

2. Download Dubbo-Admin

Enter github, search for dubbo-admin

https://github.com/apache/dubbo-admin

download:

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-PDACaVEs-1610961439901)(images\1578297063167.png)]

3. Unzip the downloaded zip package to the specified folder (unzip to that folder at will)

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-mCPOfH3k-1610961439904)(images\1578297477356.png)]

4. Modify the configuration file

After decompression, we enter the following directory and find the application.properties configuration file to modify the configuration

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-YPuRXSOt-1610961439914)(images\1578297603008.png)]

Modify to the address of the host where zookeeper is located

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-G3FEvIGd-1610961439916)(images\1578297758655.png)]

# 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
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

Hold down the shift key, use powershell, execute the following instructions, you need to install maven in advance

This process takes a long time and takes about 20 minutes, during which errors and warnings may be reported, which is normal

mvn  clean package

The effect after the execution is as follows:

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-WDI63fR4-1610961439917)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118164324247.png)]

6. Start the backend

Execute this command in this directory

Finished

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-rJBmoGXX-1610961439919)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118164834615.png)]

This window cannot be closed, otherwise it cannot be used normally

7, the foreground starts

Execute the following commands in this directory, shitf + right click, select powershell

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-49e2NlXp-1610961439920)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\2021-01-18_153821-1610958667997.jpg)]

Start successfully

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-qjTnhw4J-1610961439921)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118163612429.png)]

This window cannot be closed, otherwise it cannot be used normally

8. Visit

According to the prompt of successful startup, enter the corresponding address http://localhost:8081/ in the browser

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-AFJPfd64-1610961439922)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118165234436.png)]

Click the service query, you need to enter the account password

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-qUWFl73e-1610961439923)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118165251894.png)]

Username and password are both root

dubbo-admin is simple to use

  1. Inquire

In the above steps, we have entered the main interface of Dubbo-Admin

Enter * to query all services

The picture shows the service in the dubbo study notes (you need to start this producer service first)

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-zq14hgNB-1610961439924)(images\1578301528363.png)]

After clicking the details

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-LLSZT2qG-1610961439925)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118170830219.png)]

If you want to display successful metadata, you need to add the following code in the xml configuration file of the producer

    <!-- 元数据配置 -->
    <dubbo:metadata-report address="zookeeper://192.168.149.135:2181" />

Restart the producer and open Dubbo-Admin again

So our metadata information will come out

  1. test

    [External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-XqxgfMUb-1610961439926)(C:\Users\GAOqize\Desktop\Dubbo & Zookeeper\courseware\4.Dubbo\ 20-Dubbo\data\dubbo-admin installation.assets\image-20210118171230237.png)]

Guess you like

Origin blog.csdn.net/weixin_49343190/article/details/112789302