This page describes how to setup the Sahara dashboard UI component by either installing it as part of DevStack or installing it in an isolated environment and running from the command line.
The easiest way to have a local Sahara UI environment with DevStack is to include the Sahara-Dashboard component in DevStack. This can be accomplished by modifying your DevStack local.conf file to enable sahara-dashboard. See the DevStack documentation for more information on installing and configuring DevStack.
If you are developing Sahara from an OSX environment you will need to run DevStack on a virtual machine. See Setup VM for DevStack on OSX for more information.
After Sahara-Dashboard installation as a part of DevStack, Horizon will contain a Sahara tab. Sahara-Dashboard source code will be located at $DEST/sahara-dashboard which is usually /opt/stack/sahara-dashboard.
Note The host where you are going to perform installation has to be able to connect to all OpenStack endpoints. You can list all available endpoints using the following command:
$ keystone endpoint-list
$ sudo apt-get update $ sudo apt-get install git-core python-dev gcc python-setuptools python-virtualenv node-less libssl-dev libffi-devOn Ubuntu 12.10 and higher you have to install the following lib as well:
$ sudo apt-get install nodejs-legacy
Here is an example for the Icehouse release:
$ git clone https://github.com/openstack/horizon -b stable/icehouse
Then install the virtual environment:
$ python tools/install_venv.py
$ cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
Set the proper values for host and url variables:
OPENSTACK_HOST = "ip of your controller" SAHARA_URL = "url for sahara (e.g. "http://localhost:8386/v1.1")"If you are using Neutron instead of Nova-Network:
SAHARA_USE_NEUTRON = TrueIf you are using Nova-Network with auto_assign_floating_ip=False add the following parameter:
AUTO_ASSIGNMENT_ENABLED = False
$ git clone https://github.com/openstack/sahara-dashboard.git
$ export SAHARA_DASHBOARD_HOME=$(pwd)/sahara-dashboard
$ ln -s $SAHARA_DASHBOARD_HOME/saharadashboard .venv/lib/python2.7/site-packages/saharadashboard
$ .venv/bin/pip install python-saharaclient
Add sahara to to the Horizon config:
HORIZON_CONFIG = { 'dashboards': ('nova', 'syspanel', 'settings', 'sahara'),and add saharadashboard to the installed apps:
INSTALLED_APPS = ( 'saharadashboard', ....
$ tools/with_venv.sh python manage.py runserver 0.0.0.0:8080
This will start Horizon in debug mode. That means the logs will be written to console and if any exceptions happen, you will see the stack-trace rendered as a web-page.
Debug mode can be disabled by changing DEBUG=True to False in local_settings.py. In that case Horizon should be started slightly differently, otherwise it will not serve static files:
$ tools/with_venv.sh python manage.py runserver --insecure 0.0.0.0:8080
Note It is not recommended to use Horizon in this mode for production.
If you have changed any *.py files in $SAHARA_DASHBOARD_HOME directory, Horizon will notice that and reload automatically. However changes made to non-python files may not be noticed, so you have to restart Horizon again manually, as described in step 10.