<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>All,</div>
<div><br>
</div>
<div>While implementing the flannel --network-driver for swarm, I have come across an issue that requires feedback from the community. Here is the breakdown of the issue:</div>
<ol>
<li>Flannel [1] requires etcd to store network configuration. Meeting this requirement is simple for the kubernetes bay types since kubernetes requires etcd.</li><li>A discovery process is needed for bootstrapping etcd. Magnum implements the public discovery option [2].</li><li>A discovery process is also required to bootstrap a swarm bay type. Again, Magnum implements a publicly hosted (Docker Hub) option [3].</li><li>Magnum API exposes the discovery_url attribute that is leveraged by swarm and etcd discovery.</li><li>Etcd can not be implemented in swarm because discovery_url is associated to swarm’s discovery process and not etcd.</li></ol>
<div>Here are a few options on how to overcome this obstacle:</div>
<ol>
<li>Make the discovery_url more specific, for example etcd_discovery_url <i>and </i>
swarm_discovery_url. However, this option would needlessly expose both discovery url’s to all bay types.</li><li>Swarm supports etcd as a discovery backend. This would mean discovery is similar for both bay types. With both bay types using the same mechanism for discovery, it will be easier to provide a private discovery option in the future.</li><li>Do not support flannel as a network-driver for k8s bay types. This would require adding support for a different driver that supports multi-host networking such as libnetwork. Note: libnetwork is only implemented in the Docker experimental release: <a href="https://github.com/docker/docker/tree/master/experimental">https://github.com/docker/docker/tree/master/experimental</a>.</li></ol>
<div>I lean towards #2 but their may be other options, so feel free to share your thoughts. I would like to obtain feedback from the community before proceeding in a particular direction.</div>
<div><br>
</div>
<div>[1] <a href="https://github.com/coreos/flannel">https://github.com/coreos/flannel</a></div>
<div><u>[2] </u><a href="https://github.com/coreos/etcd/blob/master/Documentation/discovery_protocol.md">https://github.com/coreos/etcd/blob/master/Documentation/discovery_protocol.md</a></div>
<div><u>[3] </u><a href="https://docs.docker.com/swarm/discovery/">https://docs.docker.com/swarm/discovery/</a></div>
<div><br>
</div>
<div>
<div>Regards,</div>
<div>Daneyon Hansen</div>
</div>
</body>
</html>