O'Reilly logo

The DevOps 2.0 Toolkit by Viktor Farcic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Automating Deployment with Docker Swarm and Ansible

We are already familiar with Jenkins Workflow, and it should be relatively easy to extend this knowledge to Docker Swarm deployments.

First things first. We need to provision our cd node with Jenkins:

ansible-playbook /vagrant/ansible/jenkins-node-swarm.yml \
    -i /vagrant/ansible/hosts/prod

ansible-playbook /vagrant/ansible/jenkins.yml \
    -c local

The two playbooks deployed the familiar Jenkins instance with two nodes. This time, the slaves we are running are cd and swarm-master. Among other jobs, the playbook created the books-ms-swarm job based on the Multibranch Workflow. The only difference between this and the other multibranch jobs we used earlier is in the Include branches filter that, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required