Environment Preparation

Please refer to Environment Preparation

Create a Working Directory

export HOME=/home/work
export WORKSPACE=$HOME/open-falcon
mkdir -p $WORKSPACE

Copy the Code of Frontend Modules

git clone https://github.com/open-falcon/dashboard.git

Install the Dependency Pack

yum install -y python-virtualenv
yum install -y python-devel
yum install -y openldap-devel
yum install -y mysql-devel
yum groupinstall "Development tools"

cd $WORKSPACE/dashboard/
virtualenv ./env

./env/bin/pip install -r pip_requirements.txt -i https://pypi.douban.com/simple

Initialize the Database

Please refer to Environment Preparation

Change the Configuration

The configuration file of Dashboard is 'rrd/config.py` please change according to actual usage

## API_ADDR standd for the addess of backend API
API_ADDR = "" 

## change PORTAL_DB_* according to actual usage; default user name is "root" and  default password is null
## change ALARM_DB_* according to actual usage; default user name is "root" and  default password is

Start as Developer

./env/bin/python wsgi.py

open in your browser.

Start in Production Environment

bash control start

open in your browser.

Stop Dashboard

bash control stop

Check the Log

bash control tail

Dashboard User Management

Dashboard does not create any account including supervisor account by default. Users need to sign up in the webpage.
If you want to have an ultra supervisor account, please create an account whose name is root. (The first account whose name is root will be considered as ultra supervisor.) The ultra supervisor can allocate permissions to normal users.

Tips:Anyone who can open the page of Dashboard can create an account. So do not forget to disable the signning up feature of Dashboard after use. What you need to do is to change the value of item "signup_disable" to "true" in the API configuration file "cfg.json" then reboot API. When you want to create an account for someone, just recover the configuration and then disbale the item again.
Copyright 2015 - 2018 Xiaomi Inc. all right reserved,powered by Gitbook该文件修订时间: 2018-11-20 15:12:29