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 #35 from jdeathe/centos-7-develop
Browse files Browse the repository at this point in the history
ISSUE 34: Adds initial CentOS-7 build.
  • Loading branch information
jdeathe authored Jun 12, 2018
2 parents 3d054d8 + d6a9929 commit 8f66b9a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 66 deletions.
46 changes: 4 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,11 @@
# Change Log

## centos-6
## centos-7

Summary of release changes for Version 1.
Summary of release changes for Version 2.

CentOS-6 6.9 x86_64 - Memcached 1.4.
CentOS-7 7.4.1708 x86_64 - Memcached 1.4.

### 1.1.3 - 2018-05-13

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

### 1.1.2 - 2018-01-13

- Updates source image to [1.8.3 tag](https://github.com/jdeathe/centos-ssh/releases/tag/1.8.3).
- Adds a `.dockerignore` file.

### 1.1.1 - 2017-09-15

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

### 1.1.0 - 2017-08-08

- Fixes issue with expect script failure when using `expect -f`.
- Adds `SHPEC_ROOT` variable to Makefile.
- Removes scmi; it's maintained [upstream](https://github.com/jdeathe/centos-ssh/blob/centos-6/src/usr/sbin/scmi).
- Adds use of readonly variables for constants.
- Updates source image to [1.8.1 tag](https://github.com/jdeathe/centos-ssh/releases/tag/1.8.1).
- Adds a `src` directory for the image root files.
- Adds `STARTUP_TIME` variable for the `logs-delayed` Makefile target.
- Adds test case output with improved readability.
- Adds healthcheck.
- Adds [libmemcached](http://libmemcached.org/) to image.
- Adds `MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER` to optionally disable process startup.

### 1.0.1 - 2017-05-22

- Adds source from [jdeathe/centos-ssh:1.7.6](https://github.com/jdeathe/centos-ssh/releases/tag/1.7.6)
- Updates memcached package to `memcached-1.4.4-5.el6`.
- Adds a change log (`CHANGELOG.md`).
- Adds support for semantic version numbered tags.
- Adds minor code style changes to the Makefile for readability.
- Adds support for running `shpec` functional tests with `make test`.
- Adds correct spelling of Memcached in log file path: `/var/log/memcached.log`.
- Replaces deprecated Dockerfile `MAINTAINER` with a `LABEL`.

### 1.0.0 - 2016-11-23
### 2.0.0 - Unreleased

- Initial release based on Memcached version 1.4.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# =============================================================================
# jdeathe/centos-ssh-memcached
#
# CentOS-6, Memcached 1.4.
# CentOS-7, Memcached 1.4.
# =============================================================================
FROM jdeathe/centos-ssh:1.8.4
FROM jdeathe/centos-ssh:2.3.2

RUN rpm --rebuilddb \
&& yum -y install \
--setopt=tsflags=nodocs \
--disableplugin=fastestmirror \
libmemcached-0.31-1.1.el6 \
memcached-1.4.4-5.el6 \
libmemcached-1.0.16-5.el7 \
memcached-1.4.15-10.el7_3.1 \
&& yum versionlock add \
libmemcached* \
memcached* \
Expand Down Expand Up @@ -52,7 +52,7 @@ ENV MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=true \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="1.1.3"
ARG RELEASE_VERSION="2.0.0"
LABEL \
maintainer="James Deathe <james.deathe@gmail.com>" \
install="docker run \
Expand All @@ -79,7 +79,7 @@ jdeathe/centos-ssh-memcached:${RELEASE_VERSION} \
org.deathe.license="MIT" \
org.deathe.vendor="jdeathe" \
org.deathe.url="https://github.com/jdeathe/centos-ssh-memcached" \
org.deathe.description="CentOS-6 6.9 x86_64 - Memcached 1.4."
org.deathe.description="CentOS-7 7.4.1708 x86_64 - Memcached 1.4."

HEALTHCHECK \
--interval=0.5s \
Expand Down
2 changes: 1 addition & 1 deletion README-short.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CentOS-6 6.9 x86_64 - Memcached.
CentOS-7 7.4.1708 x86_64 - Memcached.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
centos-ssh-memcached
====================

Docker Image including CentOS-6 6.9 x86_64 and Memcached 1.4.
Docker Image including:

- CentOS-6 6.9 x86_64 and Memcached 1.4.
- CentOS-7 7.4.1708 x86_64 and Memcached 1.4.

## Overview & links

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.1.3` or `1.1.3` for the [1.1.3](https://github.com/jdeathe/centos-ssh-memcached/tree/1.1.3) 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.1.3` OR `1.1.3` for the [1.1.3](https://github.com/jdeathe/centos-ssh-memcached/tree/1.1.3) release tag and `centos-7-2.0.0` OR `2.0.0` for the [2.0.0](https://github.com/jdeathe/centos-ssh/tree/2.0.0) release tag.

### Tags and respective `Dockerfile` links

- `centos-6`, `centos-6-1.1.3`, `1.1.3` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-memcached/blob/centos-6/Dockerfile)
- `centos-7`,`centos-7-2.0.0`,`2.0.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-memcached/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.1.3`,`1.1.3` [(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 @@ -29,26 +33,26 @@ For cases where access to docker exec is not possible the preferred method is to

## Quick Example

Run up a container named `memcached.pool-1.1.3` from the docker image `jdeathe/centos-ssh-memcached` on port 11211 of your docker host.
Run up a container named `memcached.pool-1.1.1` from the docker image `jdeathe/centos-ssh-memcached` on port 11211 of your docker host.

```
$ docker run -d \
--name memcached.pool-1.1.3 \
--name memcached.pool-1.1.1 \
-p 11211:11211/tcp \
jdeathe/centos-ssh-memcached:centos-6
jdeathe/centos-ssh-memcached:centos-7
```

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

```
$ docker logs memcached.pool-1.1.3
$ docker logs memcached.pool-1.1.1
```

To verify the Memcached service status:

```
$ docker exec -it \
memcached.pool-1.1.3 \
memcached.pool-1.1.1 \
memcached-tool localhost stats
```

Expand All @@ -63,15 +67,15 @@ In the following example the memcached service is bound to port 11211 of the doc
#### Using environment variables

```
$ docker stop memcached.pool-1.1.3 && \
docker rm memcached.pool-1.1.3
$ docker stop memcached.pool-1.1.1 && \
docker rm memcached.pool-1.1.1
$ docker run \
--detach \
--tty \
--name memcached.pool-1.1.3 \
--name memcached.pool-1.1.1 \
--publish 11211:11211/tcp \
--env "MEMCACHED_CACHESIZE=32" \
jdeathe/centos-ssh-memcached:centos-6
jdeathe/centos-ssh-memcached:centos-7
```

#### Environment Variables
Expand Down
4 changes: 2 additions & 2 deletions environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ DOCKER_IMAGE_NAME := centos-ssh-memcached
SHPEC_ROOT := test/shpec

# Tag validation patterns
DOCKER_IMAGE_TAG_PATTERN := ^(latest|centos-6|((1|centos-6-1)\.[0-9]+\.[0-9]+))$
DOCKER_IMAGE_RELEASE_TAG_PATTERN := ^(1|centos-6-1)\.[0-9]+\.[0-9]+$
DOCKER_IMAGE_TAG_PATTERN := ^(latest|centos-[6-7]|((1|2|centos-(6-1|7-2))\.[0-9]+\.[0-9]+))$
DOCKER_IMAGE_RELEASE_TAG_PATTERN := ^(1|2|centos-(6-1|7-2))\.[0-9]+\.[0-9]+$

# -----------------------------------------------------------------------------
# Variables
Expand Down
2 changes: 1 addition & 1 deletion src/etc/systemd/system/centos-ssh-memcached@.service
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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=1.1.3"
Environment="DOCKER_IMAGE_TAG=2.0.0"
Environment="DOCKER_PORT_MAP_TCP_11211=11211"
Environment="DOCKER_PORT_MAP_UDP_11211=NULL"
Environment="MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=true"
Expand Down
4 changes: 2 additions & 2 deletions src/opt/scmi/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ readonly DOCKER_USER=jdeathe
readonly DOCKER_IMAGE_NAME=centos-ssh-memcached

# Tag validation patterns
readonly DOCKER_IMAGE_TAG_PATTERN='^(latest|centos-6|((1|centos-6-1)\.[0-9]+\.[0-9]+))$'
readonly DOCKER_IMAGE_RELEASE_TAG_PATTERN='^(1|centos-6-1)\.[0-9]+\.[0-9]+$'
readonly DOCKER_IMAGE_TAG_PATTERN='^(latest|centos-[6-7]|((1|2|centos-(6-1|7-2))\.[0-9]+\.[0-9]+))$'
readonly DOCKER_IMAGE_RELEASE_TAG_PATTERN='^(1|2|centos-(6-1|7-2))\.[0-9]+\.[0-9]+$'

# -----------------------------------------------------------------------------
# Variables
Expand Down
1 change: 1 addition & 0 deletions test/shpec/operation_shpec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ function test_custom_configuration ()
bash -c "memcat \
--servers=memcached.pool-1.1.1:11211 \
lorem-ipsum-base64.txt \
2> /dev/null \
| awk 'NR > 1 { print line; } \
{ line = \$0; } \
END { printf \$0; }'"
Expand Down

0 comments on commit 8f66b9a

Please sign in to comment.