资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

OpenStacklbaashaproxyv1v2怎么配置

这篇文章主要介绍OpenStack lbaas haproxy v1v2怎么配置,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都做网站、成都网站制作、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的阎良网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

lbaas v2 haproxy###

一 安装软件

# apt-get install haproxy neutron-lbaasv2-agent 
# yum install haproxy neutron-lbaasv2-agent

二 配置 LBaaS v2 with an agent

1 # vi /etc/neutron/neutron.conf 在已有的plugins后面添加

service_plugins = [existing service plugins],neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2

2 # vi /etc/neutron/neutron_lbaas.conf 添加下面一行

service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default

3 在/etc/neutron/lbaas_agent.ini文件中启用HAProxy负载均衡

# vi /etc/neutron/lbaas_agent.ini
[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
[haproxy]
user_group = haproxy

4 运行neutron-lbaas数据库迁移

# neutron-db-manage --service lbaas upgrade head

如果您已部署LBaaS v1,现在停止LBaaS v1代理。 v1和v2代理无法同时运行。

5 重启服务

# service neutron-lbaasv2-agent restart
# service neutron-server restart

三 查看日志

# tail -f /var/log/neutron/neutron-lbaasv2-agent.log

四 创建测试(horizon界面暂不支持v2版本)

# neutron lbaas-loadbalancer-create --name test-lb test108
# neutron lbaas-loadbalancer-show test-lb

# neutron security-group-create lbaas
# neutron security-group-rule-create   --direction ingress   --protocol tcp   --port-range-min 80   --port-range-max 80   --remote-ip-prefix 0.0.0.0/0   lbaas
# neutron security-group-rule-create   --direction ingress   --protocol tcp   --port-range-min 443   --port-range-max 443   --remote-ip-prefix 0.0.0.0/0   lbaas
# neutron  security-group-rule-create   --direction ingress   --protocol icmp   lbaas
# neutron port-update   --security-group lbaas $PORT-ID

# neutron lbaas-listener-create   --name test-lb-http   --loadbalancer test-lb   --protocol HTTP   --protocol-port 80
# neutron lbaas-pool-create   --name test-lb-pool-http   --lb-algorithm ROUND_ROBIN   --listener test-lb-http   --protocol HTTP
# neutron lbaas-member-create --subnet test108 --address 192.168.108.126 --protocol-port 80 test-lb-pool-http

# ping ip
# ps aux |grep haproxy

lbaas v1 haproxy

一 安装软件

# apt-get install haproxy neutron-lbaas-agent

1 # vi /etc/neutron/neutron.conf 在已有的plugins后面添加

service_plugins = lbaas

2 # vi /etc/neutron/neutron_lbaas.conf 添加下面一行

service_provider = LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default

3 在/etc/neutron/lbaas_agent.ini文件中启用HAProxy负载均衡器

# vi /etc/neutron/lbaas_agent.ini
[DEFAULT]
###在文件/etc/neutron/lbaas_agent.ini中选择所需要的驱动##
###激活Open vSwitch 负载均衡即服务驱动:
###interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
###或者,激活Linux网桥负载均衡即服务驱动:
###interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
[haproxy]
user_group = haproxy

4 在数据库中创建所要求的表:

# neutron-db-manage --service lbaas upgrade head

5 重启服务 如果您已部署LBaaS v2,现在停止LBaaS v2代理。 v1和v2代理无法同时运行。

# service neutron-lbaas-agent restart
# service neutron-server restart

二 查看日志

# tail -f /var/log/neutron/neutron-lbaas-agent.log

三 创建测试(horizon界面支持v1版本配置)

以上是“OpenStack lbaas haproxy v1v2怎么配置”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!


网站栏目:OpenStacklbaashaproxyv1v2怎么配置
当前URL:http://cdkjz.cn/article/gcsdch.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220