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

Commit

Permalink
Merge pull request #60 from jdeathe/centos-7-develop
Browse files Browse the repository at this point in the history
Release changes for 2.1.1
  • Loading branch information
jdeathe authored Nov 16, 2018
2 parents accd088 + 9b3c862 commit 95af1e9
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 11 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ Summary of release changes for Version 2.

CentOS-7 7.5.1804 x86_64 - Memcached 1.4.

### 2.1.1 - 2018-11-16

- Fixes typo in test; using `--format` instead of `--filter`.
- Adds required `--sysctl` settings to docker run templates.
- Updates source image to [2.4.1](https://github.com/jdeathe/centos-ssh/releases/tag/2.4.1).

### 2.1.0 - 2018-08-16

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

### 2.0.0 - 2018-05-12

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# CentOS-7, Memcached 1.4.
# =============================================================================
FROM jdeathe/centos-ssh:2.4.0
FROM jdeathe/centos-ssh:2.4.1

RUN rpm --rebuilddb \
&& yum -y install \
Expand Down Expand Up @@ -52,7 +52,7 @@ ENV MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=true \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="2.1.0"
ARG RELEASE_VERSION="2.1.1"
LABEL \
maintainer="James Deathe <james.deathe@gmail.com>" \
install="docker run \
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Docker Image including:

## Overview & links

The latest CentOS-6 / CentOS-7 based releases can be pulled from the `centos-6` / `centos-7` Docker tags respectively. For production use it is recommended to select a specific release tag - the convention is `centos-6-1.2.0` OR `1.2.0` for the [1.2.0](https://github.com/jdeathe/centos-ssh-memcached/tree/1.2.0) release tag and `centos-7-2.1.0` OR `2.1.0` for the [2.1.0](https://github.com/jdeathe/centos-ssh/tree/2.1.0) release tag.
The latest CentOS-6 / CentOS-7 based releases can be pulled from the `centos-6` / `centos-7` Docker tags respectively. For production use it is recommended to select a specific release tag - the convention is `centos-6-1.2.1` OR `1.2.1` for the [1.2.1](https://github.com/jdeathe/centos-ssh-memcached/tree/1.2.1) release tag and `centos-7-2.2.1` OR `2.2.1` for the [2.2.1](https://github.com/jdeathe/centos-ssh/tree/2.2.1) release tag.

### Tags and respective `Dockerfile` links

- `centos-7`,`centos-7-2.1.0`,`2.1.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-memcached/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.2.0`,`1.2.0` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-memcached/blob/centos-6/Dockerfile)
- `centos-7`,`centos-7-2.2.1`,`2.2.1` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-memcached/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.2.1`,`1.2.1` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-memcached/blob/centos-6/Dockerfile)

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).

Expand All @@ -39,7 +39,8 @@ Run up a container named `memcached.pool-1.1.1` from the docker image `jdeathe/c
$ docker run -d \
--name memcached.pool-1.1.1 \
-p 11211:11211/tcp \
jdeathe/centos-ssh-memcached:2.1.0
--sysctl "net.core.somaxconn=1024" \
jdeathe/centos-ssh-memcached:2.2.1
```

Now you can verify it is initialised and running successfully by inspecting the container's logs.
Expand Down Expand Up @@ -74,8 +75,11 @@ $ docker run \
--tty \
--name memcached.pool-1.1.1 \
--publish 11211:11211/tcp \
--sysctl "net.core.somaxconn=1024" \
--sysctl "net.ipv4.ip_local_port_range=1024 65535" \
--sysctl "net.ipv4.route.flush=1" \
--env "MEMCACHED_CACHESIZE=32" \
jdeathe/centos-ssh-memcached:2.1.0
jdeathe/centos-ssh-memcached:2.2.1
```

#### Environment Variables
Expand Down
3 changes: 3 additions & 0 deletions default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
define DOCKER_CONTAINER_PARAMETERS
--name $(DOCKER_NAME) \
--restart $(DOCKER_RESTART_POLICY) \
--sysctl "net.core.somaxconn=$(SYSCTL_NET_CORE_SOMAXCONN)" \
--sysctl "net.ipv4.ip_local_port_range=$(SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE)" \
--sysctl "net.ipv4.route.flush=$(SYSCTL_NET_IPV4_ROUTE_FLUSH)" \
--env "MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=$(MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER)" \
--env "MEMCACHED_CACHESIZE=$(MEMCACHED_CACHESIZE)" \
--env "MEMCACHED_MAXCONN=$(MEMCACHED_MAXCONN)" \
Expand Down
5 changes: 5 additions & 0 deletions environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ DOCKER_IMAGE_RELEASE_TAG_PATTERN := ^(1|2|centos-(6-1|7-2))\.[0-9]+\.[0-9]+$
# Variables
# -----------------------------------------------------------------------------

# Docker --sysctl settings
SYSCTL_NET_CORE_SOMAXCONN ?= 1024
SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE ?= 1024 65535
SYSCTL_NET_IPV4_ROUTE_FLUSH ?= 1

# Docker image/container settings
DOCKER_CONTAINER_OPTS ?=
DOCKER_IMAGE_TAG ?= latest
Expand Down
8 changes: 7 additions & 1 deletion src/etc/systemd/system/centos-ssh-memcached@.service
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ Environment="DOCKER_USER=jdeathe"
Environment="DOCKER_CONTAINER_OPTS="
Environment="DOCKER_IMAGE_PACKAGE_PATH=/var/opt/scmi/packages"
Environment="DOCKER_IMAGE_NAME=centos-ssh-memcached"
Environment="DOCKER_IMAGE_TAG=2.1.0"
Environment="DOCKER_IMAGE_TAG=2.1.1"
Environment="DOCKER_PORT_MAP_TCP_11211=11211"
Environment="DOCKER_PORT_MAP_UDP_11211=NULL"
Environment="MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=true"
Environment="MEMCACHED_CACHESIZE=64"
Environment="MEMCACHED_MAXCONN=1024"
Environment="MEMCACHED_OPTIONS=-U 0"
Environment="SYSCTL_NET_CORE_SOMAXCONN=1024"
Environment="SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE=1024 65535"
Environment="SYSCTL_NET_IPV4_ROUTE_FLUSH=1"

# Initialisation: Load image from local storage if available, otherwise pull.
ExecStartPre=/bin/bash -c \
Expand Down Expand Up @@ -88,6 +91,9 @@ ExecStartPre=-/bin/bash -c \
ExecStart=/bin/bash -c \
"exec /usr/bin/docker run \
--name %p.%i \
--sysctl \"net.core.somaxconn=${SYSCTL_NET_CORE_SOMAXCONN}\" \
--sysctl \"net.ipv4.ip_local_port_range=${SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE}\" \
--sysctl \"net.ipv4.route.flush=${SYSCTL_NET_IPV4_ROUTE_FLUSH}\" \
--env \"MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=${MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER}\" \
--env \"MEMCACHED_CACHESIZE=${MEMCACHED_CACHESIZE}\" \
--env \"MEMCACHED_MAXCONN=${MEMCACHED_MAXCONN}\" \
Expand Down
3 changes: 3 additions & 0 deletions src/opt/scmi/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ fi
# Common parameters of create and run targets
DOCKER_CONTAINER_PARAMETERS="--name ${DOCKER_NAME} \
--restart ${DOCKER_RESTART_POLICY} \
--sysctl \"net.core.somaxconn=${SYSCTL_NET_CORE_SOMAXCONN}\" \
--sysctl \"net.ipv4.ip_local_port_range=${SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE}\" \
--sysctl \"net.ipv4.route.flush=${SYSCTL_NET_IPV4_ROUTE_FLUSH}\" \
--env \"MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=${MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER}\" \
--env \"MEMCACHED_CACHESIZE=${MEMCACHED_CACHESIZE}\" \
--env \"MEMCACHED_MAXCONN=${MEMCACHED_MAXCONN}\" \
Expand Down
5 changes: 5 additions & 0 deletions src/opt/scmi/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ DIST_PATH="${DIST_PATH:-./dist}"
# Number of seconds expected to complete container startup including bootstrap.
STARTUP_TIME="${STARTUP_TIME:-1}"

# Docker --sysctl settings
SYSCTL_NET_CORE_SOMAXCONN="${SYSCTL_NET_CORE_SOMAXCONN:-1024}"
SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE="${SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE:-1024 65535}"
SYSCTL_NET_IPV4_ROUTE_FLUSH="${SYSCTL_NET_IPV4_ROUTE_FLUSH:-1}"

# ETCD register service settings
REGISTER_ETCD_PARAMETERS="${REGISTER_ETCD_PARAMETERS:-}"
REGISTER_TTL="${REGISTER_TTL:-60}"
Expand Down
3 changes: 3 additions & 0 deletions src/opt/scmi/service-unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ readonly SERVICE_UNIT_ENVIRONMENT_KEYS="
MEMCACHED_CACHESIZE
MEMCACHED_MAXCONN
MEMCACHED_OPTIONS
SYSCTL_NET_CORE_SOMAXCONN
SYSCTL_NET_IPV4_IP_LOCAL_PORT_RANGE
SYSCTL_NET_IPV4_ROUTE_FLUSH
"
readonly SERVICE_UNIT_REGISTER_ENVIRONMENT_KEYS="
REGISTER_ETCD_PARAMETERS
Expand Down
4 changes: 2 additions & 2 deletions test/shpec/operation_shpec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ function test_custom_configuration ()

it "Can disable memcached-wrapper."
docker ps \
--format "name=memcached.pool-1.1.1" \
--format "health=healthy" \
--filter "name=memcached.pool-1.1.1" \
--filter "health=healthy" \
&> /dev/null \
&& docker top \
memcached.pool-1.1.1 \
Expand Down

0 comments on commit 95af1e9

Please sign in to comment.