Install and configure

Install and configure

This section describes how to install and configure the dashboard on the controller node.

The only core service required by the dashboard is the Identity service. You can use the dashboard in combination with other services, such as Image service, Compute, and Networking. You can also use the dashboard in environments with stand-alone services such as Object Storage.

Note

This section assumes proper installation, configuration, and operation of the Identity service using the Apache HTTP server and Memcached service as described in the Install and configure the Identity service section.

Install and configure components

Note

Default configuration files vary by distribution. You might need to add these sections and options rather than modifying existing sections and options. Also, an ellipsis (...) in the configuration snippets indicates potential default configuration options that you should retain.

  1. Install the packages:

    # pkg install py27-horizon
    
  1. Edit the /usr/local/etc/apache24/Includes/openstack-dashboard.conf file:

    WSGIScriptAlias / /usr/local/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi process-group=horizon
    WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10 display-name=%{GROUP}
    WSGIProcessGroup horizon
    
    Alias /static/dashboard /usr/local/lib/python2.7/site-packages/openstack_dashboard/static/dashboard
    
    <Directory /usr/local/lib/python2.7/site-packages/openstack_dashboard/static>
    <IfVersion >= 2.4>
       Require all granted
    </IfVersion>
    <IfVersion < 2.4>
       Order allow,deny
       Allow from all
    </IfVersion>
    </Directory>
    
    <Directory /usr/local/lib/python2.7/site-packages/openstack_dashboard/wsgi>
    <IfVersion >= 2.4>
       Require all granted
    </IfVersion>
    <IfVersion < 2.4>
       Order allow,deny
       Allow from all
    </IfVersion>
    </Directory>
    
  1. Create the /usr/local/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py file:

    # cd /usr/local/lib/python2.7/site-packages/openstack_dashboard/local
    # cp local_settings.example local_settings.py
    
  2. Edit the /usr/local/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py file and complete the following actions:

    • Specify the directory for storing assets (CSS, JS)

      STATIC_ROOT = '/usr/local/lib/python2.7/site-packages/openstack_dashboard/static'
      
    • Configure the dashboard to use OpenStack services on the controller node:

      OPENSTACK_HOST = "controller"
      
    • Allow all hosts to access the dashboard:

      ALLOWED_HOSTS = ['*', ]
      
    • Configure the memcached session storage service:

      SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
      
      CACHES = {
          'default': {
               'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
               'LOCATION': 'controller:11211',
          }
      }
      

      Note

      Comment out any other session storage configuration.

    • Enable the Identity API version 3:

      OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
      
    • Enable support for domains:

      OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
      
    • Configure API versions:

      OPENSTACK_API_VERSIONS = {
          "identity": 3,
          "image": 2,
          "volume": 2,
      }
      
    • Configure default as the default domain for users that you create via the dashboard:

      OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
      
    • Configure user as the default role for users that you create via the dashboard:

      OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
      
    • Optionally, configure the time zone:

      TIME_ZONE = "TIME_ZONE"
      

      Replace TIME_ZONE with an appropriate time zone identifier. For more information, see the list of time zones.

  3. Set permissions

    # chown -R horizon /usr/local/lib/python2.7/site-packages/openstack_dashboard/static
    # chown -R horizon /usr/local/lib/python2.7/site-packages/openstack_dashboard/local
    

Finalize installation

  • Restart the web server and session storage service:

    # service apache24 restart
    # service memcached restart
    

    Note

    The service <service name> restart command starts each service if not currently running.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.