zoukankan      html  css  js  c++  java
  • 安装horizon

    在控制节点上安装


    controllerHost='controller'
    ADMIN_PASSWD='Ideal123!'

    1.安装dashboard组件


    yum -y install openstack-dashboard

    2.配置dashboard允许所有IP访问


    sed -i "/ALLOWED_HOSTS =/cALLOWED_HOSTS = ['*']"  /etc/openstack-dashboard/local_settings

    3.配置dashboard限制API的版本号


    sed -i '/^#OPENSTACK_API_VERSIONS/iOPENSTACK_API_VERSIONS = {"data-processing": 1.1,
    "identity": 3,
    "image": 2,
    "volume": 2,
    "compute": 2}' /etc/openstack-dashboard/local_settings

    4.配置dashboard使用memcached缓存session,注释掉其它的缓存配置

    line_index=$(sed -n -e "/^CACHES/=" /etc/openstack-dashboard/local_settings)
    sed -i "${line_index},+5d" /etc/openstack-dashboard/local_settings
    sed -i "${line_index} a CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
    'LOCATION': '${controllerHost}:11211' }}" /etc/openstack-dashboard/local_settings
    sed -i 's/^SESSION_ENGINE/#&/' /etc/openstack-dashboard/local_settings
    echo "SESSION_ENGINE = 'django.contrib.sessions.backends.cache'" >> /etc/openstack-dashboard/local_settings

    5.配置dashboard得知keystone服务的地址


    sed -i "/OPENSTACK_HOST =/cOPENSTACK_HOST = '${controllerHost}'"  /etc/openstack-dashboard/local_settings
    sed -i '/^OPENSTACK_KEYSTONE_URL/cOPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST' /etc/openstack-dashboard/local_settings

    6.配置dashboard启用对多域的支持,在登陆的时候需要输入域


    sed -i "/OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT =/cOPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True" /etc/openstack-dashboard/local_settings

    7.配置dashboard中创建的用户都属于Default域


    sed -i "/OPENSTACK_KEYSTONE_DEFAULT_DOMAIN =/cOPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'" /etc/openstack-dashboard/local_settings

    8.配置dashboard中创建的用户都是user角色


    sed -i '/OPENSTACK_KEYSTONE_DEFAULT_ROLE =/cOPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"'  /etc/openstack-dashboard/local_settings

    9.配置dashboard中的时区


    sed -i '/TIME_ZONE =/cTIME_ZONE = "Asia/Shanghai"'   /etc/openstack-dashboard/local_settings

    10.配置httpd使用WSGI运行python程序


    sed -i '/WSGISocketPrefix/aWSGIApplicationGroup %{GLOBAL}'   /etc/httpd/conf.d/openstack-dashboard.conf

    11.配置httpd服务的监听IP


    sed -i "s/Listen 80/Listen 0.0.0.0:80/g" /etc/httpd/conf/httpd.conf

    12.启动dashboard服务


    systemctl enable httpd.service memcached.service
    systemctl restart httpd.service memcached.service
    systemctl status httpd.service memcached.service

    dashboard报错处理


    1.登陆页面,无法跳转


    sed -i 's/^SESSION_ENGINE/#&/' /etc/openstack-dashboard/local_settings
    echo "SESSION_ENGINE = 'django.contrib.sessions.backends.file'" >> /etc/openstack-dashboard/local_settings
    systemctl restart httpd memcached && systemctl status httpd memcached

    2.出错啦! 遇到异常情况,请刷新


    systemctl restart rabbitmq-server && systemctl status rabbitmq-server

    3.Bad Request (400)


    sed -i "/ALLOWED_HOSTS =/cALLOWED_HOSTS = ['*']"  /etc/openstack-dashboard/local_settings
    systemctl restart httpd memcached && systemctl status httpd memcached

  • 相关阅读:
    [NOIP2003]加分二叉树
    POJ3737 UmBasketella
    [POI2008]STA-Station
    [SDOI2014]旅行
    说明位图,矢量图,像素,分辨率,PPI,DPI?
    像素 PIXEL 图片的基本单位 像素非常小 图片是成千上万的像素组成 显示/屏幕分辨率 (DPI 屏幕分辨率)
    使用 parted 命令可以查看系统采用什么类型的分区表 gpt/mbr/msdos/ext/ext/ext2/ext3/ext4
    Linux硬件与服务
    Linux是一个基于POSIX和Unix的多用户、多任务、支持多线程和多CPU的性能稳定的操作系统,可免费使用并自由传播。
    cut命令用于按“列”提取文本字符,格式为“cut [参数] 文本”
  • 原文地址:https://www.cnblogs.com/jipinglong/p/11206609.html
Copyright © 2011-2022 走看看