Deploy Dashboard Community Edition¶
This topic will describe how to deploy NebulaGraph Dashboard in detail.
To download and compile the latest source code of Dashboard, follow the instructions on the nebula dashboard GitHub page.
Before you deploy Dashboard, you must confirm that:
- The NebulaGraph services are deployed and started. For more information, see NebulaGraph Database Manual.
Before the installation starts, the following ports are not occupied.
- The node-exporter is installed on the machines to be monitored. For details on installation, see Prometheus document.
Download the tar packagenebula-dashboard-3.4.0.x86_64.tar.gz as needed.
tar -xvf nebula-dashboard-3.4.0.x86_64.tar.gzto decompress the installation package.
The configuration file contains the configurations of four dependent services and configurations of clusters. The descriptions of the dependent services are as follows.
Service Default port Description nebula-http-gateway 8090 Provides HTTP ports for cluster services to execute nGQL statements to interact with the NebulaGraph database. nebula-stats-exporter 9200 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). node-exporter 9100 Collects the source information of nodes in the cluster, including the CPU, memory, load, disk, and network. prometheus 9090 The time series database that stores monitoring data.
The descriptions of the configuration file are as follows.
port: 7003 # Web service port. gateway: ip: hostIP # The IP of the machine where the Dashboard is deployed. port: 8090 https: false # Whether to enable HTTPS. runmode: dev # Program running mode, including dev, test, and prod. It is used to distinguish between different running environments generally. stats-exporter: ip: hostIP # The IP of the machine where the Dashboard is deployed. nebulaPort: 9200 https: false # Whether to enable HTTPS. node-exporter: - ip: nebulaHostIP_1 # The IP of the machine where the NebulaGraph is deployed. port: 9100 https: false # Whether to enable HTTPS. # - ip: nebulaHostIP_2 # port: 9100 # https: false prometheus: ip: hostIP # The IP of the machine where the Dashboard is deployed. prometheusPort: 9090 https: false # Whether to enable HTTPS. scrape_interval: 5s # The interval for collecting the monitoring data, which is 1 minute by default. evaluation_interval: 5s # The interval for running alert rules, which is 1 minute by default. # Cluster node info nebula-cluster: name: 'default' # Cluster name metad: - name: metad0 endpointIP: nebulaMetadIP # The IP of the machine where the Meta service is deployed. port: 9559 endpointPort: 19559 # - name: metad1 # endpointIP: nebulaMetadIP # port: 9559 # endpointPort: 19559 graphd: - name: graphd0 endpointIP: nebulaGraphdIP # The IP of the machine where the Graph service is deployed. port: 9669 endpointPort: 19669 # - name: graphd1 # endpointIP: nebulaGraphdIP # port: 9669 # endpointPort: 19669 storaged: - name: storaged0 endpointIP: nebulaStoragedIP # The IP of the machine where the Storage service is deployed. port: 9779 endpointPort: 19779 # - name: storaged1 # endpointIP: nebulaStoragedIP # port: 9779 # endpointPort: 19779
./dashboard.service start allto start the services.
Deploy Dashboard with Docker Compose¶
If you are deploying Dashboard using docker, you should also modify the configuration file
config.yaml, and then run
docker-compose up -d to start the container.
If you change the port number in
config.yaml, the port number in
docker-compose.yaml needs to be consistent as well.
docker-compose stop to stop the container.
Manage services in Dashboard¶
You can use the
dashboard.service script to start, restart, stop, and check the Dashboard services.
sudo <dashboard_path>/dashboard.service [-v] [-h] <start|restart|stop|status> <prometheus|webserver|exporter|gateway|all>
||Dashboard installation path.|
||Display detailed debugging information.|
||Display help information.|
||Start the target services.|
||Restart the target services.|
||Stop the target services.|
||Check the status of the target services.|
||Set the prometheus service as the target service.|
||Set the webserver Service as the target service.|
||Set the exporter Service as the target service.|
||Set the gateway Service as the target service.|
||Set all the Dashboard services as the target services.|
To view the Dashboard version, run the command