OpenStack系列之一:手动部署OpenStack Queens(5.Dashboard)


title: OpenStack系列之一:手动部署OpenStack Queens(5.Dashboard)
categories: Linux
tags:
- OpenStack
timezone: Asia/Shanghai
date: 2019-01-21


本节假定使用Apache HTTP服务器和Memcached服务正确安装,配置和操作Identity服务。

第一步:安装和配置组件

1.Install the packages:

yum install -y openstack-dashboard

2.编辑 /etc/openstack-dashboard/local_settings 文件并完成以下操作:

cp /etc/openstack-dashboard/local_settings /etc/openstack-dashboard/local_settings.bak
vim /etc/openstack-dashboard/local_settings

# 配置仪表板以在controller节点上使用OpenStack服务 :
OPENSTACK_HOST = "controller"

# 允许您的主机访问信息中心:
ALLOWED_HOSTS = ['*', 'localhost']

# 配置memcached会话存储服务:
# 注释掉任何其他会话存储配置。
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         'LOCATION': 'controller:11211',
    }
}

# 启用Identity API版本3:
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST

# 启用对域的支持:
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True

# 配置API版本:
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "image": 2,
    "volume": 2,
}

# 配置Default为通过仪表板创建的用户的默认域:
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"

# 配置user为通过仪表板创建的用户的默认角色:
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"

# 如果选择网络选项1,请禁用对第3层网络服务的支持:
OPENSTACK_NEUTRON_NETWORK = {
    ...
    'enable_router': False,
    'enable_quotas': False,
    'enable_distributed_router': False,
    'enable_ha_router': False,
    'enable_lb': False,
    'enable_firewall': False,
    'enable_vpn': False,
    'enable_fip_topology_check': False,
}

# (可选)配置时区:
TIME_ZONE = "Asia/Shanghai"

3./etc/httpd/conf.d/openstack-dashboard.conf如果未包含,请添加以下行 。

vim /etc/httpd/conf.d/openstack-dashboard.conf
WSGIApplicationGroup %{GLOBAL}

第二步:完成安装(重新启动Web服务器和会话存储服务)

systemctl restart httpd.service memcached.service
systemctl status httpd.service memcached.service

第三步:验证操作

使用Web浏览器访问仪表板 http://controller/dashboard

Authenticate using admin or demo user and default domain credentials.
使用admin或demo用户和default域凭据进行身份验证。

附录:登录Openstack提示:出错啦!

遇到异常情况,请刷新。如需帮助请联系管理员。

vim /etc/openstack-dashboard/local_settings

#SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_ENGINE = 'django.contrib.sessions.backends.file'

systemctl restart httpd memcached
systemctl status httpd memcached

你可能感兴趣的:(OpenStack系列之一:手动部署OpenStack Queens(5.Dashboard))