Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog


## 2024-07-30 (3.x - 1.0)

## 2024-07-29 (2.9 - 1.1)

- Upgrade HAproxy to 2.9
- Upgrade OS to Bookworm
- Disabled rsyslog kernel logging support in Dockerfile
- Started rsyslogd service without service directive in docker-entrypoint.sh
- Upgraded deprecated option: option httpchk in src/configure.py

## 2024-07-29 (2.0 - 1.0)

- Upgrade HAproxy to 2.0

## 2023-03-09 (1.8-1.8)

- Upgrade HAproxy to 1.8.31
Expand Down
5 changes: 3 additions & 2 deletions haproxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM haproxy:1.8.31-buster
FROM haproxy:2.9-dev-bullseye
LABEL maintainer="EEA: IDM2 A-Team <[email protected]>"

USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
Expand All @@ -15,6 +15,7 @@ RUN apt-get update \
&& sed -i '/#$UDPServerRun/c\$UDPServerRun 514' /etc/rsyslog.conf \
&& sed -i '/$UDPServerRun 514/a $UDPServerAddress 127.0.0.1' /etc/rsyslog.conf \
&& sed -i '/cron.*/a local2.* \/proc\/1\/fd\/1' /etc/rsyslog.conf \
&& sed -i '/^module(load="imklog")/s/^/#/' /etc/rsyslog.conf \
&& mv /usr/local/bin/docker-entrypoint.sh /usr/local/bin/haproxy-entrypoint.sh

COPY src/haproxy.cfg /tmp/
Expand Down
10 changes: 6 additions & 4 deletions haproxy/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
This image is generic, thus you can obviously re-use it within
your non-related EEA projects.

- Debian: **Buster**
- HAProxy: **1.8**
- Debian: **Bullseye**
- HAProxy: **2.9**
- Expose: **5000**

### Supported tags and respective Dockerfile links

- `:latest` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/blob/master/haproxy/Dockerfile) - Debian: **Buster**, HAProxy: **1.8**
- `:latest` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/blob/master/haproxy/Dockerfile) - Debian: **bullseye**, HAProxy: **2.9**

### Stable and immutable tags

- `:2.9-1.1` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/tree/2.9-1.1/haproxy/Dockerfile) - HAProxy: **2.9.9** Release: **1.1**
- `:2.0-1.0` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/tree/2.0-1.0/haproxy/Dockerfile) - HAProxy: **2.0.31** Release: **1.0**
- `:1.8-1.8` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/tree/1.8-1.8/haproxy/Dockerfile) - HAProxy: **1.8.31** Release: **1.8**
- `:1.8-1.7` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/tree/1.8-1.7/haproxy/Dockerfile) - HAProxy: **1.8.30** Release: **1.7**
- `:1.8-1.6` [*Dockerfile*](https://github.com/eea/eea.docker.haproxy/tree/1.8-1.6/haproxy/Dockerfile) - HAProxy: **1.8.29** Release: **1.6**
Expand Down Expand Up @@ -150,7 +152,7 @@ either when running the container or in a `docker-compose.yml` file.
* `TIMEOUT_CONNECT` the maximum time to wait for a connection attempt to a VPS to succeed. Default `5000` ms
* `TIMEOUT_CLIENT` timeouts apply when the client is expected to acknowledge or send data during the TCP process. Default `50000` ms
* `TIMEOUT_SERVER` timeouts apply when the server is expected to acknowledge or send data during the TCP process. Default `50000` ms
* `HTTPCHK` The HTTP method and uri used to check on the servers health - default `HEAD /`
* `HTTPCHK` The HTTP method and uri used to check on the servers health - default `meth GET uri /`
* `HTTPCHK_HOST` Host Header override on http Health Check - default `localhost`
* `INTER` parameter sets the interval between two consecutive health checks. If not specified, the default value is `2s`
* `FAST_INTER` parameter sets the interval between two consecutive health checks when the server is any of the transition state (read above): UP - transitionally DOWN or DOWN - transitionally UP. If not set, then `INTER` is used.
Expand Down
2 changes: 1 addition & 1 deletion haproxy/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fi


#start logging
service rsyslog restart
rsyslogd

#start crontab
service cron restart
Expand Down
7 changes: 4 additions & 3 deletions haproxy/src/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
TIMEOUT_CONNECT = os.environ.get('TIMEOUT_CONNECT', '5000')
TIMEOUT_CLIENT = os.environ.get('TIMEOUT_CLIENT', '50000')
TIMEOUT_SERVER = os.environ.get('TIMEOUT_SERVER', '50000')
HTTPCHK = os.environ.get('HTTPCHK', 'HEAD /')
HTTPCHK = os.environ.get('HTTPCHK', 'meth GET uri /')
HTTPCHK_HOST = os.environ.get('HTTPCHK_HOST', 'localhost')
INTER = os.environ.get('INTER', '2s')
FAST_INTER = os.environ.get('FAST_INTER', INTER)
Expand Down Expand Up @@ -81,10 +81,11 @@

backend_type_http = Template("""
option forwardfor
option httpchk
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
option httpchk $httpchk HTTP/1.1\\r\\nHost:$httpchk_host
""")
http-check send $httpchk ver HTTP/1.1 hdr host $httpchk_host
""")

backend_conf_plus = Template("""
server $name-$index $host:$port $cookies check
Expand Down