1、安装软件包
# yum install openstack-dashboard
# vim /etc/openstack-dashboard/local_settings
OPENSTACK_HOST = "controller"
ALLOWED_HOSTS = ['one.example.com', 'two.example.com'] 内网环境,这里可以修改为*表示允许全部
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'controller:11211',
}
}
这一项找不到SESSION_ENGINE需要找CACHES,注释掉默认的CACHES,复制粘贴即可(这里的SESSION_ENGINE是一起的)
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = {
"identity": 3,
"image": 2,
"volume": 2,
}
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
TIME_ZONE = "Asia/Shanghai" 这里默认是UTC,可以修改为Asia/Shanghai,不过修改后可能会重启httpd失败,如果失败就用默认的UTC或注释掉TIME_ZONE,这里的引号需要保留
2、重启http和memcache服务
# systemctl restart httpd.service memcached.service
3、 验证
直接浏览器访问CONTROLLER_IP/dashboard
用户名分别是admin和demo,密码为认证服务阶段设置的ADMIN_PASS和DEMO_PASS。
网友评论