Highly available Horizon API

Install Dashboard

  1. [root@controller ~]# yum install openstack-dashboard -y

Dashboard Configure

  1. [root@controller1 ~]# cp /etc/openstack-dashboard/local_settings{,.bak}
  2. [root@controller1 ~]# DASHBOARD_LOCAL_SETTINGS=/etc/openstack-dashboard/local_settings
  3. [root@controller1 ~]# sed -i 's#_member_#user#g' $DASHBOARD_LOCAL_SETTINGS
  4. [root@controller1 ~]# sed -i 's#OPENSTACK_HOST = "127.0.0.1"#OPENSTACK_HOST = "controller"#' $DASHBOARD_LOCAL_SETTINGS
  5. [root@controller1 ~]# 
  6. [root@controller1 ~]# sed -i "/ALLOWED_HOSTS/cALLOWED_HOSTS = ['*', ]" $DASHBOARD_LOCAL_SETTINGS
  7. [root@controller1 ~]# 
  8. [root@controller1 ~]# sed -in '153,158s/#//' $DASHBOARD_LOCAL_SETTINGS 
  9. [root@controller1 ~]# sed -in '160,164s/.*/#&/' $DASHBOARD_LOCAL_SETTINGS
  10. [root@controller1 ~]# sed -i 's#UTC#Asia/Shanghai#g' $DASHBOARD_LOCAL_SETTINGS
  11. [root@controller1 ~]# sed -i 's#%s:5000/v2.0#%s:5000/v3#' $DASHBOARD_LOCAL_SETTINGS
  12. [root@controller1 ~]# sed -i '/ULTIDOMAIN_SUPPORT/cOPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True' $DASHBOARD_LOCAL_SETTINGS
  13. [root@controller1 ~]# sed -i "[email protected]^#[email protected][email protected]" $DASHBOARD_LOCAL_SETTINGS
  14. [root@controller1 ~]# 
  15. [root@controller1 ~]# echo '
  16. > #set
  17. > OPENSTACK_API_VERSIONS = {
  18. >     "identity": 3,
  19. >     "image": 2,
  20. >     "volume": 2,
  21. > }
  22. > #'>>$DASHBOARD_LOCAL_SETTINGS

Configure Other Controller Nodes

  1. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/openstack-dashboard/local_settings  controller2:/etc/openstack-dashboard/
  2. [root@controller1 ~]# rsync -avzP  -e 'ssh -p 22'  /etc/openstack-dashboard/local_settings  controller3:/etc/openstack-dashboard/

Restart Httpd Service

  1. [root@controller1 ~]# systemctl restart httpd
  2. [root@controller1 ~]# ssh controller2 "systemctl restart httpd" 
  3. [root@controller1 ~]# ssh controller3 "systemctl restart httpd"

Configure HA Dashboard API

  1. sed -i 's#^Listen 80#Listen 8080#'  /etc/httpd/conf/httpd.conf
  2. systemctl restart httpd.service
  3. systemctl daemon-reload
  4.  
  5. echo '
  6. listen dashboard_cluster  
  7.   bind controller:80
  8.   balance  roundrobin  
  9.   option  tcpka  
  10.   option  httpchk  
  11.   option  tcplog  
  12.   server controller1 controller1:8080 check port 8080 inter 2000 rise 2 fall 5
  13.   server controller2 controller2:8080 check port 8080 inter 2000 rise 2 fall 5
  14.   server controller3 controller3:8080 check port 8080 inter 2000 rise 2 fall 5
  15. '>>/etc/haproxy/haproxy.cfg
  16. systemctl restart haproxy.service

Now, Take the Browser

http://192.168.220.20/dashboard/

Leave a Reply

Your email address will not be published. Required fields are marked *