B13-openstack高可用(t版)-horazion计算节点集群

 

1. 安装dashboard

 在全部控制节点安装dashboard服务,以controller01节点为例

[root@controller01 ~]# yum install openstack-dashboard -y

2. 配置local_settings

[root@controller01 ~]# cp /etc/openstack-dashboard/local_settings /etc/openstack-dashboard/local_settings.bak

# 列出修改处的行数
[root@controller01 ~]# vim /etc/openstack-dashboard/local_settings

配置仪表板以在controller节点上使用OpenStack服务 
OPENSTACK_HOST = "10.100.214.200"
# 允许所有主机访问 38 ALLOWED_HOSTS = ['*', 'localhost'] # 强制使用相应版本的api

OPENSTACK_API_VERSIONS = {
"identity": 3,
"image": 2,
"volume": 3,
}

# 在多域模式运行时开启,登陆时除账号/密码外还需要输入域

OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True # 取消注释 OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default' # 取消158~163行注释,并使用memcached集群
SESSION_ENGINE = 'django.contrib.sessions.backends.cache' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': 'controller01:11211,controller02:11211,controller03:11211', }, } # 监听地址使用vip; # keystone认证使用v3; # 设置通过dashboard创建的用户具有”user”角色权限,”user”角色在keystone章节已创建 OPENSTACK_HOST = "controller" OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user" # 修改时区 463 TIME_ZONE = "Asia/Shanghai"
OPENSTACK_NEUTRON_NETWORK = {
    ...
    'enable_router': True,
    'enable_quotas': True,
    'enable_distributed_router': True,
    'enable_ha_router': True,
    'enable_lb': True,
    'enable_firewall': True,
    'enable_vpn': True,
    'enable_fip_topology_check': True,
}

 

[root@controller01 ~]# scp /etc/openstack-dashboard/local_settings 10.100.214.202:/etc/openstack-dashboard/
[root@controller01 ~]# scp /etc/openstack-dashboard/local_settings 10.100.214.203:/etc/openstack-dashboard/

3. 配置openstack-dashboard.conf

# 在全部控制节点操作;
# bug:https://bugs.launchpad.net/horizon/+bug/1708655,此问题会导致dashboard网页挂起
# 赋权,在第3行后新增” WSGIApplicationGroup %{GLOBAL}”
[root@controller01 ~]# cp /etc/httpd/conf.d/openstack-dashboard.conf /etc/httpd/conf.d/openstack-dashboard.conf.bak
[root@controller01 ~]# sed -i '3a WSGIApplicationGroup\ %{GLOBAL}' /etc/httpd/conf.d/openstack-dashboard.conf


访问不到页面发现,使用下面进行修改

[root@controller03 openstack-dashboard]# cd /usr/share/openstack-dashboard/openstack_dashboard/local
[root@controller03 local]# echo "WEBROOT = '/dashboard'" >> local_settings.py

[root@controller01 ~]# systemctl restart httpd.service memcached.service

 

5. 验证

访问:http://10.100.214.200/dashboard

 

 

posted @ 2020-06-14 22:24  Mr-呵呵哒  阅读(380)  评论(0编辑  收藏  举报