CentOS Stream 9
Sponsored Link

OpenStack Yoga : Configure Horizon2022/06/09

 
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 
+-----------+-----------+
|   [ dlp.srv.world ]   |
|     (Control Node)    |
|                       |
|  MariaDB    RabbitMQ  |
|  Memcached  httpd     |
|  Keystone   Glance    |
|  Nova API/Compute     |
|    Neutron Server     |
|    Open vSwitch       |
|  OVN Metadata Agent   |
|    OVN-Controller     |
|       Horizon         |
+-----------------------+

[1] Install Horizon.
# install from Yoga, EPEL, CRB

[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-yoga,epel,crb -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': 'dlp.srv.world: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 = "
dlp.srv.world
"
#
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_URL = "https://dlp.srv.world: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@www ~]#
vi /etc/httpd/conf.d/ssl.conf
# line 43 : uncomment

DocumentRoot "/var/www/html"
# line 44 : uncomment and specify your hostname

ServerName
dlp.srv.world:443
# line 85 : change to specify your certificate

SSLCertificateFile
/etc/letsencrypt/live/dlp.srv.world/cert.pem
# line 93 : change to specify your certificate

SSLCertificateKeyFile
/etc/letsencrypt/live/dlp.srv.world/privkey.pem
# line 102 : uncomment and change to specify your certificate

SSLCertificateChainFile
/etc/letsencrypt/live/dlp.srv.world/chain.pem
[root@dlp ~(keystone)]#
systemctl restart httpd 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}

success
[root@dlp ~(keystone)]#
firewall-cmd --runtime-to-permanent

success
[5]
Access to the URL below with any web browser.
⇒ https://(your servers 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 displayed on the right pane.
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