CentOS Stream 9
Sponsored Link

OpenStack Antelope : Configure Horizon2023/04/17

 
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  Nginx     |
|  Keystone   httpd     |
|  Glance     Nova API  |
|  Nova Compute         |
|    Neutron Server     |
|    Open vSwitch       |
|  OVN Metadata Agent   |
|    OVN-Controller     |
|       Horizon         |
+-----------------------+

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

[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-antelope,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 = ['
*
', 'localhost' ]
# 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"
# 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'
# set [True] below if you are using self signed certificate
OPENSTACK_SSL_NO_VERIFY = False

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

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

WSGIScriptAlias /dashboard
/usr/share/openstack-dashboard/openstack_dashboard/wsgi.py
# line 8 : 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