Skip to content

Commit

Permalink
Merge branch 'release/0.54.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mblaschke committed Jun 30, 2016
2 parents fa482f3 + afa55f0 commit 5c33b2c
Show file tree
Hide file tree
Showing 257 changed files with 934 additions and 943 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ This project adheres to [WebDevOps.io Dockerfile](https://github.com/webdevops/D

## [1.0.0] - upcoming

## [0.54.0] - 2016-06-30
- Update alpine-3 to 3.4
- Fixed webdevops/php:alpine-3
- Fixed webdevops/php:alpine-3-php7
- Added webdevops/cerbot for let's encrypt
- Improved docker graph (image build)
- Added WHITELIST for image building

## [0.53.2] - 2016-06-27
- Added test for `PHP_DEBUGGER` blackfire

Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ php: webdevops/php webdevops/php-apache webdevops/php-nginx
php-dev: webdevops/php-dev webdevops/php-apache-dev webdevops/php-nginx-dev
hhvm: webdevops/hhvm webdevops/hhvm-apache webdevops/hhvm-nginx

web: webdevops/apache webdevops/apache-dev webdevops/nginx webdevops/nginx-dev webdevops/varnish
web: webdevops/apache webdevops/apache-dev webdevops/nginx webdevops/nginx-dev webdevops/varnish webdevops/certbot

applications: webdevops/typo3 webdevops/piwik

Expand Down Expand Up @@ -73,9 +73,15 @@ rebuild:
push:
BUILD_MODE=push make all

setup:
pip install --upgrade -I -r ./requirements.txt

graph:
python ./bin/diagram.py --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-layout.gv

graph-full:
python ./bin/diagram.py --all --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-full-layout.gv

documentation:
docker run -t -i --rm -p 8080:8000 -v "$$(pwd)/documentation/docs/:/opt/docs" webdevops/sphinx sphinx-autobuild --poll -H 0.0.0.0 /opt/docs html

Expand Down Expand Up @@ -159,3 +165,6 @@ webdevops/sphinx:

webdevops/varnish:
bash bin/build.sh varnish "${DOCKER_REPOSITORY}/varnish" "${DOCKER_TAG_LATEST}"

webdevops/certbot:
bash bin/build.sh certbot "${DOCKER_REPOSITORY}/certbot" "${DOCKER_TAG_LATEST}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Command | Description
`FAST=0 make all` | Build all containers *slow mode* (serial building)
`DEBUG=1 make all` | Show log of build process even if process is successfull
`FORCE=1 make all` | Force container build (`docker build --no-cache ...`)
`WHITELIST="alpine-3 centos-7" make all` | Build all container with tag alpine-3 or centos-7
<br> |
`make baselayout` | Build and deploy baselayout.tar
`make provision` | Deploy all configuration files from [_provisioning/](_provisioning/README.md)
Expand Down
13 changes: 10 additions & 3 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ if [ -z "$FORCE" ]; then
FORCE=0
fi

if [ -z "$WHITELIST" ]; then
WHITELIST=""
fi

if [ -z "${BUILD_MODE}" ]; then
BUILD_MODE="build"
fi
Expand Down Expand Up @@ -220,8 +224,9 @@ foreachDockerfileInPath "docker/${TARGET}" "buildTarget"
waitForBuildStep

## Build docker tag latest
foreachDockerfileInPath "docker/${TARGET}" "buildTargetLatest" "${LATEST}"

if [ -z "$WHITELIST" ]; then
foreachDockerfileInPath "docker/${TARGET}" "buildTargetLatest" "${LATEST}"
fi
# wait for final build
waitForBuild

Expand All @@ -232,7 +237,9 @@ case "$BUILD_MODE" in
build)
echo ">> Checking built images"
foreachDockerfileInPath "docker/${TARGET}" "checkBuild"
foreachDockerfileInPath "docker/${TARGET}" "checkBuildLatest" "${LATEST}"
if [ -z "$WHITELIST" ]; then
foreachDockerfileInPath "docker/${TARGET}" "checkBuildLatest" "${LATEST}"
fi
;;
esac

Expand Down
22 changes: 20 additions & 2 deletions bin/diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
PATH = os.path.dirname(os.path.abspath(__file__))
FROM_REGEX = re.compile(ur'FROM\s+(?P<image>[^\s:]+)(:(?P<tag>.+))?', re.MULTILINE)
CONTAINERS = {}
TAGS = {}
SUBGRAPH = {}
EDGES = {}

