Integrate Kuryr network driver for Swarm bay

Registered by Ton Ngo on 2016-07-26

Integrate Kuryr as libnetwork for Swarm bay to allow users to create networks for containers and launch containers on these networks.

Blueprint information

Status:
Started
Approver:
hongbin
Priority:
High
Drafter:
Ton Ngo
Direction:
Approved
Assignee:
Ton Ngo
Definition:
Approved
Series goal:
Accepted for ocata
Implementation:
Started
Milestone target:
milestone icon ocata-2
Started by
Ton Ngo on 2016-08-12

Related branches

Sprints

Whiteboard

Integrate Kuryr driver for Swarm bay

Following the discussion from Austin, we can proceed to integrate the
libnetwork driver from Kuryr to the Swarm bay.

From the user perspective, this will be available as a new option for
the network-driver parameter in the baymodel for Swarm:

--network-driver=kuryr

A Swarm bay built with this option will have the Kuryr driver installed on
each node along with the configuration for Docker to use this driver.
The user will be able to create arbitrary network as follows:

docker network create --driver kuryr test_net

docker network ls
NETWORK ID NAME DRIVER
c338e56309d2 bridge bridge
91d19b79c5ec host host
01c830d4ac4f none null
2af1b926ab97 test_net kuryr

Then containers can be connected to the network as:

docker run --net=test_net ubuntu

The container will be assigned a routable IP on this network.

The implementation in Magnum will include the following:

1. Configuration script for
   -Generate the /etc/kuryr/kuryr.conf file: Neutron URI, credential for service account
   -Generate the Docker network plugin file

2. Openvswitch and Neutron L2 agent:
   -Current Fedora 23 does not have these installed. To avoid building custom image, we can
    run them in a container with -net=host and -priviledged option
   -Pull fedora23 image and launch openvswitch container on each node

3. Container for Kuryr agent:
   -The official supported container from the Kuryr team is kuryr/libnetwork
   -Pull image and launch container on each node. Need to mount /var/run/openswitch

4. Miscellaneous
   -Attribute validation: allow for "kuryr" as driver
   -Documentation

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

Addressed by: https://review.openstack.org/355101
    Openvswitch image build

Addressed by: https://review.openstack.org/358952
    Templates and scripts for Kuryr

Addressed by: https://review.openstack.org/368929
    Config parameters for Kuryr

Addressed by: https://review.openstack.org/368930
    Enable Kuryr driver

(?)

Work Items

Work items:
Container images in Docker Hub (Kuryr, OVS): DONE
Parameters in magnum.conf: TODO
Labels validation: INPROGRESS
Templates, scripts: INPROGRESS
Update user guide: TODO
Functional test: TODO
Resolve security issues: TODO

This blueprint contains Public information 
Everyone can see this information.