配置Dashboard服务
1. 安装和配置组件
yum -y install openstack-dashboard
2. 编辑 /etc/openstack-dashboard/local_settings文件
打开配置文件,搜索下面这些键,替换他们(下面有sed命令替换)
controller节点
OPENSTACK_HOST = "controller"
启用Identity API版本3
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
配置user为通过仪表板创建的用户的默认角色:
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
接受所有主机
ALLOWED_HOSTS = ['*']
配置memcached会话存储服务
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': 'openvip.com:11211', }}
启用对域的支持:
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
配置API版本:
OPENSTACK_API_VERSIONS = { "identity": 3, "image": 2, "volume": 3,}
配置Default为通过仪表板创建的用户的默认域:
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
如果选择网络选项1,请禁用对第3层网络服务的支持:
OPENSTACK_NEUTRON_NETWORK = { 'enable_router': False, 'enable_quotas': False, 'enable_distributed_router': False, 'enable_ha_router': False, 'enable_lb': False, 'enable_firewall': False, 'enable_vpn': False, 'enable_fip_topology_check': False,}
(可选)配置时区:
TIME_ZONE = "Asia/Shanghai"
sed替换
sed -i.bak '/^OPENSTACK_HOST/s#127.0.0.1#controller#' /etc/openstack-dashboard/local_settingssed -i '/^OPENSTACK_KEYSTONE_DEFAULT_ROLE/s#".*"#"user"#' /etc/openstack-dashboard/local_settingssed -i "/^ALLOWED_HOSTS/s#\[.*\]#['*']#" /etc/openstack-dashboard/local_settingssed -i '/^#SESSION_ENGINE/s/#//' /etc/openstack-dashboard/local_settingssed -i "/^SESSION_ENGINE/s#'.*'#'django.contrib.sessions.backends.cache'#" /etc/openstack-dashboard/local_settingssed -i "/^# 'default'/s/#//" /etc/openstack-dashboard/local_settingssed -i "/^#CACHES/,+6s/#//" /etc/openstack-dashboard/local_settingssed -i "/^ 'LOCATION'/s#127.0.0.1#openvip.com#" /etc/openstack-dashboard/local_settingssed -i "/OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT/s/#//" /etc/openstack-dashboard/local_settingssed -i "/OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT/s#False#True#" /etc/openstack-dashboard/local_settingssed -i "/OPENSTACK_API_VERSIONS/,+5s/#//" /etc/openstack-dashboard/local_settingssed -i '/"compute"/d' /etc/openstack-dashboard/local_settingssed -i '/^#OPENSTACK_KEYSTONE_DEFAULT_DOMAIN/s/#//' /etc/openstack-dashboard/local_settings sed -i '/^OPENSTACK_KEYSTONE_DEFAULT_DOMAIN/s/Default/default/' /etc/openstack-dashboard/local_settingssed -i '/^OPENSTACK_NEUTRON_NETWORK/,+7s#True#False#' /etc/openstack-dashboard/local_settingssed -i "/^OPENSTACK_NEUTRON_NETWORK/s/$/\n 'enable_lb': False,/" /etc/openstack-dashboard/local_settingssed -i "/^OPENSTACK_NEUTRON_NETWORK/s/$/\n 'enable_firewall': False,/" /etc/openstack-dashboard/local_settingssed -i "/^OPENSTACK_NEUTRON_NETWORK/s/$/\n 'enable_vpn': False,/" /etc/openstack-dashboard/local_settings
3. 添加下行到配置文件/etc/httpd/conf.d/openstack-dashboard.conf
WSGIApplicationGroup %{GLOBAL}
4. 重新启动Web服务器和会话存储服务()
systemctl restart httpd.service
memcached我安装在其它机器上
systemctl restart memcached.service
4. 浏览器http://controller/dashboard
controller写你控制端的ip
资料来自:https://thson.blog.csdn.net/article/details/100055061