Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save charlesmarshall/8b77bfbbc30f279ca6f1 to your computer and use it in GitHub Desktop.
Save charlesmarshall/8b77bfbbc30f279ca6f1 to your computer and use it in GitHub Desktop.
CoreOS Cloud-Init with fleet and etcd start up
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB ...snip... QAyapHGwoBvkq7nNp
coreos:
etcd:
# via https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/7028e012ca66ef0121b64c19c40a425a
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
runtime: no
content: |
[Unit]
Description=fleet
[Service]
Environment=FLEET_PUBLIC_IP=$private_ipv4
ExecStart=/usr/bin/fleet
write_files:
- content: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB ...snip... QAyapHGwoBvkq7nNp
path: /home/core/.ssh/shared.pub
permissions: '0600'
owner: core:core
- content: |
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAsjvCcWeXSpB2EvTvxsyMHoA55BDcU/oP0Kr1QvgXGmw/PT/R
8Nq/Hy8WBW8vlJGqlkClZqvJn7vE014G3a4otmJT087nA+ftfYc0g04GzBFzt05Q
... snip ...
dWtYdrxBBuKUDmSqdHkGPJS/KErmVm2OWqPgiOMgae2s7QSrySX6VKRH/grV0DLh
UYrPiHUruKX6rgEVjhzS55dKiN4XRk0N+CWYXq3mgmO5zV3rb4/u
-----END RSA PRIVATE KEY-----
path: /home/core/.ssh/shared
permissions: '0600'
owner: core:core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment