0%

CentOS部署OpenStack过程-Dashboard

安装配置组件

  1. 安装组件
    yum install openstack-dashboard -y
  2. 配置

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    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.cache'
    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"
  3. 重启web,memcached服务
    systemctl restart httpd memcached

验证操作

打开浏览器,输入地址:http://ops-cont/dashboard
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
login-successed

参考

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