Skip to content

Instantly share code, notes, and snippets.

@ca0abinary
Created March 19, 2015 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ca0abinary/1ae9e78a54b7584e8477 to your computer and use it in GitHub Desktop.
Save ca0abinary/1ae9e78a54b7584e8477 to your computer and use it in GitHub Desktop.
CoreOS + Etcd + Flannel = Pretty Cool (user-data)
#cloud-config
---
coreos:
etcd:
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
discovery: https://discovery.etcd.io/ff10c58e472358739a4d57e315cc94f3
fleet:
public-ip: $public_ipv4
flannel:
interface: $public_ipv4
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: docker-tcp.socket
command: start
enable: true
content: |
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=2375
Service=docker.service
BindIPv6Only=both
[Install]
WantedBy=sockets.target
- name: flanneld.service
drop-ins:
- name: 50-network-config.conf
content: |
[Service]
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }'
command: start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment