转:CentOS7安装OpenStack-07.安装horizon服务组件-OpenStack-rocky版(centos7.7下安装)

CentOS7安装OpenStack-07.安装horizon服务组件

https://www.cnblogs.com/liugp/p/12463296.html

7.0.horizon(dashboard)概述

# mitaka中文版文档
https://docs.openstack.org/mitaka/zh_CN/install-guide-rdo/neutron-controller-install.html

# rocky版-用户引导页
https://docs.openstack.org/install-guide/openstack-services.html#minimal-deployment-for-rocky

# rocky版horizon(dashboard)安装文档
https://docs.openstack.org/horizon/rocky/install/

系统环境要求:

1)Python2.7或者3.5以上
2)Django1.11或者2.0以上(Django 1.8 to 1.10 are no longer supported since Rocky release.)
3)可用的keystone节点服务
4)以下服务可以选择:

  • cinder: Block Storage
  • glance: Image Management
  • neutron: Networking
  • nova: Compute
  • swift: Object Storage
  • Horizon also supports many other OpenStack services via plugins. For more information, see the Plugin Registry.

7.1.安装dashboard WEB控制台

1)安装dashboard软件包

yum install openstack-dashboard -y

2)修改配置文件/etc/openstack-dashboard/local_settings

 

ALLOWED_HOSTS = ['*', ]

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

OPENSTACK_API_VERSIONS = {

    "identity": 3,

    "image": 2,

    "volume": 2,

}

OPENSTACK_HOST = "controller"

OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST

OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"

OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True

OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"

CACHES = {

    'default': {

         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',

         'LOCATION': 'controller:11211',

    }

}

OPENSTACK_NEUTRON_NETWORK = {

    'enable_router': False,

    'enable_quotas': False,

    'enable_distributed_router': False,

    'enable_ha_router': False,

    'enable_fip_topology_check': False,

    'enable_lb': False,

    'enable_firewall': False,

    'enable_vpn': False,

}

TIME_ZONE = "Asia/Shanghai"

 

# 问题:登录出现错误

 

# 查看日志 tail -f /var/log/httpd/error_log

ERROR django.request Internal Server Error: /dashboard/auth/login/

# 解决:

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

换成

SESSION_ENGINE = 'django.contrib.sessions.backends.file'

3)修改/etc/httpd/conf.d/openstack-dashboard.conf

# 增加以下内容:vim /etc/httpd/conf.d/openstack-dashboard.conf

WSGIApplicationGroup %{GLOBAL}

4)重启web服务器以及会话存储服务

systemctl restart httpd.service memcached.service

systemctl status httpd.service memcached.service

# 问题:如果启动不了,页面报错信息如下:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

 

More information about this error may be available in the server error log.

# 查看日志,tail -f /etc/httpd/conf/error_log,如果报错信息如下:

IOError: [Errno 13] Permission denied: '/usr/share/openstack-dashboard/openstack_dashboard/local/_usr_share_openstack-dashboard_openstack_dashboard_local_.secret_key_store.lock'

# 解决

chown -R apache:apache   /usr/share/openstack-dashboard/

# 重启服务

systemctl restart httpd.service memcached.service

systemctl status httpd.service memcached.service

5)检查dashboard是否可用

# 在浏览器中输入下面的地址:用户名和密码都是admin,域名用default

http://controller:80/dashboard

问题:如果跳转404,则可以修改配置vim /etc/httpd/conf.d/openstack-dashboard.conf

 

WSGIDaemonProcess dashboard

WSGIProcessGroup dashboard

WSGISocketPrefix run/wsgi

WSGIApplicationGroup %{GLOBAL}

WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi

Alias /static /usr/share/openstack-dashboard/static

 

<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>

  Options All

  AllowOverride All

  Require all granted</Directory>

 

<Directory /usr/share/openstack-dashboard/static>

  Options All

  AllowOverride All

  Require all granted</Directory>

 

# 重启服务

systemctl restart httpd.service memcached.service

systemctl status httpd.service memcached.service

# 访问

http://controller
http://192.168.182.143

 

 

# 登录后显示这样一个摘要信息

 

 

 

~~~至此,horizon安装部署完毕~~~

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值