Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CoreOS cloud-config with docker tcp socket
#cloud-config
coreos:
etcd:
<% if @host.params['etcd_discovery_url'] -%>
discovery: <%= @host.params['etcd_discovery_url'] %>
<% end -%>
addr: <%= @host.ip %>:4001
peer-addr: <%= @host.ip %>:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: docker-tcp.socket
command: start
enable: yes
content: |
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service
[Install]
WantedBy=sockets.target
- name: enable-docker-tcp.service
command: start
content: |
[Unit]
Description=Enable the Docker Socket for the API
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl enable docker-tcp.socket
ssh_authorized_keys:
<% if @host.params['ssh_authorized_keys'] -%>
- "<%= @host.params['ssh_authorized_keys'] %>"
<% end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment