From 7bc7f47c3e21b4368a69fbfadcece9591a7cca7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Meireles?= Date: Fri, 27 Mar 2015 09:32:35 +0000 Subject: [PATCH] simplify and turn more idiomatic flanneld's setup in CoreOS' cloud-configs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: António Meireles --- .../aws/cloud-configs/master.yaml | 12 ++++-------- .../aws/cloud-configs/node.yaml | 15 ++++----------- .../coreos/cloud-configs/master.yaml | 12 ++++-------- .../coreos/cloud-configs/node.yaml | 12 ++++-------- .../coreos/cloud-configs/standalone.yaml | 12 ++++-------- 5 files changed, 20 insertions(+), 43 deletions(-) diff --git a/docs/getting-started-guides/aws/cloud-configs/master.yaml b/docs/getting-started-guides/aws/cloud-configs/master.yaml index e7e903e5e9..2453e81903 100644 --- a/docs/getting-started-guides/aws/cloud-configs/master.yaml +++ b/docs/getting-started-guides/aws/cloud-configs/master.yaml @@ -11,6 +11,8 @@ coreos: fleet: etcd-servers: http://localhost:4001 metadata: "role=master" + flannel: + interface: eth1 units: - name: setup-network-environment.service command: start @@ -72,16 +74,10 @@ coreos: drop-ins: - name: 50-network-config.conf content: | + [Unit] + Requires=etcd.service [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart= - ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \ - /usr/bin/docker run --net=host --privileged=true --rm \ - --volume=/run/flannel:/run/flannel \ - --env=NOTIFY_SOCKET=/run/flannel/sd.sock \ - --env-file=/run/flannel/options.env \ - --volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \ - quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true --iface=eth1 - name: docker-cache.service command: start content: | diff --git a/docs/getting-started-guides/aws/cloud-configs/node.yaml b/docs/getting-started-guides/aws/cloud-configs/node.yaml index 59c24c5f24..d88fe92b75 100644 --- a/docs/getting-started-guides/aws/cloud-configs/node.yaml +++ b/docs/getting-started-guides/aws/cloud-configs/node.yaml @@ -4,6 +4,8 @@ coreos: fleet: etcd-servers: http://:4001 metadata: "role=node" + flannel: + interface: eth1 units: - name: etcd.service mask: true @@ -14,19 +16,10 @@ coreos: drop-ins: - name: 50-network-config.conf content: | + [Unit] + Requires=etcd.service [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - # as we need to turn eth1 as the default interface - # https://github.com/coreos/bugs/issues/228 is sorted - # see notes in https://github.com/coreos/flannel/pull/137 - ExecStart= - ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \ - /usr/bin/docker run --net=host --privileged=true --rm \ - --volume=/run/flannel:/run/flannel \ - --env=NOTIFY_SOCKET=/run/flannel/sd.sock \ - --env-file=/run/flannel/options.env \ - --volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \ - quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld -etcd-endpoints http://:4001 --ip-masq=true --iface=eth1 - name: docker.service command: start drop-ins: diff --git a/docs/getting-started-guides/coreos/cloud-configs/master.yaml b/docs/getting-started-guides/coreos/cloud-configs/master.yaml index 5bb9297b66..e1fadc458b 100644 --- a/docs/getting-started-guides/coreos/cloud-configs/master.yaml +++ b/docs/getting-started-guides/coreos/cloud-configs/master.yaml @@ -11,6 +11,8 @@ coreos: fleet: etcd-servers: http://localhost:4001 metadata: "role=master" + flannel: + interface: eth1 units: - name: setup-network-environment.service command: start @@ -74,16 +76,10 @@ coreos: drop-ins: - name: 50-network-config.conf content: | + [Unit] + Requires=etcd.service [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart= - ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \ - /usr/bin/docker run --net=host --privileged=true --rm \ - --volume=/run/flannel:/run/flannel \ - --env=NOTIFY_SOCKET=/run/flannel/sd.sock \ - --env-file=/run/flannel/options.env \ - --volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \ - quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true --iface=eth1 - name: docker-cache.service command: start content: | diff --git a/docs/getting-started-guides/coreos/cloud-configs/node.yaml b/docs/getting-started-guides/coreos/cloud-configs/node.yaml index ab4d2dc08b..5c9a28ee15 100644 --- a/docs/getting-started-guides/coreos/cloud-configs/node.yaml +++ b/docs/getting-started-guides/coreos/cloud-configs/node.yaml @@ -4,6 +4,8 @@ coreos: fleet: etcd-servers: http://:4001 metadata: "role=node" + flannel: + interface: eth1 units: - name: etcd.service mask: true @@ -14,16 +16,10 @@ coreos: drop-ins: - name: 50-network-config.conf content: | + [Unit] + Requires=etcd.service [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart= - ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \ - /usr/bin/docker run --net=host --privileged=true --rm \ - --volume=/run/flannel:/run/flannel \ - --env=NOTIFY_SOCKET=/run/flannel/sd.sock \ - --env-file=/run/flannel/options.env \ - --volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \ - quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld -etcd-endpoints http://:4001 --ip-masq=true --iface=eth1 - name: docker.service command: start drop-ins: diff --git a/docs/getting-started-guides/coreos/cloud-configs/standalone.yaml b/docs/getting-started-guides/coreos/cloud-configs/standalone.yaml index 4a9e4e0fab..dcde9b0ae3 100644 --- a/docs/getting-started-guides/coreos/cloud-configs/standalone.yaml +++ b/docs/getting-started-guides/coreos/cloud-configs/standalone.yaml @@ -9,6 +9,8 @@ write_files: until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done hostname: standalone coreos: + flannel: + interface: eth1 units: - name: etcd.service command: start @@ -35,16 +37,10 @@ coreos: drop-ins: - name: 50-network-config.conf content: | + [Unit] + Requires=etcd.service [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart= - ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \ - /usr/bin/docker run --net=host --privileged=true --rm \ - --volume=/run/flannel:/run/flannel \ - --env=NOTIFY_SOCKET=/run/flannel/sd.sock \ - --env-file=/run/flannel/options.env \ - --volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \ - quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true --iface=eth1 - name: docker-cache.service command: start content: |