OpenStack-Queens详细安装部署(七)Horizon集群

  • A+
所属分类:OpenStack

Horizon集群
1. 安装dashboard (所有controller节点操作)

[root@DT_Node-172_17_7_1 ~]# yum install openstack-dashboard -y

2. 配置local_settings (所有controller节点操作)

# 注意local_settings文件的权限:root:apache
[root@DT_Node-172_17_7_1 ~]# cp /etc/openstack-dashboard/local_settings{,_original}

# 列出修改处的行数
[root@DT_Node-172_17_7_1 ~]# 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 (所有controller节点操作)

# bug:https://bugs.launchpad.net/horizon/+bug/1708655,此问题会导致dashboard网页挂起
# 赋权,在第3行后新增” WSGIApplicationGroup %{GLOBAL}”
[root@DT_Node-172_17_7_1 ~]# cp /etc/httpd/conf.d/openstack-dashboard.conf{,_original}
[root@DT_Node-172_17_7_1 ~]# sed -i '3a WSGIApplicationGroup\ %{GLOBAL}' /etc/httpd/conf.d/openstack-dashboard.conf

4. 启动服务 (所有controller节点操作)

[root@DT_Node-172_17_7_1 ~]# systemctl restart httpd.service memcached.service

5.配置HAproxy

a. haproxy增加配置文件 (所有controller节点操作)

# horizon服务
 listen dashboard_cluster
  bind 172.17.7.100:80
  balance  source
  option  tcpka
  option  httpchk
  option  tcplog
  server controller1 172.17.7.1:80 check inter 2000 rise 2 fall 5
  server controller2 172.17.7.2:80 check inter 2000 rise 2 fall 5
  server controller3 172.17.7.3:80 check inter 2000 rise 2 fall 5

b.重启haproxy (VIP所在节点操作)

[root@DT_Node-172_17_7_2 ~]# systemctl restart haproxy.service 
[root@DT_Node-172_17_7_2 ~]# systemctl status haproxy.service        
[root@DT_Node-172_17_7_2 ~]# ss -tnl | grep 80

OpenStack-Queens详细安装部署(七)Horizon集群

5. 验证
登陆:http://172.17.7.100/dashboard

域/账号/密码:default/admin/admin_pass,或:default/demo/demo_pass

登陆页:
OpenStack-Queens详细安装部署(七)Horizon集群

系统信息-服务:
OpenStack-Queens详细安装部署(七)Horizon集群

系统信息-计算服务:
OpenStack-Queens详细安装部署(七)Horizon集群

系统信息-网络服务:
OpenStack-Queens详细安装部署(七)Horizon集群

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: