CentOS 8
Sponsored Link

OpenStack Ussuri : Configure Horizon
2020/06/08
 
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 Ussuri, EPEL, PowerTools

[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-ussuri,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'
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "volume": 3,
    "compute": 2,
}

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

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
WSGIApplicationGroup %{GLOBAL}
[root@dlp ~(keystone)]#
systemctl restart httpd

[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)/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 access an instance, Click [Instances] on the left menu. Then, instances' list is shown on the right, next Click the name of instance you'd like to access.
[8] The description of instance is shown, next, Click [Console] tab.
[9] The console of instance is shown. You can operate instances on here.
Matched Content