Jump to: navigation, search

Difference between revisions of "OpenStackDashboard"

(Updated document to reflect Keystone integration.)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
= [[OpenStack]] Dashboard =
 
= [[OpenStack]] Dashboard =
The OpenStack Dashboard is a reference implementation for the django-nova project.  It is housed on Github.
 
  
To view a quick video tour of the dashboard in action, please see this [http://blog.rabbityard.com/post/2937203639/openstack-dashboard-video blog post].
+
The OpenStack Dashboard (Dashboard) provides a baseline user interface for managing OpenStack services. It is a reference implementation built using the django-openstack project which contains all of the core functionality needed to develop a site-specific implementation. This page provides step-by-step instructions for installing and running Dashboard.
  
You can also view a more recent demo at http://vimeo.com/20787736.
+
== Requirements ==
 +
 
 +
* python 2.6 or 2.7 (not tested with python 3.0)
 +
* [http://git-scm.com/ git]
 +
* a [https://github.com/rackspace/keystone Keystone] (identity and authentication service) endpoint
 +
* a Compute ([[Nova|Nova]]) enpoint
  
== Prerequisites for Running The [[OpenStack]] Dashboard ==
+
=== Optional ===
* python 2.6 (not tested with python 3.0).
+
* an Image Store ([[InstallInstructions/Glance|Glance]]) endpoint
* Running a [https://github.com/rackspace/keystone Keystone] instance.
+
* an Object Store ([[Swift|Swift]]) endpoint
* URL of your keystone instance (this is usually something like http://localhost:5000/v2.0).
+
* a [[Quantum|Quantum]] (networking) endpoint
* Admin token for your keystone instance.
 
  
These instructions have only been tested on Ubuntu 10.10 server.
+
Dashboard is tested on Ubuntu 10.10 server, however, it should run on any system with Python 2.6 or 2.7 that is capable of running Django including Mac OS X (installing prerequisites may differ depending on platform).
  
 
== Installation Overview ==
 
== Installation Overview ==
The overall steps for building the dashboard are:
 
  
# Get the source for openstack-dashboard from Github.
+
Installing Dashboard involves four basic steps:
# Build and configure openstack-dashboard.
+
 
# Run the server.
+
# get the source from Github
 +
# configure
 +
# install
 +
# run
  
These instructions are for a '''test''' openstack-dashboard deployment. They configure your dashboard to use the default django server. To create a more robust installation, you should configure this with an Apache webserver.
+
These instructions are for a '''development''' openstack-dashboard deployment. For production deployments consider using Apache (more instructions on the [https://docs.djangoproject.com/en/dev/howto/deployment/modpython/ Django website].
  
 
== Get The Source ==
 
== Get The Source ==
To prevent any interruption to our hacking, let's grab all the code that we need.
 
  
=== Create Your Source Directory ===
+
Execute the following in a terminal on the host you would like to install Dashboard on:
 +
 
 +
 
 +
<pre><nowiki>
 +
$ git clone https://github.com/4P/openstack-dashboard
 +
</nowiki></pre>
 +
 
 +
 
 +
You should now have a directory called openstack-dashboard, which contains the Dashboard application.
 +
 
 +
== Configure Dashboard ==
 +
 
 +
With the reference implementation built, it is now time to configure our Dashboard application. The first step in configuring the application is to create your local_settings.py file:
 +
 
 +
 
 +
<pre><nowiki>
 +
$ cd openstack-dashboard/openstack-dashboard
 +
$ cp local/local_settings.py.example local/local_settings.py
 +
</nowiki></pre>
 +
 
 +
 
 +
The local_settings.py file contains a default starting point for running Dashboard. There are three key sections of the local_settings.py file that need to be edited for most deployments.
 +
 
 +
=== Keystone Configuration ===
 +
 
 +
Dashboard requires a Keystone endpoint for identity and authentication. The settings in local_settings.py pertaining to Keystone are:
 +
 
 +
# OPENSTACK_ADMIN_TOKEN (a pre-configured Keystone admin token)
 +
# OPENSTACK_KEYSTONE_URL (the Keystone endpoint URL)
 +
 
 +
General instructions for Installing the latest Keystone can be found on [https://github.com/openstack/keystone Github]. For a good all-in-one Nova/Glance/Keystone installation there is the [https://github.com/cloudbuilders/devstack devstack] project.
 +
 
 +
The admin token can be generated by executing something like the following using the keystone-manage command on the Keystone host:
 +
 
 +
 
 +
<pre><nowiki>
 +
keystone-manage token add 999888777666 admin admin 2015-02-05T00:00
 +
</nowiki></pre>
 +
 
 +
 
 +
To use this token you would add the following to local_settings.py:
 +
 
  
 
<pre><nowiki>
 
<pre><nowiki>
$ mkdir src
+
OPENSTACK_ADMIN_TOKEN = "999888777666"
$ cd src
 
 
</nowiki></pre>
 
</nowiki></pre>
  
=== Get openstack-dashboard ===
+
 
openstack-dashboard provides all the look and feel for the dashboard.
+
The Keystone endpoint setting takes the following form:
  
  
 
<pre><nowiki>
 
<pre><nowiki>
$ git clone https://github.com/4P/openstack-dashboard
+
OPENSTACK_KEYSTONE_URL = "http://mykeystoneurl:5000/v2.0/"
 +
</nowiki></pre>
 +
 
 +
 
 +
=== Swift Configuration ===
 +
 
 +
If a Swift endpoint is available and configured in the Keystone service catalog turning on the Swift UI is as simple as adding the following to local_settings.py:
 +
 
 +
 
 +
<pre><nowiki>
 +
SWIFT_ENABLED = True
 
</nowiki></pre>
 
</nowiki></pre>
  
You should now have a directory called openstack-dashboard, which contains the OpenStack Dashboard application.
 
  
== Build and Configure openstack-dashboard ==
+
=== Quantum Configuration ===
With the reference implementation built, it is now time to configure our OpenStack Dashboard application. The first step in configuring the application is to create your local_settings.py file:
+
 
 +
Quantum currently requires the following settings:
  
  
 
<pre><nowiki>
 
<pre><nowiki>
$ cd openstack-dashboard/local
+
QUANTUM_ENABLED = True
$ cp local_settings.py.example local_settings.py
+
QUANTUM_URL = '127.0.0.1'
$ vi local_settings.py
+
QUANTUM_PORT = '9696'
 +
QUANTUM_TENANT = '1234'
 +
QUANTUM_CLIENT_VERSION='0.1'
 
</nowiki></pre>
 
</nowiki></pre>
  
In the local_settings.py file, we need to change several important options:
 
  
* OPENSTACK_ADMIN_TOKEN : Token for Keystone endpoint.
+
== Install Dashboard ==
* OPENSTACK_KEYSTONE_URL : URL for the Keystone endpoint.
+
 
* SWIFT_ENABLED : Flag to enable/disable swift support from the dashboard.
+
After Dashboard has been configured install the Dashboard virtual environment using the terminal commands below:
  
Now it's time to install the openstack-dashboard environment. This installs all the dependencies for openstack-dashboard.
+
Note: the instructions below are for Ubuntu, however, setuptools can be installed on a wide variety of platforms: http://pypi.python.org/pypi/setuptools
  
  
 
<pre><nowiki>
 
<pre><nowiki>
$ apt-get install -y python-setuptools
+
$ apt-get install -y python-setuptools  
$ cd ..
 
 
$ sudo easy_install virtualenv
 
$ sudo easy_install virtualenv
 
$ python tools/install_venv.py
 
$ python tools/install_venv.py
 
</nowiki></pre>
 
</nowiki></pre>
  
This will take a bit as it needs to download a number of dependencies from the internet.
 
  
== Run the Server ==
+
Installing the virtual environment will take some time depending on download speeds.
Now run the built-in server at an unprivileged port so that you can view your results:
+
 
 +
== Run Dashboard ==
 +
 
 +
Dashboard is run using the standard Django manage.py script from the context of the virtual environment:
  
  
Line 80: Line 136:
 
</nowiki></pre>
 
</nowiki></pre>
  
Make sure that your firewall isn't blocking TCP/8000 and just point your browser at this server on port 8000. If you are running the server on the same machine as your browser, this would be "http://localhost:8000".
 
  
== Configuring the VNC Console ==
+
At this point the Dashboard should be available at http://dashboardhost:8000/.
 +
 
 +
== Optional Step: Configure VNC ==
 +
 
 
Note: Tested only with KVM but should work with other hypervisors.
 
Note: Tested only with KVM but should work with other hypervisors.
  
Line 92: Line 150:
 
git clone https://github.com/openstack/noVNC.git
 
git clone https://github.com/openstack/noVNC.git
 
</nowiki></pre>
 
</nowiki></pre>
 +
  
 
Next, run the vncproxy by creating a new screen window with <ctrl>-a <ctrl>-c.
 
Next, run the vncproxy by creating a new screen window with <ctrl>-a <ctrl>-c.
Line 101: Line 160:
 
bin/nova-vncproxy --vncproxy_wwwroot ~/src/noVNC --flagfile=/path/to/flagfile
 
bin/nova-vncproxy --vncproxy_wwwroot ~/src/noVNC --flagfile=/path/to/flagfile
 
</nowiki></pre>
 
</nowiki></pre>
 +
  
 
To your nova.conf, you also need to add the flag: --vncproxy_url=http://<ip of vnc proxy>:6080
 
To your nova.conf, you also need to add the flag: --vncproxy_url=http://<ip of vnc proxy>:6080
  
 
Now your VNC button should launch a VNC window so that you can access the instance.
 
Now your VNC button should launch a VNC window so that you can access the instance.
 +
 +
= Video Demos =
 +
 +
'''Note''': These videos are out-of-date and do not reflect the latest Dashboard implementation.
 +
 +
To view a quick video tour of Dashboard in action, please see this [http://blog.rabbityard.com/post/2937203639/openstack-dashboard-video blog post].
 +
 +
You can also view a more recent demo at http://vimeo.com/20787736.

Revision as of 20:04, 19 September 2011

OpenStack Dashboard

The OpenStack Dashboard (Dashboard) provides a baseline user interface for managing OpenStack services. It is a reference implementation built using the django-openstack project which contains all of the core functionality needed to develop a site-specific implementation. This page provides step-by-step instructions for installing and running Dashboard.

Requirements

  • python 2.6 or 2.7 (not tested with python 3.0)
  • git
  • a Keystone (identity and authentication service) endpoint
  • a Compute (Nova) enpoint

Optional

  • an Image Store (Glance) endpoint
  • an Object Store (Swift) endpoint
  • a Quantum (networking) endpoint

Dashboard is tested on Ubuntu 10.10 server, however, it should run on any system with Python 2.6 or 2.7 that is capable of running Django including Mac OS X (installing prerequisites may differ depending on platform).

Installation Overview

Installing Dashboard involves four basic steps:

  1. get the source from Github
  2. configure
  3. install
  4. run

These instructions are for a development openstack-dashboard deployment. For production deployments consider using Apache (more instructions on the Django website.

Get The Source

Execute the following in a terminal on the host you would like to install Dashboard on:


$ git clone https://github.com/4P/openstack-dashboard


You should now have a directory called openstack-dashboard, which contains the Dashboard application.

Configure Dashboard

With the reference implementation built, it is now time to configure our Dashboard application. The first step in configuring the application is to create your local_settings.py file:


$ cd openstack-dashboard/openstack-dashboard
$ cp local/local_settings.py.example local/local_settings.py


The local_settings.py file contains a default starting point for running Dashboard. There are three key sections of the local_settings.py file that need to be edited for most deployments.

Keystone Configuration

Dashboard requires a Keystone endpoint for identity and authentication. The settings in local_settings.py pertaining to Keystone are:

  1. OPENSTACK_ADMIN_TOKEN (a pre-configured Keystone admin token)
  2. OPENSTACK_KEYSTONE_URL (the Keystone endpoint URL)

General instructions for Installing the latest Keystone can be found on Github. For a good all-in-one Nova/Glance/Keystone installation there is the devstack project.

The admin token can be generated by executing something like the following using the keystone-manage command on the Keystone host:


keystone-manage token add 999888777666 admin admin 2015-02-05T00:00


To use this token you would add the following to local_settings.py:


OPENSTACK_ADMIN_TOKEN = "999888777666"


The Keystone endpoint setting takes the following form:


OPENSTACK_KEYSTONE_URL = "http://mykeystoneurl:5000/v2.0/"


Swift Configuration

If a Swift endpoint is available and configured in the Keystone service catalog turning on the Swift UI is as simple as adding the following to local_settings.py:


SWIFT_ENABLED = True


Quantum Configuration

Quantum currently requires the following settings:


QUANTUM_ENABLED = True
QUANTUM_URL = '127.0.0.1'
QUANTUM_PORT = '9696'
QUANTUM_TENANT = '1234'
QUANTUM_CLIENT_VERSION='0.1'


Install Dashboard

After Dashboard has been configured install the Dashboard virtual environment using the terminal commands below:

Note: the instructions below are for Ubuntu, however, setuptools can be installed on a wide variety of platforms: http://pypi.python.org/pypi/setuptools


$ apt-get install -y python-setuptools 
$ sudo easy_install virtualenv
$ python tools/install_venv.py


Installing the virtual environment will take some time depending on download speeds.

Run Dashboard

Dashboard is run using the standard Django manage.py script from the context of the virtual environment:


$ tools/with_venv.sh dashboard/manage.py runserver 0.0.0.0:8000


At this point the Dashboard should be available at http://dashboardhost:8000/.

Optional Step: Configure VNC

Note: Tested only with KVM but should work with other hypervisors.

In the same /src directory as your Dashboard is housed, get a copy of noVNC.


cd ~/src
git clone https://github.com/openstack/noVNC.git


Next, run the vncproxy by creating a new screen window with <ctrl>-a <ctrl>-c.

You should run vncproxy with a pointer to the flag file as well:


bin/nova-vncproxy --vncproxy_wwwroot ~/src/noVNC --flagfile=/path/to/flagfile


To your nova.conf, you also need to add the flag: --vncproxy_url=http://<ip of vnc proxy>:6080

Now your VNC button should launch a VNC window so that you can access the instance.

Video Demos

Note: These videos are out-of-date and do not reflect the latest Dashboard implementation.

To view a quick video tour of Dashboard in action, please see this blog post.

You can also view a more recent demo at http://vimeo.com/20787736.