Openstack(十三)部署管理服务horizon
13.1horizon介绍
horizon是openstack的管理其他组件的图形显示和操作界面,通过API和其他服务进行通讯,如镜像服务、计算服务和网络服务等结合使用,horizon基于python django开发,通过Apache的wsgi模块进行web访问通信,Horizon只需要更改配置文件连接到keyston即可,过程如下:
12.2控制端安装horizon
# yum install openstack-dashboard
12.3配置horizon
# vim /etc/openstack-dashboard/local_settings
159 OPENSTACK_HOST = "192.168.10.100"
28 ALLOWED_HOSTS = ['*',]
#配置memcache会话保持,
129 SESSION_ENGINE = 'django.contrib.sessions.backends.cache' #新增加
130 CACHES = { #注释之前的配置
131 'default': {
132 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
133 'LOCATION': '192.168.10.100:11211',
134 },
135 }
#启用第三版API 认证
161 OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
#启用对域的支持
65 OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
#配置API版本:
54 OPENSTACK_API_VERSIONS = {
55 # "data-processing": 1.1,
56 "identity": 3,
57 "image": 2,
58 "volume": 2,
59 # "compute": 2,
60 }
#配置默认域:
73 OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
#配置web界面创建的用户默认权限:
162 OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
#单一扁平网络模式下,禁用第三层网络
282 OPENSTACK_NEUTRON_NETWORK = {
283 'enable_router': False,
284 'enable_quotas': False,
285 'enable_ipv6': False,
286 'enable_distributed_router': False,
287 'enable_ha_router': False,
288 'enable_lb': False,
289 'enable_firewall': False,
290 'enable_vpn': False,
291 'enable_fip_topology_check': False,
#配置时区:
417 TIME_ZONE = "Asia/Shanghai"
12.4重启web服务
# systemctl restart httpd.service
12.5配置haproxy
# cat /etc/haproxy/haproxy.cfg
listen horizon
bind 192.168.10.100:80
mode tcp
log global
balance source
server neutron-server 192.168.10.201:80 check inter 5000 rise 3 fall 3
# systemctl restart haproxy
12.6验证端口
12.7访问web界面
http://192.168.10.100/dashboard