Contents:
Tuskar UI is a user interface for Tuskar, a management API for OpenStack deployments. It is a plugin for OpenStack Horizon.
Tuskar UI endeavours to be a stateless UI, relying on Tuskar API calls as much as possible. We use existing Horizon libraries and components where possible. If added libraries and components are needed, we will work with the OpenStack community to push those changes back into Horizon.
Interested in seeing Tuskar and Tuskar UI in action? Watch a demo!
Use the Installation Guide to install Tuskar UI.
This project is licensed under the Apache License, version 2. More information can be found in the LICENSE file.
Join us on IRC (Internet Relay Chat):
Network: Freenode (irc.freenode.net/tuskar)
Channel: #tuskar
Or send an email to openstack-dev@lists.openstack.org.
If you want to install and configure the entire TripleO + Tuskar + Tuskar UI stack, you can use the devtest installation guide.
Otherwise, you can use the installation instructions for Tuskar UI below.
Installation prerequisites are:
You may find the Tuskar install guide helpful.
Tuskar UI is a Django app written in Python and has a few installation dependencies:
On a RHEL 6 system, you should install the following:
yum install git python-devel swig openssl-devel mysql-devel libxml2-devel libxslt-devel gcc gcc-c++
The above should work well for similar RPM-based distributions. For other distros or platforms, you will obviously need to convert as appropriate.
Then, you’ll want to use the easy_install utility to set up a few other tools:
easy_install pip
easy_install nose
Begin by cloning the Horizon and Tuskar UI repositories:
git clone git://github.com/openstack/horizon.git
git clone git://github.com/openstack/python-tuskarclient.git
git clone git://github.com/openstack/tuskar-ui.git
Go into horizon and install a virtual environment for your setup:
cd horizon
python tools/install_venv.py
Next, run run_tests.sh to have pip install Horizon dependencies:
./run_tests.sh
Set up your local_settings.py file:
cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
Open up the copied local_settings.py file in your preferred text editor. You will want to customize several settings:
Install Tuskar UI with all dependencies in your virtual environment:
tools/with_venv.sh pip install -e ../python-tuskarclient/
tools/with_venv.sh pip install -e ../tuskar-ui/
And enable it in Horizon:
cp ../tuskar-ui/_50_tuskar.py.example openstack_dashboard/local/enabled/_50_tuskar.py
Then disable the other dashboards:
cp ../tuskar-ui/_10_admin.py.example openstack_dashboard/local/enabled/_10_admin.py
cp ../tuskar-ui/_20_project.py.example openstack_dashboard/local/enabled/_20_project.py
cp ../tuskar-ui/_30_identity.py.example openstack_dashboard/local/enabled/_30_identity.py
If everything has gone according to plan, you should be able to run:
tools/with_venv.sh ./manage.py runserver
and have the application start on port 8080. The Tuskar UI dashboard will be located at http://localhost:8080/infrastructure
If you wish to access it remotely (i.e., not just from localhost), you need to open port 8080 in iptables:
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
and launch the server with 0.0.0.0:8080 on the end:
tools/with_venv.sh ./manage.py runserver 0.0.0.0:8080
To allow users to load a bunch of nodes at once, there is possibility to upload CSV file with given list of nodes. This file should be formatted as
driver,address,username,password/ssh key,mac addresses,cpu architecture,number of CPUs,available memory,available storage
Even if there is no all data available, we assume empty values for missing keys and try to parse everything, what is possible.
The code repository is located at OpenStack. Please go there if you want to check it out:
The list of bugs and blueprints is on Launchpad:
https://launchpad.net/tuskar-ui
We use OpenStack’s Gerrit for the code contributions:
https://review.openstack.org/#/q/status:open+project:openstack/tuskar-ui,n,z
and we follow the OpenStack Gerrit Workflow.
If you’re interested in the code, here are some key places to start:
There are several ways to run tests for tuskar-ui.
Using tox:
This is the easiest way to run tests. When run, tox installs dependencies, prepares the virtual python environment, then runs test commands. The gate tests in gerrit usually also use tox to run tests. For avaliable tox environments, see tox.ini.
By running run_tests.sh:
Tests can also be run using the run_tests.sh script, to see available options, run it with the --help option. It handles preparing the virtual environment and executing tests, but in contrast with tox, it does not install all dependencies, e.g. jshint must be installed before running the jshint testcase.
Manual tests:
To manually check tuskar-ui, it is possible to run a development server for tuskar-ui by running run_tests.sh --runserver.
To run the server with the settings used by the test environment: run_tests.sh --runserver 0.0.0.0:8000 --settings=tuskar_ui.test.settings