diff options
Diffstat (limited to 'tools/kingbird/install_kingbird.sh')
-rwxr-xr-x | tools/kingbird/install_kingbird.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/kingbird/install_kingbird.sh b/tools/kingbird/install_kingbird.sh index 4cec1e1..7480e59 100755 --- a/tools/kingbird/install_kingbird.sh +++ b/tools/kingbird/install_kingbird.sh @@ -171,6 +171,28 @@ iniset ${KINGBIRD_CONF_FILE} database connection "mysql://$mysql_user:$mysql_pas iniset ${KINGBIRD_CONF_FILE} database max_overflow -1 iniset ${KINGBIRD_CONF_FILE} database max_pool_size 1000 +# Configure haproxy + +cat > /etc/haproxy/conf.d/180-kingbird-api.cfg <<EOF +listen kingbird-api + bind ${KINGBIRD_PUBLIC_URL}:${KINGBIRD_PORT} + bind ${KINGBIRD_INTERNAL_URL}:${KINGBIRD_PORT} + http-request set-header X-Forwarded-Proto https if { ssl_fc } + option httpchk + http-check expect status 401 + option httplog + option forceclose + option http-buffer-request + timeout server 660s + timeout http-request 10s + server node-4 ${bind_host}:${KINGBIRD_PORT} check inter 10s fastinter 2s downinter 3s rise 3 fall 3 +EOF + +service haproxy restart + +# Configure iptables +iptables -I INPUT -p tcp -m multiport --dports 8118 -m comment --comment "410 kingbird" -j ACCEPT + # Run kingbird mkdir -p /var/log/kingbird |