diff --git a/docs/getting-started-guides/aws/cloud-configs/master.yaml b/docs/getting-started-guides/aws/cloud-configs/master.yaml index e96234f39343c..828975eecaf39 100644 --- a/docs/getting-started-guides/aws/cloud-configs/master.yaml +++ b/docs/getting-started-guides/aws/cloud-configs/master.yaml @@ -60,32 +60,28 @@ coreos: Wants=etcd.service After=etcd.service After=network-online.target - Before=flannel.service + Before=flanneld.service [Service] ExecStartPre=/usr/bin/chmod +x /opt/bin/waiter.sh ExecStart=/usr/bin/bash /opt/bin/waiter.sh RemainAfterExit=true Type=oneshot - - name: flannel.service + - name: flanneld.service command: start - content: | - [Unit] - Wants=etcd-waiter.service - After=etcd-waiter.service - Requires=etcd.service - After=etcd.service - After=network-online.target - Wants=network-online.target - Description=flannel is an etcd backed overlay network for containers - - [Service] - Type=notify - ExecStartPre=-/usr/bin/mkdir -p /opt/bin - ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld - ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld - ExecStartPre=-/usr/bin/etcdctl mk /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart=/opt/bin/flanneld + drop-ins: + - name: 50-network-config.conf + content: | + [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 098a642bdd886..73372abc2e366 100644 --- a/docs/getting-started-guides/aws/cloud-configs/node.yaml +++ b/docs/getting-started-guides/aws/cloud-configs/node.yaml @@ -9,20 +9,24 @@ coreos: mask: true - name: fleet.service command: start - - name: flannel.service + - name: flanneld.service command: start - content: | - [Unit] - After=network-online.target - Wants=network-online.target - Description=flannel is an etcd backed overlay network for containers - - [Service] - Type=notify - ExecStartPre=-/usr/bin/mkdir -p /opt/bin - ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld - ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld - ExecStart=/opt/bin/flanneld -etcd-endpoints http://:4001 + drop-ins: + - name: 50-network-config.conf + content: | + [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 5f8c71376a9b8..4b8d6344a46c8 100644 --- a/docs/getting-started-guides/coreos/cloud-configs/master.yaml +++ b/docs/getting-started-guides/coreos/cloud-configs/master.yaml @@ -62,32 +62,28 @@ coreos: Wants=etcd.service After=etcd.service After=network-online.target - Before=flannel.service + Before=flanneld.service [Service] ExecStartPre=/usr/bin/chmod +x /opt/bin/waiter.sh ExecStart=/usr/bin/bash /opt/bin/waiter.sh RemainAfterExit=true Type=oneshot - - name: flannel.service + - name: flanneld.service command: start - content: | - [Unit] - Wants=etcd-waiter.service - After=etcd-waiter.service - Requires=etcd.service - After=etcd.service - After=network-online.target - Wants=network-online.target - Description=flannel is an etcd backed overlay network for containers - - [Service] - Type=notify - ExecStartPre=-/usr/bin/mkdir -p /opt/bin - ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld - ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld - ExecStartPre=-/usr/bin/etcdctl mk /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart=/opt/bin/flanneld + drop-ins: + - name: 50-network-config.conf + content: | + [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 0cd47e9c21091..e2c31ff5dc686 100644 --- a/docs/getting-started-guides/coreos/cloud-configs/node.yaml +++ b/docs/getting-started-guides/coreos/cloud-configs/node.yaml @@ -9,20 +9,21 @@ coreos: mask: true - name: fleet.service command: start - - name: flannel.service + - name: flanneld.service command: start - content: | - [Unit] - After=network-online.target - Wants=network-online.target - Description=flannel is an etcd backed overlay network for containers - - [Service] - Type=notify - ExecStartPre=-/usr/bin/mkdir -p /opt/bin - ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld - ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld - ExecStart=/opt/bin/flanneld -etcd-endpoints http://:4001 + drop-ins: + - name: 50-network-config.conf + content: | + [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 58508bafa1de7..7bf7a4a80fd3e 100644 --- a/docs/getting-started-guides/coreos/cloud-configs/standalone.yaml +++ b/docs/getting-started-guides/coreos/cloud-configs/standalone.yaml @@ -23,32 +23,28 @@ coreos: Wants=etcd.service After=etcd.service After=network-online.target - Before=flannel.service + Before=flanneld.service [Service] ExecStartPre=/usr/bin/chmod +x /opt/bin/waiter.sh ExecStart=/usr/bin/bash /opt/bin/waiter.sh RemainAfterExit=true Type=oneshot - - name: flannel.service + - name: flanneld.service command: start - content: | - [Unit] - Wants=etcd-waiter.service - After=etcd-waiter.service - Requires=etcd.service - After=etcd.service - After=network-online.target - Wants=network-online.target - Description=flannel is an etcd backed overlay network for containers - - [Service] - Type=notify - ExecStartPre=-/usr/bin/mkdir -p /opt/bin - ExecStartPre=/usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/k8s/flanneld - ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld - ExecStartPre=-/usr/bin/etcdctl mk /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}' - ExecStart=/opt/bin/flanneld + drop-ins: + - name: 50-network-config.conf + content: | + [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: |