Traefik Blue/Green Deploy (Canary Deployment)


My is Steve Murphy and I work for the Church of Jesus Christ of Latter Day Saints. I have been dealing with a lot of devops efforts for the past year and a half and am in need of help in trying to figure out how we can get one of our backend apps to have a zero downtime when running the deploy. Essentially we are looking to do a blue/green deploy and leveraging traefik to help us do this. I'd like to not do this with K8s for now as I know there are options there, but we are relatively small team and here is our current setup on how I would like to make this work. We could do this in a few different ways and I'm hoping to get your opinion on the easiest way to go about this.

Setup 1:
We have a swarm cluster and could run the traefik container inside this cluster but currently use docker-compose to launch our apps. We have a frontend and backend, which really we would like to route to one of two backends that are running our java stack app.

Setup 2:
This would be without docker swarm and essentially we would either have two VMs and a frontend and backend docker container running on each VM, or we would ideally like to have one VM and have one frontend and two backends running on the same VM. We do use oauth, which might complicate things. I've been playing with Traefik v2 for a week or more now and have been able to get our app up and running and redirecting find with using routing and services. I need to know integrate that second backend app if possible to be able to upgrade it to the latest version while draining the currently running container.

I can provide any information needed including any compose files for frontend or backend. I know I am asking a lot, but this would go a long way in helping our partner not be affected every time we do a deploy.

Steve Murphy
c - 801-502-1715

We had an online Meetup this last Wednesday. @jakubhajek found a clever way to do a Canary deployment using

  • Traefik 2.1.1
  • Docker Swarm and stacks
  • Load Weight from 50/50 to 100/0 ratio

He accomplish a complete release without any single traffic drop.

Awesome job if you ask me!

EDIT (2020-02-12_12h21):

1 Like

Hi @pascalandy this is showing as private. Any other source for this.

1 Like

@patricia_dugan, should these videos be available publicly?

1 Like

Hi! Thanks for the ping! This video is no longer available. Please view this:

1 Like

@patricia_dugan Thanks for that. I just got around to watching that.