Created
March 10, 2015 23:14
-
-
Save chrissnell/fabe7c454a4244a3d417 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
write_files: | |
- path: /run/cloud-config.yml | |
permissions: '0644' | |
content: | | |
#cloud-config | |
coreos: | |
fleet: | |
# Need to override this in a unit like we did for etcd below | |
# used for fleetctl ssh command | |
# public-ip: $_private_ipv4 | |
metadata: "role=services" | |
units: | |
- name: etcd.service | |
command: start | |
- name: fleet.service | |
command: start | |
coreos: | |
units: | |
- name: setup-network-environment.service | |
command: start | |
runtime: true | |
content: | | |
[Unit] | |
Description=Setup networking environment by pulling IP from ifconfig(8) | |
Documentation=https://github.com/kelseyhightower/setup-network-environment | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
ExecStartPre=-/usr/bin/mkdir -p /opt/bin | |
ExecStartPre=/usr/bin/wget -N -P /opt/bin http://REDACTED/coreos-setup-network-environment-linux-amd64 | |
ExecStartPre=/usr/bin/chmod +x /opt/bin/coreos-setup-network-environment-linux-amd64 | |
ExecStart=/opt/bin/coreos-setup-network-environment-linux-amd64 | |
RemainAfterExit=yes | |
Type=oneshot | |
- name: etcd.service | |
command: start | |
content: | | |
[Unit] | |
Description=etcd | |
Requires=setup-network-environment.service | |
After=setup-network-environment.service | |
ConditionFileNotEmpty=/etc/network-environment | |
ReloadPropagatedFrom=setup-network-environment.service | |
[Service] | |
User=etcd | |
PermissionsStartOnly=true | |
EnvironmentFile=/etc/network-environment | |
ExecStart=/usr/bin/etcd -name etcd -addr ${DEFAULT_IPV4}:4001 -peer-addr ${DEFAULT_IPV4}:7001 -data-dir /var/lib/etcd -max-retry-attempts 20 -cluster-active-size 3 -discovery https://discovery.etcd.io/REDACTED | |
Restart=always | |
RestartSec=10s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment