CentOS部署OpenStack过程-Dashboard

CentOS部署OpenStack过程-Dashboard

安装配置组件

  1. 安装组件
    yum install openstack-dashboard -y
  2. 配置
vi /etc/openstack-dashboard/local_settings
# configure dashboard_host
OPENSTACK_HOST="ops-cont"
# allow all host visit dashboard
ALLOWED_HOSTS=['*', ]
# configure memcached
SESSION_ENGINE='django.contrib.sessions.backends.file'
CACHES={
    'default':{
        'BACKEND':'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION':'ops-cont:11211',
    }
}
# enable auth v3
OPENSTACK_KEYSTONE_URL="http://%s:5000/v3" % OPENSTACK_HOSTS
# enable domain support
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT=True
# configure api version
OPENSTACK_API_VERSIONS={
    "identity":3,
    "image":2,
    "volume":2,
}
# configure default domain
OPEMSTACK_KEYSTONE_DEFAULT_DOMAIN="default"
# configure default role
OPENSTACK_KEYSTONE_DEFAULT_ROLE="user"
# configure timezone
TIME_ZONE="Asia/Shanghai"
  1. 重启web,memcached服务
    systemctl restart httpd memcached

验证操作

打开浏览器,输入地址:http://ops-cont/dashboard

CentOS部署OpenStack过程-Dashboard_第1张图片
openstack-dashboard

注意

按照官方文档配置完成后,在执行登录操作的时候httpd日志会报如下错误提示:

"Unable to create a new session key. "
RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

根据错误提示,需要修改SESSION_ENGINE,将其修改为'django.contrib.sessions.backends.file'即可正常登录。2

CentOS部署OpenStack过程-Dashboard_第2张图片
login-successed

参考

  1. 安装dashboard
  2. openstack中dashboard页面RuntimeError

你可能感兴趣的:(CentOS部署OpenStack过程-Dashboard)