Skip to content

Instantly share code, notes, and snippets.

@kelseyhightower
Created February 23, 2015 20:21
Show Gist options
  • Select an option

  • Save kelseyhightower/612b839eb6a722d61264 to your computer and use it in GitHub Desktop.

Select an option

Save kelseyhightower/612b839eb6a722d61264 to your computer and use it in GitHub Desktop.
- name: flannel.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 http://192.168.0.1/flanneld
ExecStartPre=/usr/bin/chmod +x /opt/bin/flanneld
ExecStartPre=-/usr/bin/etcdctl -C http://192.168.12.10:2379 mk /coreos.com/network/config \
'{"Network":"192.168.0.0/16","Backend":{"Type":"host-gw"},"SubnetMin": "192.168.1.0", "SubnetMax": "192.168.11.0"}'
ExecStart=/opt/bin/flanneld -etcd-endpoints http://192.168.12.10:2379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment