Skip to content

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 dashboard is create. Make sure the default character set of the database is utf8.

    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

  1. Select and download the TAR package according to your needs. It is recommended to select the latest version.

  2. Use tar -xzvf to 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.0.linux-amd64.tar.gz -C /usr/local/
    
  3. Enter the extracted folder and modify the config.yaml file in the etc directory to set the LicenseManagerURL parameter to the host IP and port number 9119 where 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.
    
  4. 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 all
    

    Or 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

  1. Download an RPM package.

  2. 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-ent by default.

    sudo rpm -i nebula-dashboard-ent-<version>.x86_64.rpm
    

    You can also run the following command to specify the installation path.

    sudo rpm -i nebula-dashboard-ent-xxx.rpm --prefix=<path> 
    
  3. Enter the extracted folder and modify the config.yaml file in the etc directory to set the LicenseManagerURL parameter to the host IP and port number 9119 where 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.
    
  4. 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

  1. Download a DEB package.

  2. 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.0 version:

    sudo dpkg -i nebula-dashboard-ent-3.5.0.ubuntu1804.amd64.deb
    
  3. Enter the extracted folder and modify the config.yaml file in the etc directory to set the LicenseManagerURL parameter to the host IP and port number 9119 where 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.
    
  4. 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.service script 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_path Dashboard installation path.
    -v Display detailed debugging information.
    -h Display help information.
    -version Display the Dashboard version.
    start Start the target services.
    restart Restart the target services.
    stop Stop the target services.
    status Check the status of the target services.
    prometheus Set the prometheus Service as the target service.
    webserver Set the webserver Service as the target service.
    exporter Set the exporter Service as the target service.
    gateway Set the gateway Service as the target service.
    all Set 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 systemctl command.

    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.service can view the Dashboard Enterprise Edition logs in the logs directory.

    For example:

    cat logs/prometheus.log
    

    The descriptions of the log files are as follows.

    Log file Description
    alertmanager.log Alertmanager service log.
    nebula-stats-exporter.log nebula-stats-exporter service log.
    prometheus.log Prometheus service log.
    br Backup and restore service log.
    webserver.log Dashboard service log.
    It takes effect only when the Log.Mode in the Dashboard configuration is console.
    access.log Access log.
    It takes effect only when the Log.Mode in the Dashboard configuration is file.
    error.log Error log.
    It takes effect only when the Log.Mode in the Dashboard configuration is file.
    severe.log Severe log.
    It takes effect only when the Log.Mode in the Dashboard configuration is file.
    slow.log Slow log.
    It takes effect only when the Log.Mode in the Dashboard configuration is file.
    stat.log Statistic log.
    It takes effect only when the Log.Mode in the Dashboard configuration is file.
  • 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} -b
    

    For example, to view the logs of the Prometheus service:

    journalctl -u nbd-prometheus.service -b
    

Next to do

Connect to Dashboard


Last update: July 5, 2023