OpenStack Train node version Installation bis (XI) service dashboard mounted horizon

Project Name OpenStack Dashboard Dashboard service is the Horizon, the only service that is required identity services keystone, development of language is a web framework Django python.

System requirements
to install Train version of Horizon has the following requirements:
1, the locale
Python 2.7,3.6 or 3.7
Django 2.2 1.11,2.0 and
pilot phase Django 2.0 and 2.2 support in the Train versions.
Ussuri release (next release After the release of Train) will be used as the main Django Django 2.2 version. Django 2.0 support will be deleted.
2, keystone endpoint accessible
3, other services are optional.
Stein version from the start, Horizon supports the following services:
Cinder: massive storage
glance: image management
neutron: Network
nova: computing
swift: object storage
, if configured keystone of good service endpoint, then the Horizon will automatically enable it to support its detection .
Horizon also supports many other OpenStack services through plug-ins.

In computing node (c1) mounting the instrument on board service horizon
since the operation requires horizon apache, apache keystone order not to affect on the control node like the other services, it is installed on the computing nodes. Confirm whether to activate the service previously installed properly prior to installation.

安装软件包
yum install openstack-dashboard -y

image.png

编辑配置文件
必须直接用vim编辑,不可清空后在复制粘贴。
vim /etc/openstack-dashboard/local_settings

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

39行,允许主机访问仪表板:
ALLOWED_HOSTS = ['*'] #['*']是指的接受所有主机。

100行,配置memcached会话存储服务:
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'ct:11211',
},
}

126行,启用身份认证服务API版本3:
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST

127行,加入,启用对多域的支持:
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True

128行。加入配置API版本:
OPENSTACK_API_VERSIONS = {
"identity": 3,
"image": 2,
"volume": 3,
}

133行,加入,配置Default为通过仪表板创建的用户的默认域:
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"

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

139行选择了二层网络,要禁用对第3层网络服务的支持:

OPENSTACK_NEUTRON_NETWORK = {

      'enable_auto_allocated_network': False,

      'enable_distributed_router': False,

      'enable_ha_router': False,

      'enable_ipv6': False,

      'enable_rbac_policy': False,

      'enable_router': False,

      'enable_quotas': False,

      'enable_lb': False,

      'enable_fip_topology_check': False,


      'default_dns_nameservers': [],

      'supported_provider_types': ['*'],

      'segmentation_id_range': {},

      'extra_provider_types': {},

      'supported_vnic_types': ['*'],

      'physical_networks': [],  

 }   

False必须首字母大写

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

以下两步官方文档中没有,但是需要执行,否则dashboard打不开或显示不对

重建apache的dashboard配置文件
cd /usr/share/openstack-dashboard
python manage.py make_web_conf --apache > /etc/httpd/conf.d/openstack-dashboard.conf

image.png

建立策略文件(policy.json)的软链接,否则登录到dashboard将出现权限错误和显示混乱
ln -s /etc/openstack-dashboard /usr/share/openstack-dashboard/openstack_dashboard/conf

image.png

重新启动计算节点(c1)上apache服务

systemctl restart httpd.service

由于dashboard的运行机制是把网站下的所有文件删除之后再重新复制,所以重启httpd需要等待一段时间。

image.png

重新启动控制节点(ct)上的memcache服务

systemctl restart memcached.service

验证操作

在别的电脑使用Web浏览器访问仪表板,网址为 http://192.168.10.42(注意,和以前版本不一样,不加dashboard)

image.png

使用admin登录,密码是ADMIN_PASS

image.png

右上角改变下主题

image.png

可以看到我们在安装glance时上传的cirros镜像

image.png

可以管理项目、用户、组和角色

image.png

把所有模块点一下,看有没有报错信息。

至此,horizon安装完毕。

做了域名解析,也可以用域名访问dashboard。



Guess you like

Origin blog.51cto.com/11694088/2460460