CentOS Stream 8
Sponsored Link

OpenStack Wallaby : Configure Horizon2021/04/22

 
Configure OpenStack Dashboard Service (Horizon).
It's possible to control OpenStack on Web GUI to set Dashboard.
This example is based on the environment like follows.
        eth0|10.0.0.30 
+-----------+-----------+
|    [ Control Node ]   |
|                       |
|  MariaDB    RabbitMQ  |
|  Memcached  httpd     |
|  Keystone   Glance    |
|  Nova API   Horizon   |
+-----------------------+

[1] Install Horizon.
# install from Wallaby, EPEL, PowerTools

[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-wallaby,powertools,epel -y install openstack-dashboard
[2] Configure Horizon.
[root@dlp ~(keystone)]#
vi /etc/openstack-dashboard/local_settings
# line 39 : set Hosts you allow to access

# to specify wildcard ['*'], allow all

ALLOWED_HOSTS = ['
*
', ]
# line 94-99 : uncomment and specify Memcache server Host

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '10.0.0.30:11211',
    },
}

# line 105 : add

SESSION_ENGINE = "django.contrib.sessions.backends.cache"
# line 118 : set Openstack Host

# line 119 : comment out and add a line to specify URL of Keystone Host

OPENSTACK_HOST = "
10.0.0.30
"
#
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_URL = "http://10.0.0.30:5000/v3"
# line 123 : set your timezone

TIME_ZONE = "
Asia/Tokyo
"
# add to the end

WEBROOT = '/dashboard/'
LOGIN_URL = '/dashboard/auth/login/'
LOGOUT_URL = '/dashboard/auth/logout/'
LOGIN_REDIRECT_URL = '/dashboard/'
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'

[root@dlp ~(keystone)]#
vi /etc/httpd/conf.d/openstack-dashboard.conf
# line 4 : add

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
WSGIApplicationGroup %{GLOBAL}
# line 6 : change

WSGIScriptAlias /dashboard
/usr/share/openstack-dashboard/openstack_dashboard/wsgi.py
# line 9 : change

<Directory
/usr/share/openstack-dashboard/openstack_dashboard
>
[root@dlp ~(keystone)]#
systemctl restart httpd
# if you allow common users to access to instances details or console on the Dashboard web, set like follows

[root@dlp ~(keystone)]#
vi /etc/nova/policy.json
{
  # add
  "os_compute_api:os-extended-server-attributes": "rule:admin_or_owner",
}

[root@dlp ~(keystone)]#
systemctl restart openstack-nova-api
[3] If SELinux is enabled, change policy.
[root@dlp ~(keystone)]#
setsebool -P httpd_can_network_connect on

[4] If Firewalld is running, allow services.
[root@dlp ~(keystone)]#
firewall-cmd --add-service={http,https} --permanent

success
[root@dlp ~(keystone)]#
firewall-cmd --reload

success
[5]
Access to the URL below with any web browser.
⇒ http://(server's hostname or IP address)/dashboard/
After accessing, following screen is displayed, then you can login with a user in Keystone.
It's possible to use all features if you login with [admin] user when you set it on keystone bootstrap.
If you login with a common user, it's possible to use or manage own instances.
[6] After login successfully, following screen is displayed (with common user). You can control Openstack on this Dashboard.
[7] To confirm own instances, Click [Instances] on the left pane, then they are diplayed on the right pane.
If you did not configure Nova Policy like [2] above, common users can access to here only.
If you configured Nova Policy like [2] above, it's possible to confirm details of instance to click an instance name.
[8] The details of an instance is displayed. To Click [Console] tab, it's possible to access to instance console.
[9] On instance console, it's possible to operate instance on Dashboard web.
Matched Content