Skip to content

Instantly share code, notes, and snippets.

@kolach
Created March 12, 2016 03:10
Show Gist options
  • Save kolach/0a3c766aba81b156597d to your computer and use it in GitHub Desktop.
Save kolach/0a3c766aba81b156597d to your computer and use it in GitHub Desktop.
#cloud-config
# include one or more SSH public keys
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCvXuhhBvI4FxrBDnmp6ziwkWmAQeHXFOXeUPY1F9Vmy9tw9Xvba1S581Mj2VVWALPMtFiaoukN/Ceo8r42OVwZOy4prsqsrNGnLtCs9EMMIzzlbgXTHinDZcD8w2WCoisNcOSznla6r2BxBOhk1vX4/+iureXzdYnlyrnEJwEWl0sE0Z2Cej/xWd36WgwX0JDvl37W8Vhq8hEIkJjOOQ60EbK7UVtMYnAYwM+NNnI2Tfsw7Z5/4J4opf6vt0PqlICnm50T0p7NDBOB6TRzWzWoJozidfR8fHBou90PhwFl9OFmFmmnG7qnvAlAf+sTJMo4BrAn7B37fT+OE9imBnx32LqfxJbXxwhMRypoy91oEyYO7DFzs7J+JS4PbM0o+fJDhF57K4Ooa+YksNJVDKu+bSuKF/1H1uU/GEI0t7ApWASSalJ5bcDeNhZeGjyB8KWKUPLlypnxFfuoeHC7yBY9Ru++nUsx/OQreNuUaaMpDsRhtvHA3D9G5HDlUXA6HRxRoRRAoZA6dHoc89B2iFZ0D9Erjx/w4ztudBaa519GlutJm3km4uP9JL2GGAoJplnRDqv6V4ljZPpdW1bZWZ710yXGiBl6HbuKrFQ+8MuxVAyPDP/oX+nkm32t4LLwSYWtWynpzxefpTFyRxq1pNY5U7rXz3t8rfFx8j/C/hAyYQ== chikolad@gmail.com
coreos:
etcd2:
# Static cluster
name: etcdserver
initial-cluster-token: etcd-cluster-1
initial-cluster: etcdserver=http://$private_ipv4:2380
initial-cluster-state: new
advertise-client-urls: http://$public_ipv4:2379
initial-advertise-peer-urls: http://$private_ipv4:2380
# listen on both the official ports and the legacy ports
# legacy ports can be omitted if your application doesn't depend on them
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
fleet:
public-ip: $public_ipv4
metadata: "role=services"
flannel:
interface: $public_ipv4
update:
reboot-strategy: "etcd-lock"
units:
# To use etcd2, comment out the above service and uncomment these
# Note: this requires a release that contains etcd2
- name: etcd2.service
command: start
- name: fleet.service
command: start
- 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
- 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
write_files:
- path: "/etc/motd"
permissions: "0644"
owner: "root"
content: |
--- My CoreOS Cluster ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment