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 #140 from jdeathe/centos-6-develop
Browse files Browse the repository at this point in the history
Release changes for 1.5.1
  • Loading branch information
jdeathe authored Oct 9, 2018
2 parents b93ea39 + 43118b1 commit 2dbbf7a
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Summary of release changes for Version 1.

CentOS-6 6.10 x86_64 - Varnish Cache 4.1.

### 1.5.1 - 2018-10-09

- Adds lockfile to ensure varnishd is started before varnishncsa.
- Adds failure messages to healthcheck script.

### 1.5.0 - 2018-10-01

- Updates `gcc` package to 4.4.7-23.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ENV SSH_AUTOSTART_SSHD=false \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="1.5.0"
ARG RELEASE_VERSION="1.5.1"
LABEL \
maintainer="James Deathe <[email protected]>" \
install="docker run \
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Docker Image including:

## Overview & links

- `centos-7`, `centos-7-2.1.0`, `2.1.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-varnish/blob/centos-7/Dockerfile)
- `centos-6`, `centos-6-1.5.0`, `1.5.0` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-varnish/blob/centos-6/Dockerfile)
- `centos-7`, `centos-7-2.2.0`, `2.2.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-varnish/blob/centos-7/Dockerfile)
- `centos-6`, `centos-6-1.5.1`, `1.5.1` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-varnish/blob/centos-6/Dockerfile)

#### centos-6

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.5.0`or `1.5.0` for the [1.5.0](https://github.com/jdeathe/centos-ssh-varnish/tree/1.5.0) release tag.
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.5.1`or `1.5.1` for the [1.5.1](https://github.com/jdeathe/centos-ssh-varnish/tree/1.5.1) release tag.

#### centos-7

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.1.0`or `2.1.0` for the [2.1.0](https://github.com/jdeathe/centos-ssh-varnish/tree/2.1.0) release tag.
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.2.0`or `2.2.0` for the [2.2.0](https://github.com/jdeathe/centos-ssh-varnish/tree/2.2.0) release tag.

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 @@ -43,7 +43,7 @@ $ docker run -d -t \
--name varnish.pool-1.1.1 \
-p 80:80 \
--add-host httpd_1:172.17.8.101 \
jdeathe/centos-ssh-varnish:1.5.0
jdeathe/centos-ssh-varnish:1.5.1
```

Now you can verify it is initialised and running successfully by inspecting the container's logs.
Expand Down Expand Up @@ -76,7 +76,7 @@ $ docker run \
--ulimit nproc=65535 \
--env "VARNISH_STORAGE=malloc,256M" \
--add-host httpd_1:172.17.8.101 \
jdeathe/centos-ssh-varnish:1.5.0
jdeathe/centos-ssh-varnish:1.5.1
```

Now you can verify it is initialised and running successfully by inspecting the container's logs:
Expand Down
2 changes: 1 addition & 1 deletion src/etc/systemd/system/[email protected]
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-varnish"
Environment="DOCKER_IMAGE_TAG=1.5.0"
Environment="DOCKER_IMAGE_TAG=1.5.1"
Environment="DOCKER_PORT_MAP_TCP_80=8000"
Environment="DOCKER_PORT_MAP_TCP_8443=8500"
Environment="ULIMIT_MEMLOCK=82000"
Expand Down
6 changes: 6 additions & 0 deletions src/usr/bin/healthcheck
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if [[ ${VARNISH_AUTOSTART_VARNISHD_WRAPPER} == true ]] \
&& ! ps axo command \
| grep -qE '^/usr/sbin/varnishd '
then
printf -- \
"Process varnishd not running."
exit 1
fi

Expand All @@ -19,6 +21,8 @@ if [[ ${VARNISH_AUTOSTART_VARNISHD_WRAPPER} == true ]] \
&& ! varnishadm vcl.show -v boot \
&> /dev/null
then
printf -- \
"Varnish not booted."
exit 1
fi

Expand All @@ -27,6 +31,8 @@ if [[ ${VARNISH_AUTOSTART_VARNISHNCSA_WRAPPER} == true ]] \
&& ! ps axo command \
| grep -qE '^/usr/bin/varnishncsa '
then
printf -- \
"Process varnishncsa not running."
exit 1
fi

Expand Down
12 changes: 9 additions & 3 deletions src/usr/sbin/varnishd-wrapper
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Create lock file
touch /var/lock/subsys/varnishd-wrapper

function set_varnish_vcl_conf ()
{
local -r pattern_base64='^[A-Za-z0-9/+=]*$'
Expand Down Expand Up @@ -48,14 +51,17 @@ readonly DAEMON_OPTS="-j unix,user=varnish,ccgroup=varnish
-S /etc/varnish/secret
-s ${VARNISH_STORAGE:-file,/var/lib/varnish/varnish_storage.bin,1G}
"
readonly NICE=/bin/nice
readonly NICENESS=${VARNISH_NICENESS:-10}
readonly VARNISHD=/usr/sbin/varnishd
readonly NICE="/bin/nice"
readonly NICENESS="${VARNISH_NICENESS:-10}"
readonly VARNISHD="/usr/sbin/varnishd"

printf -- \
"Starting Varnish Cache: \n %s\n" \
"${DAEMON_OPTS}"

# Release lock file
rm -f /var/lock/subsys/varnishd-wrapper

exec ${NICE} \
-n ${NICENESS} \
${VARNISHD} \
Expand Down
34 changes: 18 additions & 16 deletions test/shpec/operation_shpec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -889,23 +889,24 @@ function test_custom_configuration ()
80/tcp
)"

# Make a request to populate the access_log
curl -sI \
-X GET \
-H "Host: ${backend_hostname}" \
http://127.0.0.1:${container_port_80}/ \
&> /dev/null

# Ensure log file exists before checking it's contents
counter=0
until docker exec \
varnish.pool-1.1.1 \
bash -c "[[ -f /var/log/varnish/access_log ]]"
bash -c "[[ -s /var/log/varnish/access_log ]]"
do
if (( counter > 6 ))
then
break
fi

# Make a request to populate the access_log
curl -sI \
-X GET \
-H "Host: ${backend_hostname}" \
http://127.0.0.1:${container_port_80}/ \
&> /dev/null

sleep 0.5
(( counter += 1 ))
done
Expand Down Expand Up @@ -962,23 +963,24 @@ function test_custom_configuration ()
80/tcp
)"

# Make a request to populate the access_log
curl -sI \
-X GET \
-H "Host: ${backend_hostname}" \
http://127.0.0.1:${container_port_80}/ \
&> /dev/null

# Ensure log file exists before checking it's contents
counter=0
until docker exec \
varnish.pool-1.1.1 \
bash -c "[[ -f /var/log/varnish/access_log ]]"
bash -c "[[ -s /var/log/varnish/access_log ]]"
do
if (( counter > 6 ))
then
break
fi

# Make a request to populate the access_log
curl -sI \
-X GET \
-H "Host: ${backend_hostname}" \
http://127.0.0.1:${container_port_80}/ \
&> /dev/null

sleep 0.5
(( counter += 1 ))
done
Expand Down

0 comments on commit 2dbbf7a

Please sign in to comment.