4. Co-exist?
Q2
The Old Way The Docker Way
Build pipeline
Configuration management
Deployment pipeline
Build pipeline
Configuration management
Deployment pipeline
inconvenient…
5. Reuse old, and apply to new…
The Old Way The Docker Way
Build pipeline
Configuration management
Deployment pipeline
Build pipeline
Configuration management
Deployment pipeline
… with minimal effort
… smooth learning curve
… ease of maintenance
… graceful degradation
… be a good citizen
My proposal:
6. Should fits into Docker model.
Should be of good quality.
… be a good citizen
in the Docker world
7. Nginx wrk Boom json-server
built via
package
manager
C compiler Go compiler
Node.js
runtime
http://bit.ly/halfblood-docker
8. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
4. Pursue for minimal image.
9. 1. Use CM to build image.
Base image:
williamyeh/ansible
playbook
10. 1. Use CM to build image.
2. Adapt for Dockerized app.
Major
1. Process execution model.
2. Storage model (embrace immutable infra, please).
3. Network model.
Ref. "Dockerized app "
http://william-yeh.github.io/docker-workshop/slides/dockerize.html
Minor
4. Log handling.
5. Init/upstart/systemd handling.
6. Wrapper scripts as new entrypoint, if necessary.
11. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
Base image: williamyeh/ansible:mini-debian8
Minimal configuration:
the Ansible body will be removed when mission completed.
12. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
4. Pursue for minimal image.
Base image: williamyeh/ansible:mini-alpine3
Ref:
1. " Docker image "
http://william-yeh.github.io/docker-mini/
2. " Alpine Linux"
http://school.soft-arch.net/courses/docker-part2/lectures/885446
use Alpine Linux in Ansible playbooks.
playbook
19. nginx
1. Use CM to build image.
2. Adapt for Dockerized app.
20. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
nginx
williamyeh/ansible:mini-debian8
williamyeh/ansible:debian8-onbuild
Base image:
22. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
4. Pursue for minimal image.
nginx
williamyeh/ansible:mini-alpine3
williamyeh/ansible:mini-debian8
Base image:
23. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
4. Pursue for minimal image.
nginx
32. wrk
1. Use CM to build image.
2. Adapt for Dockerized app.
N/A
33. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
wrk
williamyeh/ansible:mini-debian8
williamyeh/ansible:debian8-onbuild
Base image:
35. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
4. Pursue for minimal image.
wrk
williamyeh/ansible:mini-alpine3
williamyeh/ansible:mini-debian8
Base image:
36. 1. Use CM to build image.
2. Adapt for Dockerized app.
3. Slim down the image.
4. Pursue for minimal image.
wrk