在控制节点上安装

controllerHost='controller'
ADMIN_PASSWD='Ideal123!'

1.安装dashboard组件

yum -y install openstack-dashboard

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

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

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

sed -i '/^#OPENSTACK_API_VERSIONS/i\OPENSTACK_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 = {\n'default': {\n'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\
\n'LOCATION': '${controllerHost}:11211'\n}}" /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 =/c\OPENSTACK_HOST = '${controllerHost}'"  /etc/openstack-dashboard/local_settings
sed -i '/^OPENSTACK_KEYSTONE_URL/c\OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST' /etc/openstack-dashboard/local_settings

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

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

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

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

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

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

9.配置dashboard中的时区

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

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

sed -i '/WSGISocketPrefix/a\WSGIApplicationGroup %{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 =/c\ALLOWED_HOSTS = ['*']"  /etc/openstack-dashboard/local_settings
systemctl restart httpd memcached && systemctl status httpd memcached

最新文章

  1. Windows下ADT环境搭建
  2. ar命令详解
  3. 设计模式(二)简单工厂模式(Simple Factory Pattern)
  4. BZOJ1491: [NOI2007]社交网络
  5. mysql命令行以及mysql workbence查询结果中文乱码的解决方法
  6. mysql-5.7.9-winx64 MySQL服务无法启动,服务没有报告任何错误的解决办法
  7. Xamarin.Android MVP模式
  8. Trianglify – 五彩缤纷的 SVG 背景图案
  9. Sublime text3 笔记
  10. 在SQL2005中部署CLR 程序集
  11. hibernate笔记(一)
  12. windows 7多点触摸开发
  13. DB2 表空间监控
  14. windows phone 8.1开发:(消息弹出框)强大的ContentDialog
  15. 加减号改变input[type=number]的数值,基于[zepto.js]
  16. linux内核链表的使用
  17. 关于java和c++中布尔量的比较
  18. python 基础 01
  19. 遍历文件,读取.wxss文件,在头部添加一条注释
  20. CentOS 7.3 上安装docker

热门文章

  1. vulkan 的icb
  2. Java中的集合HashSet、LinkedHashSet、TreeSet和EnumSet(二)
  3. 在npm install时node-gyp出现错误
  4. filter(expr|obj|ele|fn)筛选出与指定表达式匹配的元素集合。
  5. HDU 5863 cjj's string game ( 16年多校10 G 题、矩阵快速幂优化线性递推DP )
  6. Pycharm下将py文件打包成exe文件
  7. Linux常用目录及目录作用说明
  8. @ConfigurationProperties实现配置注入到实体类
  9. Apache搭建简单的图片访问服务器
  10. LeetCode 229. 求众数 II(Majority Element II )