Last active
August 29, 2015 14:26
-
-
Save jjbubudi/5bd2c08df8c3ea0836cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
coreos: | |
etcd2: | |
discovery: https://discovery.etcd.io/<token> | |
advertise-client-urls: http://$private_ipv4:2379, http://$private_ipv4:4001 | |
initial-advertise-peer-urls: http://$private_ipv4:2380 | |
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 | |
flannel: | |
interface: $public_ipv4 | |
units: | |
- name: flanneld.service | |
drop-ins: | |
- name: 50-network-config.conf | |
content: | | |
[Service] | |
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ "Network": "172.20.0.0/16", "Backend": {"Type": "vxlan"} }' | |
command: start | |
- name: etcd2.service | |
command: start | |
- name: fleet.service | |
command: start | |
- name: mk-docker-dns-opts.service | |
content: | | |
[Unit] | |
Requires=flanneld.service | |
After=flanneld.service | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/bash -c 'echo $(grep FLANNEL_SUBNET /run/flannel/subnet.env | sed "s/.*=/DOCKER_OPT_DNS=\\\"--dns=/;s_/.*_\\\"_") >/run/docker_dns_opt.env' | |
command: start | |
- name: docker.service | |
command: start | |
drop-ins: | |
- name: 50-mk-docker-dns-opts.conf | |
content: | | |
[Unit] | |
Requires=mk-docker-dns-opts.service | |
After=mk-docker-dns-opts.service | |
[Service] | |
EnvironmentFile=/run/docker_dns_opt.env | |
ExecStart= | |
ExecStart=/usr/lib/coreos/dockerd --daemon --host=fd:// $DOCKER_OPTS $DOCKER_OPT_DNS $DOCKER_OPT_BIP $DOCKER_OPT_MTU $DOCKER_OPT_IPMASQ | |
- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment