Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 13f31cc

Browse files
authored
Merge pull request #52 from jdeathe/centos-7-develop
Release changes for 2.0.0
2 parents d8b9a08 + 73b0f55 commit 13f31cc

32 files changed

+1532
-329
lines changed

CHANGELOG.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
# Change Log
22

3-
## centos-6
3+
## centos-7
44

5-
Summary of release changes for Version 1.
5+
Summary of release changes for Version 2.
66

7-
CentOS-6 6.9 x86_64 - HAProxy 1.5 / HATop 0.7.
7+
CentOS-7 7.4.1708 x86_64 - HAProxy 1.8 / HATop 0.7.
88

9-
### 1.0.2 - 2018-05-28
10-
11-
- Updates source image to [1.8.4 tag](https://github.com/jdeathe/centos-ssh/releases/tag/1.8.4).
12-
- Adds feature to set `HAPROXY_SSL_CERTIFICATE` via a file path. e.g. Docker Swarm secrets.
13-
- Adds feature to set `HAPROXY_CONF` via a file path. e.g. Docker Swarm secrets.
14-
15-
### 1.0.1 - 2018-01-22
16-
17-
- Updates source image to [1.8.3 tag](https://github.com/jdeathe/centos-ssh/releases/tag/1.8.3).
18-
- Adds generic ready state test function.
19-
20-
### 1.0.0 - 2017-11-28
9+
### 2.0.0 - 2018-07-16
2110

2211
- Initial release
23-
- HAProxy [1.5.18](http://www.haproxy.org/download/1.5/src/CHANGELOG)
12+
- HAProxy [1.8.9](http://www.haproxy.org/download/1.8/src/CHANGELOG)
2413
- HATop [0.7.7](http://feurix.org/projects/hatop/changes/#hatop-0-7-7)

Dockerfile

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =============================================================================
22
# jdeathe/centos-ssh-haproxy
33
# =============================================================================
4-
FROM jdeathe/centos-ssh:1.8.4
4+
FROM jdeathe/centos-ssh:2.3.2
55

66
ARG HATOP_VERSION="0.7.7"
77

@@ -12,8 +12,8 @@ RUN rpm --rebuilddb \
1212
&& yum -y install \
1313
--setopt=tsflags=nodocs \
1414
--disableplugin=fastestmirror \
15-
haproxy-1.5.18-1.el6 \
16-
rsyslog-5.8.10-10.el6_6 \
15+
haproxy18u-1.8.9-1.ius.centos7 \
16+
rsyslog-8.24.0-16.el7 \
1717
&& yum versionlock add \
1818
haproxy \
1919
rsyslog \
@@ -30,7 +30,7 @@ RUN rpm --rebuilddb \
3030
RUN sed -i \
3131
-e 's~^#\$ModLoad imudp$~\$ModLoad imudp~' \
3232
-e 's~^#\$UDPServerRun 514$~\$UDPServerRun 514~' \
33-
-e 's~^\$OmitLocalLogging on$~\$OmitLocalLogging off~' \
33+
-e 's~^\(\$OmitLocalLogging .*\)$~#\1~' \
3434
-e 's~^\(\$ModLoad imuxsock .*\)$~#\1~' \
3535
-e 's~^\(\$ModLoad imjournal .*\)$~#\1~' \
3636
-e 's~^\(\$IMJournalStateFile .*\)$~#\1~' \
@@ -77,9 +77,7 @@ ADD src/usr/sbin \
7777
/usr/sbin/
7878
ADD src/opt/scmi \
7979
/opt/scmi/
80-
ADD src/etc/services-config/haproxy/haproxy-bootstrap.conf \
81-
src/etc/services-config/haproxy/haproxy-http.example.cfg \
82-
src/etc/services-config/haproxy/haproxy-tcp.example.cfg \
80+
ADD src/etc/services-config/haproxy \
8381
/etc/services-config/haproxy/
8482
ADD src/etc/services-config/supervisor/supervisord.d \
8583
/etc/services-config/supervisor/supervisord.d/
@@ -92,12 +90,42 @@ RUN ln -sf \
9290
&& ln -sf \
9391
/etc/services-config/haproxy/haproxy-http.example.cfg \
9492
/etc/haproxy/haproxy-http.cfg \
93+
&& ln -sf \
94+
/etc/services-config/haproxy/haproxy-http-proxy.example.cfg \
95+
/etc/haproxy/haproxy-http-proxy.cfg \
96+
&& ln -sf \
97+
/etc/services-config/haproxy/haproxy-h2.example.cfg \
98+
/etc/haproxy/haproxy-h2.cfg \
99+
&& ln -sf \
100+
/etc/services-config/haproxy/haproxy-h2-proxy.example.cfg \
101+
/etc/haproxy/haproxy-h2-proxy.cfg \
95102
&& ln -sf \
96103
/etc/services-config/haproxy/haproxy-tcp.example.cfg \
97104
/etc/haproxy/haproxy-tcp.cfg \
98105
&& ln -sf \
99106
/etc/services-config/haproxy/haproxy-bootstrap.conf \
100107
/etc/haproxy-bootstrap.conf \
108+
&& ln -sf \
109+
/etc/services-config/haproxy/400.html.http \
110+
/etc/haproxy/400.html.http \
111+
&& ln -sf \
112+
/etc/services-config/haproxy/403.html.http \
113+
/etc/haproxy/403.html.http \
114+
&& ln -sf \
115+
/etc/services-config/haproxy/408.html.http \
116+
/etc/haproxy/408.html.http \
117+
&& ln -sf \
118+
/etc/services-config/haproxy/500.html.http \
119+
/etc/haproxy/500.html.http \
120+
&& ln -sf \
121+
/etc/services-config/haproxy/502.html.http \
122+
/etc/haproxy/502.html.http \
123+
&& ln -sf \
124+
/etc/services-config/haproxy/503.html.http \
125+
/etc/haproxy/503.html.http \
126+
&& ln -sf \
127+
/etc/services-config/haproxy/504.html.http \
128+
/etc/haproxy/504.html.http \
101129
&& ln -sf \
102130
/etc/services-config/supervisor/supervisord.d/haproxy-bootstrap.conf \
103131
/etc/supervisord.d/haproxy-bootstrap.conf \
@@ -108,7 +136,7 @@ RUN ln -sf \
108136
/etc/services-config/supervisor/supervisord.d/rsyslogd-wrapper.conf \
109137
/etc/supervisord.d/rsyslogd-wrapper.conf \
110138
&& chmod 600 \
111-
/etc/services-config/haproxy/haproxy-{http,tcp}.example.cfg \
139+
/etc/services-config/haproxy/{haproxy-{http,http-proxy,h2,h2-proxy,tcp}.example.cfg,{400,403,408,500,502,503,504}.html.http} \
112140
&& chmod 600 \
113141
/etc/services-config/supervisor/supervisord.d/{haproxy-bootstrap,{haproxy,rsyslogd}-wrapper}.conf \
114142
&& chmod 700 \
@@ -128,7 +156,7 @@ ENV HAPROXY_SSL_CERTIFICATE="" \
128156
# -----------------------------------------------------------------------------
129157
# Set image metadata
130158
# -----------------------------------------------------------------------------
131-
ARG RELEASE_VERSION="1.0.2"
159+
ARG RELEASE_VERSION="2.0.0"
132160
LABEL \
133161
maintainer="James Deathe <[email protected]>" \
134162
install="docker run \
@@ -155,7 +183,7 @@ jdeathe/centos-ssh-haproxy:${RELEASE_VERSION} \
155183
org.deathe.license="MIT" \
156184
org.deathe.vendor="jdeathe" \
157185
org.deathe.url="https://github.com/jdeathe/centos-ssh-haproxy" \
158-
org.deathe.description="CentOS-6 6.9 x86_64 - HAProxy 1.5 / HATop 0.7."
186+
org.deathe.description="CentOS-7 7.4.1708 x86_64 - HAProxy 1.8 / HATop 0.7."
159187

160188
HEALTHCHECK \
161189
--interval=0.5s \

README-short.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CentOS-6 6.9 x86_64 - HAProxy / HATop.
1+
CentOS-7 7.4.1708 x86_64 - HAProxy / HATop.

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
centos-ssh-haproxy
22
==================
33

4-
Docker Images of CentOS-6 6.9 x86_64 - HAProxy 1.5 / HATop 0.7.
4+
Docker Image including:
5+
- CentOS-6 6.9 x86_64 - HAProxy 1.5 / HATop 0.7.
6+
- CentOS-7 7.4.1708 x86_64 - HAProxy 1.8 / HATop 0.7.
57

68
- http://www.haproxy.org/
79
- http://feurix.org/projects/hatop/
810

911
## Overview & links
1012

11-
- `centos-6`, `centos-6-1.0.2`, `1.0.2` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-6/Dockerfile)
13+
- `centos-7`, `centos-7-2.0.0`, `2.0.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-7/Dockerfile)
14+
- `centos-6`, `centos-6-1.0.3`, `1.0.3` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-6/Dockerfile)
1215

1316
#### centos-6
1417

15-
The latest CentOS-6 based release can be pulled from the `centos-6` Docker tag. It is recommended to select a specific release tag - the convention is `centos-6-1.0.2`or `1.0.2` for the [1.0.2](https://github.com/jdeathe/centos-ssh-haproxy/tree/1.0.2) release tag.
18+
The latest CentOS-6 based release can be pulled from the `centos-6` Docker tag. It is recommended to select a specific release tag - the convention is `centos-6-1.0.3`or `1.0.3` for the [1.0.3](https://github.com/jdeathe/centos-ssh-haproxy/tree/1.0.3) release tag.
19+
20+
#### centos-7
21+
22+
The latest CentOS-7 based release can be pulled from the `centos-7` Docker tag. It is recommended to select a specific release tag - the convention is `centos-7-2.0.0`or `2.0.0` for the [2.0.0](https://github.com/jdeathe/centos-ssh-haproxy/tree/2.0.0) release tag.
1623

1724
Included in the build are the [SCL](https://www.softwarecollections.org/), [EPEL](http://fedoraproject.org/wiki/EPEL) and [IUS](https://ius.io) repositories. Installed packages include [OpenSSH](http://www.openssh.com/portable.html) secure shell, [vim-minimal](http://www.vim.org/), are installed along with python-setuptools, [supervisor](http://supervisord.org/) and [supervisor-stdout](https://github.com/coderanger/supervisor-stdout).
1825

@@ -28,7 +35,7 @@ SSH is not required in order to access a terminal for the running container. The
2835
$ docker exec -it {docker-name-or-id} bash
2936
```
3037

31-
For cases where access to docker exec is not possible the preferred method is to use Command Keys and the nsenter command. See [command-keys.md](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-6/command-keys.md) for details on how to set this up.
38+
For cases where access to docker exec is not possible the preferred method is to use Command Keys and the nsenter command. See [command-keys.md](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-7/command-keys.md) for details on how to set this up.
3239

3340
## Quick Example
3441

@@ -41,7 +48,7 @@ $ docker run -d -t \
4148
-p 443:443 \
4249
--add-host httpd_1:172.17.8.101 \
4350
--add-host httpd_2:172.17.8.102 \
44-
jdeathe/centos-ssh-haproxy:centos-6
51+
jdeathe/centos-ssh-haproxy:2.0.0
4552
```
4653

4754
Now you can verify it is initialised and running successfully by inspecting the container's logs.
@@ -54,7 +61,7 @@ $ docker logs haproxy.pool-1.1.1
5461

5562
### Running
5663

57-
To run the a docker container from this image you can use the standard docker commands. Alternatively, there's a [docker-compose.yml](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-6/docker-compose.yml) example.
64+
To run the a docker container from this image you can use the standard docker commands. Alternatively, there's a [docker-compose.yml](https://github.com/jdeathe/centos-ssh-haproxy/blob/centos-7/docker-compose.yml) example.
5865

5966
In the following example the http service is bound to port 80 and https on port 443 of the docker host. Also, the environment variable `HAPROXY_HOST_NAMES` has been used to set a list of 3 hostnames to be added to the auto-generated self-signed SAN certificate.
6067

@@ -78,7 +85,7 @@ $ docker run \
7885
--env "HAPROXY_HOST_NAMES=www.app.local app.local localhost.localdomain" \
7986
--add-host httpd_1:172.17.8.101 \
8087
--add-host httpd_2:172.17.8.102 \
81-
jdeathe/centos-ssh-haproxy:centos-6
88+
jdeathe/centos-ssh-haproxy:2.0.0
8289
```
8390

8491
Now you can verify it is initialised and running successfully by inspecting the container's logs:

docker-compose-h2-proxy.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# ------------------------------------------------------------------------------
2+
# Ref: https://docs.docker.com/compose/compose-file/
3+
#
4+
# Setup:
5+
# docker-compose down
6+
# docker-compose build
7+
#
8+
# Run HTTP/2 PROXY (Varnish) example:
9+
# docker-compose -f docker-compose.yml -f docker-compose-h2-proxy.yml up -d
10+
#
11+
# HATop usage:
12+
# docker-compose exec haproxy hatop --help
13+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-1 -i 1
14+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-2 -i 1
15+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-3 -i 1
16+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-4 -i 1
17+
# ------------------------------------------------------------------------------
18+
version: "3.0"
19+
networks:
20+
tier2:
21+
driver: "bridge"
22+
internal: true
23+
services:
24+
haproxy:
25+
environment:
26+
HAPROXY_CONFIG: "/etc/haproxy/haproxy-h2-proxy.cfg"
27+
varnish_1:
28+
environment:
29+
VARNISH_STORAGE: "malloc,256M"
30+
VARNISH_MAX_THREADS: "4096"
31+
VARNISH_MIN_THREADS: "1024"
32+
VARNISH_VCL_CONF: "${VARNISH_VCL_CONF:-/run/secrets/varnish_vcl_terminated_https}"
33+
image: "jdeathe/centos-ssh-varnish:2.0.0"
34+
networks:
35+
- "tier2"
36+
- "tier3"
37+
restart: "always"
38+
sysctls:
39+
net.core.somaxconn: "4096"
40+
net.ipv4.ip_local_port_range: "1024 65535"
41+
net.ipv4.route.flush: "1"
42+
tty: true
43+
ulimits:
44+
memlock: 82000
45+
nofile:
46+
soft: 524288
47+
hard: 1048576
48+
nproc: 65535
49+
volumes:
50+
# Emulate docker swarm secrets
51+
- "${PWD}/test/fixture/secrets:/run/secrets:ro"
52+
varnish_2:
53+
environment:
54+
VARNISH_STORAGE: "malloc,256M"
55+
VARNISH_MAX_THREADS: "4096"
56+
VARNISH_MIN_THREADS: "1024"
57+
VARNISH_VCL_CONF: "${VARNISH_VCL_CONF:-/run/secrets/varnish_vcl_terminated_https}"
58+
image: "jdeathe/centos-ssh-varnish:2.0.0"
59+
networks:
60+
- "tier2"
61+
- "tier3"
62+
restart: "always"
63+
sysctls:
64+
net.core.somaxconn: "4096"
65+
net.ipv4.ip_local_port_range: "1024 65535"
66+
net.ipv4.route.flush: "1"
67+
tty: true
68+
ulimits:
69+
memlock: 82000
70+
nofile:
71+
soft: 524288
72+
hard: 1048576
73+
nproc: 65535
74+
volumes:
75+
# Emulate docker swarm secrets
76+
- "${PWD}/test/fixture/secrets:/run/secrets:ro"

docker-compose-h2.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ------------------------------------------------------------------------------
2+
# Ref: https://docs.docker.com/compose/compose-file/
3+
#
4+
# Setup:
5+
# docker-compose down
6+
# docker-compose build
7+
#
8+
# Run HTTP/2 example:
9+
# docker-compose -f docker-compose.yml -f docker-compose-h2.yml up -d
10+
#
11+
# HATop usage:
12+
# docker-compose exec haproxy hatop --help
13+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-1 -i 1
14+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-2 -i 1
15+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-3 -i 1
16+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-4 -i 1
17+
# ------------------------------------------------------------------------------
18+
version: "3.0"
19+
services:
20+
haproxy:
21+
environment:
22+
HAPROXY_CONFIG: "/etc/haproxy/haproxy-h2.cfg"

docker-compose-http-proxy.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# ------------------------------------------------------------------------------
2+
# Ref: https://docs.docker.com/compose/compose-file/
3+
#
4+
# Setup:
5+
# docker-compose down
6+
# docker-compose build
7+
#
8+
# Run HTTP/1.1 PROXY (Varnish) example:
9+
# docker-compose -f docker-compose.yml -f docker-compose-http-proxy.yml up -d
10+
#
11+
# HATop usage:
12+
# docker-compose exec haproxy hatop --help
13+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-1 -i 1
14+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-2 -i 1
15+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-3 -i 1
16+
# docker-compose exec haproxy hatop -s /var/lib/haproxy/stats-4 -i 1
17+
# ------------------------------------------------------------------------------
18+
version: "3.0"
19+
networks:
20+
tier2:
21+
driver: "bridge"
22+
internal: true
23+
services:
24+
haproxy:
25+
environment:
26+
HAPROXY_CONFIG: "/etc/haproxy/haproxy-http-proxy.cfg"
27+
varnish_1:
28+
environment:
29+
VARNISH_STORAGE: "malloc,256M"
30+
VARNISH_MAX_THREADS: "4096"
31+
VARNISH_MIN_THREADS: "1024"
32+
VARNISH_VCL_CONF: "${VARNISH_VCL_CONF:-/run/secrets/varnish_vcl_default}"
33+
image: "jdeathe/centos-ssh-varnish:2.0.0"
34+
networks:
35+
- "tier2"
36+
- "tier3"
37+
restart: "always"
38+
sysctls:
39+
net.core.somaxconn: "4096"
40+
net.ipv4.ip_local_port_range: "1024 65535"
41+
net.ipv4.route.flush: "1"
42+
tty: true
43+
ulimits:
44+
memlock: 82000
45+
nofile:
46+
soft: 524288
47+
hard: 1048576
48+
nproc: 65535
49+
volumes:
50+
# Emulate docker swarm secrets
51+
- "${PWD}/test/fixture/secrets:/run/secrets:ro"
52+
varnish_2:
53+
environment:
54+
VARNISH_STORAGE: "malloc,256M"
55+
VARNISH_MAX_THREADS: "4096"
56+
VARNISH_MIN_THREADS: "1024"
57+
VARNISH_VCL_CONF: "${VARNISH_VCL_CONF:-/run/secrets/varnish_vcl_default}"
58+
image: "jdeathe/centos-ssh-varnish:2.0.0"
59+
networks:
60+
- "tier2"
61+
- "tier3"
62+
restart: "always"
63+
sysctls:
64+
net.core.somaxconn: "4096"
65+
net.ipv4.ip_local_port_range: "1024 65535"
66+
net.ipv4.route.flush: "1"
67+
tty: true
68+
ulimits:
69+
memlock: 82000
70+
nofile:
71+
soft: 524288
72+
hard: 1048576
73+
nproc: 65535
74+
volumes:
75+
# Emulate docker swarm secrets
76+
- "${PWD}/test/fixture/secrets:/run/secrets:ro"

0 commit comments

Comments
 (0)