Skip to content

Instantly share code, notes, and snippets.

@PaulusTM
Created December 20, 2017 19:10
Show Gist options
  • Save PaulusTM/319cc69d99ecb6ccc1244f6106114ab3 to your computer and use it in GitHub Desktop.
Save PaulusTM/319cc69d99ecb6ccc1244f6106114ab3 to your computer and use it in GitHub Desktop.
#cloud-config
---
hostname: {{VM_NAME}}
ssh_authorized_keys:
- ssh-rsa ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCX9ib81tx38a+I6FUQnG5iQMY/55nsbcvEATU2BQ//dK20/eRBAcDwV6Avswa6pAzf0uMueNi0ypOAAPtSKpAP5ohjoy5gN7Fd47hbCcnbcd1Nm3Q2nPsjDQz7oIc4DQwG+JLBytS1eTjQ/c6gSx3UW9+GJs7vuhdB3zi7+AzQM5qFEy11ZwNbf783LjKB7KunyUKmXF07sGqBjCkIP0KiQ8UnGyAcjt3ViRDuYiSfNoShYrWOGOeY5fH84eYTOS0dp6wciJVB15XasCKz0syqCadecHOV6fpX5w3x8xljitrbFjehHGquXLC2YM0oy3CvDhTY+detdvgbFjt+dMc5 dpaulus@DESKTOP-EKTG7IU
coreos:
etcd2:
name: {{VM_NAME}}
discovery: {{ETCD_DISCOVERY_TOKEN}}
advertise-client-urls: http://{{IP_ADDRESS[NET_0]}}:2379
initial-advertise-peer-urls: http://{{IP_ADDRESS[NET_0]}}:2380
listen-client-urls: http://0.0.0.0:2379
listen-peer-urls: http://{{IP_ADDRESS[NET_0]}}:2380
fleet:
public-ip: {{IP_ADDRESS[NET_0]}}
metadata: cluster={{CLUSTER_NAME}},machine={{VM_NAME}}
units:
- name: static.network
command: start
content: |
[Match]
Name=eth0
[Network]
Address={{IP_ADDRESS[NET_0]}}/{{SUBNET_BITS[NET_0]}}
DNS={{DNS_SERVER_0[NET_0]}}
DNS={{DNS_SERVER_1[NET_0]}}
Gateway={{GATEWAY[NET_0]}}
- name: docker-tcp.socket
command: start
enable: true
content: |
[Unit]
Descritption=Docker Socket for the API
[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service
[Install]
WantedBy=sockets.target
- name: etcd2.service
command: start
- name: fleet.service
command: start
- name: docker.service
command: start
update:
reboot-strategy: etcd-lock
group: {{CHANNEL}}
manage_etc_hosts: localhost
write_files:
- path: /etc/environment
permissions: 0644
content: |
COREOS_PUBLIC_IPV4={{IP_ADDRESS[NET_0]}}
COREOS_PRIVATE_IPV4={{IP_ADDRESS[NET_0]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment