-
Notifications
You must be signed in to change notification settings - Fork 4
/
deploy-master.yml
354 lines (354 loc) · 9.94 KB
/
deploy-master.yml
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
---
apiVersion: v1
kind: Service
metadata:
name: hamster-aline-master
spec:
selector:
app: hamster-aline-master
type: NodePort
ports:
- name: aline-master-web
protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30302
- name: aline-master-grpc
protocol: TCP
port: 50001
targetPort: 50001
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hamster-aline-master
labels:
app: hamster-aline-master
spec:
replicas: 1
selector:
matchLabels:
app: hamster-aline-master
template:
metadata:
labels:
app: hamster-aline-master
spec:
containers:
- name: hamster-aline-master
image: hamstershare/hamster-develop:${PIPELINE_ID}
imagePullPolicy: Always
env:
- name: IC_NETWORK
value: ic
- name: IPC_TEST
value: "true"
- name: HOME
value: /home/ubuntu
- name: DB_HOST
value: mysql
- name: DB_PASSWORD
valueFrom:
configMapKeyRef:
name: hamster-aline
key: db_password
- name: DOCKER_HOST
value: tcp://docker:2376
- name: DOCKER_CERT_PATH
value: /certs/client
- name: DOCKER_TLS_VERIFY
value: "1"
- name: GITHUB_APP_ID
value: "294815"
- name: GITHUB_APP_PEM
value: "/home/ubuntu/githubApp/hamster-test-private-key.pem"
- name: OPENAI_API_KEY
valueFrom:
configMapKeyRef:
name: hamster-aline
key: openai_api_key
- name: CLIENT_SECRETS
valueFrom:
configMapKeyRef:
name: hamster-aline
key: client_secrets
- name: APPS_CLIENT_ID
valueFrom:
configMapKeyRef:
name: hamster-aline
key: apps_client_id
- name: APPS_CLIENT_SECRETS
valueFrom:
configMapKeyRef:
name: hamster-aline
key: apps_client_secerts
- name: GATEWAY
valueFrom:
configMapKeyRef:
name: hamster-aline
key: gateway
- name: METASCAN_USERNAME
valueFrom:
configMapKeyRef:
name: hamster-aline
key: meta_scan_username
- name: METASCAN_PASSWORD
valueFrom:
configMapKeyRef:
name: hamster-aline
key: meta_scan_password
- name: AZURE_API_KEY
valueFrom:
configMapKeyRef:
name: hamster-aline
key: AZURE_API_KEY
- name: AZURE_API_BASE
valueFrom:
configMapKeyRef:
name: hamster-aline
key: AZURE_API_BASE
- name: AZURE_DEPLOYMENT_NAME
valueFrom:
configMapKeyRef:
name: hamster-aline
key: AZURE_DEPLOYMENT_NAME
- name: ipfs_gateway
valueFrom:
configMapKeyRef:
name: hamster-aline
key: ipfs_gateway
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: hamster-aline
key: JWT_SECRET
- name: INSTALL_AUTH_CLIENT_SECRETS
valueFrom:
configMapKeyRef:
name: hamster-aline
key: INSTALL_AUTH_CLIENT_SECRETS
- name: GITHUB_RW_APP_ID
valueFrom:
configMapKeyRef:
name: hamster-aline
key: GITHUB_RW_APP_ID
- name: APPS_RW_CLIENT_ID
valueFrom:
configMapKeyRef:
name: hamster-aline
key: APPS_RW_CLIENT_ID
- name: APPS_RW_CLIENT_SECRETS
valueFrom:
configMapKeyRef:
name: hamster-aline
key: APPS_RW_CLIENT_SECRETS
- name: GITHUB_APP_RW_PEM
value: "/home/ubuntu/rwGithubApp/hamster-rw-private-key.pem"
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /home/ubuntu/.config/dfx
name: dfx-config
- mountPath: /root/pipelines
name: aline-pipelines
- mountPath: /root/workdir
name: aline-workdir
- mountPath: /home/ubuntu/pipelines
name: aline-pipelines
- mountPath: /home/ubuntu/workdir
name: aline-workdir
- mountPath: /certs
name: docker-tls
readOnly: true
- name: kubeconfig
mountPath: "/root/.kube"
readOnly: true
- name: ubuntu-kubeconfig
mountPath: "/home/ubuntu/.kube"
readOnly: true
- name: hamster-test-private-key
mountPath: "/home/ubuntu/githubApp"
readOnly: true
- name: rw-key
mountPath: "/home/ubuntu/rwGithubApp"
readOnly: true
volumes:
- name: dfx-config
persistentVolumeClaim:
claimName: dfx-config
- name: aline-pipelines
persistentVolumeClaim:
claimName: aline-pipelines
- name: aline-workdir
persistentVolumeClaim:
claimName: aline-workdir
- name: docker-tls
persistentVolumeClaim:
claimName: docker-tls
- name: kubeconfig
configMap:
# Provide the name of the ConfigMap you want to mount.
name: kubeconfig
# An array of keys from the ConfigMap to create as files
items:
- key: "kubeconfig"
path: "config"
- name: ubuntu-kubeconfig
configMap:
name: kubeconfig
items:
- key: "kubeconfig"
path: "config"
- name: hamster-test-private-key
configMap:
name: hamster-test-private-key.pem
items:
- key: "hamster-test-private-key.pem"
path: "hamster-test-private-key.pem"
- name: rw-key
configMap:
name: hamster-test-private-key.pem
items:
- key: "hamster-rw-private-key.pem"
path: "hamster-rw-private-key.pem"
---
apiVersion: v1
kind: Service
metadata:
name: docker
spec:
selector:
app: docker
type: ClusterIP
ports:
- name: docker-rpc
protocol: TCP
port: 2376
targetPort: 2376
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: docker
labels:
app: docker
spec:
replicas: 1
selector:
matchLabels:
app: docker
template:
metadata:
labels:
app: docker
spec:
containers:
- name: docker
image: docker:dind
imagePullPolicy: IfNotPresent
args:
- --storage-driver
- overlay2
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
ports:
- containerPort: 2376
volumeMounts:
- mountPath: /root/pipelines
name: aline-pipelines
- mountPath: /root/workdir
name: aline-workdir
- mountPath: /home/ubuntu/.move
name: aptos-move-cache
- mountPath: /certs
name: docker-tls
- mountPath: /home/ubuntu/workdir
name: aline-workdir
- mountPath: /var/lib/cargo/registry
name: cargo-build-registry
- mountPath: /var/lib/cargo/git
name: cargo-build-git
securityContext:
privileged: true
volumes:
- name: aline-pipelines
persistentVolumeClaim:
claimName: aline-pipelines
- name: aline-workdir
persistentVolumeClaim:
claimName: aline-workdir
- name: docker-tls
persistentVolumeClaim:
claimName: docker-tls
- name: aptos-move-cache
persistentVolumeClaim:
claimName: aptos-move-cache
- name: cargo-build-git
persistentVolumeClaim:
claimName: cargo-build-git
- name: cargo-build-registry
persistentVolumeClaim:
claimName: cargo-build-registry
---
apiVersion: v1
kind: Service
metadata:
name: docker2
spec:
selector:
app: docker2
type: ClusterIP
ports:
- name: docker-rpc
protocol: TCP
port: 2376
targetPort: 2376
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: docker2
labels:
app: docker2
spec:
replicas: 1
selector:
matchLabels:
app: docker2
template:
metadata:
labels:
app: docker2
spec:
containers:
- name: docker2
image: docker:dind
imagePullPolicy: IfNotPresent
args:
- --storage-driver
- overlay2
env:
- name: DOCKER_TLS_CERTDIR
value: /certs
ports:
- containerPort: 2376
volumeMounts:
- mountPath: /root/pipelines
name: aline-worker-pipelines
- mountPath: /root/workdir
name: aline-worker-workdir
- mountPath: /certs
name: docker2-tls
securityContext:
privileged: true
volumes:
- name: aline-worker-pipelines
persistentVolumeClaim:
claimName: aline-worker-pipelines
- name: aline-worker-workdir
persistentVolumeClaim:
claimName: aline-worker-workdir
- name: docker2-tls
persistentVolumeClaim:
claimName: docker2-tls