Created
February 22, 2016 14:45
-
-
Save mstrzele/80489fb2e857581cd08a to your computer and use it in GitHub Desktop.
etcd-aws-cluster on CoreOS
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: | |
advertise-client-urls: http://$private_ipv4:2379 | |
initial-advertise-peer-urls: http://$private_ipv4:2380 | |
listen-client-urls: http://0.0.0.0:2379 | |
listen-peer-urls: http://$private_ipv4:2380 | |
units: | |
- name: etcd-peers.service | |
command: start | |
content: | | |
[Unit] | |
Description=Write a file with the etcd peers that we should bootstrap to | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/docker pull monsantoco/etcd-aws-cluster:latest | |
ExecStart=/usr/bin/docker run --rm=true -v /etc/sysconfig/:/etc/sysconfig/ monsantoco/etcd-aws-cluster:latest | |
- name: etcd2.service | |
command: start | |
drop-ins: | |
- name: 30-etcd_peers.conf | |
content: | | |
[Unit] | |
After=etcd-peers.service | |
Requires=etcd-peers.service | |
[Service] | |
# Load the other hosts in the etcd leader autoscaling group from file | |
EnvironmentFile=/etc/sysconfig/etcd-peers | |
- name: fleet.service | |
command: start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment