Support Docker Swarm Mode

Registered by Fabrizio Soppelsa

Support as a new COE Docker Swarm Mode, based on Swarmkit, the new orchestration system included into the Docker Engine in 1.12+.

No additional configurations, like external Etcd, are required: They are already integrated into Swarm. So, the workflow should be significantly easier: Instanciate docker hosts, initialize the swarm on the first, join other managers, join workers.

The new ClusterTemplate should have the same properties of the current Swarm COEs, only type should change to avoid confusion, to "swarm-mode".

magnum cluster-template-create --name swarm-mode-cluster-template \
                           --image-id fedora-atomic-latest \
                           --keypair-id testkey \
                           --external-network-id public \
                           --dns-nameserver 8.8.8.8 \
                           --flavor-id m1.small \
                           --docker-volume-size 5 \
                           --coe swarm-mode

magnum cluster-create --name swarm-mode-cluster \
                  --cluster-template swarm-mode-cluster-template \
                  --master-count 3 \
                  --node-count 8

These commands create the template and instanciate a cluster with 3 managers and 5 workers.

Also, new images should be added and supported. I am thinking more to an approach like Docker Machine launched with the generic driver. In the beginning, we could start by supporting officially Ubuntu 16.04 rather than Fedora Atomic, and have some good hooks for adding the Docker hosts running on different distros provisioning easier, later.

Blueprint information

Status:
Complete
Approver:
Ton Ngo
Priority:
Undefined
Drafter:
Fabrizio Soppelsa
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Spyros Trigazis
Completed by
Spyros Trigazis

Related branches

Sprints

Whiteboard

---
Available since pike on fedora atomic.
-----------------------------------------------------------------------------
strigazi @ Thu Jul 13 09:37:09 UTC 2017
With the current patch https://review.openstack.org/#/c/427761
I have tested that it works in the default scenario. Single master with the dedicated cluster private network without LB. I tested multimaster config in a hackish way to verify that secondary masters can join.

Next working items:
- test optional FIPs
- test master LB
- Allow multi-master without lb?
- test passing a private network
- reno
- docs
- unit tests
- copy logs
- add baremetal support
-----------------------------------------------------------------------------

Gerrit topic: https://review.openstack.org/#q,topic:bp/swarm-mode-support,n,z

Addressed by: https://review.openstack.org/474491
    [PoC] Deploy docker swarm mode on baremetal Fedora
^^^ No longer in development, superceded by https://review.openstack.org/#/c/427761.

Gerrit topic: https://review.openstack.org/#q,topic:swarm-mode-support,n,z

Addressed by: https://review.openstack.org/427761
    Add swarm-mode driver

Addressed by: https://review.openstack.org/481542
    DO_NOT_MERGE Test private network and subnet

Addressed by: https://review.openstack.org/492390
    tests: Use swarm-mode for api tests

Gerrit topic: https://review.openstack.org/#q,topic:bug/1708454,n,z

Gerrit topic: https://review.openstack.org/#q,topic:fix-ci,n,z

Addressed by: https://review.openstack.org/497239
    Add remaining release notes

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.