openstack pike + ceph +高可用集成 -- Dashboard Cluster (十)

##Dashboard UI 高可用配置

#####在controller1安装配置

#安装 所有controller节点安装
yum install openstack-dashboard -y

#配置
cp /etc/openstack-dashboard/local_settings{,.bak}
#egrep -v '#|^$' /etc/openstack-dashboard/local_settings #显示默认配置
Setfiles=/etc/openstack-dashboard/local_settings
sed -i 's#_member_#user#g' $Setfiles
sed -i 's#OPENSTACK_HOST = "127.0.0.1"#OPENSTACK_HOST = "controller"#' $Setfiles
##允许所有主机访问#
sed -i "/ALLOWED_HOSTS/cALLOWED_HOSTS = ['*', ]" $Setfiles
#去掉memcached注释#
sed -in '153,158s/#//' $Setfiles 
sed -in '160,164s/.*/#&/' $Setfiles
sed -i 's#UTC#Asia/Shanghai#g' $Setfiles
sed -i 's#%s:5000/v2.0#%s:5000/v3#' $Setfiles
sed -i '/ULTIDOMAIN_SUPPORT/cOPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True' $Setfiles
sed -i "s@^#OPENSTACK_KEYSTONE_DEFAULT@OPENSTACK_KEYSTONE_DEFAULT@" $Setfiles
echo '
#set
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "image": 2,
    "volume": 2,
}
#'>>$Setfiles
#
sed -i '156s/127.0.0.1:11211/controller:11211/ $Setfiles
systemctl restart httpd

#访问
# http://vip/dashboard/

# http集群,前面步骤已配置http://www.cnblogs.com/elvi/p/7736570.html

#########其它节点配置controller2,controller3

#同步controller1配置到其它节点
rsync -avzP  -e 'ssh -p 22'  /etc/openstack-dashboard/local_settings  controller2:/etc/openstack-dashboard/
rsync -avzP  -e 'ssh -p 22'  /etc/openstack-dashboard/local_settings  controller3:/etc/openstack-dashboard/

#重启http
ssh controller2  "systemctl restart httpd"
ssh controller3  "systemctl restart httpd"

 

posted @ 2018-04-03 11:50  小⑦  阅读(264)  评论(0编辑  收藏  举报