Skip to content

Commit 71c277d

Browse files
committed
Add 3.2 branch
1 parent cfab93f commit 71c277d

File tree

11 files changed

+236
-17
lines changed

11 files changed

+236
-17
lines changed

.github/workflows/docker_auto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
env:
1414
DOCKER_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1515
DOCKER_IMAGE: haproxytech/haproxy-alpine-quic
16-
STABLE_BRANCH: "3.0"
16+
STABLE_BRANCH: "3.1"
1717
steps:
1818
- name: Login to Docker Hub
1919
id: login_docker

.github/workflows/docker_manual.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
packages: write
1010
strategy:
1111
matrix:
12-
branch: ["2.6", "2.8", "2.9", "3.0", "3.1"]
12+
branch: ["2.6", "2.8", "2.9", "3.0", "3.1", "3.2"]
1313
env:
1414
DOCKER_PLATFORMS: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
1515
DOCKER_IMAGE: haproxytech/haproxy-alpine-quic
16-
STABLE_BRANCH: "3.0"
16+
STABLE_BRANCH: "3.1"
1717
steps:
1818
- name: Login to Docker Hub
1919
id: login_docker

2.6/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM alpine:3.20 AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
2121
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \

2.8/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM alpine:3.20 AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
2121
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \

2.9/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM alpine:3.20 AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
2121
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \

3.0/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM alpine:3.20 AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
2121
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \

3.1/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM alpine:3.20 AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
2121
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
@@ -35,7 +35,7 @@ MAINTAINER Dinko Korunic <dkorunic@haproxy.com>
3535
LABEL Name HAProxy
3636
LABEL Release Community Edition
3737
LABEL Vendor HAProxy
38-
LABEL Version 3.1.0
38+
LABEL Version 3.1.0-old
3939
LABEL RUN /usr/bin/docker -d IMAGE
4040

4141
ENV HAPROXY_BRANCH 3.1
@@ -54,7 +54,7 @@ RUN apk add --no-cache ca-certificates && \
5454
apk add --no-cache --virtual build-deps gcc libc-dev \
5555
linux-headers lua5.4-dev make openssl openssl-dev pcre2-dev tar \
5656
zlib-dev curl shadow && \
57-
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/devel/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
57+
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
5858
echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c - && \
5959
groupadd "$HAPROXY_GID" && \
6060
useradd -g "$HAPROXY_GID" "$HAPROXY_UID" && \

