根据https://www.golinuxcloud.com/configure-haproxy-in-openstack-high-availability/尝试实施 HA 的教程。我被困在需要向我没有的 /etc/httpd/conf.d/15-horizon_vhost.conf 文件添加 VIP 别名的步骤。有谁知道我必须把这个放在哪里?我在 Stein 版本上工作。
问问题
48 次
1 回答
0
OpenStack 的 HA 实现过程非常简单。您需要在负载均衡器机器上设置 VIP,并使用集群工具(如 keepalived 或起搏器)管理 VIP,这样您就拥有了启动和运行 haproxy 的 VIP。实际上,您可以跳过该部分并使用下面的内容进行 haproxy 配置。
global
chroot /var/lib/haproxy
daemon
group haproxy
maxconn 4000
pidfile /var/run/haproxy.pid
user haproxy
defaults
log global
maxconn 4000
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
listen dashboard_cluster
bind 172.16.64.151:443
balance source
option tcpka
option httpchk
option tcplog
server controller1 172.16.64.138:443 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:443 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:443 check inter 2000 rise 2 fall 5
listen galera_cluster
bind 172.16.64.151:3306
balance source
option mysql-check
server galera1 172.16.64.136:3306 check port 9200 inter 2000 rise 2 fall 5
server galer2a 172.16.64.137:3306 backup check port 9200 inter 2000 rise 2 fall 5
listen glance_api_cluster
bind 172.16.64.151:9292
balance source
option tcpka
option httpchk
option tcplog
server controller1 172.16.64.138:9292 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:9292 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:9292 check inter 2000 rise 2 fall 5
listen glance_registry_cluster
bind 172.16.64.151:9191
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:9191 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:9191 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:9191 check inter 2000 rise 2 fall 5
listen keystone_admin_cluster
bind 172.16.64.151:35357
balance source
option tcpka
option httpchk
option tcplog
server controller1 172.16.64.138:35357 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:35357 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:35357 check inter 2000 rise 2 fall 5
listen keystone_public_internal_cluster
bind 172.16.64.151:5000
balance source
option tcpka
option httpchk
option tcplog
server controller1 172.16.64.138:5000 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:5000 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:5000 check inter 2000 rise 2 fall 5
listen nova_ec2_api_cluster
bind 172.16.64.151:8773
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:8773 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8773 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8773 check inter 2000 rise 2 fall 5
listen nova_compute_api_cluster
bind 172.16.64.151:8774
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:8774 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8774 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8774 check inter 2000 rise 2 fall 5
listen nova_metadata_api_cluster
bind 172.16.64.151:8775
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:8775 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8775 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8775 check inter 2000 rise 2 fall 5
listen nova_placement_cluster
bind 172.16.64.151:8778
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:8778 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8778 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8778 check inter 2000 rise 2 fall 5
listen cinder_api_cluster
bind 172.16.64.151:8776
balance source
option tcpka
option httpchk
option tcplog
server controller1 172.16.64.138:8776 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8776 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8776 check inter 2000 rise 2 fall 5
listen ceilometer_api_cluster
bind 172.16.64.151:8777
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:8777 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8777 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8777 check inter 2000 rise 2 fall 5
listen nova_vncproxy_cluster
bind 172.16.64.151:6080
balance source
option tcpka
option tcplog
server controller1 172.16.64.138:6080 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:6080 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:6080 check inter 2000 rise 2 fall 5
listen neutron_api_cluster
bind 172.16.64.151:9696
balance source
option tcpka
option httpchk
option tcplog
server controller1 172.16.64.138:9696 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:9696 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:9696 check inter 2000 rise 2 fall 5
listen swift_proxy_cluster
bind 172.16.64.151:8080
balance source
option tcplog
option tcpka
server controller1 172.16.64.138:8080 check inter 2000 rise 2 fall 5
server controller2 172.16.64.139:8080 check inter 2000 rise 2 fall 5
server controller3 172.16.64.129:8080 check inter 2000 rise 2 fall 5
于 2019-12-18T16:34:37.360 回答