Created
February 12, 2017 16:28
-
-
Save dgellow/94e9965d422967f1180c4e80df4e23e2 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 | |
coreos: | |
etcd2: | |
# generate a new token for each unique cluster from https://discovery.etcd.io/new: | |
discovery: https://discovery.etcd.io/token | |
# multi-region deployments, multi-cloud deployments, and Droplets without | |
# private networking need to use $public_ipv4: | |
advertise-client-urls: https://$private_ipv4:2379,https://$private_ipv4:4001 | |
initial-advertise-peer-urls: https://$private_ipv4:2380 | |
# listen on the official ports 2379, 2380 and one legacy port 4001: | |
listen-client-urls: https://0.0.0.0:2379,https://0.0.0.0:4001 | |
listen-peer-urls: https://$private_ipv4:2380 | |
fleet: | |
# fleet defaults to plain HTTP - explicitly tell it to use HTTPS on port 4001: | |
etcd_servers: https://$private_ipv4:4001 | |
public-ip: $private_ipv4 # used for fleetctl ssh command | |
units: | |
- name: etcd2.service | |
command: start | |
- name: fleet.service | |
command: start | |
# enable and start iptables-restore | |
- name: iptables-restore.service | |
enable: true | |
command: start | |
write_files: | |
# tell etcd2 and fleet where our certificates are going to live: | |
- path: /run/systemd/system/etcd2.service.d/30-certificates.conf | |
permissions: 0644 | |
content: | | |
[Service] | |
# client environment variables | |
Environment=ETCD_CA_FILE=/home/core/ca.pem | |
Environment=ETCD_CERT_FILE=/home/core/coreos.pem | |
Environment=ETCD_KEY_FILE=/home/core/coreos-key.pem | |
# peer environment variables | |
Environment=ETCD_PEER_CA_FILE=/home/core/ca.pem | |
Environment=ETCD_PEER_CERT_FILE=/home/core/coreos.pem | |
Environment=ETCD_PEER_KEY_FILE=/home/core/coreos-key.pem | |
- path: /run/systemd/system/fleet.service.d/30-certificates.conf | |
permissions: 0644 | |
content: | | |
[Service] | |
# client auth certs | |
Environment=FLEET_ETCD_CAFILE=/home/core/ca.pem | |
Environment=FLEET_ETCD_CERTFILE=/home/core/coreos.pem | |
Environment=FLEET_ETCD_KEYFILE=/home/core/coreos-key.pem | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment