This repository has been archived by the owner on Jul 11, 2019. It is now read-only.
/
launcher-template.yaml
606 lines (587 loc) · 19.6 KB
/
launcher-template.yaml
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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
kind: Template
apiVersion: v1
metadata:
name: fabric8-launcher
annotations:
openshift.io/display-name: "Fabric8 Launch (Frontend + Backend)"
description: This application consists of the combination of Backend and Frontend services for Fabric8 Launch
tags: instant-app,fabric8-launcher
iconClass: icon-shadowman
template.openshift.io/long-description: This application consists of the combination of Backend and Frontend services for Fabric8 Launch
template.openshift.io/provider-display-name: Red Hat, Inc.
template.openshift.io/documentation-url: https://github.com/fabric8-launcher
template.openshift.io/support-url: https://access.redhat.com
message: "The following service(s) have been created in your project: launcher-backend, launcher-frontend.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/fabric8-launcher"
labels:
template: launcher-header
app: fabric8-launcher
parameters:
- name: LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME
displayName: Your GitHub username
description: Your GitHub username (leave empty when using Keycloak)
- name: LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN
displayName: Your GitHub Mission Control access token
description: Your GitHub Mission Control access token (leave empty when using Keycloak)
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL
displayName: Target OpenShift API URL
description: The base URL of the OpenShift API where the launched boosters
should be created (ie. https://hostname[:port] or https://ipaddress[:port]).
Leave the default value when targetting the same OpenShift/Minishift you are
running this on
value: https://openshift.default.svc.cluster.local
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL
displayName: Target OpenShift Console URL
description: The base URL of the OpenShift Console where the launched boosters
should be created (ie. https://hostname[:port] or https://ipaddress[:port]).
When targetting the same OpenShift/Minishift instance you are running this on you
can most likely look at this page's address bar of your browser and copy the URL
Example value (https://$HOSTNAMEORIP:8443)
value:
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME
displayName: OpenShift user name
description: OpenShift user (leave empty when using Keycloak)
value: developer
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD
displayName: OpenShift password
description: OpenShift password (leave empty when using Keycloak)
value: developer
- name: LAUNCHER_KEYCLOAK_URL
displayName: KeyCloak URL
description: The URL (with the /auth part) of a Keycloak installation to perform SSO
authentication (leave empty if you've explicitly specified GItHub/OpenShift
authentication above)
value: https://sso.openshift.io/auth
- name: LAUNCHER_KEYCLOAK_REALM
displayName: KeyCloak Realm
description: The keycloak realm to be used (leave empty if you've explicitly specified
GitHub/OpenShift authentication above)
value: rh-developers-launch
- name: LAUNCHER_TRACKER_SEGMENT_TOKEN
displayName: Segment Token
description: The token to use for Segment tracking. Leaving this empty will disable
tracking. This must be set to the proper tokens for staging and production!
- name: LAUNCHER_BOOSTER_CATALOG_REPOSITORY
displayName: Catalog Git Repository
description: The GitHub repository containing the booster catalog
value: https://github.com/fabric8-launcher/launcher-booster-catalog.git
required: true
- name: LAUNCHER_BOOSTER_CATALOG_REF
displayName: Catalog Git Reference
description: The Git reference to use for the above repository
value: latest
required: true
- name: LAUNCHER_BOOSTER_CATALOG_FILTER
displayName: Catalog Filter
description: Optional expression to filter a subset of boosters for the above repository (eg. booster.mission.id == 'rest-http')
value:
- name: LAUNCHER_BACKEND_CATALOG_REINDEX_TOKEN
displayName: Catalog Reindex Token
description: A token that must be passed to the catalog reindex service to trigger the catalog
reindexing.
value:
- name: LAUNCHER_BACKEND_ENVIRONMENT
displayName: Booster Environment
description: The environment where this backend is running. This is used in the environment section
in the booster catalog entries. Leaving this empty will set the value to 'development' if the
'Catalog Git Reference' is set to 'master', in any other case the value will default to 'production'.
value:
- name: BACKEND_IMAGE
value: fabric8/launcher-backend
required: true
- name: BACKEND_IMAGE_TAG
value: latest
required: true
- description: CPU request
displayName: CPU request
required: true
name: BACKEND_CPU_REQUEST
value: "10m"
- description: CPU limit
displayName: CPU limit
required: true
name: BACKEND_CPU_LIMIT
value: "1000m"
- description: Memory request
displayName: Memory request
required: true
name: BACKEND_MEMORY_REQUEST
value: "768Mi"
- description: Memory limit
displayName: Memory limit
required: true
name: BACKEND_MEMORY_LIMIT
value: "2G"
- description: Number of deployment replicas
displayName: Number of deployment replicas
required: true
name: BACKEND_REPLICAS
value: "1"
- name: FRONTEND_IMAGE
value: fabric8/launcher-frontend
required: true
- name: FRONTEND_IMAGE_TAG
value: latest
required: true
- description: CPU request
displayName: CPU request
required: true
name: FRONTEND_CPU_REQUEST
value: "10m"
- description: CPU limit
displayName: CPU limit
required: true
name: FRONTEND_CPU_LIMIT
value: "50m"
- description: Memory request
displayName: Memory request
required: true
name: FRONTEND_MEMORY_REQUEST
value: "8M"
- description: Memory limit
displayName: Memory limit
required: true
name: FRONTEND_MEMORY_LIMIT
value: "64M"
- description: Number of deployment replicas
displayName: Number of deployment replicas
required: true
name: FRONTEND_REPLICAS
value: "1"
- name: CONTROLLER_IMAGE
value: fabric8/configmapcontroller
required: true
- name: CONTROLLER_IMAGE_TAG
value: 2.3.7
required: true
objects:
- kind: ConfigMap
apiVersion: v1
metadata:
name: launcher
data:
launcher.missioncontrol.github.username: ${LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME}
launcher.missioncontrol.github.token: ${LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN}
launcher.missioncontrol.openshift.username: ${LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME}
launcher.missioncontrol.openshift.password: ${LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD}
launcher.missioncontrol.openshift.api.url: ${LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL}
launcher.missioncontrol.openshift.console.url: ${LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL}
launcher.backend.catalog.filter: ${LAUNCHER_BOOSTER_CATALOG_FILTER}
launcher.backend.catalog.git.repository: ${LAUNCHER_BOOSTER_CATALOG_REPOSITORY}
launcher.backend.catalog.git.ref: ${LAUNCHER_BOOSTER_CATALOG_REF}
launcher.backend.catalog.reindex.token: ${LAUNCHER_BACKEND_CATALOG_REINDEX_TOKEN}
launcher.backend.documentation.reload.token: ${LAUNCHER_BACKEND_CATALOG_REINDEX_TOKEN}
launcher.backend.environment: ${LAUNCHER_BACKEND_ENVIRONMENT}
launcher.keycloak.url: ${LAUNCHER_KEYCLOAK_URL}
launcher.keycloak.realm: ${LAUNCHER_KEYCLOAK_REALM}
launcher.tracker.segment.token: ${LAUNCHER_TRACKER_SEGMENT_TOKEN}
launcher.backend.url: /launch/api
launcher.missioncontrol.url: /launch
osio.keycloak.saas.url: https://api.prod-preview.openshift.io
osio.openshift.api.url: https://f8osoproxy-test-dsaas-preview.b6ff.rh-idev.openshiftapps.com
osio.wit.url: https://api.prod-preview.openshift.io
osio.auth.url: https://auth.prod-preview.openshift.io
osio.jenkins.url: https://jenkins.prod-preview.openshift.io
osio.sentry.dsn: ""
- kind: ConfigMap
apiVersion: v1
metadata:
name: launcher-clusters
data:
openshift-clusters.yaml: |-
- id: starter-us-east-1
apiUrl: https://api.starter-us-east-1.openshift.com
consoleUrl: https://console.starter-us-east-1.openshift.com
type: starter
- id: starter-us-west-1
apiUrl: https://api.starter-us-west-1.openshift.com
consoleUrl: https://console.starter-us-west-1.openshift.com
type: starter
- id: starter-us-west-2
apiUrl: https://api.starter-us-west-2.openshift.com
consoleUrl: https://console.starter-us-west-2.openshift.com
type: starter
- id: starter-ca-central-1
apiUrl: https://api.starter-ca-central-1.openshift.com
consoleUrl: https://console.starter-ca-central-1.openshift.com
type: starter
- id: pro-us-east-1
apiUrl: https://api.pro-us-east-1.openshift.com
consoleUrl: https://console.pro-us-east-1.openshift.com
type: pro
- id: pro-eu-west-1
apiUrl: https://api.pro-eu-west-1.openshift.com
consoleUrl: https://console.pro-eu-west-1.openshift.com
type: pro
- id: pro-ap-southeast-2
apiUrl: https://api.pro-ap-southeast-2.openshift.com
consoleUrl: https://console.pro-ap-southeast-2.openshift.com
type: pro
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: launcher-backend
annotations:
configmap.fabric8.io/update-on-change: "launcher,launcher-clusters"
spec:
replicas: "${{BACKEND_REPLICAS}}"
selector:
service: launcher-backend
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
service: launcher-backend
spec:
containers:
- env:
- name: LAUNCHER_BOOSTER_CATALOG_REPOSITORY
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.catalog.git.repository
- name: LAUNCHER_BOOSTER_CATALOG_REF
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.catalog.git.ref
- name: LAUNCHER_BOOSTER_CATALOG_FILTER
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.catalog.filter
optional: true
- name: LAUNCHER_BACKEND_CATALOG_REINDEX_TOKEN
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.catalog.reindex.token
optional: true
- name: LAUNCHER_BACKEND_DOCUMENTATION_RELOAD_TOKEN
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.documentation.reload.token
optional: true
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.openshift.api.url
optional: true
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.openshift.console.url
optional: true
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.openshift.username
optional: true
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.openshift.password
optional: true
- name: LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.github.username
optional: true
- name: LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.github.token
optional: true
- name: LAUNCHER_KEYCLOAK_URL
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.keycloak.url
- name: LAUNCHER_KEYCLOAK_REALM
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.keycloak.realm
- name: LAUNCHER_TRACKER_SEGMENT_TOKEN
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.tracker.segment.token
- name: LAUNCHER_BACKEND_ENVIRONMENT
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.environment
- name: LAUNCHER_MISSIONCONTROL_OPENSHIFT_CLUSTERS_FILE
value: /etc/fabric8-launcher/openshift-clusters.yaml
- name: KEYCLOAK_SAAS_URL
valueFrom:
configMapKeyRef:
name: launcher
key: osio.keycloak.saas.url
- name: OPENSHIFT_API_URL
valueFrom:
configMapKeyRef:
name: launcher
key: osio.openshift.api.url
- name: WIT_URL
valueFrom:
configMapKeyRef:
name: launcher
key: osio.wit.url
optional: true
- name: AUTH_URL
valueFrom:
configMapKeyRef:
name: launcher
key: osio.auth.url
optional: true
- name: JENKINS_URL
valueFrom:
configMapKeyRef:
name: launcher
key: osio.jenkins.url
optional: true
- name: SENTRY_DSN
valueFrom:
configMapKeyRef:
name: launcher
key: osio.sentry.dsn
optional: true
image: ${BACKEND_IMAGE}:${BACKEND_IMAGE_TAG}
imagePullPolicy: Always
name: launcher-backend
ports:
- containerPort: 8080
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /etc/fabric8-launcher/
name: configmap-volume
readinessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 10
resources:
requests:
cpu: ${BACKEND_CPU_REQUEST}
memory: ${BACKEND_MEMORY_REQUEST}
limits:
cpu: ${BACKEND_CPU_LIMIT}
memory: ${BACKEND_MEMORY_LIMIT}
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: configmap-volume
configMap:
name: launcher-clusters
test: false
triggers:
- type: ConfigChange
- kind: Service
apiVersion: v1
metadata:
labels:
service: launcher-backend
name: launcher-backend
spec:
ports:
- name: "8080"
port: 8080
protocol: TCP
targetPort: 8080
selector:
service: launcher-backend
sessionAffinity: None
type: ClusterIP
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: launcher-frontend
annotations:
configmap.fabric8.io/update-on-change: "launcher"
spec:
replicas: "${{FRONTEND_REPLICAS}}"
selector:
service: launcher-frontend
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
service: launcher-frontend
spec:
containers:
- image: ${FRONTEND_IMAGE}:${FRONTEND_IMAGE_TAG}
imagePullPolicy: Always
name: launcher-frontend
ports:
- containerPort: 8080
protocol: TCP
env:
- name: LAUNCHER_BACKEND_URL
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.backend.url
- name: LAUNCHER_MISSIONCONTROL_URL
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.missioncontrol.url
- name: LAUNCHER_KEYCLOAK_URL
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.keycloak.url
- name: LAUNCHER_KEYCLOAK_REALM
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.keycloak.realm
- name: LAUNCHER_TRACKER_SEGMENT_TOKEN
valueFrom:
configMapKeyRef:
name: launcher
key: launcher.tracker.segment.token
resources: {}
terminationMessagePath: /dev/termination-log
readinessProbe:
httpGet:
path: /launch/wizard
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 10
periodSeconds: 20
livenessProbe:
httpGet:
path: /launch/wizard
port: 8080
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 20
resources:
requests:
cpu: ${FRONTEND_CPU_REQUEST}
memory: ${FRONTEND_MEMORY_REQUEST}
limits:
cpu: ${FRONTEND_CPU_LIMIT}
memory: ${FRONTEND_MEMORY_LIMIT}
restartPolicy: Always
dnsPolicy: ClusterFirst
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- kind: Service
apiVersion: v1
metadata:
labels:
service: launcher-frontend
name: launcher-frontend
spec:
ports:
- name: "8080"
port: 8080
protocol: TCP
targetPort: 8080
selector:
service: launcher-frontend
sessionAffinity: None
type: ClusterIP
- apiVersion: v1
kind: ServiceAccount
metadata:
labels:
service: configmapcontroller
name: configmapcontroller
- apiVersion: v1
kind: RoleBinding
metadata:
labels:
service: configmapcontroller
name: configmapcontroller-edit
roleRef:
name: edit
subjects:
- kind: ServiceAccount
name: configmapcontroller
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
service: configmapcontroller
name: configmapcontroller
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
service: configmapcontroller
strategy:
rollingParams:
timeoutSeconds: 7200
type: Rolling
template:
metadata:
labels:
service: configmapcontroller
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: ${CONTROLLER_IMAGE}:${CONTROLLER_IMAGE_TAG}
name: configmapcontroller
serviceAccountName: configmapcontroller
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Route
metadata:
name: launcher
spec:
to:
kind: Service
name: launcher-frontend
weight: 100
wildcardPolicy: None
status: {}