-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathiot-demo.yml
1076 lines (1049 loc) · 27.8 KB
/
iot-demo.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
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
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#*******************************************************************************
# Copyright (c) 2017 Red Hat, Eurotech, Inc and others
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Red Hat, Inc. - initial implementation
# Eurotech - initial implementation of Kapua components
#
#******************************************************************************
apiVersion: v1
kind: Template
metadata:
annotations:
description: Red Hat IoT Demo Application Template
iconClass: icon-shadowman
tags: jboss,iot,kapua,kura,eclipse
name: iot-demo
parameters:
- name: IMAGE_VERSION
description: The version of the image to use
value: latest
- name: DOCKER_ACCOUNT
description: The docker hub account name to pull from
value: redhatiot
- name: JOLOKIA_PASSWORD
description: The password used for the Jolokia endpoint authentication
generate: expression
from: '[a-zA-Z0-9]{15}'
required: true
- name: JOLOKIA_USER
description: The username used for the Jolokia endpoint authentication
value: jolokia
- name: ELASTIC_SEARCH_MEMORY
descrption: The minimum and maximun Java heap space for Elasticsearch
value: 256m
- description: Maven mirror url. If nexus is deployed locally, use nexus url (e.g. http://nexus.ci:8081/content/groups/public/)
displayName: Maven mirror url
name: MAVEN_MIRROR_URL
required: false
- description: MQ cluster password
from: '[a-zA-Z0-9]{8}'
generate: expression
name: MQ_CLUSTER_PASSWORD
required: true
- description: JGroups cluster password
from: '[a-zA-Z0-9]{8}'
generate: expression
name: JGROUPS_CLUSTER_PASSWORD
required: true
- description: Git source URI for application
name: GIT_URI
required: true
value: https://github.com/redhat-iot/summit2017
- description: Git branch/tag reference
name: GIT_REF
value: master
- description: MQ Broker username
name: BROKER_USERNAME
value: "demo-gw2"
required: true
- description: MQ Broker password
name: BROKER_PASSWORD
value: "RedHat123"
required: true
- description: OpenShift load-balanced MQ Broker service name
name: BROKER_WS_NAME
value: "broker"
required: true
- description: Name of datastore proxy service
name: DATASTORE_PROXY_SERVICE
value: "datastore-proxy"
required: true
- description: API Key for Google Maps
name: GOOGLE_MAPS_API_KEY
value: "AIzaSyDpDtvyzzdXDYk5nt6CuOtjxmvBvwGq5D4"
required: false
- description: Datastore username
name: DATASTORE_USERNAME
value: "rhiot"
required: true
- description: Datastore password
name: DATASTORE_PASSWORD
value: "redhatiot1!"
required: true
- description: Datastore service hostname
name: DATASTORE_HOST
value: "datastore-hotrod"
required: true
- description: Datastore port
name: DATASTORE_PORT
value: "11333"
required: true
- description: Datastore password
name: DATASTORE_CACHE
value: "customer,facility,operator,shipment,vehicle"
required: true
- description: Datastore password
name: ADDITIONAL_SENSOR_IDS
required: false
- description: Number of Kura Simulators to run
name: KSIM_NUM_GATEWAYS
value: "2"
required: true
- description: Kapua Account Name
name: KSIM_ACCOUNT_NAME
value: "Red-Hat"
required: true
- description: Simulator Name Factory
name: KSIM_NAME_FACTORY
# value: "host:addr"
- description: Simulator Name Custom Prefix
name: KSIM_BASE_NAME
value: "truck-"
- description: Displayed title of web dashboard
name: DASHBOARD_WEB_TITLE
value: "Red Hat + Eurotech IoT Fleet Telematics Demo"
required: true
labels:
demo: summit2017
objects:
# Config Maps (Hawkular)
- apiVersion: v1
kind: ConfigMap
metadata:
name: hawkular-openshift-agent-kapua
labels:
name: hawkular-openshift-agent-kapua
hawkular-openshift-agent: jolokia-kapua
data:
hawkular-openshift-agent: |
endpoints:
- type: jolokia
protocol: https
port: 8778
path: /jolokia/
collection_interval: 15s
credentials:
username: ${JOLOKIA_USER}
password: ${JOLOKIA_PASSWORD}
tls:
skip_certificate_validation: true
metrics:
- name: java.lang:type=Memory#HeapMemoryUsage#used
id: java_memory_heap_used
type: gauge
description: Heap Memory Used
units: B
# Deployment configs
- apiVersion: v1
kind: DeploymentConfig
metadata:
generation: 1
labels:
app: sql
name: sql
spec:
replicas: 1
selector:
app: sql
deploymentconfig: sql
strategy:
type: Recreate
template:
metadata:
labels:
app: sql
deploymentconfig: sql
hawkular-openshift-agent: jolokia-kapua
spec:
containers:
- env:
- name: H2_OPTS
value: -javaagent:/jolokia-jvm-agent.jar=port=8778,protocol=https,caCert=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt,clientPrincipal=cn=system:master-proxy,useSslClientAuthentication=true,extraClientCheck=true,host=0.0.0.0,discoveryEnabled=false,user=${JOLOKIA_USER},password=${JOLOKIA_PASSWORD}
image: ${DOCKER_ACCOUNT}/kapua-sql:${IMAGE_VERSION}
imagePullPolicy: Always
name: sql
ports:
- containerPort: 8778
name: jolokia
- containerPort: 3306
protocol: TCP
- containerPort: 8181
protocol: TCP
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 15
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 3306
timeoutSeconds: 1
volumeMounts:
- mountPath: /opt/h2-data
name: sql-data
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: sql-data
- name: hawkular-openshift-agent
configMap:
name: hawkular-openshift-agent-kapua
- apiVersion: v1
kind: DeploymentConfig
metadata:
generation: 1
labels:
app: kapua-broker
name: kapua-broker
spec:
replicas: 1
selector:
app: kapua-broker
deploymentconfig: kapua-broker
strategy:
type: Recreate
template:
metadata:
annotations:
openshift.io/container.kapua-broker.image.entrypoint: '["/maven/bin/activemq","console"]'
labels:
app: kapua-broker
deploymentconfig: kapua-broker
hawkular-openshift-agent: jolokia-kapua
spec:
containers:
- env:
- name: ACTIVEMQ_OPTS
value: -Dcommons.db.connection.host=$SQL_SERVICE_HOST -Dcommons.db.connection.port=$SQL_PORT_3306_TCP_PORT -Ddatastore.elasticsearch.nodes=$ELASTICSEARCH_PORT_9200_TCP_ADDR -javaagent:/jolokia-jvm-agent.jar=port=8778,protocol=https,caCert=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt,clientPrincipal=cn=system:master-proxy,useSslClientAuthentication=true,extraClientCheck=true,host=0.0.0.0,discoveryEnabled=false,user=${JOLOKIA_USER},password=${JOLOKIA_PASSWORD}
image: ${DOCKER_ACCOUNT}/kapua-broker:${IMAGE_VERSION}
imagePullPolicy: Always
name: kapua-broker
ports:
- containerPort: 8778
name: jolokia
- containerPort: 1883
protocol: TCP
- containerPort: 61614
protocol: TCP
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 15
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 1883
timeoutSeconds: 1
volumeMounts:
- mountPath: /maven/data
name: kapua-broker-volume-1
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: kapua-broker-volume-1
- apiVersion: v1
kind: DeploymentConfig
metadata:
generation: 1
labels:
app: kapua-console
name: kapua-console
spec:
replicas: 1
selector:
app: kapua-console
deploymentconfig: kapua-console
template:
metadata:
labels:
app: kapua-console
deploymentconfig: kapua-console
hawkular-openshift-agent: jolokia-kapua
spec:
containers:
- env:
- name: JAVA_OPTS
value: -Ddatastore.elasticsearch.nodes=$ELASTICSEARCH_PORT_9200_TCP_ADDR -Dcommons.db.connection.host=$SQL_SERVICE_HOST -Dcommons.db.connection.port=$SQL_PORT_3306_TCP_PORT -Dbroker.host=$KAPUA_BROKER_SERVICE_HOST -javaagent:/jolokia-jvm-agent.jar=port=8778,protocol=https,caCert=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt,clientPrincipal=cn=system:master-proxy,useSslClientAuthentication=true,extraClientCheck=true,host=0.0.0.0,discoveryEnabled=false,user=${JOLOKIA_USER},password=${JOLOKIA_PASSWORD}
image: ${DOCKER_ACCOUNT}/kapua-console-jetty:${IMAGE_VERSION}
imagePullPolicy: Always
name: kapua-console
ports:
- containerPort: 8778
name: jolokia
- containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 5
failureThreshold: 3
periodSeconds: 10
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: hawkular-openshift-agent
configMap:
name: hawkular-openshift-agent-kapua
- apiVersion: v1
kind: DeploymentConfig
metadata:
generation: 1
labels:
app: kapua-api
hawkular-openshift-agent: jolokia-kapua
name: kapua-api
spec:
replicas: 1
selector:
app: kapua-api
deploymentconfig: kapua-api
template:
metadata:
labels:
app: kapua-api
deploymentconfig: kapua-api
hawkular-openshift-agent: jolokia-kapua
spec:
containers:
- env:
- name: JAVA_OPTS
value: -Ddatastore.elasticsearch.nodes=$ELASTICSEARCH_PORT_9200_TCP_ADDR -Dcommons.db.connection.host=$SQL_SERVICE_HOST -Dcommons.db.connection.port=$SQL_PORT_3306_TCP_PORT -Dbroker.host=$KAPUA_BROKER_SERVICE_HOST -javaagent:/jolokia-jvm-agent.jar=port=8778,protocol=https,caCert=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt,clientPrincipal=cn=system:master-proxy,useSslClientAuthentication=true,extraClientCheck=true,host=0.0.0.0,discoveryEnabled=false,user=${JOLOKIA_USER},password=${JOLOKIA_PASSWORD}
image: ${DOCKER_ACCOUNT}/kapua-api-jetty:${IMAGE_VERSION}
imagePullPolicy: Always
name: kapua-console
ports:
- containerPort: 8778
name: jolokia
- containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 5
failureThreshold: 3
periodSeconds: 10
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: hawkular-openshift-agent
configMap:
name: hawkular-openshift-agent-kapua
- apiVersion: v1
kind: DeploymentConfig
metadata:
generation: 1
labels:
app: elasticsearch
hawkular-openshift-agent: jolokia-kapua
name: elasticsearch
spec:
replicas: 1
selector:
app: elasticsearch
deploymentconfig: elasticsearch
template:
metadata:
labels:
app: elasticsearch
deploymentconfig: elasticsearch
hawkular-openshift-agent: jolokia-kapua
spec:
containers:
- env:
- name: ES_HEAP_SIZE
value: ${ELASTIC_SEARCH_MEMORY}
- name: ES_JAVA_OPTS
value: -Des.cluster.name=kapua-datastore -Des.http.cors.enabled=true -Des.http.cors.allow-origin=*
image: elasticsearch:2.4
imagePullPolicy: Always
name: elasticsearch
ports:
- containerPort: 9200
- containerPort: 9300
readinessProbe:
httpGet:
path: /
port: 9200
initialDelaySeconds: 15
timeoutSeconds: 5
failureThreshold: 3
periodSeconds: 10
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-data
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: hawkular-openshift-agent
configMap:
name: hawkular-openshift-agent-kapua
- name: elasticsearch-data
emptyDir: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: simulator
spec:
replicas: 1
selector:
app: simulator
deploymentconfig: simulator
strategy:
type: Recreate
template:
metadata:
labels:
app: simulator
deploymentconfig: simulator
spec:
containers:
- name: simulator
image: ${DOCKER_ACCOUNT}/kura-simulator:${IMAGE_VERSION}
imagePullPolicy: Always
restartPolicy: Always
dnsPolicy: ClusterFirst
env:
- name: KSIM_BROKER_PROTO
value: $(KAPUA_BROKER_PORT_1883_TCP_PROTO)
- name: KSIM_BROKER_HOST
value: $(KAPUA_BROKER_SERVICE_HOST)
- name: KSIM_BROKER_PORT
value: $(KAPUA_BROKER_PORT_1883_TCP_PORT)
- name: KSIM_BROKER_USER
value: ${BROKER_USERNAME}
- name: KSIM_BROKER_PASSWORD
value: ${BROKER_PASSWORD}
- name: KSIM_BASE_NAME
value: ${KSIM_BASE_NAME}
- name: KSIM_NAME_FACTORY
value: ${KSIM_NAME_FACTORY}
- name: KSIM_NUM_GATEWAYS
value: ${KSIM_NUM_GATEWAYS}
- name: KSIM_ACCOUNT_NAME
value: ${KSIM_ACCOUNT_NAME}
- name: KSIM_SIMULATION_CONFIGURATION
valueFrom:
configMapKeyRef:
name: data-simulator-config
key: ksim.simulator.configuration
# Services
- apiVersion: v1
kind: Service
metadata:
name: sql
labels:
app: sql
spec:
ports:
- name: h2-sql
protocol: TCP
port: 3306
targetPort: 3306
- name: h2-web
protocol: TCP
port: 8181
targetPort: 8181
selector:
app: sql
deploymentconfig: sql
- apiVersion: v1
kind: Service
metadata:
name: kapua-broker
labels:
app: kapua-broker
annotations:
service.alpha.openshift.io/dependencies: '[{"name": "sql", "kind": "Service"}, {"name": "elasticsearch", "kind": "Service"}]'
spec:
ports:
- name: mqtt-tcp
protocol: TCP
port: 1883
nodePort: 31883
- name: mqtts-tcp
protocol: TCP
port: 8883
nodePort: 31885
- name: mqtt-websocket-tcp
protocol: TCP
port: 61614
nodePort: 31614
selector:
app: kapua-broker
deploymentconfig: kapua-broker
type: NodePort
- apiVersion: v1
kind: Service
metadata:
name: kapua-console
labels:
app: kapua-console
annotations:
service.alpha.openshift.io/dependencies: '[{"name": "sql", "kind": "Service"}]'
spec:
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
selector:
app: kapua-console
deploymentconfig: kapua-console
- apiVersion: v1
kind: Service
metadata:
name: kapua-api
labels:
app: kapua-api
annotations:
service.alpha.openshift.io/dependencies: '[{"name": "sql", "kind": "Service"}]'
spec:
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
selector:
app: kapua-api
deploymentconfig: kapua-api
- apiVersion: v1
kind: Service
metadata:
name: elasticsearch
labels:
app: elasticsearch
spec:
ports:
- name: http
protocol: TCP
port: 9200
targetPort: 9200
- name: transport
protocol: TCP
port: 9300
targetPort: 9300
selector:
app: elasticsearch
deploymentconfig: elasticsearch
# Routes
- apiVersion: v1
kind: Route
metadata:
name: ${BROKER_WS_NAME}
labels:
app: kapua-broker
spec:
to:
kind: Service
name: kapua-broker
port:
targetPort: mqtt-websocket-tcp
- apiVersion: v1
kind: Route
metadata:
name: console
labels:
app: kapua-console
spec:
to:
kind: Service
name: kapua-console
port:
targetPort: http
- apiVersion: v1
kind: Route
metadata:
name: api
labels:
app: kapua-api
spec:
to:
kind: Service
name: kapua-api
port:
targetPort: http
- apiVersion: v1
kind: Route
metadata:
name: search
labels:
app: elasticsearch
spec:
to:
kind: Service
name: elasticsearch
port:
targetPort: http
###
### END OpenShift Template items from Kapua dev-tools
###
# UI and JDG
#
# Image Streams
#
- apiVersion: v1
kind: ImageStream
metadata:
name: dashboard
spec:
tags:
- name: latest
- apiVersion: v1
kind: ImageStream
metadata:
name: datastore-proxy
spec:
tags:
- name: latest
#
# Build Configs
#
- apiVersion: v1
kind: BuildConfig
metadata:
name: dashboard
labels:
application: dashboard
spec:
output:
to:
kind: ImageStreamTag
name: dashboard:latest
source:
contextDir: dashboard
git:
ref: ${GIT_REF}
uri: ${GIT_URI}
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: nodejs:4
namespace: openshift
type: Source
triggers:
- imageChange: {}
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: BuildConfig
metadata:
name: datastore-proxy
labels:
application: datastore-proxy
spec:
output:
to:
kind: ImageStreamTag
name: datastore-proxy:latest
source:
contextDir: dgproxy
git:
ref: ${GIT_REF}
uri: ${GIT_URI}
type: Git
strategy:
sourceStrategy:
env:
- name: MAVEN_MIRROR_URL
value: ${MAVEN_MIRROR_URL}
from:
kind: ImageStreamTag
name: wildfly:10.1
namespace: openshift
type: Source
triggers:
- type: ConfigChange
- imageChange: {}
type: ImageChange
#
# Angular Dashboard deployment
#
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: dashboard
name: dashboard
spec:
replicas: 1
selector:
deploymentconfig: dashboard
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
app: dashboard
deploymentconfig: dashboard
spec:
containers:
- env:
- name: BROKER_WS_NAME
value: ${BROKER_WS_NAME}
- name: BROKER_USERNAME
value: ${BROKER_USERNAME}
- name: BROKER_PASSWORD
value: ${BROKER_PASSWORD}
- name: DATASTORE_PROXY_SERVICE
value: ${DATASTORE_PROXY_SERVICE}
- name: GOOGLE_MAPS_API_KEY
value: ${GOOGLE_MAPS_API_KEY}
- name: DASHBOARD_WEB_TITLE
value: ${DASHBOARD_WEB_TITLE}
image: dashboard
imagePullPolicy: Always
name: dashboard
ports:
- containerPort: 8080
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 5
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
triggers:
- imageChangeParams:
automatic: true
containerNames:
- dashboard
from:
kind: ImageStreamTag
name: dashboard:latest
type: ImageChange
- type: ConfigChange
#
# Datastore Deployment Config
#
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
generation: 1
labels:
app: datastore
application: datastore
name: datastore
spec:
replicas: 1
selector:
deploymentConfig: datastore
strategy:
recreateParams:
timeoutSeconds: 600
type: Recreate
template:
metadata:
labels:
application: datastore
deploymentConfig: datastore
name: datastore
spec:
containers:
- env:
- name: USERNAME
value: ${DATASTORE_USERNAME}
- name: PASSWORD
value: ${DATASTORE_PASSWORD}
- name: OPENSHIFT_KUBE_PING_LABELS
value: application=datastore
- name: OPENSHIFT_KUBE_PING_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: INFINISPAN_CONNECTORS
value: hotrod,rest
- name: CACHE_NAMES
value: ${DATASTORE_CACHE}
- name: DATAVIRT_CACHE_NAMES
- name: ENCRYPTION_REQUIRE_SSL_CLIENT_AUTH
- name: HOTROD_SERVICE_NAME
value: ${DATASTORE_HOST}
- name: MEMCACHED_CACHE
value: default
- name: REST_SECURITY_DOMAIN
- name: JGROUPS_CLUSTER_PASSWORD
value: ${JGROUPS_CLUSTER_PASSWORD}
image: registry.access.redhat.com/jboss-datagrid-6/datagrid65-openshift:1.4
imagePullPolicy: Always
name: datastore
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8888
name: ping
protocol: TCP
- containerPort: 11211
name: memcached
protocol: TCP
- containerPort: 11222
name: hotrod
protocol: TCP
- containerPort: 11333
name: hotrod3
protocol: TCP
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 60
triggers:
- imageChangeParams:
automatic: true
containerNames:
- datastore
from:
kind: ImageStreamTag
name: jboss-datagrid65-openshift:1.4
namespace: openshift
type: ImageChange
- type: ConfigChange
status: {}
#
# Datastore Proxy Deployment Config
#
- apiVersion: v1
kind: DeploymentConfig
metadata:
generation: 1
labels:
app: datastore-proxy
application: datastore-proxy
name: datastore-proxy
spec:
replicas: 1
selector:
deploymentConfig: datastore-proxy
strategy:
recreateParams:
timeoutSeconds: 600
resources: {}
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
application: datastore-proxy
deploymentConfig: datastore-proxy
name: datastore-proxy
spec:
containers:
- env:
- name: OPENSHIFT_KUBE_PING_LABELS
value: application=datastore-proxy
- name: OPENSHIFT_KUBE_PING_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: MQ_CLUSTER_PASSWORD
value: ${MQ_CLUSTER_PASSWORD}
- name: JGROUPS_CLUSTER_PASSWORD
value: ${JGROUPS_CLUSTER_PASSWORD}
- name: AUTO_DEPLOY_EXPLODED
value: "false"
- name: DATASTORE_HOST
value: ${DATASTORE_HOST}
- name: DATASTORE_PORT
value: ${DATASTORE_PORT}
- name: DATASTORE_CACHE
value: ${DATASTORE_CACHE}
- name: BROKER_USERNAME
value: ${BROKER_USERNAME}
- name: BROKER_PASSWORD
value: ${BROKER_PASSWORD}
- name: ADDITIONAL_SENSOR_IDS
value: ${ADDITIONAL_SENSOR_IDS}
image: datastore-proxy
imagePullPolicy: Always
lifecycle:
preStop:
exec:
command:
- /opt/eap/bin/jboss-cli.sh
- -c
- :shutdown(timeout=60)
name: datastore-proxy
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8888
name: ping
protocol: TCP
resources: {}
livenessProbe:
failureThreshold: 5
httpGet:
path: /api/utils/health
port: 8080
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 5
httpGet:
path: /api/utils/health
port: 8080
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 75
triggers:
- imageChangeParams:
automatic: true
containerNames:
- datastore-proxy
from:
kind: ImageStreamTag
name: datastore-proxy:latest
type: ImageChange
- type: ConfigChange
status: {}
#
# Services
#