Horizon requires the OPENSTACK_KEYSTONE_DEFAULT_DOMAIN value to be the name of the default domain, not the ID[1]. The name of the default keystone domain is 'Default', not 'default', which is its ID. This patch updates the horizon install guide to demonstrate the correct default value. [1] https://review.openstack.org/#/c/389679/ backport: ocata Change-Id: I2c7a9e0f0b563b1f0460d22745f224dfe542287e
15 KiB
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 <keystone-install> section.
Install and configure components
obs
Install the packages:
# zypper install openstack-dashboard
rdo
Install the packages:
# yum install openstack-dashboard
ubuntu
Install the packages:
# apt install openstack-dashboard
debian
Install the packages:
# apt install openstack-dashboard-apacheRespond to prompts for web server configuration.
Note
The automatic configuration process generates a self-signed SSL certificate. Consider obtaining an official certificate for production environments.
Note
There are two modes of installation. One using
/horizonas the URL, keeping your default vhost and only adding an Alias directive: this is the default. The other mode will remove the default Apache vhost and install the dashboard on the webroot. It was the only available option before the Liberty release. If you prefer to set the Apache configuration manually, install theopenstack-dashboardpackage instead ofopenstack-dashboard-apache.
obs
Configure the web server:
# cp /etc/apache2/conf.d/openstack-dashboard.conf.sample \ /etc/apache2/conf.d/openstack-dashboard.conf # a2enmod rewriteEdit the
/srv/www/openstack-dashboard/openstack_dashboard/local/local_settings.pyfile and complete the following actions:Configure the dashboard to use OpenStack services on the
controllernode:OPENSTACK_HOST = "controller"Allow your hosts to access the dashboard:
ALLOWED_HOSTS = ['one.example.com', 'two.example.com']Note
ALLOWED_HOSTScan also be['*']to accept all hosts. This may be useful for development work, but is potentially insecure and should not be used in production. See Django documentation for further information.Configure the
memcachedsession 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_HOSTEnable support for domains:
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = TrueConfigure API versions:
OPENSTACK_API_VERSIONS = { "identity": 3, "image": 2, "volume": 2, }Configure
Defaultas the default domain for users that you create via the dashboard:OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"Configure
useras the default role for users that you create via the dashboard:OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"If you chose networking option 1, disable support for layer-3 networking services:
OPENSTACK_NEUTRON_NETWORK = { ... 'enable_router': False, 'enable_quotas': False, 'enable_distributed_router': False, 'enable_ha_router': False, 'enable_lb': False, 'enable_firewall': False, 'enable_vpn': False, 'enable_fip_topology_check': False, }Optionally, configure the time zone:
TIME_ZONE = "TIME_ZONE"Replace
TIME_ZONEwith an appropriate time zone identifier. For more information, see the list of time zones.
rdo
- Edit the
/etc/openstack-dashboard/local_settingsfile and complete the following actions:Configure the dashboard to use OpenStack services on the
controllernode:OPENSTACK_HOST = "controller"Allow your hosts to access the dashboard:
ALLOWED_HOSTS = ['one.example.com', 'two.example.com']Note
ALLOWED_HOSTS can also be ['*'] to accept all hosts. This may be useful for development work, but is potentially insecure and should not be used in production. See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts for further information.
Configure the
memcachedsession 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_HOSTEnable support for domains:
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = TrueConfigure API versions:
OPENSTACK_API_VERSIONS = { "identity": 3, "image": 2, "volume": 2, }Configure
Defaultas the default domain for users that you create via the dashboard:OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"Configure
useras the default role for users that you create via the dashboard:OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"If you chose networking option 1, disable support for layer-3 networking services:
OPENSTACK_NEUTRON_NETWORK = { ... 'enable_router': False, 'enable_quotas': False, 'enable_distributed_router': False, 'enable_ha_router': False, 'enable_lb': False, 'enable_firewall': False, 'enable_vpn': False, 'enable_fip_topology_check': False, }Optionally, configure the time zone:
TIME_ZONE = "TIME_ZONE"Replace
TIME_ZONEwith an appropriate time zone identifier. For more information, see the list of time zones.
ubuntu or debian
- Edit the
/etc/openstack-dashboard/local_settings.pyfile and complete the following actions:Configure the dashboard to use OpenStack services on the
controllernode:OPENSTACK_HOST = "controller"In the Dashboard configuration section, allow your hosts to access Dashboard:
ALLOWED_HOSTS = ['one.example.com', 'two.example.com']Note
- Do not edit the
ALLOWED_HOSTSparameter under the Ubuntu configuration section. ALLOWED_HOSTScan also be['*']to accept all hosts. This may be useful for development work, but is potentially insecure and should not be used in production. See the Django documentation for further information.
- Do not edit the
Configure the
memcachedsession 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_HOSTEnable support for domains:
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = TrueConfigure API versions:
OPENSTACK_API_VERSIONS = { "identity": 3, "image": 2, "volume": 2, }Configure
Defaultas the default domain for users that you create via the dashboard:OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"Configure
useras the default role for users that you create via the dashboard:OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"If you chose networking option 1, disable support for layer-3 networking services:
OPENSTACK_NEUTRON_NETWORK = { ... 'enable_router': False, 'enable_quotas': False, 'enable_ipv6': False, 'enable_distributed_router': False, 'enable_ha_router': False, 'enable_lb': False, 'enable_firewall': False, 'enable_vpn': False, 'enable_fip_topology_check': False, }Optionally, configure the time zone:
TIME_ZONE = "TIME_ZONE"Replace
TIME_ZONEwith an appropriate time zone identifier. For more information, see the list of time zones.
Finalize installation
ubuntu or debian
Reload the web server configuration:
# service apache2 reload
obs
Restart the web server and session storage service:
# systemctl restart apache2.service memcached.serviceNote
The
systemctl restartcommand starts each service if not currently running.
rdo
Restart the web server and session storage service:
# systemctl restart httpd.service memcached.serviceNote
The
systemctl restartcommand starts each service if not currently running.