Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgraded haproxy image to 2.9 #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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-bookworm
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
8 changes: 5 additions & 3 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: **Bookworm**
- 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: **Bookworm**, 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
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
5 changes: 3 additions & 2 deletions haproxy/src/configure.py
Original file line number Diff line number Diff line change
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 meth GET uri / ver HTTP/1.1 hdr host $httpchk_host
""")

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