3.2/Dockerfile

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
FROM golang:alpine AS dataplaneapi-builder
2+
3+
ENV DATAPLANE_MINOR 3.0.3
4+
ENV DATAPLANE_V2_MINOR 2.9.8
5+
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git
6+
7+
RUN apk add --no-cache ca-certificates git make && \
8+
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
9+
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
10+
git checkout "v${DATAPLANE_MINOR}" && \
11+
make build && cp build/dataplaneapi /dataplaneapi && \
12+
make clean && \
13+
git checkout "v${DATAPLANE_V2_MINOR}" && \
14+
make build && cp build/dataplaneapi /dataplaneapi-v2
15+
16+
FROM alpine:3.20 AS openssl-builder
17+
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
19+
20+
RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
21+
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
22+
mkdir -p /tmp/openssl && \
23+
tar -xzf openssl.tar.gz -C /tmp/openssl --strip-components=1 && \
24+
rm -f openssl.tar.gz && \
25+
cd /tmp/openssl && \
26+
./config --libdir=lib --prefix=/opt/quictls && \
27+
make -j $(nproc) && \
28+
make install && \
29+
rm -rf /tmp/openssl
30+
31+
FROM alpine:3.20
32+
33+
MAINTAINER Dinko Korunic <dkorunic@haproxy.com>
34+
35+
LABEL Name HAProxy
36+
LABEL Release Community Edition
37+
LABEL Vendor HAProxy
38+
LABEL Version 3.2.0
39+
LABEL RUN /usr/bin/docker -d IMAGE
40+
41+
ENV HAPROXY_BRANCH 3.2
42+
ENV HAPROXY_MINOR 3.2.0-old
43+
ENV HAPROXY_SHA256 56a1468574ab411dcabde837f96bea6cf3c2eb90e279469f75ed1dcdc70fce11
44+
ENV HAPROXY_SRC_URL http://www.haproxy.org/download
45+
46+
ENV HAPROXY_UID haproxy
47+
ENV HAPROXY_GID haproxy
48+
49+
COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
50+
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
51+
COPY --from=openssl-builder /opt/quictls /opt/quictls
52+
53+
RUN apk add --no-cache ca-certificates && \
54+
apk add --no-cache --virtual build-deps gcc libc-dev \
55+
linux-headers lua5.4-dev make openssl openssl-dev pcre2-dev tar \
56+
zlib-dev curl shadow && \
57+
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/devel/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
58+
echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c - && \
59+
groupadd "$HAPROXY_GID" && \
60+
useradd -g "$HAPROXY_GID" "$HAPROXY_UID" && \
61+
mkdir -p /tmp/haproxy && \
62+
tar -xzf haproxy.tar.gz -C /tmp/haproxy --strip-components=1 && \
63+
rm -f haproxy.tar.gz && \
64+
make -C /tmp/haproxy -j"$(nproc)" TARGET=linux-musl CPU=generic USE_PCRE2=1 USE_PCRE2_JIT=1 \
65+
USE_TFO=1 USE_LINUX_TPROXY=1 USE_GETADDRINFO=1 \
66+
USE_LUA=1 LUA_LIB=/usr/lib/lua5.4 LUA_INC=/usr/include/lua5.4 \
67+
USE_PROMEX=1 USE_SLZ=1 \
68+
USE_OPENSSL=1 USE_PTHREAD_EMULATION=1 \
69+
SSL_INC=/opt/quictls/include SSL_LIB=/opt/quictls/lib USE_QUIC=1 \
70+
LDFLAGS="-L/opt/quictls/lib -Wl,-rpath,/opt/quictls/lib" \
71+
all && \
72+
make -C /tmp/haproxy TARGET=linux2628 install-bin install-man && \
73+
ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy && \
74+
mkdir -p /var/lib/haproxy && \
75+
chown "$HAPROXY_UID:$HAPROXY_GID" /var/lib/haproxy && \
76+
mkdir -p /usr/local/etc/haproxy && \
77+
ln -s /usr/local/etc/haproxy /etc/haproxy && \
78+
cp -R /tmp/haproxy/examples/errorfiles /usr/local/etc/haproxy/errors && \
79+
rm -rf /tmp/haproxy && \
80+
chmod +x /usr/local/bin/dataplaneapi && \
81+
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
82+
chmod +x /usr/local/bin/dataplaneapi-v2 && \
83+
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
84+
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
85+
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
86+
apk del build-deps && \
87+
apk add --no-cache openssl zlib lua5.4-libs pcre2 && \
88+
rm -f /var/cache/apk/* && \
89+
echo "/lib:/usr/local/lib:/usr/lib:/opt/quictls/lib" > "/etc/ld-musl-$(uname -m).path" && \
90+
mkdir -p /opt/quictls/ssl && \
91+
rm -rf /opt/quictls/ssl/certs && \
92+
ln -s /etc/ssl/certs /opt/quictls/ssl/certs
93+
94+
COPY haproxy.cfg /usr/local/etc/haproxy
95+
COPY docker-entrypoint.sh /
96+
97+
STOPSIGNAL SIGUSR1
98+
99+
ENTRYPOINT ["/docker-entrypoint.sh"]
100+
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

3.2/docker-entrypoint.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# first arg is `-f` or `--some-option`
5+
if [ "${1#-}" != "$1" ]; then
6+
set -- haproxy "$@"
7+
fi
8+
9+
if [ "$1" = 'haproxy' ]; then
10+
shift # "haproxy"
11+
# if the user wants "haproxy", let's add a couple useful flags
12+
# -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
13+
# -db -- disables background mode
14+
set -- haproxy -W -db "$@"
15+
fi
16+
17+
exec "$@"

3.2/haproxy.cfg

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
#---------------------------------------------------------------------
2+
# Example configuration for a possible web application. See the
3+
# full configuration options online.
4+
#
5+
# https://www.haproxy.org/download/3.2/doc/configuration.txt
6+
# https://cbonte.github.io/haproxy-dconv/3.2/configuration.html
7+
#
8+
#---------------------------------------------------------------------
9+
10+
#---------------------------------------------------------------------
11+
# Global settings
12+
#---------------------------------------------------------------------
13+
global
14+
# to have these messages end up in /var/log/haproxy.log you will
15+
# need to:
16+
#
17+
# 1) configure syslog to accept network log events. This is done
18+
# by adding the '-r' option to the SYSLOGD_OPTIONS in
19+
# /etc/sysconfig/syslog
20+
#
21+
# 2) configure local2 events to go to the /var/log/haproxy.log
22+
# file. A line like the following can be added to
23+
# /etc/sysconfig/syslog
24+
#
25+
# local2.* /var/log/haproxy.log
26+
#
27+
log 127.0.0.1 local2
28+
29+
chroot /var/lib/haproxy
30+
pidfile /var/run/haproxy.pid
31+
maxconn 4000
32+
user haproxy
33+
group haproxy
34+
# daemon
35+
36+
# turn on stats unix socket
37+
stats socket /var/lib/haproxy/stats
38+
39+
#---------------------------------------------------------------------
40+
# common defaults that all the 'listen' and 'backend' sections will
41+
# use if not designated in their block
42+
#---------------------------------------------------------------------
43+
defaults
44+
mode http
45+
log global
46+
option httplog
47+
option dontlognull
48+
option http-server-close
49+
option forwardfor except 127.0.0.0/8
50+
option redispatch
51+
retries 3
52+
timeout http-request 10s
53+
timeout queue 1m
54+
timeout connect 10s
55+
timeout client 1m
56+
timeout server 1m
57+
timeout http-keep-alive 10s
58+
timeout check 10s
59+
maxconn 3000
60+
61+
#---------------------------------------------------------------------
62+
# example how to define user and enable Data Plane API on tcp/5555
63+
# more information: https://github.com/haproxytech/dataplaneapi and
64+
# https://www.haproxy.com/documentation/hapee/2-0r1/configuration/dataplaneapi/
65+
#---------------------------------------------------------------------
66+
# userlist haproxy-dataplaneapi
67+
# user admin insecure-password mypassword
68+
#
69+
# program api
70+
# command /usr/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy --config-file /usr/local/etc/haproxy/haproxy.cfg --reload-cmd "kill -SIGUSR2 1" --restart-cmd "kill -SIGUSR2 1" --reload-delay 5 --userlist haproxy-dataplaneapi
71+
# no option start-on-reload
72+
73+
#---------------------------------------------------------------------
74+
# main frontend which proxys to the backends
75+
#---------------------------------------------------------------------
76+
frontend main
77+
bind *:80
78+
# bind *:443 ssl # To be completed ....
79+
80+
acl url_static path_beg -i /static /images /javascript /stylesheets
81+
acl url_static path_end -i .jpg .gif .png .css .js
82+
83+
use_backend static if url_static
84+
default_backend app
85+
86+
#---------------------------------------------------------------------
87+
# static backend for serving up images, stylesheets and such
88+
#---------------------------------------------------------------------
89+
backend static
90+
balance roundrobin
91+
server static1 127.0.0.1:4331 check
92+
server static2 127.0.0.1:4332 check
93+
94+
#---------------------------------------------------------------------
95+
# round robin balancing between the various backends
96+
#---------------------------------------------------------------------
97+
backend app
98+
balance roundrobin
99+
server app1 127.0.0.1:5001 check
100+
server app2 127.0.0.1:5002 check
101+
server app3 127.0.0.1:5003 check
102+
server app4 127.0.0.1:5004 check

0 commit comments

Comments
 (0)