Merge "Merge haproxy-octavia elements"

This commit is contained in:
Zuul 2017-11-10 23:41:42 +00:00 committed by Gerrit Code Review
commit 2b7193764e
14 changed files with 11 additions and 92 deletions

View File

@ -301,18 +301,17 @@ pushd $TEMP > /dev/null
if [ "$AMP_BASEOS" = "ubuntu" ]; then
AMP_element_sequence=${AMP_element_sequence:-"base vm ubuntu"}
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND-ubuntu"
elif [ "$AMP_BASEOS" = "fedora" ]; then
AMP_element_sequence=${AMP_element_sequence:-"base vm fedora selinux-permissive"}
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
elif [ "$AMP_BASEOS" = "centos" ]; then
AMP_element_sequence=${AMP_element_sequence:-"base vm centos7 selinux-permissive"}
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
elif [ "$AMP_BASEOS" = "rhel" ]; then
AMP_element_sequence=${AMP_element_sequence:-"base vm rhel7 selinux-permissive"}
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
fi
# Add our backend element (haproxy, etc.)
AMP_element_sequence="$AMP_element_sequence $AMP_BACKEND"
if [ "$AMP_ROOTPW" ]; then
AMP_element_sequence="$AMP_element_sequence root-passwd"
export DIB_PASSWORD=$AMP_ROOTPW
@ -322,7 +321,7 @@ fi
if [ "$AMP_BASEOS" = "ubuntu" ]; then
AMP_element_sequence="$AMP_element_sequence rebind-sshd"
AMP_element_sequence="$AMP_element_sequence no-resolvconf"
AMP_element_sequence="$AMP_element_sequence amphora-agent-ubuntu"
AMP_element_sequence="$AMP_element_sequence amphora-agent"
AMP_element_sequence="$AMP_element_sequence keepalived-octavia-ubuntu"
elif [ "$AMP_BASEOS" = "rhel" ]; then
AMP_element_sequence="$AMP_element_sequence no-resolvconf"

View File

@ -1 +0,0 @@
amphora-agent

View File

@ -1,3 +0,0 @@
Element to install an Octavia Amphora with an haproxy backend.

View File

@ -1,3 +0,0 @@
package-installs
pkg-map
sysctl

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -eux
set -o pipefail
[ -d /var/lib/haproxy ] || install -d -D -m 0755 -o root -g root /var/lib/haproxy

View File

@ -1,3 +0,0 @@
{
"haproxy": null
}

View File

@ -1,8 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
# Doing both here as just remove doesn't seem to work on xenial
update-rc.d haproxy disable || true
update-rc.d -f haproxy remove || true

View File

@ -1,27 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
sysctl-write-value net.ipv4.tcp_max_tw_buckets 5800000
sysctl-write-value net.ipv4.tcp_max_orphans 5800000
sysctl-write-value net.ipv4.tcp_max_syn_backlog 100000
sysctl-write-value net.ipv4.tcp_keepalive_time 300
sysctl-write-value net.ipv4.tcp_tw_recycle 0
sysctl-write-value net.ipv4.tcp_tw_reuse 1
sysctl-write-value net.core.somaxconn 65534
sysctl-write-value net.ipv4.tcp_synack_retries 3
sysctl-write-value net.core.netdev_max_backlog 100000
sysctl-write-value fs.file-max 1048576
# It's ok for these to fail if conntrack module isn't loaded
sysctl-write-value net.netfilter.nf_conntrack_max 131072 || true
sysctl-write-value net.ipv4.netfilter.ip_conntrack_max 1524288 || true
sysctl-write-value net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait 5 || true
sysctl-write-value net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait 5 || true
sysctl-write-value net.ipv4.tcp_fin_timeout 5
sysctl-write-value net.ipv4.ip_nonlocal_bind 1
sysctl-write-value net.ipv4.tcp_rmem "16384 65536 524288"
sysctl-write-value net.ipv4.tcp_wmem "16384 349520 699040"
sysctl-write-value net.ipv4.ip_local_port_range "1025 65534"

View File

@ -1,21 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
case $DISTRO_NAME in
ubuntu | debian )
HAPROXY_USER_GROUP=nogroup
;;
fedora | centos* | rhel* )
HAPROXY_USER_GROUP=haproxy
;;
*)
HAPROXY_USER_GROUP=nogroup
;;
esac
cat >> /var/lib/octavia/haproxy-default-user-group.conf <<EOF
global
group $HAPROXY_USER_GROUP
EOF

View File

@ -1,12 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
if [[ -d /etc/rsyslog.d ]] && [[ ! -e /etc/rsyslog.d/49-haproxy.conf ]]; then
cat >> /etc/rsyslog.d/49-haproxy.conf <<EOF
# Send HAProxy messages to a dedicated logfile
if \$programname startswith 'haproxy' then /var/log/haproxy.log
&~
EOF
fi

View File

@ -1,2 +0,0 @@
haproxy:
default: haproxy

View File

@ -3,5 +3,11 @@
set -eu
set -o pipefail
chkconfig haproxy off
if [ "$DISTRO_NAME" == "ubuntu" ]; then
# Doing both here as just remove doesn't seem to work on xenial
update-rc.d haproxy disable || true
update-rc.d -f haproxy remove || true
else
chkconfig haproxy off
fi