Dashboard uses SQLite database by default. For a production use, MySQL or PostgreSQL may be more preferable. The procedure for MySQL is given below. Procedure for PostgreSQL will be very similar.
Install python-dev and libhmysqlclient-dev
sudo apt-get install libmysqlclient-dev sudo apt-get install python-dev
Activate virtualenv and install mysql-python package inside the virtual environment of Dashboard.
cd /opt/osdb/openstack-dashboard sudo bash source .dashboard-venv/bin/activate easy_install mysql-python
Create a Mysql database user with all privileges on OpenStack Dashboard database
mysql -uroot -pmygreatsecret >create database dashboarddb; >grant ALL on dashboarddb.* to nova@localhost identified by 'mygreatsecret';
Update the DATABASES section of the Django's local_settings.py file (/opt/osdb/openstack-dashboard/local/local_settings.py) with the MySQL database settings. Here is the relevant extract from the updated file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'dashboarddb',
'USER': 'nova',
'PASSWORD': 'mygreatsecret',
'HOST': 'localhost',
'default-character-set': 'utf8',
}
}
Create the schema in the database
sudo tools/with_venv.sh dashboard/manage.py syncdb
