Skip to main content

Zero Downtime Deployment with Ansible

Stein Inge Morisbak (Bekk Consulting AS)
Location: 212 Level: Intermediate
Average rating: ***..
(3.50, 28 ratings)
Slides:   1-PDF 


Ansible is a radically simple and lightweight provisioning framework which makes your servers and applications easier to provision and deploy. By orchestrating your application deployments you gain benefits such as documentation as code, testability, continuous integration, version control, refactoring, automation and autonomy of your deployment routines, server- and application configuration. Ansible uses a language that approaches plain English, uses SSH and has no agents to install on remote systems. It is the simplest way to automate and orchestrate application deployment, configuration management and continuous delivery.

In this tutorial you will be given an introduction to Ansible and learn how to provision Linux servers with a web-proxy, a database and some other packages. Furthermore we will automate zero downtime deployment of a Java application to a load balanced environment.

We will cover how to provision servers with:

  • an application user
  • a PostgreSQL database
  • Nginx with a load balanced reverse proxy
  • an init script installed as a service
  • zero downtime deployment of an application that uses the provisioned infrastructure


For instructions and installments, please visit:

Photo of Stein Inge Morisbak

Stein Inge Morisbak

Bekk Consulting AS

Stein Inge is Practice Lead for Continuous Delivery and Devops at BEKK. He is a true Agile evangelist with 15 years of experience in both contributing to, and helping others to become better at producing excellent software together with demanding customers. He is also an experienced speaker at conferences and the founder of DevOps Norway Meetup.

Comments on this page are now closed.


Picture of Stein Inge Morisbak
Stein Inge Morisbak
19-11-2014 15:39 CET

I would really appreciate more feedback on my talk, so please rate and comment. Thanks :)

Trevor Rea
15-11-2014 19:35 CET

Hi Stein,

Apolgies for late reply. Checked out repo and it all worked for me (no Java issues).


Pieter van Boxtel
11-11-2014 22:17 CET

I did have some issues. Tried it a few times and then tried to handle it by connecting to the app1 box and do a manual java install, which worked (after upgrading the box). After that I tried ansible again and everything went fine, including app2.

Picture of Stein Inge Morisbak
Stein Inge Morisbak
9-11-2014 18:23 CET

It works well on my machine. Can you provide som more details? Does anyone else experience that the java installation fails?

Jae Task
7-11-2014 21:17 CET

Downloaded and ansible running but fails on java install in sites.yml

Picture of Stein Inge Morisbak
Stein Inge Morisbak
7-11-2014 0:11 CET

Hey everyone!

I strongly advise you to do all the downloads and instalments before the tutorial. We don’t want to clog up the Wi-Fi, and we won’t have time for it during the session. My intentions are to let you familiarise yourselves with the code and give you a good starting point for playing with it after the tutorial.

Looking forward to seeing you all in Barcelona :)

Markus Krogemann
3-11-2014 23:33 CET

Bit more detail to where it failed: MacOSX 10.9 Mavericks

Picture of Stein Inge Morisbak
Stein Inge Morisbak
3-11-2014 22:51 CET

It works on my machine, but thank you for posting in case others experience the same issue.

Markus Krogemann
3-11-2014 22:45 CET

Just a quick comment on
sudo pip install ansible —quiet
This does not work for me. Leaving out the —quiet makes it work.

Picture of Stein Inge Morisbak
Stein Inge Morisbak
1-11-2014 20:05 CET

Hi Trevor,

Sorry about that. The starting point for the tutorial is up now.


Trevor Rea
1-11-2014 17:34 CET


I’ve tried to clone the git repository required but am receiving a 404 and it doesn’t appear to exist in your Github account?