10. Create our First
Jenkins Project
• Create a freestyle project called “Build
Docker Image”
• Use custom workspace (under
Advanced). I set my workspace to
build_docker_image.
• Configure the source repository (https://
github.com/shr3kst3r/ansible-jenkins-
example.git)
19. Create our Second
Jenkins Project
• Create a freestyle project called
“Project Test Ansible with Docker”
• Use custom workspace (under
Advanced). I set my workspace to
docker_ansible.
• Configure the source repository (https://
github.com/shr3kst3r/ansible-jenkins-
example.git)
34. Testing on my Mac
• http://boot2docker.io/
• docker build -t jenkins-ansible .
• docker run -v "/Users/dennis/git/ansible-
jenkins-example:/build:rw" jenkins-
ansible /bin/bash -c 'cd /build && ./
test_it’
• docker rm $(docker ps -a -q) # delete
35.
36. Benefits
• Super fast start times. Do not have to
spin up a server.
• Allows for a very quick test lifecycle (22
seconds total time for this simple
example)
• Reproducible and Consistent
37. Ansible and Docker
• Some General Info (interesting video):
http://www.ansible.com/docker
• Docker Module: http://
docs.ansible.com/docker_module.html
38. Odds and Ends
• https://github.com/shr3kst3r/ansible-
jenkins-example
• You can reach me at
dennis@wpengine.com or @shr3kst3r
on the twitters