-
Notifications
You must be signed in to change notification settings - Fork 6
/
accelerator.yaml
1125 lines (1070 loc) · 36.5 KB
/
accelerator.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
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
accelerator:
displayName: Tanzu Banking Demo
description: Accelerator to demonstate banking application on TAP with microservices
iconUrl: https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Node.js_logo.svg/1280px-Node.js_logo.svg.png
tags:
- spring
- banking
- tanzu-banking-demo
options:
- name: gitRepo
label: Git repo
inputType: text
required: true
dataType: string
defaultValue: https://github.com/MoSehsah/bank-demo
- name: parentApp
label: Name of parent application (the Big A app)
description: Name of the parent application this component is a part of
inputType: text
dataType: string
defaultValue: banking-demo
- name: pkgName
label: Package name
inputType: text
defaultValue: "com.vmware.tanzu"
required: true
- name: javaVersion
label: Java version
inputType: radio
dataType: number
defaultValue: 17
choices:
- value: 11
text: 11
- value: 17
text: 17
required: true
- name: springBootVersion
label: Spring Boot version
inputType: select
choices:
- value: 2.7.1
text: 2.7.1
- value: 2.6.9
text: 2.6.9
defaultValue: "2.6.9"
required: true
- name: namespaceToDeploy
label: Namespace to deploy
description: Please type the namespace to deploy
inputType: text
dataType: string
defaultValue: dev
- name: hasTests
label: Do CI test
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: airgapped
label: Airgapped setup
description: Quote-Service will return static values instead of fetching live data from IEX-Trade.
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: containterRegistryURL
label: Container Registry URL for Tiltfile
description: Please type the URL
inputType: text
dataType: string
defaultValue: harbor.dorn.gorke.ml/tap-15
- name: k8sContextName
label: Kubernetes Context Name for Tiltfile
description: Please type the context name
inputType: text
dataType: string
defaultValue: gke_gorkemozlu_europe-central2-c_tap-gke02
###### Open Telemetry
- name: otelState
label: Enable OpenTelemetry Distributed Tracing?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: deployOtel
label: Deploy OpenTelemetry Operator?
dependsOn:
name: otelState
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: selectTracingMethod
label: Please choose the tracing method.
dependsOn:
name: otelState
inputType: select
defaultValue: dummyValue
choices:
- value: wavefront
text: Tanzu Observability
- value: jaeger
text: Jaeger
- name: wavefrontToken
label: Tanzu Observability Token for distributed tracing
description: Please type the token
dependsOn:
name: selectTracingMethod
value: wavefront
inputType: text
dataType: string
defaultValue: xyz-asd-000
#discovery-server
- name: eurekaState
label: Auto Integrate with Service Discovery ?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: eurekaURL
label: Eureka Service Discovery URL
description: Please type the URL
dependsOn:
name: eurekaState
inputType: text
dataType: string
defaultValue: 'http://discovery-server.dev.svc.cluster.local/eureka'
- name: autoScalingClass
label: Choose autoscaling Class
inputType: select
defaultValue: dummyValue
choices:
- value: kpa
text: Knative Concurrency-based autoscaling (KPA)
- value: hpa
text: Standard Kubernetes CPU-based autoscaling. (HPA)
- name: autoScalingMinScale
label: Minimum Pod Count
description: Disable scale to zero with a minScale of 1.
dependsOn:
name: autoScalingClass
value: kpa
inputType: text
dataType: string
defaultValue: "1"
- name: autoScalingMaxScale
label: Max Pod Count
description: Change max pod count
dependsOn:
name: autoScalingClass
value: kpa
inputType: text
dataType: string
defaultValue: "10"
- name: autoScalingScaleDownDelay
label: Scale Down Delay time
description: The time window before scale down applied
dependsOn:
name: autoScalingClass
value: kpa
inputType: text
dataType: string
defaultValue: "10m"
#Add-posgres-section
# - name: postgresVersion
# label: Choose postgres version
# dependsOn:
# name: addPostgresServiceClaim
# inputType: select
# defaultValue: postgres-14
# choices:
# - value: postgres-12
# text: postgres-12
# - value: postgres-13
# text: postgres-13
# - value: postgres-14
# text: postgres-14
#
# - name: postgresName
# label: Set postgres name
# description: Give a deployment name for postgres
# dependsOn:
# name: addPostgresServiceClaim
# inputType: text
# dataType: string
# defaultValue: postgres
#
# - name: postgresStorageClassName
# label: Set the Storage Class name
# dependsOn:
# name: addPostgresServiceClaim
# inputType: text
# dataType: string
# defaultValue: standard
#
# - name: postgresDBName
# label: Set the Database name
# dependsOn:
# name: addPostgresServiceClaim
# inputType: text
# dataType: string
# defaultValue: tanzubank
#
# - name: postgresHaMode
# label: Set the High Availability
# dependsOn:
# name: addPostgresServiceClaim
# inputType: toggle
# display: true
# dataType: boolean
# defaultValue: false
####################################################################################################################################
#config-server
- name: configServerDeploy
label: Deploy Config-Server ?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: branchNameConfigServer
label: Branch of the Config-Server
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: configServerDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#discovery-server
- name: discoveryServerDeploy
label: Deploy Discovery-Server ?
description: Spring Eureka
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: branchNameDiscoveryServer
label: Branch of the Discovery-Server
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: discoveryServerDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#account-service
- name: accountServiceDeploy
label: Deploy Account-Service ?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: accountServiceDeployState
label: Choose Account-Service
dependsOn:
name: accountServiceDeploy
inputType: select
defaultValue: existingAccountService
choices:
- value: newAccountServiceDevelop
text: Develop using Discovery-Server
- value: newAccountServiceDeploy
text: Deploy using Discovery-Server
- name: accountServiceDeployName
label: Choose service name of Account-Service.
describe: Change default value if needed
dependsOn:
name: accountServiceDeploy
inputType: text
dataType: string
defaultValue: account-service # double check.
# - name: hasTestsAccountService
# label: Do CI test
# dependsOn:
# name: accountServiceDeploy
# inputType: checkbox
# display: true
# dataType: boolean
# defaultValue: false
- name: branchNameAccountService
label: Branch of the Account-Service
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: accountServiceDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#user-service
- name: userServiceDeploy
label: Deploy User-Service ?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: userServiceDeployState
label: Choose User-Service
dependsOn:
name: userServiceDeploy
inputType: select
defaultValue: existingUserService
choices:
- value: newUserServiceDevelop
text: Develop using Discovery-Server
- value: newUserServiceDeploy
text: Deploy using Discovery-Server
- name: userServiceDeployName
label: Choose service name of User-Service.
describe: Change default value if needed
dependsOn:
name: userServiceDeploy
inputType: text
dataType: string
defaultValue: user-service # double check.
# - name: hasTestsUserService
# label: Do CI test
# dependsOn:
# name: userServiceDeploy
# display: true
# inputType: checkbox
# dataType: boolean
# defaultValue: false
- name: addPostgresServiceClaim
label: Auto Deploy and Integrate with Tanzu PostgreSQL ?
dependsOn:
name: userServiceDeploy
display: true
dataType: boolean
defaultValue: false
- name: branchNameUserService
label: Branch of the User-Service
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: userServiceDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#quote-service
- name: quoteServiceDeploy
label: Deploy Quote-Service (Java)?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: quoteServiceDeployState
label: Choose Quote-Service
dependsOn:
name: quoteServiceDeploy
inputType: select
defaultValue: existingQuoteService
choices:
- value: newQuoteServiceDevelop
text: Develop using Discovery-Server
- value: newQuoteServiceDeploy
text: Deploy using Discovery-Server
- name: quoteServiceDeployName
label: Choose service name of Quote-Service.
describe: Change default value if needed
dependsOn:
name: quoteServiceDeploy
inputType: text
dataType: string
defaultValue: quote-service # double check.
# - name: hasTestsQuoteService
# label: Do CI test
# dependsOn:
# name: quoteServiceDeploy
# display: true
# inputType: checkbox
# dataType: boolean
# defaultValue: false
- name: enableRedisCachingQuoteService
label: Enable Redis Caching
dependsOn:
name: quoteServiceDeploy
display: true
dataType: boolean
defaultValue: false
- name: branchNameQuoteService
label: Branch of the Quote-Service
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: quoteServiceDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#quote-service-dotnet
- name: quoteServiceDotnetDeploy
label: Deploy Quote-Service (.Net Core)?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: quoteServiceDotnetDeployState
label: Choose Quote-Service
dependsOn:
name: quoteServiceDotnetDeploy
inputType: select
defaultValue: dummyDefaultValue
choices:
- value: quoteServiceDotnetDevelop
text: Develop using Discovery-Server
- value: newQuoteServiceDotnetDeploy
text: Deploy using Discovery-Server
- name: quoteServiceDotnetDeployName
label: Choose service name of Quote-Service.
describe: Change default value if needed
dependsOn:
name: quoteServiceDotnetDeploy
inputType: text
dataType: string
defaultValue: quote-service # double check.
# - name: hasTestsQuoteServiceDotnet
# label: Do CI test
# dependsOn:
# name: quoteServiceDotnetDeploy
# display: true
# inputType: checkbox
# dataType: boolean
# defaultValue: false
- name: quoteServiceDotnetTilt
label: Enable Development with Tilt
dependsOn:
name: quoteServiceDotnetDeploy
display: true
dataType: boolean
defaultValue: false
- name: branchNameQuoteServiceDotnet
label: Branch of the Quote-Service
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: quoteServiceDotnetDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#portfolio-service
- name: portfolioServiceDeploy
label: Deploy Portfolio-Service ?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: portfolioServiceDeployState
label: Choose Portfolio-Service
dependsOn:
name: portfolioServiceDeploy
inputType: select
defaultValue: dummyDefaultValue
choices:
- value: newPortfolioServiceDevelop
text: Develop using Discovery-Server
- value: newPortfolioServiceDeploy
text: Deploy using Discovery-Server
- value: existingPortfolioService
text: Develop using External Services
- name: portfolioServiceDeployName
label: Choose service name of Portfolio-Service.
describe: Change default value if needed
dependsOn:
name: portfolioServiceDeploy
inputType: text
dataType: string
defaultValue: portfolio-service # double check.
- name: accountServiceName
label: Type external service name of Account-Service.
describe: Change default value if needed
dependsOn:
name: portfolioServiceDeployState
value: existingPortfolioService
inputType: text
dataType: string
defaultValue: account-service.dev.svc.cluster.local:80 # double check.
- name: quoteServiceName
label: Type external service name of Quote-Service.
describe: Change default value if needed
dependsOn:
name: portfolioServiceDeployState
value: existingPortfolioService
inputType: text
dataType: string
defaultValue: quote-service.dev.svc.cluster.local:80 # double check.
# - name: hasTestsPortfolioService
# label: Do CI test
# dependsOn:
# name: portfolioServiceDeploy
# inputType: checkbox
# display: true
# dataType: boolean
# defaultValue: false
- name: branchNamePortfolioService
label: Branch of the Portfolio-Service
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: portfolioServiceDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
#web-service
- name: webServiceDeploy
label: Deploy Web-Service ?
inputType: checkbox
display: true
dataType: boolean
defaultValue: false
- name: webServiceDeployState
label: Choose Web-Service
dependsOn:
name: webServiceDeploy
inputType: select
defaultValue: newWebServiceDeploy
choices:
- value: newWebServiceDevelop
text: Develop using Discovery-Server
- value: newWebServiceDeploy
text: Deploy using Discovery-Server
- value: existingWebService
text: Develop using External Services
- name: webServiceDeployNameW
label: Choose service name of Web-Service.
describe: Change default value if needed
dependsOn:
name: webServiceDeploy
inputType: text
dataType: string
defaultValue: web-service # double check.
- name: accountServiceNameW
label: Choose service name of Account-Service.
describe: Change default value if needed
dependsOn:
name: webServiceDeployState
value: existingWebService
inputType: text
dataType: string
defaultValue: account-service.dev.svc.cluster.local:80 # double check.
- name: quoteServiceNameW
label: Type external service name of Quote-Service.
describe: Change default value if needed
dependsOn:
name: webServiceDeployState
value: existingWebService
inputType: text
dataType: string
defaultValue: quote-service.dev.svc.cluster.local:80 # double check.
- name: userServiceNameW
label: Type external service name of User-Service.
describe: Change default value if needed
dependsOn:
name: webServiceDeployState
value: existingWebService
inputType: text
dataType: string
defaultValue: user-service.dev.svc.cluster.local:80 # double check.
- name: portfolioServiceNameW
label: Type external service name of Portfolio-Service.
describe: Change default value if needed
dependsOn:
name: webServiceDeployState
value: existingWebService
inputType: text
dataType: string
defaultValue: portfolio-service.dev.svc.cluster.local:80 # double check.
- name: analyticsServiceNameW
label: Type external service name of Analytics-Service.
describe: Change default value if needed
dependsOn:
name: webServiceDeployState
value: existingWebService
inputType: text
dataType: string
defaultValue: analytics-service.dev.svc.cluster.local:80 # double check.
# - name: hasTestsWebService
# label: Do CI test
# dependsOn:
# name: webServiceDeploy
# display: true
# inputType: checkbox
# dataType: boolean
# defaultValue: false
- name: branchNameWebService
label: Branch of the Web-Service
description: Please type the branch to use - Skip this value if using existing.
dependsOn:
name: webServiceDeploy
inputType: text
dataType: string
defaultValue: main
####################################################################################################################################
# - name: You can access the output with CLI as well
# inputType: textarea
# display: true
# defaultValue: |
# kubectl -n accelerator-system port-forward svc/acc-server 8877:80
# tanzu accelerator generate spring-data-services --server-url http://localhost:8877 --options='{"gitRepo":"https://github.com/gorkemozlu/spring-petclinic-tap-mysql","parentApp":"petclinic-app","hasTests":false,"addToComponent":true,"branchName":"main","namespaceToDeploy":"my-apps","addDB":true,"dbType":"MySQL","dbName":"petclinic-db","appDeploymentType":"tap"}'
engine:
let:
- name: emptyVar
expression: "''"
merge:
#generic transformations
- includes: ["readme.md"]
- includes: ["yaml/airgapped/**"]
condition: "#airgapped != false"
- includes: ["yaml/open-telemetry/open-telemetry/**"]
condition: "#deployOtel != false"
chain:
- type: YTT
- includes: ["yaml/open-telemetry/readme.md"]
condition: "#deployOtel != false"
- includes: ["yaml/open-telemetry/jaeger/**"]
condition: "#selectTracingMethod == 'jaeger'"
chain:
- type: YTT
- includes: ["yaml/open-telemetry/wavefront/**"]
condition: "#selectTracingMethod == 'wavefront'"
chain:
- type: YTT
- includes: ["account-service/**"]
condition: "#accountServiceDeployState == 'newAccountServiceDevelop'"
excludes: [ "account-service/target","account-service/config/**" ]
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#accountServiceDeployName"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- type: ReplaceText
substitutions:
- text: com.vmware.tanzu
with: "#pkgName"
- type: RewritePath
regex: account-service/src/main/java/com/vmware/tanzu/account/(.*)
rewriteTo: "'account-service/src/main/java/' + #pkgName.replace('.', '/') + '/account/' + #g1"
- type: RewritePath
regex: account-service/src/test/java/com/vmware/tanzu/account/(.*)
rewriteTo: "'account-service/src/test/java/' + #pkgName.replace('.', '/') + '/account/' + #g1"
- type: ReplaceText
substitutions:
- text: "<groupId>com.vmware.tanzu</groupId>'"
with: "'<groupId>' + #pkgName + '</groupId>'"
- text: "<java.version>17</java.version>"
with: "'<java.version>' + #javaVersion + '</java.version>'"
- text: "<version>2.7.1</version>"
with: "'<version>' + #springBootVersion + '</version>'"
- includes: ["account-service/config/**"]
condition: "#accountServiceDeploy != false"
chain:
- type: YTT
#- includes: [ "account-service/Tiltfile" ]
- includes: ["config-server/config/**"]
condition: "#configServerDeploy != false"
chain:
- type: YTT
- includes: ["discovery-server/config/**"]
condition: "#discoveryServerDeploy != false"
chain:
- type: YTT
- includes: ["user-service/**"]
condition: "#userServiceDeployState == 'newUserServiceDevelop'"
excludes: [ "user-service/target","user-service/config/**" ]
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#userServiceDeployName"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- type: ReplaceText
substitutions:
- text: com.vmware.tanzu
with: "#pkgName"
- type: RewritePath
regex: user-service/src/main/java/com/vmware/tanzu/user/(.*)
rewriteTo: "'user-service/src/main/java/' + #pkgName.replace('.', '/') + '/user/' + #g1"
- type: RewritePath
regex: user-service/src/test/java/com/vmware/tanzu/user/(.*)
rewriteTo: "'user-service/src/test/java/' + #pkgName.replace('.', '/') + '/user/' + #g1"
- type: ReplaceText
substitutions:
- text: "<groupId>com.vmware.tanzu</groupId>'"
with: "'<groupId>' + #pkgName + '</groupId>'"
- text: "<java.version>17</java.version>"
with: "'<java.version>' + #javaVersion + '</java.version>'"
- text: "<version>2.7.1</version>"
with: "'<version>' + #springBootVersion + '</version>'"
- includes: ["user-service/config/**"]
condition: "#userServiceDeploy != false"
chain:
- type: YTT
- includes: ["quote-service/**"]
condition: "#quoteServiceDeployState == 'newQuoteServiceDevelop'"
excludes: [ "quote-service/target","quote-service/config/**" ]
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#quoteServiceDeployName"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- type: ReplaceText
substitutions:
- text: com.vmware.tanzu
with: "#pkgName"
- type: RewritePath
regex: quote-service/src/main/java/com/vmware/tanzu/quotes/(.*)
rewriteTo: "'quote-service/src/main/java/' + #pkgName.replace('.', '/') + '/quotes/' + #g1"
- type: RewritePath
regex: quote-service/src/test/java/com/vmware/tanzu/quotes/(.*)
rewriteTo: "'quote-service/src/test/java/' + #pkgName.replace('.', '/') + '/quotes/' + #g1"
- type: ReplaceText
substitutions:
- text: "<groupId>com.vmware.tanzu</groupId>'"
with: "'<groupId>' + #pkgName + '</groupId>'"
- text: "<java.version>17</java.version>"
with: "'<java.version>' + #javaVersion + '</java.version>'"
- text: "<version>2.7.1</version>"
with: "'<version>' + #springBootVersion + '</version>'"
# - type: ReplaceText
# substitutions:
# - text: '@EnableCaching'
# with: "#emptyVar"
# condition: "#enableRedisCachingQuoteService"
- includes: ["quote-service/config/**"]
condition: "#quoteServiceDeploy != false"
chain:
- type: YTT
- includes: ["quote-service-dotnet/**"]
condition: "#quoteServiceDotnetDeployState == 'quoteServiceDotnetDevelop'"
excludes: [ "quote-service-dotnet/config/**" ]
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#quoteServiceDotnetDeployName"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- includes: ["quote-service-dotnet/config/**"]
condition: "#quoteServiceDotnetDeploy != false"
chain:
- type: YTT
- includes: ["portfolio-service/**"]
condition: "#portfolioServiceDeployState == 'newPortfolioServiceDevelop'"
excludes: [ "portfolio-service/target","portfolio-service/config/**" ]
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#portfolioServiceDeployName"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- type: ReplaceText
substitutions:
- text: com.vmware.tanzu
with: "#pkgName"
- type: RewritePath
regex: portfolio-service/src/main/java/com/vmware/tanzu/portfolio/(.*)
rewriteTo: "'portfolio-service/src/main/java/' + #pkgName.replace('.', '/') + '/portfolio/' + #g1"
- type: RewritePath
regex: portfolio-service/src/test/java/com/vmware/tanzu/portfolio/(.*)
rewriteTo: "'portfolio-service/src/test/java/' + #pkgName.replace('.', '/') + '/portfolio/' + #g1"
- type: ReplaceText
substitutions:
- text: "<groupId>com.vmware.tanzu</groupId>'"
with: "'<groupId>' + #pkgName + '</groupId>'"
- text: "<java.version>17</java.version>"
with: "'<java.version>' + #javaVersion + '</java.version>'"
- text: "<version>2.7.1</version>"
with: "'<version>' + #springBootVersion + '</version>'"
- includes: ["portfolio-service/config/**"]
condition: "#portfolioServiceDeploy != false"
chain:
- type: YTT
- includes: ["portfolio-service/**"]
excludes: [ "portfolio-service/target","portfolio-service/config/**","portfolio-service/src/main/resources/bootstrap.yml" ]
condition: "#portfolioServiceDeployState == 'existingPortfolioService'"
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#portfolioServiceDeployName"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- type: ReplaceText
substitutions:
- text: com.vmware.tanzu
with: "#pkgName"
- type: RewritePath
regex: portfolio-service/src/main/java/com/vmware/tanzu/portfolio/(.*)
rewriteTo: "'portfolio-service/src/main/java/' + #pkgName.replace('.', '/') + '/portfolio/' + #g1"
- type: RewritePath
regex: portfolio-service/src/test/java/com/vmware/tanzu/portfolio/(.*)
rewriteTo: "'portfolio-service/src/test/java/' + #pkgName.replace('.', '/') + '/portfolio/' + #g1"
- type: ReplaceText
substitutions:
- text: "<groupId>com.vmware.tanzu</groupId>'"
with: "'<groupId>' + #pkgName + '</groupId>'"
- text: "<java.version>17</java.version>"
with: "'<java.version>' + #javaVersion + '</java.version>'"
- text: "<version>2.7.1</version>"
with: "'<version>' + #springBootVersion + '</version>'"
- includes: ["portfolio-service/src/main/resources/bootstrap.yml"]
condition: "#portfolioServiceDeployState == 'existingPortfolioService'"
chain:
- type: ReplaceText
substitutions:
- text: "eureka:"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " client:"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " serviceUrl:"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " defaultZone: ${EUREKA_URL}"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " fetch-registry: true"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " instance:"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " hostname: ${HOSTNAME}"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " defaultZone: ${EUREKA_URL}"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " #nonSecurePort: 80"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " #metadata-map:"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " # management:"
with: "#emptyVar"
- type: ReplaceText
substitutions:
- text: " # port: 80"
with: "#emptyVar"
- includes: ["web-ui/**"]
condition: "#webServiceDeployState == 'newWebServiceDevelop'"
excludes: [ "web-ui/target","web-ui/config/**" ]
chain:
- type: ReplaceText
substitutions:
- text: containterRegistryURL
with: "#containterRegistryURL"
- type: ReplaceText
substitutions:
- text: nspace
with: "#namespaceToDeploy"
- type: ReplaceText
substitutions:
- text: app-name
with: "#webServiceDeployNameW"
- type: ReplaceText
substitutions:
- text: context-name
with: "#k8sContextName"
- type: ReplaceText
substitutions:
- text: com.vmware.tanzu
with: "#pkgName"
- type: RewritePath
regex: web-ui/src/main/java/com/vmware/tanzu/web/(.*)
rewriteTo: "'web-ui/src/main/java/' + #pkgName.replace('.', '/') + '/web/' + #g1"
- type: RewritePath
regex: web-ui/src/test/java/com/vmware/tanzu/web/(.*)
rewriteTo: "'web-ui/src/test/java/' + #pkgName.replace('.', '/') + '/web/' + #g1"
- type: ReplaceText