-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloud_config
207 lines (167 loc) · 6.39 KB
/
cloud_config
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#cloud-config
coreos:
etcd:
#new url for each cluster: https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/664ae47bfb6711b0de13ad62ecda5685
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
public-ip: $private_ipv4 # used for fleetctl ssh command
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: userdata.service
command: start
content: |
Description=VMX User Data
# Requirements
Requires=etcd.service
Requires=docker.service
Requires=appbuilder.service
Requires=middledata.service
Requires=middle.service
# Dependency ordering
After=etcd.service
After=docker.service
Before=appbuilder.service
Before=middledata.service
Before=middle.service
[Service]
# Let processes take awhile to start up (for first run Docker containers)
TimeoutStartSec=0
# work correctly.
KillMode=none
# Get CoreOS environmental variables
EnvironmentFile=/etc/environment
# Pre-start and Start
ExecStartPre=-/usr/bin/docker kill vmxuserdata
ExecStartPre=-/usr/bin/docker rm vmxuserdata
ExecStartPre=/usr/bin/docker pull visionai/vmx-userdata
ExecStart=/usr/bin/docker run -d --name vmxuserdata visionai/vmx-userdata
# Stop
ExecStop=/usr/bin/docker stop vmxuserdata
- name: appbuilder.service
command: start
content: |
Description=VMX App Builder service
# Requirements
Requires=etcd.service
Requires=docker.service
Requires=userdata.service
Requires=middledata.service
Requires=middle.service
# Dependency ordering
After=etcd.service
After=docker.service
After=userdata.service
Before=middledata.service
Before=middle.service
[Service]
# Let processes take awhile to start up (for first run Docker containers)
TimeoutStartSec=0
# work correctly.
KillMode=none
# Get CoreOS environmental variables
EnvironmentFile=/etc/environment
# Pre-start and Start
ExecStartPre=-/usr/bin/docker kill vmxappbuilder
ExecStartPre=-/usr/bin/docker rm vmxappbuilder
ExecStartPre=/usr/bin/docker pull visionai/vmx-appbuilder
ExecStart=/usr/bin/docker run -d --name vmxappbuilder visionai/vmx-appbuilder
# Stop
ExecStop=/usr/bin/docker stop vmxappbuilder
[X-Fleet]
# Schedule on the same machine as the associated Middle Service
X-ConditionMachineOf=userdata.service
- name: middledata.service
command: start
content: |
Description=VMX Middle binaries
# Requirements
Requires=etcd.service
Requires=docker.service
Requires=userdata.service
Requires=appbuilder.service
Requires=middle.service
# Dependency ordering
After=etcd.service
After=docker.service
After=userdata.service
After=appbuilder.service
Before=middle.service
[Service]
# Let processes take awhile to start up (for first run Docker containers)
TimeoutStartSec=0
# work correctly.
KillMode=none
# Get CoreOS environmental variables
EnvironmentFile=/etc/environment
# Pre-start and Start
ExecStartPre=-/usr/bin/docker kill vmxmiddledata
ExecStartPre=-/usr/bin/docker rm vmxmiddledata
ExecStartPre=/usr/bin/docker pull visionai/vmx-middle
ExecStart=/usr/bin/docker run -d --name vmxmiddledata visionai/vmx-middle
# Stop
ExecStop=/usr/bin/docker stop vmxmiddledata
[X-Fleet]
# Schedule on the same machine as the associated Middle Service
X-ConditionMachineOf=appbuilder.service
- name: mcr.service
command: start
content: |
Description=Matlab MCR
# Requirements
Requires=etcd.service
Requires=docker.service
# Dependency ordering
After=etcd.service
After=docker.service
[Service]
# Let processes take awhile to start up (for first run Docker containers)
TimeoutStartSec=0
# work correctly.
KillMode=none
# Get CoreOS environmental variables
EnvironmentFile=/etc/environment
# Pre-start and Start
ExecStartPre=-/usr/bin/docker kill vmxmcr
ExecStartPre=-/usr/bin/docker rm vmxmcr
ExecStartPre=/usr/bin/docker pull visionai/mcr-2014a
ExecStart=/usr/bin/docker run -d --name vmxmcr visionai/mcr-2014a
# Stop
ExecStop=/usr/bin/docker stop vmxmcr
- name: middle.service
command: start
content: |
Description=VMX Middle Service
# Requirements
Requires=etcd.service
Requires=docker.service
Requires=userdata.service
Requires=appbuilder.service
Requires=middledata.service
# Dependency ordering
After=etcd.service
After=docker.service
After=userdata.service
After=appbuilder.service
After=middledata.service
[Service]
# Let processes take awhile to start up (for first run Docker containers)
TimeoutStartSec=0
# work correctly.
KillMode=none
# Get CoreOS environmental variables
EnvironmentFile=/etc/environment
# Pre-start and Start
ExecStartPre=-/usr/bin/docker kill vmxenvironment
ExecStartPre=-/usr/bin/docker rm vmxenvironment
ExecStartPre=/usr/bin/docker pull visionai/vmx-environment
ExecStart=/usr/bin/docker run -t --volumes-from vmxmcr --volumes-from vmxuserdata --volumes-from vmxmiddledata --volumes-from vmxappbuilder -p ${COREOS_PUBLIC_IPV4}:80:3000 --name vmxenvironment --rm visionai/vmx-environment /vmx/middle/vmx
# Stop
ExecStop=/usr/bin/docker stop vmxenvironment
[X-Fleet]
# Schedule on the same machine as the associated Middle Service
X-ConditionMachineOf=middledata.service