这一小节基本配置相同,但留意以下紫色部份的配置,当初为了管理方便,我们让办公网openstack的dashboard的登录桥接了科兴的dashboard,由此统一dashboard界面的登录地址
2台controller安装组件
# yum install openstack-dashboard -y
修改一样的配置
vi /etc/openstack-dashboard/local_settings
OPENSTACK_HOST="controller"
ALLOWED_HOSTS=['*', ]
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'controller1:11211,controller2:11211',
}
}
OPENSTACK_KEYSTONE_DEFAULT_ROLE="user"
TIME_ZONE="Asia/Shanghai"
修改一下dashboard的界面登出超时时长,它跟keystone的token一致,不然30分钟内无操作,自动登出,很烦人
/usr/share/openstack-dashboard/openstack_dashboard/settings.py
SESSION_TIMEOUT = 86400
让controller的dashboard复用kxcontroller的dashboard配置
AVAILABLE_REGIONS = [
('http://controller:5000/v2.0', 'RegionOne'),
('http://kxcontroller:5000/v2.0', 'RegionTwo'),
]
重启服务。
# systemctl enable httpd.service memcached.service
# systemctl restart httpd.service memcached.service
验证:
本地电脑上配置hosts解析配置
10.40.42.10 controller
访问以下连接测试
http://controller/dashboard
使用admin demo帐号密码 测试登录是否异常