Atom feed of this document
 

 About the Dashboard

You can use a dashboard interface with an OpenStack Compute installation with a web-based console provided by the Openstack-Dashboard project. It provides web-based interactions with the OpenStack Compute cloud controller through the OpenStack APIs. For more information about the Openstack-Dashboard project, please visit: https://github.com/openstack/horizon/. These instructions are for an example deployment configured with an Apache web server.

 System Requirements for the Dashboard

Because Apache does not serve content from a root user, you must use another user with sudo privileges and run as that user.

You should have a running OpenStack Compute installation with the Identity Service, Keystone, enabled for identity management.

The dashboard needs to be installed on the node that can contact the Identity Service.

You should know the URL of your Identity endpoint and the Compute endpoint.

You must know the credentials of a valid Identity service user.

You must have git installed. It's straightforward to install it with sudo apt-get install git-core.

Python 2.6 is required, and these instructions have been tested with Ubuntu 10.10. 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).

Optional components:

  • An Image Store (Glance) endpoint.

  • An Object Store (Swift) endpoint.

  • A Quantum (networking) endpoint.

 Installing the OpenStack Dashboard

Here are the overall steps for creating the OpenStack dashboard.

  1. Install the OpenStack Dashboard framework including Apache and related modules.

  2. Configure the Dashboard.

  3. Restart and run the Apache server.

Install the OpenStack Dashboard, as root:

# apt-get install -y memcached libapache2-mod-wsgi openstack-dashboard
# yum install -y memcached mod-wsgi openstack-dashboard

Next, modify the variable CACHE_BACKEND in /etc/openstack-dashboard/local_settings.py to match the ones set in /etc/memcached.conf. Open /etc/openstack-dashboard/local_settings.py and look for this line:

CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
[Note]Note

The address and port in the new value need to be equal to the ones set in /etc/memcached.conf.

If you change the memcached settings, restart the Apache web server for the changes to take effect.

[Note]Note

This guide has selected memcache as a session store for OpenStack Dashboard. There are other options available, each with benefits and drawbacks. Refer to the OpenStack Dashboard Session Storage section for more information.

 Configuring the Dashboard

Start the mysql command line client by running:

$ mysql -u root -p

Enter the MySQL root user's password when prompted.

To configure the MySQL database, create the dash database.

mysql> CREATE DATABASE dash;

Create a MySQL user for the newly-created dash database that has full control of the database.

mysql> GRANT ALL ON dash.* TO 'dash'@'%' IDENTIFIED BY
        'yourpassword';

Enter quit at the mysql> prompt to exit MySQL.

After configuring the local_settings.py as shown below, you can run the manage.py syncdb command to populate this newly-created database.

A full example local_settings.py file is included in the Appendix of the OpenStack Install and Deploy manual.

In the /etc/openstack-dashboard/local_settings.py file, change these options:

  • DATABASES: Change the database section to point to the MySQL database named dash:

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'dash',
            'USER': 'dash',
            'PASSWORD': 'yourpassword',
            'HOST': 'localhost',
            'default-character-set': 'utf8'
        },
    }
  • SWIFT_ENABLED: If an Object Storage (Swift) endpoint is available and configured in the Identity service catalog, set SWIFT_ENABLED = True.

  • QUANTUM_ENABLED: If a Network Connection (Quantum) service is available and configured in the Identity service catalog, set QUANTUM_ENABLED = True. The project is expected to become a core OpenStack project in the Folsom release. You can set also QUANTUM_ENABLED = False.

Run the manage.py syncdb command to initialize the database.

$ /usr/share/openstack-dashboard/manage.py syncdb 

As a result, you should see the following at the end of what returns:

Installing custom SQL ...
Installing indexes ...
DEBUG:django.db.backends:(0.008) CREATE INDEX `django_session_c25c2c28` ON `django_session` (`expire_date`);; args=()
No fixtures found.

If you want to avoid a warning when restarting apache2, create a blackhole directory in the dashboard directory like so:

#  sudo mkdir -p /var/lib/dash/.blackhole

Restart Apache to pick up the default site and symbolic link settings.

# /etc/init.d/apache2 restart

Restart the nova-api service to ensure the API server can connect to the Dashboard and to avoid an error displayed in the Dashboard.

sudo restart nova-api

 Validating the Dashboard Install

To validate the Dashboard installation, point your browser at http://192.168.206.130. Note that you cannot use VNC Console from a Chrome browser. You need both Flash installed and a Firefox browser. Once you connect to the Dashboard with the URL, you should see a login window. Enter the credentials for users you created with the Identity Service, Keystone. For example, enter "adminUser" for the username and "secretword" as the password.

 Launching Instances using Dashboard

The Dashboard can be used to launch instances. This section explains the various steps to be followed to launch a instance.

 Modify Security Groups

Before launching a VM, first modify the Security Groups rules to allow us to ping and SSH to the instances. This is done by editing the default security group or adding a new security group. For ease of understanding, modify the default security group.

Select IP protocol TCP and enter 22 in "From Port" and "To Port" and CIDR 0.0.0.0/0. This opens port 22 for requests from any IP. If you want requests from particular range of IP, provide it in CIDR field.

Select IP protocol ICMP and enter -1 in "From Port" and "To Port" and CIDR 0.0.0.0/0. This allows ping from any IP. If you want ping requests from particular range of IP, provide it in CIDR field.

 Adding Keypair

Next add a Keypair. Once a Keypair is added, the public key would be downloaded. This key can be used to SSH to the launched instance.

Once this is done, we are now all set to launch an Instance

 Launching Instance

Click Images & Snapshots and launch a required instance from the list of images available.

Click launch on the required image. Provide a Server Name, select the flavor, the keypair added above and the default security group. Provide the number of instances required. Once these details are provided, click Launch Instance.

Once the status is Active, the instance is ready and we can ping and SSH to the instance.

 Make a secure connection to the launched instance

Here are the steps to SSH into an instance using the downloaded keypair file. The username is ubuntu for the Ubuntu cloud images on TryStack.

  1. Download the MyKey.pem file from the OpenStack Dashboard.

  2. In a command line interface, modify the access to the .pem file:

    $ chmod 0600 MyKey.pem

  3. Use the ssh-add command to ensure that the keypair is known to SSH:

    $ ssh-add MyKey.pem
  4. Copy the IP address from the MyFirstInstance.

  5. Use the SSH command to make a secure connection to the instance:

    $ ssh -i MyKey.pem ubuntu@10.0.0.2

    You should see a prompt asking "Are you sure you want to continue connection (yes/no)?" Type yes and you have successfully connected.



loading table of contents...