1

I am using docker-compose in development environment with a docker-compose.yml file where I list all the containers I need.

Also I have a centralized git repo, Jenkins server and a another server where I am going to keep both staging and production.

So the question is how to better organize the deployment process.

Now git push on the git server side triggers a Jenkins build job. Depending on the branch name (staging or production) different jobs will be triggered.

A build job uses the docker-compose for bringing up the whole environment and running tests. How do I push new containers to the staging/production environment then?

One way is to push them to the private or a public docker registry, but what is the best practice of updating containers in production? Should the Jenkins server just ssh and run raw kill, rm, pull and run commands? I do not see examples around.

3
  • docker-compose has several issues which make it unsuitable for production, such as 1218, 1174, another bug I can't find right now because I can't search encrypted email, and possibly others. Overall, deployment is something that needs much more attention before Docker is widely used. May 19, 2015 at 15:06
  • @MichaelHampton Yeah, I've seen these so I do not want to use it in production. It's also impossible as some of the containers should be on different servers. So how would you deploy a container? Raw ssh comands?
    – Glueon
    May 19, 2015 at 15:25
  • Right now kubernetes is the best thing I've seen. That will require a bit of setup, though. May 19, 2015 at 15:26

1 Answer 1

1

Kubernetes, Docker Swarm, or Rancher are probably the best ways the implement what is called a rolling update.

Basically a rolling update will take a collection of containers (known as a service) and update them one by one. So imagine you have three containers running your app, a rolling update will take the first container down and update it and so on until the service is fully updated. This means you effectively get zero down time on the app as the load balancers in these products are intelligent and will not redirect to updating containers.

This link gives you a basic implementation of Swarm running a service and then updating it.

Swarm Rolling Update

For some of the easiest setup and implementation - in my experience, Rancher is a good starting place to get the hang of all these concepts. It basically is an interface on top of different Docker technologies like Kubernetes.

Rancher Website

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .