OpenStack (haproxy)
openstack部署脚本
链接:<https://pan.baidu.com/s/1BTp_tGNC6ZWwVmKkhwivgw >
提取码:jxuz
haproxy 官网:< https://www.haproxy.org/ >
haproxy推荐阅读:http://www.ttlsa.com/linux/haproxy-study-tutorial/
openstack部署haproxy
在所有节点安装Haproxy
第一步:安装haproxy
yum -y install haproxy
systemctl enable haproxy.service
第二步:所有节点配置haproxy
cat <<EOF>/etc/rsyslog.d/haproxy.conf
$ModLoad imudp
$UDPServerRun 514
$template Haproxy,"%msg%n"
local0.=info -/var/log/haproxy.log;Haproxy
local0.notice -/var/log/haproxy-status.log;Haproxy
local0.* ~
EOF
systemctl restart rsyslog.service
systemctl status rsyslog.service
cat <<EOF>/etc/haproxy/haproxy.cfg
global
log 127.0.0.1 local3
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
stats socket /var/lib/haproxy/stats
maxconn 40000
user haproxy
group haproxy
daemon
spread-checks 3
tune.bufsize 32768
tune.maxrewrite 1024
tune.ssl.default-dh-param 2048
defaults
mode http
log global
option httplog
option tcplog
option redispatch
option http-server-close
option splice-auto
option dontlognull
retries 3
timeout http-request 20s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
maxconn 8000
listen stats
bind 0.0.0.0:8789
mode http
stats enable
stats uri /
stats realm Haproxy\ Statistics
stats auth admin:admin
stats refresh 15s
stats show-node
stats show-legends
stats hide-version
listen dashboard_cluster
bind 192.168.210.120:8080
balance source
option tcpka
option httpchk
option tcplog
server node1 192.168.210.131:80 check inter 2000 rise 2 fall 5
server node2 192.168.210.130:80 check inter 2000 rise 2 fall 5
server node3 192.168.210.132:80 check inter 2000 rise 2 fall 5
listen galera_cluster
bind 192.168.210.120:3307
balance source
hash-type consistent
mode tcp
option tcplog
option clitcpka
option srvtcpka
option httpchk
timeout client 28801s
timeout server 28801s
server node1 192.168.210.131:3306 check port 9200 inter 20s fastinter 2s downinter 2s rise 3 fall 3
server node2 192.168.210.130:3306 check port 9200 inter 20s fastinter 2s downinter 2s rise 3 fall 3 backup
server node3 192.168.210.132:3306 check port 9200 inter 20s fastinter 2s downinter 2s rise 3 fall 3 backup
listen mq_cluster
bind 192.168.210.120:5672 tcp-ut 5s
mode tcp
option tcpka
balance roundrobin
server node1 192.168.210.131:5672 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
server node2 192.168.210.130:5672 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
server node3 192.168.210.132:5672 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
listen keystone_admin_cluster
bind 192.168.210.120:35358
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httplog
option httpclose
option forwardfor
server node1 192.168.210.131:35357 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
server node2 192.168.210.130:35357 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
server node3 192.168.210.132:35357 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
listen keystone_public_internal_cluster
bind 192.168.210.120:5001
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httplog
option httpclose
option forwardfor
server node1 192.168.210.131:5000 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
server node2 192.168.210.130:5000 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
server node3 192.168.210.132:5000 check inter 10s fastinter 2s downinter 2s rise 3 fall 3
listen glance_registry_cluster
bind 192.168.210.120:9192
timeout server 30m
server node1 192.168.210.131:9191 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:9191 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:9191 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen glance_api_cluster
bind 192.168.210.120:9293
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httpchk /versions
option httplog
option httpclose
timeout server 30m
server node1 192.168.210.131:9292 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:9292 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:9292 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen nova_ec2_api_cluster
bind 192.168.210.120:9774
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httpchk
option httplog
option httpclose
timeout server 600s
server node1 192.168.210.131:8774 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:8774 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:8774 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen nova_compute_api_cluster
bind 192.168.210.120:9773
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httpchk
option httplog
option httpclose
server node1 192.168.210.131:8773 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.131:8773 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.131:8773 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen nova_metadata_api_cluster
bind 192.168.210.120:9775
option httpchk
option httplog
option httpclose
server node1 192.168.210.131:8775 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:8775 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:8775 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen nova_vncproxy_cluster
bind 192.168.210.120:6081
http-request set-header X-Forwarded-Proto https if { ssl_fc }
server node1 192.168.210.131:6080 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:6080 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:6080 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen nova_placement_cluster
bind 192.168.210.120:9778
http-request set-header X-Forwarded-Proto https if { ssl_fc }
server node1 192.168.210.131:8778 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:8778 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:8778 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen neutron_api_cluster
bind 192.168.210.120:9697
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httpchk
option httplog
option httpclose
server node1 192.168.210.131:9696 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:9696 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:9696 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen cinder_api_cluster
bind 192.168.210.120:9776
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httpchk
option httplog
option httpclose
server node1 192.168.210.131:8776 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:8776 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:8776 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
listen ceilometer_api_cluster
bind 192.168.210.120:9777
http-request set-header X-Forwarded-Proto https if { ssl_fc }
option httplog
option httpclose
server node1 192.168.210.131:8777 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node2 192.168.210.130:8777 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
server node3 192.168.210.132:8777 check inter 10s fastinter 2s downinter 3s rise 3 fall 3
EOF
OpenStack (haproxy)的更多相关文章
- 学习openstack(六)
VIII openstack(1) 传统的数据中心面临的问题:成本.效率(要快).管理方面(物理机.云主机): 云计算:对运维需求总体量是减少了,尤其是硬件工程师,对运维的技术要求提高了: 云计算是个 ...
- OpenStack(三)——allinone云平台的使用方法
接着OpenStack(二)——使用Kolla部署OpenStack-allinone云平台继续操作. 特别感谢https://www.cnblogs.com/openstackteam/p/5519 ...
- 理解 Neutorn LBaaS - 每天5分钟玩转 OpenStack(120)
Load Balance as a Service(LBaaS)是 Neutron 提供的一项高级网络服务.LBaaS 允许租户在自己的网络中创建和管理 load balancer. load bal ...
- Neutron 功能概述 - 每天5分钟玩转 OpenStack(65)
从今天开始,我们将学习 OpenStack 的 Networking Service,Neutron.Neutron 的难度会比前面所有模块都大一些,内容也多一些.为了帮助大家更好的掌握 Neutor ...
- OpenStack(四)——使用Kolla部署OpenStack多节点云
(1).实验环境 主机名 IP地址 角色 内存 网卡 CPU 磁盘 OpenStack-con 192.168.128.110 controller(控制) 8G 桥接网卡ens32和ens33 4核 ...
- 学习openstack(八)
一.OpenStack初探 1.1 OpenStack简介 OpenStack是一整套开源软件项目的综合,它允许企业或服务提供者建立.运行自己的云计算和存储设施.Rackspace与NASA是最初 ...
- 学习openstack(五)
OpenStackOpenStack介绍OpenStack是一种免费的开源平台,帮助服务提供商实现类似于亚马逊EC2和S3的基础设施服务.OpenStack当前有三个核心项目:计算(Nova),对象存 ...
- 学习openstack(四)
一.KVM虚拟化 1.KVM的安装: yum install qemu-kvm qemu-kvm-tools virt-manager libvirt virt-install /etc/init.d ...
- 学习openstack(三)
一.OpenStack初探 1.1 OpenStack简介 OpenStack是一整套开源软件项目的综合,它允许企业或服务提供者建立.运行自己的云计算和存储设施.Rackspace与NASA是最初 ...
随机推荐
- git 工作区与版本库
git 工作区.版本库 在我们使用git的时候,我们脑海中一定要有一个关于git的框架,如下图: 我们先对git的工作区.暂存区.本地仓库做一个基本的解释 工作区: 就是我们电脑中代码的下载目录 版本 ...
- 第十一章节 BJROBOT PS3 手柄控制【ROS全开源阿克曼转向智能网联无人驾驶车】
1.把小车架空平放在地板上. 2.用 USB 线将 PS3 蓝牙手柄连接至小车主控端,初次连接手柄上的 4 个红色指示灯会同时闪烁; 3.按下手柄中间的圆形配对键,然后等待红灯闪烁至停止. 4.此 ...
- ES6 对象拓展方法
一,ES6 对象拓展方法 ES6为对象提供了一些拓展方法,下面列举几个比较常见的对象拓展方法.
- 你知道 react-color 的实现原理吗
一.前言 ReactColor 是一个优秀的 React 颜色选择器组件,官方给了多种布局供开发者选择. 笔者常用的主题为 Sketch,这种主题涵盖了颜色面板.推荐色块.RGB颜色输入等功能,比较完 ...
- Jetbrains系列产品重置试用方法
0x0. 项目背景 Jetbrains家的产品有一个很良心的地方,他会允许你试用30天(这个数字写死在代码里了)以评估是否你真的需要为它而付费.但很多时候会出现一种情况:IDE并不能按照我们实际的试用 ...
- win10中安装Linux子系统
前言 Win10的Linux子系统闻名已久,今天就来操作一下 正文 限制 该功能是win10 1809 及之后才加入的功能,故请先核对版本. 开启功能 打开windows设置 设置 -> 更新和 ...
- es6 Array.from + new Set 去重复
// es6 set数据结构 生成一个数据集 里面的元素是唯一的 const items = new Set([1, 2, 3, 4, 5, 5, 5, 5]); // items 是个对象 item ...
- 【MyBatis】MyBatis 缓存
MyBatis 缓存 文章源码 什么是缓存 像大多数的持久化框架一样,MyBatis 也提供了缓存策略,通过缓存策略来减少数据库的查询次数,从而提高性能. Mybatis 中缓存分为一级缓存,二级缓存 ...
- 【Oracle】sum(..) over(..)用法分析
今天再看sql优化详解的时候,提到了一个sum(..) over(..) 于是自己实验并在网上找了相关的一些文章来看 下面创建一张表: create sequence xulie increment ...
- 【Azure Developer】解决Azure Key Vault管理Storage的示例代码在中国区Azure遇见的各种认证/授权问题 - C# Example Code
问题描述 使用Azure密钥保管库(Key Vault)来托管存储账号(Storage Account)密钥的示例中,从Github中下载的示例代码在中国区Azure运行时候会遇见各种认证和授权问题, ...