高可用OpenStack(Queen版)集群-8.Horizon集群
参考文档:
- Install-guide:https://docs.openstack.org/install-guide/
- OpenStack High Availability Guide:https://docs.openstack.org/ha-guide/index.html
- 理解Pacemaker:http://www.cnblogs.com/sammyliu/p/5025362.html
十二.Horizon集群
1. 安装dashboard
# 在全部控制节点安装dashboard服务,以controller01节点为例 [root@controller01 ~]# yum install openstack-dashboard -y
2. 配置local_settings
# 在全部控制节点操作,以controller01节点为例; # 注意local_settings文件的权限:root:apache [root@controller01 ~]# cp /etc/openstack-dashboard/local_settings /etc/openstack-dashboard/local_settings.bak # 列出修改处的行数 [root@controller01 ~]# vim /etc/openstack-dashboard/local_settings # 允许所有主机访问 38 ALLOWED_HOSTS = ['*', 'localhost'] # 强制使用相应版本的api 64 OPENSTACK_API_VERSIONS = { 65 # "data-processing": 1.1, 66 "identity": 3, 67 "image": 2, 68 "volume": 2, 69 # "compute": 2, 70 } # 在多域模式运行时开启,登陆时除账号/密码外还需要输入域 75 OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True # 取消注释 97 OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default' # 取消158~163行注释,并使用memcached集群 158 CACHES = { 159 'default': { 160 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 161 'LOCATION': 'controller01:11211,controller02:11211,controller03:11211', 162 }, 163 } # 注释165~169行 165 #CACHES = { 166 # 'default': { 167 # 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 168 # }, 169 #} # 监听地址使用vip; # keystone认证使用v3; # 设置通过dashboard创建的用户具有”user”角色权限,”user”角色在keystone章节已创建 188 OPENSTACK_HOST = "controller" 189 OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST 190 OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user" # 修改时区 463 TIME_ZONE = "Asia/Shanghai"
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
4. 启动服务
# 全部控制节点操作; [root@controller01 ~]# systemctl restart httpd.service memcached.service
5. 验证
登陆:http://172.30.200.30/dashboard
域/账号/密码:default/admin/admin_pass,或:default/demo/demo_pass
登陆页:
系统信息-服务:
系统信息-计算服务:
系统信息-网络服务: