#安装和配置组件
yum install -y openstack-dashboard
#配置dashboard
cp /etc/openstack-dashboard/local_settings /etc/openstack-dashboard/local_settings.bac
在/etc/openstack-dashboard/local_settings中配置以下内容
OPENSTACK_HOST = "controller"
ALLOWED_HOSTS = ['*',]
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'controller:11211',
},
}
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = {
"identity": 3,
"image": 2,
"volume": 3,
}
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
#如果您选择网络选项 1,请禁用对第 3 层网络服务的支持:
OPENSTACK_NEUTRON_NETWORK = {
'enable_distributed_router': False,
'enable_firewall': False,
'enable_ha_router': False,
'enable_lb': False,
'enable_quotas': True,
'enable_security_group': True,
'enable_vpn': False,
'profile_support': None,
}
TIME_ZONE = "TIME_ZONE"
#增加以下配置,否则dashboard的权限配置policy.json不生效, 界面显示的栏目也不对, 还经常弹出错误
#keystone定义了每个用户的权限, 所以原来界面栏目显示混乱
POLICY_FILES_PATH = '/etc/openstack-dashboard'
#注意openstack-dashboard-18.3.3-2及以后的版本无需做以下配置,openstack-dashboard-18.3.3-1及以前的版本需要做如下配置
#配置/etc/httpd/conf.d/openstack-dashboard.conf
cp /etc/httpd/conf.d/openstack-dashboard.conf /etc/httpd/conf.d/openstack-dashboard.conf.bac
#配置内容如下:
cat /etc/httpd/conf.d/openstack-dashboard.conf
bash
WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
Alias /static /usr/share/openstack-dashboard/static
<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
Options All
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share/openstack-dashboard/static>
Options All
AllowOverride All
Require all granted
</Directory>
#完成安装
systemctl restart httpd.service memcached.service
systemctl status httpd.service memcached.service
参考链接:
https://docs.openstack.org/horizon/train/install/install-rdo.html