Merge "Add support for overlay networks in Swarm."

This commit is contained in:
Jenkins 2016-09-08 01:25:40 +00:00 committed by Gerrit Code Review
commit d0fd2c6be6
2 changed files with 16 additions and 0 deletions

View File

@ -4,6 +4,13 @@
echo "Configuring ${NETWORK_DRIVER} network service ..." echo "Configuring ${NETWORK_DRIVER} network service ..."
if [ "$NETWORK_DRIVER" == "docker" ]; then
DOCKER_NETWORK_OPTIONS="--cluster-store etcd://$ETCD_SERVER_IP:2379\
--cluster-advertise $SWARM_NODE_IP:9379"
sed -i "/^DOCKER_NETWORK_OPTIONS=/ s#=.*#='$DOCKER_NETWORK_OPTIONS'#" \
/etc/sysconfig/docker-network
fi
if [ "$NETWORK_DRIVER" != "flannel" ]; then if [ "$NETWORK_DRIVER" != "flannel" ]; then
exit 0 exit 0
fi fi

View File

@ -0,0 +1,9 @@
---
features:
- Add configuration for overlay networks for the docker
network driver in swarm. To use this feature, users need
to create a swarm cluster with network_driver set to 'docker'.
After the cluster is created, users can create an overlay network
(docker network create -d overlay mynetwork) and use it when
launching a new container (docker run --net=mynetwork ...).