-
Notifications
You must be signed in to change notification settings - Fork 5
/
user-data
109 lines (97 loc) · 3.23 KB
/
user-data
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#cloud-config
hostname: devbox
write_files:
- path: /etc/systemd/system/docker.service.d/increase-ulimit.conf
owner: core:core
permissions: 0644
content: |
[Service]
LimitMEMLOCK=infinity
- path: /etc/resolv.conf
permissions: 0644
owner: root
content: |
nameserver 127.0.0.1
nameserver 8.8.8.8
coreos:
update:
# we don't want our development box rebooting
reboot-strategy: off
etcd2:
name: devbox
advertise-client-urls: "http://172.17.42.1:2379,http://localhost:4001"
listen-client-urls: "http://172.17.42.1:2379,http://localhost:4001"
debug: true
units:
- name: docker.service
command: restart
- name: etcd.service
command: stop
enable: false
- name: etcd2.service
command: start
- name: fleet.service
command: start
- name: dockito-proxy.service
command: start
enable: true
content: |
[Unit]
Description=Run dockito-proxy
After=docker.service
Requires=docker.service
[Service]
KillMode=none
User=core
Restart=always
RestartSec=10s
ExecStartPre=/usr/bin/docker pull dockito/proxy:latest
ExecStartPre=-/usr/bin/docker rm -f dockito-proxy
ExecStart=/usr/bin/docker run --privileged=true --rm --name dockito-proxy -v /data/dockito-proxy/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock -p 80:80 -p 443:443 dockito/proxy:latest
ExecStartPost=-/usr/bin/docker ps -a -q | xargs docker rm
ExecStop=/usr/bin/docker kill dockito-proxy
ExecStopPost=-/usr/bin/docker ps -a -q | xargs docker rm
[Install]
WantedBy=local.target
- name: dockito-dnsmasq.service
command: start
enable: true
content: |
[Unit]
Description=Run dockito-dnsmasq
After=docker.service
Requires=docker.service
[Service]
KillMode=none
User=core
Restart=always
RestartSec=10s
ExecStartPre=/usr/bin/docker pull dockito/dnsmasq:latest
ExecStartPre=-/usr/bin/docker rm -f dockito-dnsmasq
ExecStart=/usr/bin/docker run --rm -p 53:53/udp -p 53:53/tcp --name dockito-dnsmasq dockito/dnsmasq:latest
ExecStartPost=-/usr/bin/docker ps -a -q | xargs docker rm
ExecStop=/usr/bin/docker kill dockito-dnsmasq
ExecStopPost=-/usr/bin/docker ps -a -q | xargs docker rm
[Install]
WantedBy=local.target
- name: dockito-vault.service
command: start
enable: true
content: |
[Unit]
Description=Run dockito-vault
After=docker.service
Requires=docker.service
[Service]
KillMode=none
User=core
Restart=always
RestartSec=10s
ExecStartPre=/usr/bin/docker pull dockito/vault:latest
ExecStartPre=-/usr/bin/docker rm -f dockito-vault
ExecStart=/usr/bin/docker run --rm -p 172.17.42.1:14242:3000 -v /vault:/vault --name dockito-vault dockito/vault:latest
ExecStartPost=-/usr/bin/docker ps -a -q | xargs docker rm
ExecStop=/usr/bin/docker kill dockito-vault
ExecStopPost=-/usr/bin/docker ps -a -q | xargs docker rm
[Install]
WantedBy=local.target