Skip to content

Commit 5c33b2c

Browse files
committed
Merge branch 'release/0.54.0'
2 parents fa482f3 + afa55f0 commit 5c33b2c

File tree

257 files changed

+934
-943
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+934
-943
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ This project adheres to [WebDevOps.io Dockerfile](https://github.com/webdevops/D
44

55
## [1.0.0] - upcoming
66

7+
## [0.54.0] - 2016-06-30
8+
- Update alpine-3 to 3.4
9+
- Fixed webdevops/php:alpine-3
10+
- Fixed webdevops/php:alpine-3-php7
11+
- Added webdevops/cerbot for let's encrypt
12+
- Improved docker graph (image build)
13+
- Added WHITELIST for image building
14+
715
## [0.53.2] - 2016-06-27
816
- Added test for `PHP_DEBUGGER` blackfire
917

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ php: webdevops/php webdevops/php-apache webdevops/php-nginx
2020
php-dev: webdevops/php-dev webdevops/php-apache-dev webdevops/php-nginx-dev
2121
hhvm: webdevops/hhvm webdevops/hhvm-apache webdevops/hhvm-nginx
2222

23-
web: webdevops/apache webdevops/apache-dev webdevops/nginx webdevops/nginx-dev webdevops/varnish
23+
web: webdevops/apache webdevops/apache-dev webdevops/nginx webdevops/nginx-dev webdevops/varnish webdevops/certbot
2424

2525
applications: webdevops/typo3 webdevops/piwik
2626

@@ -73,9 +73,15 @@ rebuild:
7373
push:
7474
BUILD_MODE=push make all
7575

76+
setup:
77+
pip install --upgrade -I -r ./requirements.txt
78+
7679
graph:
7780
python ./bin/diagram.py --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-layout.gv
7881

82+
graph-full:
83+
python ./bin/diagram.py --all --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-full-layout.gv
84+
7985
documentation:
8086
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
8187

@@ -159,3 +165,6 @@ webdevops/sphinx:
159165

160166
webdevops/varnish:
161167
bash bin/build.sh varnish "${DOCKER_REPOSITORY}/varnish" "${DOCKER_TAG_LATEST}"
168+
169+
webdevops/certbot:
170+
bash bin/build.sh certbot "${DOCKER_REPOSITORY}/certbot" "${DOCKER_TAG_LATEST}"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Command | Description
3434
`FAST=0 make all` | Build all containers *slow mode* (serial building)
3535
`DEBUG=1 make all` | Show log of build process even if process is successfull
3636
`FORCE=1 make all` | Force container build (`docker build --no-cache ...`)
37+
`WHITELIST="alpine-3 centos-7" make all` | Build all container with tag alpine-3 or centos-7
3738
<br> |
3839
`make baselayout` | Build and deploy baselayout.tar
3940
`make provision` | Deploy all configuration files from [_provisioning/](_provisioning/README.md)

bin/build.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ if [ -z "$FORCE" ]; then
1212
FORCE=0
1313
fi
1414

15+
if [ -z "$WHITELIST" ]; then
16+
WHITELIST=""
17+
fi
18+
1519
if [ -z "${BUILD_MODE}" ]; then
1620
BUILD_MODE="build"
1721
fi
@@ -220,8 +224,9 @@ foreachDockerfileInPath "docker/${TARGET}" "buildTarget"
220224
waitForBuildStep
221225

222226
## Build docker tag latest
223-
foreachDockerfileInPath "docker/${TARGET}" "buildTargetLatest" "${LATEST}"
224-
227+
if [ -z "$WHITELIST" ]; then
228+
foreachDockerfileInPath "docker/${TARGET}" "buildTargetLatest" "${LATEST}"
229+
fi
225230
# wait for final build
226231
waitForBuild
227232

@@ -232,7 +237,9 @@ case "$BUILD_MODE" in
232237
build)
233238
echo ">> Checking built images"
234239
foreachDockerfileInPath "docker/${TARGET}" "checkBuild"
235-
foreachDockerfileInPath "docker/${TARGET}" "checkBuildLatest" "${LATEST}"
240+
if [ -z "$WHITELIST" ]; then
241+
foreachDockerfileInPath "docker/${TARGET}" "checkBuildLatest" "${LATEST}"
242+
fi
236243
;;
237244
esac
238245

bin/diagram.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
PATH = os.path.dirname(os.path.abspath(__file__))
1111
FROM_REGEX = re.compile(ur'FROM\s+(?P<image>[^\s:]+)(:(?P<tag>.+))?', re.MULTILINE)
1212
CONTAINERS = {}
13+
TAGS = {}
1314
SUBGRAPH = {}
1415
EDGES = {}
1516

