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

Commit f40244f

Browse files
authored
Merge pull request #31 from jdeathe/centos-7-develop
Release changes for 2.1.0
2 parents aa862fa + be4adb2 commit f40244f

21 files changed

+1776
-558
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.env
2+
.env.example
13
.git
24
.gitignore
35
dist

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
REDIS_MAXMEMORY=64mb
2+
REDIS_MAXMEMORY_POLICY=allkeys-lru
3+
REDIS_MAXMEMORY_SAMPLES=5
4+
REDIS_OPTIONS=
5+
REDIS_TCP_BACKLOG=1024

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
.env
12
dist

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ Summary of release changes for Version 2.
66

77
CentOS-7 7.5.1804 x86_64 - Redis 4.0.
88

9+
### 2.1.0 - 2019-02-17
10+
11+
- Updates source image to [2.5.0](https://github.com/jdeathe/centos-ssh/releases/tag/2.5.0).
12+
- Updates and restructures Dockerfile.
13+
- Updates default HEALTHCHECK interval to 1 second from 0.5.
14+
- Updates container naming conventions and readability of `Makefile`.
15+
- Fixes issue with unexpected published port in run templates when `DOCKER_PORT_MAP_TCP_6379` or `DOCKER_PORT_MAP_UDP_6379` is set to an empty string or 0.
16+
- Adds placeholder replacement of `RELEASE_VERSION` docker argument to systemd service unit template.
17+
- Adds consideration for event lag into test cases for unhealthy health_status events.
18+
- Adds port incrementation to Makefile's run template for container names with an instance suffix.
19+
- Adds docker-compose configuration example.
20+
- Adds improved logging output.
21+
- Adds improved bootstrap / wrapper scripts.
22+
- Removes use of `/etc/services-config` paths.
23+
- Removes X-Fleet section from etcd register template unit-file.
24+
- Removes the unused group element from the default container name.
25+
- Removes the node element from the default container name.
26+
- Removes unused environment variables from Makefile and scmi configuration.
27+
- Removes container log file `/var/log/redis-server-bootstrap` and `/var/log/redis/redis.log`.
28+
929
### 2.0.1 - 2018-11-19
1030

1131
- Updates source image to [2.4.1](https://github.com/jdeathe/centos-ssh/releases/tag/2.4.1).

Dockerfile

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# =============================================================================
2-
# jdeathe/centos-ssh-redis
3-
#
4-
# CentOS-7, Redis 4.0.
5-
# =============================================================================
6-
FROM jdeathe/centos-ssh:2.4.1
1+
FROM jdeathe/centos-ssh:2.5.0
72

3+
ARG RELEASE_VERSION="2.1.0"
4+
5+
# ------------------------------------------------------------------------------
6+
# Base install of required packages
7+
# ------------------------------------------------------------------------------
88
RUN yum -y install \
99
--setopt=tsflags=nodocs \
1010
--disableplugin=fastestmirror \
@@ -13,46 +13,47 @@ RUN yum -y install \
1313
redis40u* \
1414
&& yum clean all
1515

16-
# -----------------------------------------------------------------------------
16+
# ------------------------------------------------------------------------------
1717
# Copy files into place
18-
# -----------------------------------------------------------------------------
19-
ADD src/usr/bin \
20-
/usr/bin/
21-
ADD src/usr/sbin \
22-
/usr/sbin/
18+
# ------------------------------------------------------------------------------
19+
ADD src/etc \
20+
/etc/
2321
ADD src/opt/scmi \
2422
/opt/scmi/
25-
ADD src/etc/services-config/supervisor/supervisord.d \
26-
/etc/services-config/supervisor/supervisord.d/
27-
ADD src/etc/systemd/system \
28-
/etc/systemd/system/
23+
ADD src/usr \
24+
/usr/
2925

30-
RUN ln -sf \
31-
/etc/services-config/supervisor/supervisord.d/redis-server-bootstrap.conf \
32-
/etc/supervisord.d/redis-server-bootstrap.conf \
33-
&& ln -sf \
34-
/etc/services-config/supervisor/supervisord.d/redis-server-wrapper.conf \
35-
/etc/supervisord.d/redis-server-wrapper.conf \
36-
&& chmod 700 \
37-
/usr/{bin/healthcheck,sbin/redis-server-{bootstrap,wrapper}} \
38-
&& chmod 750 \
39-
/usr/sbin/redis-server-wrapper \
40-
&& chgrp redis \
41-
/usr/sbin/redis-server-wrapper \
42-
&& sed -i -r \
26+
# ------------------------------------------------------------------------------
27+
# Provisioning
28+
# - Insert placeholders into redis configuration file
29+
# - Replace placeholders with values in systemd service unit template
30+
# - Set permissions
31+
# ------------------------------------------------------------------------------
32+
RUN sed -i -r \
4333
-e "s~^(logfile ).+$~\1\"\"~" \
4434
-e "s~^(bind ).+$~\10.0.0.0~" \
4535
-e "s~^(# *)?(maxmemory ).+$~\2{{REDIS_MAXMEMORY}}~" \
4636
-e "s~^(# *)?(maxmemory-policy ).+$~\2{{REDIS_MAXMEMORY_POLICY}}~" \
4737
-e "s~^(# *)?(maxmemory-samples ).+$~\2{{REDIS_MAXMEMORY_SAMPLES}}~" \
4838
-e "s~^(tcp-backlog ).*$~\1{{REDIS_TCP_BACKLOG}}~" \
49-
/etc/redis.conf
39+
/etc/redis.conf \
40+
&& sed -i \
41+
-e "s~{{RELEASE_VERSION}}~${RELEASE_VERSION}~g" \
42+
/etc/systemd/system/centos-ssh-redis@.service \
43+
&& chmod 644 \
44+
/etc/supervisord.d/redis-server-{bootstrap,wrapper}.conf \
45+
&& chmod 700 \
46+
/usr/{bin/healthcheck,sbin/redis-server-{bootstrap,wrapper}} \
47+
&& chmod 750 \
48+
/usr/sbin/redis-server-wrapper \
49+
&& chgrp redis \
50+
/usr/sbin/redis-server-wrapper
5051

5152
EXPOSE 6379
5253

53-
# -----------------------------------------------------------------------------
54+
# ------------------------------------------------------------------------------
5455
# Set default environment variables
55-
# -----------------------------------------------------------------------------
56+
# ------------------------------------------------------------------------------
5657
ENV REDIS_AUTOSTART_REDIS_BOOTSTRAP="true" \
5758
REDIS_AUTOSTART_REDIS_WRAPPER="true" \
5859
REDIS_MAXMEMORY="64mb" \
@@ -63,10 +64,9 @@ ENV REDIS_AUTOSTART_REDIS_BOOTSTRAP="true" \
6364
SSH_AUTOSTART_SSHD="false" \
6465
SSH_AUTOSTART_SSHD_BOOTSTRAP="false"
6566

66-
# -----------------------------------------------------------------------------
67+
# ------------------------------------------------------------------------------
6768
# Set image metadata
68-
# -----------------------------------------------------------------------------
69-
ARG RELEASE_VERSION="2.0.1"
69+
# ------------------------------------------------------------------------------
7070
LABEL \
7171
maintainer="James Deathe <james.deathe@gmail.com>" \
7272
install="docker run \
@@ -96,7 +96,7 @@ jdeathe/centos-ssh-redis:${RELEASE_VERSION} \
9696
org.deathe.description="CentOS-7 7.5.1804 x86_64 - Redis 4.0."
9797

9898
HEALTHCHECK \
99-
--interval=0.5s \
99+
--interval=1s \
100100
--timeout=1s \
101101
--retries=4 \
102102
CMD ["/usr/bin/healthcheck"]

0 commit comments

Comments
 (0)