Merge pull request #6049 from AntonioMeireles/master

simplify and turn more idiomatic flanneld's setup in CoreOS' cloud-configs
pull/6/head
Brendan Burns 2015-03-27 09:53:54 -07:00
commit 3e3a4f49f1
5 changed files with 20 additions and 43 deletions

View File

@ -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: |

View File

@ -4,6 +4,8 @@ coreos:
fleet:
etcd-servers: http://<master-private-ip>: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://<master-private-ip>:4001 --ip-masq=true --iface=eth1
- name: docker.service
command: start
drop-ins:

View File

@ -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: |

View File

@ -4,6 +4,8 @@ coreos:
fleet:
etcd-servers: http://<master-private-ip>: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://<master-private-ip>:4001 --ip-masq=true --iface=eth1
- name: docker.service
command: start
drop-ins:

View File

@ -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: |