Expand All @@ -27,7 +28,14 @@ def processDockerfile(inputFile):
with open(inputFile, 'r') as fileInput:
DockerfileContent = fileInput.read()
data = ([m.groupdict() for m in FROM_REGEX.finditer(DockerfileContent)])[0]
CONTAINERS["webdevops/%s"%dockerImage] = data.get('image')
key="webdevops/%s"%dockerImage
CONTAINERS[key] = data.get('image')
appendTag(key, data.get('tag'))

def appendTag(dockerImage, tag):
if False == TAGS.has_key(dockerImage):
TAGS[dockerImage] = {}
TAGS[dockerImage][tag] = tag

def apply_styles(graph, styles):
graph.graph_attr.update(
Expand Down Expand Up @@ -69,17 +77,24 @@ def build_graph(args):
else:
graph_image.node(image)
EDGES[image] = base
if args.all :
attach_tag(graph_image, image)
else:
graph_image.node(image)


for name, subgraph in SUBGRAPH.items():
dia.subgraph(subgraph)

for image, base in EDGES.items():
dia.edge(base, image)
return dia

def attach_tag(graph, image):
for tag in TAGS[image]:
node_name = "%s-%s"%(image,tag)
node = graph.node(node_name, label=tag, fillcolor='#eeeeee', shape='folder' )
edge = graph.edge(image, node_name )

def main(args):
dockerfilePath = os.path.abspath(args.dockerfile)

Expand All @@ -92,6 +107,7 @@ def main(args):

dia = build_graph(args)
dia.render()
print " render to: %s"%args.filename


if __name__ == '__main__':
Expand All @@ -100,6 +116,8 @@ def main(args):
parser.add_argument('-f','--filename' ,help='file output (default: webdevops.gv)',default='webdevops.gv',type=str)
parser.add_argument('-F','--format' ,help='output format (default: png)',default='png',choices=('png','jpg','pdf','svg'))
parser.add_argument('-p','--path' ,help='path output',default=os.path.dirname(__file__)+"/../",type=str)
parser.add_argument('--all' ,help='show all info',dest='all' ,action='store_true')
parser.set_defaults(all=False)

args = parser.parse_args()

Expand Down
2 changes: 2 additions & 0 deletions bin/diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ diagram:
fillcolor: "#ffa35f"
docker:
- webdevops/apache
- webdevops/apache-dev
- webdevops/nginx
- webdevops/nginx-dev
- webdevops/ssh
- webdevops/vsftp
- webdevops/postfix
Expand Down
17 changes: 14 additions & 3 deletions bin/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,32 @@ function checkBlacklist() {
function foreachDockerfileInPath() {
DOCKER_BASE_PATH="$1"
CALLBACK="$2"
FILTER="*"
FILTER=".*"

if [ "$#" -ge 3 ]; then
FILTER="$3"
fi

if [ -n "${WHITELIST}" ]; then
for WTAG in $WHITELIST; do
if [ "${FILTER}" = ".*" ]; then
FILTER="${WTAG}"
else
FILTER="${FILTER}\|${WTAG}"
fi
done
fi

# build each subfolder as tag
for DOCKERFILE_PATH in $(find "${DOCKER_BASE_PATH}" -mindepth 1 -maxdepth 1 -type d -name "$FILTER"); do
for DOCKERFILE_PATH in $(find ${DOCKER_BASE_PATH} -mindepth 1 -maxdepth 1 -type d -regex ".*\(${FILTER}\).*"); do
# check if there is a Dockerfile

if [ -f "${DOCKERFILE_PATH}/Dockerfile" ]; then
DOCKERFILE="${DOCKERFILE_PATH}/Dockerfile"
TAGNAME=$(basename "${DOCKERFILE_PATH}")

if [[ -n "$(checkBlacklist "${BASENAME}:${TAGNAME}")" ]]; then
${CALLBACK}
${CALLBACK}
fi
fi
done
Expand Down
6 changes: 6 additions & 0 deletions bin/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,10 @@ function header() {
deployConfiguration samson-deployment/general samson-deployment 'latest'
}

## Build cerbot
[[ $(checkBuildTarget certbot) ]] && {
header "certbot"
}


exit 0
2 changes: 1 addition & 1 deletion docker/ansible/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:alpine-3
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:centos-7
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:debian-7
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:debian-8
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:debian-9
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-12.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-12.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-14.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-15.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-15.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-15.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-15.10
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-16.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0
2 changes: 1 addition & 1 deletion docker/apache-dev/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:alpine-3
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:centos-7
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:debian-7
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:debian-8
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:debian-9
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-12.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-12.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-14.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-15.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-15.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-15.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-15.10
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-16.04
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:alpine-3
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:centos-7
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:debian-7
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:debian-8
MAINTAINER info@webdevops.io
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=0.53.2
LABEL io.webdevops.version=0.54.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down

0 comments on commit 5c33b2c

Please sign in to comment.