-
Notifications
You must be signed in to change notification settings - Fork 2
/
user-data.weavemaster
77 lines (72 loc) · 2.51 KB
/
user-data.weavemaster
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#cloud-config
---
coreos:
etcd:
discovery: https://discovery.etcd.io/ae870a57c9a9f5112c08a5f1897dea3d
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
fleet:
public-ip: $public_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-vlan-mgmt.service
command: start
enable: true
content: |
[Unit]
After=weave.service
After=network-online.target
After=docker.service
After=etcd.service
Description=Install weave-vlan-mgmt
Documentation=https://github.com/gonkulator/weave-vlanmgmt
Requires=network-online.target
Requires=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=cd /home/core && git clone https://github.com/gonkulator/weave-vlanmgmt
ExecStart=/bin/echo Weave vlan-mgmt Installed
- 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=/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]\nEnvironmentFile=/etc/environment\nExecStartPre=/opt/bin/weave
launch \nExecStartPre=-/usr/bin/etcdctl mkdir /weave/servers\nExecStartPre=-/usr/bin/etcdctl
mk /weave/servers/master ${COREOS_PUBLIC_IPV4}\nExecStart=/usr/bin/docker logs
-f weave\nSuccessExitStatus=2\nExecStop=/opt/bin/weave stop\n"
write_files:
- path: /etc/weave.env
permissions: 420
owner: root
content: |
WEAVE_LAUNCH_ARGS="IMAMASTER!"