-
Notifications
You must be signed in to change notification settings - Fork 2
/
user-data.vmware
62 lines (58 loc) · 1.97 KB
/
user-data.vmware
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#cloud-config
---
coreos:
etcd:
discovery: https://discovery.etcd.io/4a0e8d649bc8adcc1b4438f169e845c3
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
public-ip: $private_ipv4
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: docker-tcp.socket
command: start
enable: true
content: |
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=2375
Service=docker.service
BindIPv6Only=both
[Install]
WantedBy=sockets.target
- name: 10-weave.network
runtime: false
content: |
[Match]
Type=bridge
Name=weave*
[Network]
- name: install-weave.service
command: start
enable: true
content: "[Unit]\nAfter=network-online.target\nAfter=docker.service\nAfter=etcd.service\nDescription=Install
Weave\nDocumentation=http://zettio.github.io/weave/\nRequires=network-online.target\nRequires=docker.service\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStartPre=/usr/bin/wget
-N -P /opt/bin \\\n https://raw.github.com/zettio/weave/master/weave \nExecStartPre=/usr/bin/chmod
+x /opt/bin/weave\nExecStartPre=/bin/touch /etc/weave.env\nExecStartPre=/usr/bin/docker
pull zettio/weave:latest\nExecStart=/bin/echo Weave Installed\n"
- name: weave.service
command: start
enable: true
content: "[Unit]\nAfter=install-weave.service\nDescription=Weave Network\nDocumentation=http://zettio.github.io/weave/\nRequires=install-weave.service\n\n[Service]
\nExecStartPre=/opt/bin/arewethereyet.sh \nExecStart=/usr/bin/docker logs -f
weave\nSuccessExitStatus=2\nExecStop=/opt/bin/weave stop\n"
write_files:
- path: /opt/bin/arewethereyet.sh
permissions: 750
owner: root
content: |
#!/bin/bash
while [ -z $AREWETHEREYET ] ; do
AREWETHEREYET=$(/usr/bin/etcdctl get /weave/servers/master 2>/dev/null) ;
sleep 10
done
/opt/bin/weave launch $AREWETHEREYET