Deploy Dashboard Enterprise Edition¶
This topic will introduce how to deploy Dashboard Enterprise Edition in detail.
Prerequisites¶
Before deploying Dashboard Enterprise Edition, you must do a check of these:
- Select and download Dashboard Enterprise Edition of the correct version. For information about the version correspondence between Dashboard Enterprise Edition and NebulaGraph, see Version compatibility.
-
MySQL and SQLite are supported to store Dashboard metadata. To use MySQL, make sure that the environment of MySQL is ready and a MySQL database named as
dashboardis create. Make sure the default character set of the database isutf8.Note
To store Dashboard metadata using SQLite, there is no need to configure the SQLite environment because SQLite is built-in to Dashboard.
-
Before the installation starts, the following ports are not occupied.
Port Description 7005 The port through which Dashboard Enterprise Edition provides the web service. 9091 The port of the prometheus service. 9200 The port of the nebula-stats-exporter service. 9093 The port of the Alertmanager service, used to receive Prometheus alerts and then send them to Dashboard. 9100 The port of the node-exporter service. The node-exporter is automatically deployed on the target machine after a cluster is created or imported. It is used to collect the source information of machines in the cluster, including the CPU, memory, load, disk, and network.
Enterpriseonly
You can apply online for Dashboard Enterprise Edition free trial. NebulaGraph Dashboard Enterprise Edition is available exclusively through our Enterprise Edition package and is not sold separately. Contact us for details.
Deploy Dashboard Enterprise Edition with TAR¶
Installation¶
-
Select and download the TAR package according to your needs. It is recommended to select the latest version.
-
Use
tar -xzvfto decompress the TAR package.tar -xzvf nebula-dashboard-ent-<version>.linux-amd64.tar.gz -C <install_path>For example:
tar -xzvf nebula-dashboard-ent-3.5.2.linux-amd64.tar.gz -C /usr/local/ -
Enter the extracted folder and modify the
config.yamlfile in theetcdirectory to set theLicenseManagerURLparameter to the host IP and port number9119where the License Manager (LM) is located and to set the relevant configuration.Name: dashboard-api Host: 0.0.0.0 # Specifies the address segment that can access Dashboard. Port: 7005 # The default port used to access Dashboard Enterprise Edition. MaxBytes: 1073741824 # The maximum content length of an Http request that can be accepted. The default value is 1048576. Value range: 0 ~ 8388608. Timeout: 60000 # Timeout duration of the access. Log: # Dashboard run log settings. KeepDays: 7 # The number of days for keeping log. Mode: file # The save mode of logs, including console and file. console means the service logs are logged in webserver.log. file means the service logs are logged in access.log, error.log, severe.log, slow.log, and stat.log respectively. Encoding: plain # Log encoding method, plain and json are supported. Database: Dialect: sqlite # The database type used to store metadata. Only support SQLite and MySQL currently. The default value is SQLite. AutoMigrate: true # Whether to automatically create a database table. Defaults to true. Host: 127.0.0.1 # The IP address of the connected MySQL database. Port: 3306 # The port of the connected MySQL database. Username: root # The username to log in MySQL. Password: nebula # The password to log in MySQL. Name: dashboard # The name of the corresponding database. # Information about the exporter port Exporter: NodePort: 9100 # The port of the node-exporter service. NebulaPort: 9200 # The port of the nebula-stats-exporter service. # Information of services Proxy: PrometheusAddr: 127.0.0.1:9091 # The IP address and port of the prometheus service. AlertmanagerAddr: 127.0.0.1:9093 # The IP address and port of the Alertmanager service. # Information of the sender's Email used to invite LDAP accounts. Mail: Host: smtp.office365.com # The SMTP server address. Port: 587 # The port number of the SMTP server. Username: "" # The SMTP server account name. Password: "" # The SMTP server password. # SlowQuery SlowQuery: Enable: true # The switch of slowquery data polling. MessageStore: 14 # Slow queary data store time (day). ScrapeInterval: 2m # The interval time for slow query data pulling, eg: 1s, 10s, 2m, 3h # System information System: WebAddress: http://127.0.0.1:7005 # The external access for Dashboard. It can be set as a hostname, used for interface callbacks. For example, the invitee who is invited by mail can use this link to access Dashboard. MessageStore: 90 # It sets the number of days to keep alert messages, the value of which is 90 by default. CloudProvider: "" # cloud provider name, used for aliyun now. LicenseManagerURL: "" # license manager url. -
Start Dashboard.
You can use the following command to start the Dashboard with one click.
cd /usr/local/nebula-dashboard-ent/scripts sudo ./dashboard.service start allOr execute the following commands to start prometheus, webserver, nebula-stats-exporter and alertmanager services to start Dashboard.
cd scripts sudo ./dashboard.service start prometheus # Start prometheus service sudo ./dashboard.service start webserver # Start webserver service sudo ./dashboard.service start exporter # Start nebula-stats-exporter service sudo ./dashboard.service start alertmanager # Start alertmanager service
Note
If you change the configuration file after starting Dashboard, you can run dashboard.service restart all in the scripts directory to synchronize the changes to the Dashboard client page.
Deploy Dashboard Enterprise Edition with RPM¶
Prerequisites¶
The Linux version used is CentOS and lsof has been installed.
Installation¶
-
Download an RPM package.
-
Run
sudo rpm -i <rpm>to install the RPM package.For example, run the following command to install Dashboard Enterprise Edition. Installation path is
/usr/local/nebula-dashboard-entby default.sudo rpm -i nebula-dashboard-ent-<version>.x86_64.rpmYou can also run the following command to specify the installation path.
sudo rpm -i nebula-dashboard-ent-xxx.rpm --prefix=<path> -
Enter the extracted folder and modify the
config.yamlfile in theetcdirectory to set theLicenseManagerURLparameter to the host IP and port number9119where the License Manager (LM) is located and to set the relevant configuration.Name: dashboard-api Host: 0.0.0.0 # Specifies the address segment that can access Dashboard. Port: 7005 # The default port used to access Dashboard Enterprise Edition. MaxBytes: 1073741824 # The maximum content length of an Http request that can be accepted. The default value is 1048576. Value range: 0 ~ 8388608. Timeout: 60000 # Timeout duration of the access. Log: # Dashboard run log settings. KeepDays: 7 # The number of days for keeping log. Mode: file # The save mode of logs, including console and file. console means the service logs are logged in webserver.log. file means the service logs are logged in access.log, error.log, severe.log, slow.log, and stat.log respectively. Encoding: plain # Log encoding method, plain and json are supported. Database: Dialect: sqlite # The database type used to store metadata. Only support SQLite and MySQL currently. The default value is SQLite. AutoMigrate: true # Whether to automatically create a database table. Defaults to true. Host: 127.0.0.1 # The IP address of the connected MySQL database. Port: 3306 # The port of the connected MySQL database. Username: root # The username to log in MySQL. Password: nebula # The password to log in MySQL. Name: dashboard # The name of the corresponding database. # Information about the exporter port Exporter: NodePort: 9100 # The port of the node-exporter service. NebulaPort: 9200 # The port of the nebula-stats-exporter service. # Information of services Proxy: PrometheusAddr: 127.0.0.1:9091 # The IP address and port of the prometheus service. AlertmanagerAddr: 127.0.0.1:9093 # The IP address and port of the Alertmanager service. # Information of the sender's Email used to invite LDAP accounts. Mail: Host: smtp.office365.com # The SMTP server address. Port: 587 # The port number of the SMTP server. Username: "" # The SMTP server account name. Password: "" # The SMTP server password. # SlowQuery SlowQuery: Enable: true # The switch of slowquery data polling. MessageStore: 14 # Slow queary data store time (day). ScrapeInterval: 2m # The interval time for slow query data pulling, eg: 1s, 10s, 2m, 3h # System information System: WebAddress: http://127.0.0.1:7005 # The external access for Dashboard. It can be set as a hostname, used for interface callbacks. For example, the invitee who is invited by mail can use this link to access Dashboard. MessageStore: 90 # It sets the number of days to keep alert messages, the value of which is 90 by default. CloudProvider: "" # cloud provider name, used for aliyun now. LicenseManagerURL: "" # license manager url. -
Run the following commands to view the status of and start all the services.
sudo systemctl list-dependencies nebula-dashboard.target # View the status of all the services. sudo systemctl start nebula-dashboard.target # Start all the services.You can also view, start, and stop a single service.
sudo systemctl {status|stop|start} {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service}
Uninstallation¶
To uninstall Dashboard Enterprise Edition deployed with RPM, run the following command.
sudo rpm -e <package_name>
Deploy Dashboard Enterprise Edition with DEB¶
Installation¶
-
Download a DEB package.
-
Install the package.
sudo dpkg -i <package_name>Note
Custom installation paths are not supported when installing Dashboard Enterprise Edition with DEB. The default installation path is
/usr/local/nebula-dashboard-ent/.For example, to install the DEB package of the 3.5.2 version:
sudo dpkg -i nebula-dashboard-ent-3.5.2.ubuntu1804.amd64.deb -
Enter the extracted folder and modify the
config.yamlfile in theetcdirectory to set theLicenseManagerURLparameter to the host IP and port number9119where the License Manager (LM) is located and to set the relevant configuration.Name: dashboard-api Host: 0.0.0.0 # Specifies the address segment that can access Dashboard. Port: 7005 # The default port used to access Dashboard Enterprise Edition. MaxBytes: 1073741824 # The maximum content length of an Http request that can be accepted. The default value is 1048576. Value range: 0 ~ 8388608. Timeout: 60000 # Timeout duration of the access. Log: # Dashboard run log settings. KeepDays: 7 # The number of days for keeping log. Mode: file # The save mode of logs, including console and file. console means the service logs are logged in webserver.log. file means the service logs are logged in access.log, error.log, severe.log, slow.log, and stat.log respectively. Encoding: plain # Log encoding method, plain and json are supported. Database: Dialect: sqlite # The database type used to store metadata. Only support SQLite and MySQL currently. The default value is SQLite. AutoMigrate: true # Whether to automatically create a database table. Defaults to true. Host: 127.0.0.1 # The IP address of the connected MySQL database. Port: 3306 # The port of the connected MySQL database. Username: root # The username to log in MySQL. Password: nebula # The password to log in MySQL. Name: dashboard # The name of the corresponding database. # Information about the exporter port Exporter: NodePort: 9100 # The port of the node-exporter service. NebulaPort: 9200 # The port of the nebula-stats-exporter service. # Information of services Proxy: PrometheusAddr: 127.0.0.1:9091 # The IP address and port of the prometheus service. AlertmanagerAddr: 127.0.0.1:9093 # The IP address and port of the Alertmanager service. # Information of the sender's Email used to invite LDAP accounts. Mail: Host: smtp.office365.com # The SMTP server address. Port: 587 # The port number of the SMTP server. Username: "" # The SMTP server account name. Password: "" # The SMTP server password. # SlowQuery SlowQuery: Enable: true # The switch of slowquery data polling. MessageStore: 14 # Slow queary data store time (day). ScrapeInterval: 2m # The interval time for slow query data pulling, eg: 1s, 10s, 2m, 3h # System information System: WebAddress: http://127.0.0.1:7005 # The external access for Dashboard. It can be set as a hostname, used for interface callbacks. For example, the invitee who is invited by mail can use this link to access Dashboard. MessageStore: 90 # It sets the number of days to keep alert messages, the value of which is 90 by default. CloudProvider: "" # cloud provider name, used for aliyun now. LicenseManagerURL: "" # license manager url. -
Run the following commands to view the status of and start all the services.
sudo systemctl list-dependencies nebula-dashboard.target # View the status of all the services. sudo systemctl start nebula-dashboard.target # Start all the services.You can also view, start, and stop a single service.
sudo systemctl {status|stop|start} {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service}
Uninstallation¶
To uninstall Dashboard Enterprise Edition, run the following command.
sudo dpkg -r <package_name>
Manage services in Dashboard¶
The following section presents two methods for managing the Dashboard service. It's important to note that these methods are not interchangeable. For instance, you can't start the service using the dashboard.service script and then use the systemctl command to stop it.
-
You can use the
dashboard.servicescript to start, restart, stop, and check the Dashboard services.sudo <dashboard_path>/scripts/dashboard.service [-v] [-h] [-version] <start|restart|stop|status> <prometheus|webserver|exporter|gateway|all>Parameter Description dashboard_pathDashboard installation path. -vDisplay detailed debugging information. -hDisplay help information. -versionDisplay the Dashboard version. startStart the target services. restartRestart the target services. stopStop the target services. statusCheck the status of the target services. prometheusSet the prometheus Service as the target service. webserverSet the webserver Service as the target service. exporterSet the exporter Service as the target service. gatewaySet the gateway Service as the target service. allSet all the Dashboard services as the target services. For example, if Dashboard is installed in the current directory, you can manage its services using the following commands:
sudo /dashboard/scripts/dashboard.service start all # Start Dashboard. sudo /dashboard/scripts/dashboard.service stop all # Stop Dashboard. sudo /dashboard/scripts/dashboard.service status all # Check Dashboard status. sudo /dashboard/scripts/dashboard.service restart all # Restart Dashboard.
-
If you installed Dashboard using RPM or DEB packages, you can manage the service using systemd. You can start, view, restart and stop the service using the
systemctlcommand.sudo systemctl start nebula-dashboard.target # Start all service. sudo systemctl status nebula-dashboard.target # Check Dashboard status. sudo systemctl restart <nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service> # Restart service respectively. sudo systemctl stop <nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service> # Stop service respectively.For example, to stop the Prometheus service, run the following command:
sudo systemctl stop nbd-prometheus.service
View logs¶
-
Users who manage services using
dashboard.servicecan view the Dashboard Enterprise Edition logs in thelogsdirectory.For example:
cat logs/prometheus.logThe descriptions of the log files are as follows.
Log file Description alertmanager.logAlertmanager service log. nebula-stats-exporter.lognebula-stats-exporter service log. prometheus.logPrometheus service log. brBackup and restore service log. webserver.logDashboard service log. It takes effect only when the Log.Modein the Dashboard configuration isconsole.access.logAccess log. It takes effect only when the Log.Modein the Dashboard configuration isfile.error.logError log. It takes effect only when the Log.Modein the Dashboard configuration isfile.severe.logSevere log. It takes effect only when the Log.Modein the Dashboard configuration isfile.slow.logSlow log. It takes effect only when the Log.Modein the Dashboard configuration isfile.stat.logStatistic log. It takes effect only when the Log.Modein the Dashboard configuration isfile.
-
Users managing services with systemd can access the logs for each Dashboard Enterprise Edition service through
journalctl.journalctl -u {nbd-prometheus.service|nbd-alert-manager.service|nbd-stats-exporter.service|nbd-webserver.service} -bFor example, to view the logs of the Prometheus service:
journalctl -u nbd-prometheus.service -b