Skip to content

Commit a7d907b

Browse files
authored
Feature/console (#147)
- Add multi-process python console utility with whitelist/blacklist and automatic dependency tree - Add docker:build - Add docker:push - Add docker:pull - Add docker:test (based on testinfra) - Add generate:dockerfile - Add generate:provision - Add generate:graph - Old tests are still available with make old-test
1 parent 6ed35d3 commit a7d907b

Some content is hidden

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

61 files changed

+3492
-1088
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
.idea
1+
/.idea
2+
/.cache
23
/test/Dockerfile
34
/test/vendor/
45
/test/.bundle/
56
/test/*.test
67
/test/docker.test.*.tar
78
/BLACKLIST
89
*.log
10+
*.pyc
11+
.doit.db

Makefile

+42-38
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,22 @@ applications: webdevops/typo3 webdevops/piwik
2626

2727
misc: webdevops/mail-sandbox webdevops/sphinx webdevops/liquibase
2828

29+
requirements:
30+
pip install -r ./requirements.txt
31+
2932
test:
30-
cd "test/" && make all
33+
python bin/console docker:test
34+
35+
old-test:
36+
test/run.sh
3137

32-
test-hub-images:
33-
DOCKER_PULL=1 make test
3438

3539
baselayout:
36-
BASELAYOUT=1 PROVISION=0 bash bin/provision.sh
40+
python bin/console generate:provision --baselayout
3741

3842
provision:
39-
python bin/buildDockerfile.py --template=template/ --dockerfile=docker/
40-
BASELAYOUT=0 PROVISION=1 bash bin/provision.sh
43+
python bin/console generate:dockerfile
44+
python bin/console generate:provision
4145

4246
publish: dist-update rebuild test push
4347

@@ -77,97 +81,97 @@ setup:
7781
pip install --upgrade -I -r ./requirements.txt
7882

7983
graph:
80-
python ./bin/diagram.py --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-layout.gv
84+
python ./bin/console generate:graph
8185

8286
graph-full:
83-
python ./bin/diagram.py --all --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-full-layout.gv
87+
python ./bin/console generate:graph --all --filename docker-image-full-layout.gv
8488

8589
documentation:
86-
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
90+
docker run -t -i --rm -p 8080:8000 -v "$$(pwd)/documentation/docs/:/opt/docs" -e "VIRTUAL_HOST=documentation.docker" -e "VIRTUAL_PORT=8000" webdevops/sphinx sphinx-autobuild --poll -H 0.0.0.0 /opt/docs html
8791

8892
webdevops/bootstrap:
89-
bash bin/build.sh bootstrap "${DOCKER_REPOSITORY}/bootstrap" "${DOCKER_TAG_LATEST}"
93+
python ./bin/console docker:build --whitelist=webdevops/bootstrap
9094

9195
webdevops/ansible:
92-
bash bin/build.sh bootstrap "${DOCKER_REPOSITORY}/ansible" "${DOCKER_TAG_LATEST}"
96+
python ./bin/console docker:build --whitelist=webdevops/bootstrap
9397

9498
webdevops/base:
95-
bash bin/build.sh base "${DOCKER_REPOSITORY}/base" "${DOCKER_TAG_LATEST}"
99+
python ./bin/console docker:build --whitelist=webdevops/base
96100

97101
webdevops/base-app:
98-
bash bin/build.sh base-app "${DOCKER_REPOSITORY}/base-app" "${DOCKER_TAG_LATEST}"
102+
python ./bin/console docker:build --whitelist=webdevops/base-app
99103

100104
webdevops/php:
101-
bash bin/build.sh php "${DOCKER_REPOSITORY}/php" "${DOCKER_TAG_LATEST}"
105+
python ./bin/console docker:build --whitelist=webdevops/php
102106

103107
webdevops/php-dev:
104-
bash bin/build.sh php-dev "${DOCKER_REPOSITORY}/php-dev" "${DOCKER_TAG_LATEST}"
108+
python ./bin/console docker:build --whitelist=webdevops/php-dev
105109

106110
webdevops/apache:
107-
bash bin/build.sh apache "${DOCKER_REPOSITORY}/apache" "${DOCKER_TAG_LATEST}"
111+
python ./bin/console docker:build --whitelist=webdevops/apache
108112

109113
webdevops/apache-dev:
110-
bash bin/build.sh apache-dev "${DOCKER_REPOSITORY}/apache-dev" "${DOCKER_TAG_LATEST}"
114+
python ./bin/console docker:build --whitelist=webdevops/apache-dev
111115

112116
webdevops/nginx:
113-
bash bin/build.sh nginx "${DOCKER_REPOSITORY}/nginx" "${DOCKER_TAG_LATEST}"
117+
python ./bin/console docker:build --whitelist=webdevops/nginx
114118

115119
webdevops/nginx-dev:
116-
bash bin/build.sh nginx-dev "${DOCKER_REPOSITORY}/nginx-dev" "${DOCKER_TAG_LATEST}"
120+
python ./bin/console docker:build --whitelist=webdevops/nginx-dev
117121

118122
webdevops/php-apache:
119-
bash bin/build.sh php-apache "${DOCKER_REPOSITORY}/php-apache" "${DOCKER_TAG_LATEST}"
123+
python ./bin/console docker:build --whitelist=webdevops/php-apache
120124

121125
webdevops/php-apache-dev:
122-
bash bin/build.sh php-apache-dev "${DOCKER_REPOSITORY}/php-apache-dev" "${DOCKER_TAG_LATEST}"
126+
python ./bin/console docker:build --whitelist=webdevops/php-apache-dev
123127

124128
webdevops/php-nginx:
125-
bash bin/build.sh php-nginx "${DOCKER_REPOSITORY}/php-nginx" "${DOCKER_TAG_LATEST}"
129+
python ./bin/console docker:build --whitelist=webdevops/php-nginx
126130

127131
webdevops/php-nginx-dev:
128-
bash bin/build.sh php-nginx-dev "${DOCKER_REPOSITORY}/php-nginx-dev" "${DOCKER_TAG_LATEST}"
132+
python ./bin/console docker:build --whitelist=webdevops/php-nginx-dev
129133

130134
webdevops/hhvm:
131-
bash bin/build.sh hhvm "${DOCKER_REPOSITORY}/hhvm" "${DOCKER_TAG_LATEST}"
135+
python ./bin/console docker:build --whitelist=webdevops/hhvm
132136

133137
webdevops/hhvm-apache:
134-
bash bin/build.sh hhvm-apache "${DOCKER_REPOSITORY}/hhvm-apache" "${DOCKER_TAG_LATEST}"
138+
python ./bin/console docker:build --whitelist=webdevops/hhvm-apache
135139

136140
webdevops/hhvm-nginx:
137-
bash bin/build.sh hhvm-nginx "${DOCKER_REPOSITORY}/hhvm-nginx" "${DOCKER_TAG_LATEST}"
141+
python ./bin/console docker:build --whitelist=webdevops/hhvm-nginx
138142

139143
webdevops/ssh:
140-
bash bin/build.sh ssh "${DOCKER_REPOSITORY}/ssh" "${DOCKER_TAG_LATEST}"
144+
python ./bin/console docker:build --whitelist=webdevops/ssh
141145

142146
webdevops/storage:
143-
bash bin/build.sh storage "${DOCKER_REPOSITORY}/storage" "${DOCKER_TAG_LATEST}"
147+
python ./bin/console docker:build --whitelist=webdevops/storage
144148

145149
webdevops/vsftp:
146-
bash bin/build.sh vsftp "${DOCKER_REPOSITORY}/vsftp" "${DOCKER_TAG_LATEST}"
150+
python ./bin/console docker:build --whitelist=webdevops/vsftp
147151

148152
webdevops/postfix:
149-
bash bin/build.sh postfix "${DOCKER_REPOSITORY}/postfix" "${DOCKER_TAG_LATEST}"
153+
python ./bin/console docker:build --whitelist=webdevops/postfix
150154

151155
webdevops/mail-sandbox:
152-
bash bin/build.sh mail-sandbox "${DOCKER_REPOSITORY}/mail-sandbox" "${DOCKER_TAG_LATEST}"
156+
python ./bin/console docker:build --whitelist=webdevops/mail-sandbox
153157

154158
webdevops/typo3:
155-
bash bin/build.sh typo3 "${DOCKER_REPOSITORY}/typo3" "${DOCKER_TAG_LATEST}"
159+
python ./bin/console docker:build --whitelist=webdevops/typo3
156160

157161
webdevops/piwik:
158-
bash bin/build.sh piwik "${DOCKER_REPOSITORY}/piwik" "${DOCKER_TAG_LATEST}"
162+
python ./bin/console docker:build --whitelist=webdevops/piwik
159163

160164
webdevops/samson-deployment:
161-
bash bin/build.sh samson-deployment "${DOCKER_REPOSITORY}/samson-deployment" "${DOCKER_TAG_LATEST}"
165+
python ./bin/console docker:build --whitelist=webdevops/samson-deployment
162166

163167
webdevops/sphinx:
164-
bash bin/build.sh sphinx "${DOCKER_REPOSITORY}/sphinx" "${DOCKER_TAG_LATEST}"
168+
python ./bin/console docker:build --whitelist=webdevops/sphinx
165169

166170
webdevops/varnish:
167-
bash bin/build.sh varnish "${DOCKER_REPOSITORY}/varnish" "${DOCKER_TAG_LATEST}"
171+
python ./bin/console docker:build --whitelist=webdevops/varnish
168172

169173
webdevops/certbot:
170-
bash bin/build.sh certbot "${DOCKER_REPOSITORY}/certbot" "${DOCKER_TAG_LATEST}"
174+
python ./bin/console docker:build --whitelist=webdevops/certbot
171175

172176
webdevops/liquibase:
173-
bash bin/build.sh liquibase "${DOCKER_REPOSITORY}/liquibase" "${DOCKER_TAG_LATEST}"
177+
python ./bin/console docker:build --whitelist=webdevops/liquibase

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Local building of containers can be done with `make` and `Makefile`:
3030

3131
Command | Description
3232
--------------------------- | ----------------------------------------------------------------------------------
33+
`sudo make setup` | To Install dependancies of build chain tools
3334
`make all` | Build all containers *fast mode* (parallel building, `FAST=1`)
3435
`FAST=0 make all` | Build all containers *slow mode* (serial building)
3536
`DEBUG=1 make all` | Show log of build process even if process is successfull

bin/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)