Openstack的HA解决方案【替换原有的dashboard】

0. 进入到/etc/haproxy/conf.d/目录下

mv 015-horizon.cfg 150-timaiaas.cfg

将原有的dashboard的ha配置文件做为自己的配置文件。

1. 修改150-timaiaas.cfg

listen timaiaas
  bind 172.17.46.2:80
  balance  source
  capture  cookie vgnvisitor= len 32
  cookie  SERVERID insert indirect nocache
  mode  http
  option  forwardfor
  option  httpclose
  option  httplog
  rspidel  ^Set-cookie: IP=
  server node-5 172.17.47.3:8081 cookie node-5  check inter 2000 fall 3
  server node-9 172.17.47.4:8081 cookie node-9  check inter 2000 fall 3
  server node-10 172.17.47.5:8081 cookie node-10  check inter 2000 fall 3

修改端口为8081为我们的服务端口。

2. 打开iptables 的8081端口 vi /etc/sysconfig/iptables

-A INPUT -p tcp -m multiport --ports 8081 -m comment --comment "timaIaas" -j ACCEPT

3. 设定timacloud开机自启动

chkconfig timacloud on

4. 设定原有的dashboard 开机不自动启动

chkconfig httpd off

完成。

原文地址:https://www.cnblogs.com/CLTANG/p/4332581.html