1.1. Environment Preparation
Please refer to Environment Preparation
1.1.1. Create a Working Directory
export HOME=/home/work
export WORKSPACE=$HOME/open-falcon
mkdir -p $WORKSPACE
cd $WORKSPACE
1.1.2. Copy the Code of Frontend Modules
cd $WORKSPACE
git clone https://github.com/open-falcon/dashboard.git
1.1.3. 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
1.1.4. Initialize the Database
Please refer to Environment Preparation
1.1.5. 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
module
API_ADDR = "http://127.0.0.1:8080/api/v1"
## 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
1.1.6. Start as Developer
./env/bin/python wsgi.py
open http://127.0.0.1:8081 in your browser.
1.1.7. Start in Production Environment
bash control start
open http://127.0.0.1:8081 in your browser.
1.1.8. Stop Dashboard
bash control stop
1.1.9. Check the Log
bash control tail
1.1.10. 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.