Skip to content

Deploy Dashboard

The deployment of Dashboard involves five services. This topic will describe how to deploy Dashboard in detail. To download and compile the latest source code of Nebula Dashboard, follow the instructions on the nebula dashboard GitHub page.

Prerequisites

Before you deploy Dashboard, you must confirm that:

  • Before the installation starts, the following ports are not occupied.

    • 9200
    • 9100
    • 9090
    • 8090
    • 7003
  • The Linux distribution is CentOS, installed with Node.js of version above v10.12.0 and Go of version above 1.13.

Download Dashboard

Download the tar package as needed, and it is recommended to select the latest version.

Dashboard package NebulaGraph version
nebula-graph-dashboard-1.0.2.x86_64.tar.gz v2.6.2

Service

Run tar -xvf 1.0.2.tar.gz to decompress the installation package. There are 5 services in the nebula-graph-dashboard. The descriptions are as follows.

|Name|Description||Port| |:---|:---|:---| |node-exporter | Collects the source information of machines in the cluster, including the CPU, memory, load, disk, and network. |9100| |nebula-stats-exporter | Collects the performance metrics in the cluster, including the IP addresses, versions, and monitoring metrics (such as the number of queries, the latency of queries, the latency of heartbeats, and so on). |9200| |prometheus | The time series database that stores monitoring data. |9090| |nebula-http-gateway | Provides HTTP ports for cluster services to execute nGQL statements to interact with the NebulaGraph database. |8090| |nebula-graph-dashboard| Provides the Dashboard service. Note that its name is the same as its superordinate. The following nebula-graph-dashboard refers to this service. |7003|

The above five services should be deployed as follows.

Procedure

Deploy node-exporter

Note

You need to deploy the node-exporter service on each machine in the cluster.

To start the service, run the following statement in node-exporter:

$ nohup ./node-exporter --web.listen-address=":9100" &

After the service is started, you can enter <IP>:9100 in the browser to check whether the service is started normally.

Deploy nebula-stats-exporter

Note

You only need to deploy the nebula-stats-exporter service on the machine where the nebula-graph-dashboard service is installed.

  1. Modify the config.yaml file in nebula-stats-exporter to deploy the HTTP ports of all the services. The example is as follows:

    version: v0.0.4
    clusters:
      - name: nebula
        instances:
          - name: metad0
            endpointIP: 192.168.8.157
            endpointPort: 19559
            componentType: metad
          - name: metad1
            endpointIP: 192.168.8.155
            endpointPort: 19559
            componentType: metad
          - name: metad2
            endpointIP: 192.168.8.154
            endpointPort: 19559
            componentType: metad
          - name: graphd0
            endpointIP: 192.168.8.157
            endpointPort: 19669
            componentType: graphd
          - name: graphd1
            endpointIP: 192.168.8.155
            endpointPort: 19669
            componentType: graphd
          - name: graphd2
            endpointIP: 192.168.8.154
            endpointPort: 19669
            componentType: graphd
          - name: storaged0
            endpointIP: 192.168.8.157
            endpointPort: 19779
            componentType: storaged
          - name: storaged1
            endpointIP: 192.168.8.155
            endpointPort: 19779
            componentType: storaged
          - name: storaged2
            endpointIP: 192.168.8.154
            endpointPort: 19779
            componentType: storaged
    
  2. Run the following statement to start the service:

    $ nohup  ./nebula-stats-exporter --listen-address=":9200" --bare-metal --bare-metal-config=./config.yaml &
    

After the service is started, you can enter <IP>:9200 in the browser to check whether the service is started normally.

Deploy prometheus

Note

You only need to deploy the prometheus service on the machine where the nebula-graph-dashboard service is installed.

  1. Modify the prometheus.yaml file in prometheus to deploy the IP addresses and ports of the node-exporter service and the nebula-stats-exporter. The example is as follows:

    global:
      scrape_interval:     5s
      evaluation_interval: 5s
    scrape_configs:
      - job_name: 'nebula-stats-exporter'
        static_configs:
          - targets: [
              '192.168.xx.100:9200',  # nebula-stats-exporter 服务的 IP 地址和端口。
            ]
      - job_name: 'node-exporter'
        static_configs:
          - targets: [
              '192.168.xx.100:9100',  # node-exporter 服务的 IP 地址和端口。
              '192.168.xx.101:9100'
            ]
    
    • scrape_interval: The interval for collecting the monitoring data, which is 1 minute by default.
    • evaluation_interval: The interval for running alarm rules, which is 1 minute by default.
  2. Run the following statement to start the service.

    $ nohup ./prometheus --config.file=./prometheus.yaml &
    

After the service is started, you can enter <IP>:9090 in the browser to check whether the service is started normally.

Deploy nebula-http-gateway

Note

You only need to deploy the nebula-http-gateway service on the machine where the nebula-graph-dashboard service is installed.

To start the service, run the following statement in nebula-http-gateway:

$ nohup ./nebula-httpd &

After the service is started, you can enter <IP>:8090 in the browser to check whether the service is started normally.

How to deploy the nebula-graph-dashboard service

  1. Modify the custom.json file in nebula-graph-dashboard/static/ to deploy the IP address and port of the Graph Service. The example is as follows:

    {
        "connection": {
            "ip": "192.168.xx.4",
            "port": 9669
        },
        "alias": {
            "ip:port": "instance1"
        },
        "chartBaseLine": {
    
        }
    }
    ...
    
  2. To start the service, run the following statement in nebula-graph-dashboard:

    $ npm run start
    

After the service is started, you can enter <IP>:7003 in the browser to check whether the service is started normally.

Stop Dashboard

You can enter kill <pid> to stop Dashboard. The examples are as follows:

$ kill $(lsof -t -i :9100) # stop the node-exporter service
$ kill $(lsof -t -i :9200) # stop the nebula-stats-exporter service
$ kill $(lsof -t -i :9090) # stop the prometheus service
$ kill $(lsof -t -i :8090) # stop the nebula-http-gateway service
$ cd nebula-graph-dashboard
$ npm run stop # stop the nebula-graph-dashboard service

Last update: March 13, 2023