Continuous deployment options

Hi all,

During this morning’s community call, we had some exchange of ideas regarding how to do continuous deployment with docker.

That inspired the content below.

Please review and give advise about what should be chosen for CD.

There are 3 dimensions:

Cluster size

There are 2 options in this dimension:

having 1 EC2 instance as docker host

or having more than 1

Having one is generally simpler than having multiple nodes in a cluster and easier to manage.

Having more than one provides the team an opportunity to get acquainted with cluster management at an earlier stage.

Technology stack

There are 5 options in this dimension:

Docker compose

Docker compose + Docker Swarm

Docker Swarm mode (Swarm mode is different from Docker swarm, their naming could be confusing)

Docker Stacks and Distributed Application Bundles (experimental feature)

Other 3rd party tools like Rancher, Kubernetes or Marathon

I’ll explain as much as I can for each option:

Docker compose

This one is the simplest, but it will only work with one host, similar to how tests are ran in CI now.

Docker compose + Docker Swarm

Prior to docker version 1.12 and docker compose version 1.8, Swarm itself is provide as a docker image.

This way of cluster management will probably be obsolete with the next two options coming available from docker.

Docker Swarm mode

Even though the name is similar, Swarm mode and Swarm are different.

Swarm mode is available since docker version 1.12(the latest version), it’s provided as a part of the Docker engine.

It does not work well with docker compose, so hand written scripts will be needed unless you use the experimental feature in the next section.

Docker Stacks and Distributed Application Bundles

This experimental feature allows Docker compose to work well with Docker swarm mode.

But it’s behavior may change in upcoming official version, and it lacks certain config options like volume mounting.

Other 3rd party tools like Rancher, Kubernetes or Marathon

I have not had experience with those tools, but I have been recommended with Rancher, which was described as simple and production-ready.

They will add another layer of complexity, but could isolate the chaos brought by fast changing features of Swarm.

Environments

Right now, there is no production env needed, so this dimension has only tests and UAT.

So with all of those options in different dimensions, we’ll end up with this big permutation table to choose from:

Environment
Cluster size
Tech stack
Comment
:arrow_left:Pick 1 out of those 9

Test
1
docker compose
only work with one host, could suffice for test env
Test
1
docker compose + docker swarm
Not much of a point to use swarm for one host
Test
1
Docker Swarm mode
Not much of a point to use swarm mode for one host
Test
1
Docker Stacks and Distributed Application Bundles
experimental feature
Test
1
Other 3rd party tools like Rancher, Kubernetes or Marathon
Not much of a point to use cluster management for one host
Test
more than 1
docker compose + docker swarm
one host could be sufficient for test env

Test
more than 1
Docker Swarm mode
Test
more than 1
Docker Stacks and Distributed Application Bundles
Test
more than 1
Other 3rd party tools like Rancher, Kubernetes or Marathon

UAT
1
docker compose
For UAT env, it’ll probably be benefitial for it to mimic production.
Production could potentially have more load than one host could handle.
I would advise against having only one host for UAT, to decrease future hanssles the team may encounter when going to production.

:arrow_left:Pick 1 out of those 9

UAT
1
docker compose + docker swarm
UAT
1
Docker Swarm mode
UAT
1
Docker Stacks and Distributed Application Bundles
UAT
1
Other 3rd party tools like Rancher, Kubernetes or Marathon
UAT
more than 1
docker compose + docker swarm
will probably be obsolete with later docker version
UAT
more than 1
Docker Swarm mode
needs hand written scripts, but doable
UAT
more than 1
Docker Stacks and Distributed Application Bundles
experimental feature
UAT
more than 1
Other 3rd party tools like Rancher, Kubernetes or Marathon
They will add another layer of complexity, but could isolate the chaos brought by fast changing features of Swarm.

I have marked some of the lines green, as I am personally leaning towards them.

Please provide your inputs and suggestions about which one we should choose for Test and UAT envs.