We’re a big fan of everything related to continuous deployment. There’s one aspect to tackle when continuously delivering new releases to our clients: we don’t want their connections to break during a deployment, because they might just be in the process of editing a form - with their customers sitting right beside them. Instead of the increased risk to have an unavailable backend, we want our clients to not even notice any change. One way of reducing downtime is a technique called blue/green deployment. In essence, you handle two versions of your app and use a reverse proxy in front of them to decide which version to actually use for incoming requests. One of both versions can run as hot stand-by or could even be stopped when not longer necessary. During a deployment you deploy the new release to the currently unused color and toggle the reverse proxy to redirect requests to that new release. From a high level perspective, deployments become a two-step process:

  1. deploy the new artefact to a free “color”
  2. reconfigure the proxy to use the new color for incoming requests

Deployment via InfraKit

How do you deploy your artefacts to implement the first step? We have several variants and even combinations of them: shell scripts, Puppet, Ansible, and everything managed in a CI server like TeamCity. None of the tools is perfect for everyone, and over time other tools appear in the scene. In the Docker universe you should have a look at the Docker swarm mode, which integrates nicely with the Docker service abstraction. We still need to dig into those concepts, and we’ll certainly keep you updated about our experience. But there’s yet another tool available now, which aims at managing your infrastructure in a similar manner to the swarm mode: Docker InfraKit. InfraKit hasn’t been designed to be used as deployment tool for your services, but it also doesn’t prevent you from doing so. Though InfraKit is still in an early state, you can give it a try: a modified tutorial navigates you from a local build of the necessary binaries to a simulated blue/green deployment. You’ll see that Docker InfraKit already makes fun to play with, and you should keep an eye out for the growing number of plugins.