@@ -27,7 +28,14 @@ def processDockerfile(inputFile):
2728
with open(inputFile, 'r') as fileInput:
2829
DockerfileContent = fileInput.read()
2930
data = ([m.groupdict() for m in FROM_REGEX.finditer(DockerfileContent)])[0]
30-
CONTAINERS["webdevops/%s"%dockerImage] = data.get('image')
31+
key="webdevops/%s"%dockerImage
32+
CONTAINERS[key] = data.get('image')
33+
appendTag(key, data.get('tag'))
34+
35+
def appendTag(dockerImage, tag):
36+
if False == TAGS.has_key(dockerImage):
37+
TAGS[dockerImage] = {}
38+
TAGS[dockerImage][tag] = tag
3139

3240
def apply_styles(graph, styles):
3341
graph.graph_attr.update(
@@ -69,17 +77,24 @@ def build_graph(args):
6977
else:
7078
graph_image.node(image)
7179
EDGES[image] = base
80+
if args.all :
81+
attach_tag(graph_image, image)
7282
else:
7383
graph_image.node(image)
7484

75-
7685
for name, subgraph in SUBGRAPH.items():
7786
dia.subgraph(subgraph)
7887

7988
for image, base in EDGES.items():
8089
dia.edge(base, image)
8190
return dia
8291

92+
def attach_tag(graph, image):
93+
for tag in TAGS[image]:
94+
node_name = "%s-%s"%(image,tag)
95+
node = graph.node(node_name, label=tag, fillcolor='#eeeeee', shape='folder' )
96+
edge = graph.edge(image, node_name )
97+
8398
def main(args):
8499
dockerfilePath = os.path.abspath(args.dockerfile)
85100

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

93108
dia = build_graph(args)
94109
dia.render()
110+
print " render to: %s"%args.filename
95111

96112

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

104122
args = parser.parse_args()
105123

bin/diagram.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ diagram:
122122
fillcolor: "#ffa35f"
123123
docker:
124124
- webdevops/apache
125+
- webdevops/apache-dev
125126
- webdevops/nginx
127+
- webdevops/nginx-dev
126128
- webdevops/ssh
127129
- webdevops/vsftp
128130
- webdevops/postfix

bin/functions.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,32 @@ function checkBlacklist() {
279279
function foreachDockerfileInPath() {
280280
DOCKER_BASE_PATH="$1"
281281
CALLBACK="$2"
282-
FILTER="*"
282+
FILTER=".*"
283283

284284
if [ "$#" -ge 3 ]; then
285285
FILTER="$3"
286286
fi
287287

288+
if [ -n "${WHITELIST}" ]; then
289+
for WTAG in $WHITELIST; do
290+
if [ "${FILTER}" = ".*" ]; then
291+
FILTER="${WTAG}"
292+
else
293+
FILTER="${FILTER}\|${WTAG}"
294+
fi
295+
done
296+
fi
297+
288298
# build each subfolder as tag
289-
for DOCKERFILE_PATH in $(find "${DOCKER_BASE_PATH}" -mindepth 1 -maxdepth 1 -type d -name "$FILTER"); do
299+
for DOCKERFILE_PATH in $(find ${DOCKER_BASE_PATH} -mindepth 1 -maxdepth 1 -type d -regex ".*\(${FILTER}\).*"); do
290300
# check if there is a Dockerfile
301+
291302
if [ -f "${DOCKERFILE_PATH}/Dockerfile" ]; then
292303
DOCKERFILE="${DOCKERFILE_PATH}/Dockerfile"
293304
TAGNAME=$(basename "${DOCKERFILE_PATH}")
294305

295306
if [[ -n "$(checkBlacklist "${BASENAME}:${TAGNAME}")" ]]; then
296-
${CALLBACK}
307+
${CALLBACK}
297308
fi
298309
fi
299310
done

bin/provision.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,4 +426,10 @@ function header() {
426426
deployConfiguration samson-deployment/general samson-deployment 'latest'
427427
}
428428

429+
## Build cerbot
430+
[[ $(checkBuildTarget certbot) ]] && {
431+
header "certbot"
432+
}
433+
434+
429435
exit 0

docker/ansible/alpine-3/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ FROM webdevops/bootstrap:alpine-3
88
99
LABEL vendor=WebDevOps.io
1010
LABEL io.webdevops.layout=8
11-
LABEL io.webdevops.version=0.53.2
11+
LABEL io.webdevops.version=0.54.0

docker/ansible/centos-7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ FROM webdevops/bootstrap:centos-7
88
99
LABEL vendor=WebDevOps.io
1010
LABEL io.webdevops.layout=8
11-
LABEL io.webdevops.version=0.53.2
11+
LABEL io.webdevops.version=0.54.0

0 commit comments

Comments
 (0)