forked from oracle-quickstart/appstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.yaml
825 lines (811 loc) · 24.9 KB
/
interface.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
# Copyright (c) 2023 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
title: "App Stack for Java"
description: |
The App Stack for Java can deploy existing Java applications to serverless Container Instances behind a load balancer in the Oracle Cloud. It supports multiple options: the source code of the application is in DevOps, the application is uploaded as a war or jar, or as a container image.
schemaVersion: 1.1.0
version: "20230607"
logoUrl: "https://cloudmarketplace.oracle.com/marketplace/content?contentId=58352039"
source:
type: marketplace
reference: 47726045
locale: "en"
variableGroups:
- title: Hide constants and internal variables
visible: false
variables:
- tenancy_ocid
- compartment_ocid
- current_user_ocid
- region
- marketplace_source_images
- env_variables
- devops_pipeline_image
- devops_deploy_shape
- devops_memory
- devops_ocpu
- lb_health_check_timeout_in_millis
- lb_health_check_interval_ms
- lb_health_check_retries
- lb_listener_cypher_suite
- db_version
- db_license_model
- title: "General Configuration"
variables:
- compartment_id
- availability_domain
- title: "Application"
variables:
- application_name
- nb_copies
- application_source
- application_type
- repo_name
- branch
- build_command
- artifact_location
- registry_id
- artifact_id
- image_path
- exposed_port
- title: "Application Performance Monitoring"
variables:
- is_free_tier
- title: "Database"
variables:
- use_existing_database
- autonomous_database_display_name
- autonomous_database_admin_password
- data_storage_size_in_tbs
- cpu_core_count
- ocpu_count
- autonomous_database
- autonomous_database_user
- autonomous_database_password
- use_connection_url_env
- connection_url_env
- use_tns_admin_env
- tns_admin_env
- use_username_env
- username_env
- use_password_env
- password_env
- title: "Other parameters"
variables:
- other_environment_variables
- vm_options
- program_arguments
- title: "Application configuration - SSL communication between backends and load balancer"
variables:
- use_default_ssl_configuration
- port_property
- keystore_property
- key_alias_property
- keystore_password_property
- keystore_type_property
- cert_pem
- private_key_pem
- ca_pem
- title: "Vault"
variables:
- use_existing_vault
- new_vault_display_name
- vault_compartment_id
- vault_id
- key_id
- title: "Application URL"
variables:
- create_fqdn
- zone
- subdomain
- certificate_ocid
- title: "Network"
variables:
- create_new_vcn
- vcn_compartment_id
- existing_vcn_id
- vcn_cidr
- use_existing_app_subnet
- existing_app_subnet_id
- app_subnet_cidr
- use_existing_db_subnet
- existing_db_subnet_id
- db_subnet_cidr
- use_existing_lb_subnet
- existing_lb_subnet_id
- lb_subnet_cidr
- open_https_port
- use_default_lb_configuration
- maximum_bandwidth_in_mbps
- minimum_bandwidth_in_mbps
- health_checker_url_path
- health_checker_return_code
- enable_session_affinity
- session_affinity
- session_affinity_cookie_name
- title: "Container instance configuration"
variables:
- shape
- memory_in_gbs
- ocpus
variables:
# General Configuration
compartment_id:
type: oci:identity:compartment:id
required: true
title: Compute Compartment
description: The compartment in which to create all Compute resources.
default: compartment_ocid
availability_domain:
type: oci:identity:availabilitydomain:name
required: true
title: Availability domain
description: The availability domain in which to create all Compute resources.
dependsOn:
compartmentId: ${compartment_id}
# Application
application_name:
type: string
required: true
title: Application name
description: This name will be used to name other needed resources.
nb_copies:
type: number
required: true
title: Number of deployments
description: This is the number of container instances that will be deployed.
application_source:
type: enum
title: "Application source"
default: "SOURCE_CODE"
description: You can deploy an application that is either a container image, a Java artifact (JAR/WAR) or from the source code.
required: true
enum:
- IMAGE
- ARTIFACT
- SOURCE_CODE
application_type:
type: enum
title: "Artifact type"
description: The stack can deploy either an executable JAR (using Java runtime) or a WAR (through Tomcat).
default: "JAR"
required: true
enum:
- not selected
- JAR
- WAR
visible:
not:
- eq:
- application_source
- "IMAGE"
repo_name:
type: string
required: true
title: DevOps repository name (OCID)
description: OCID of the repository containing the application source code.
visible:
eq:
- application_source
- "SOURCE_CODE"
branch:
type: string
required: true
title: Branch used for build / deployment
description: Name of the branch to be built, deployed and on which a trigger will be installed for continuous deployment.
default: main
visible:
eq:
- application_source
- "SOURCE_CODE"
build_command:
type: string
required: true
title: Application build command
description: 'For example: mvn install'
default: mvn install
visible:
eq:
- application_source
- "SOURCE_CODE"
artifact_location:
type: string
required: true
title: Artifact path
description: 'For example: target/MyApplication.jar'
visible:
eq:
- application_source
- "SOURCE_CODE"
artifact_id:
type: string
required: true
title: Artifact OCID
visible:
eq:
- application_source
- "ARTIFACT"
registry_id:
type: string
required: true
title: Artifact repository OCID
visible:
eq:
- application_source
- "ARTIFACT"
image_path:
type: string
required: true
title: Full path to the image in container registry
visible:
eq:
- application_source
- "IMAGE"
exposed_port:
type: string
required: true
title: Exposed port
description: This is the backend port on which the application is listening.
default: 8443
visible:
eq:
- application_source
- "IMAGE"
is_free_tier:
type: boolean
required: true
title: Create as Always Free Domain
description: Up to 1000 spans per hour, 31 day storage for trace data and 10 monitor runs per hour.
default: false
# Database
use_existing_database:
type: boolean
default: true
required: true
title : Use existing an existing database (Autonomous Database Serverless)
autonomous_database_display_name:
type: string
required: true
title: Autonomous Database display name
description: A user-friendly name to help you easily identify the resource.
visible:
not:
- use_existing_database
autonomous_database_admin_password:
type: password
title: Database ADMIN password
# validate
description: Password must be 12 to 30 characters and contain at least one uppercase letter, one lowercase letter, and one number. The password cannot contain the double quote (") character or the username "admin".
required: true
visible:
not:
- use_existing_database
data_storage_size_in_tbs:
type: number
required: true
title: Storage (TB)
description: The amount of storage to allocate.
default: 1
visible:
not:
- use_existing_database
# cpu_core_count:
# type: number
# required: true
# title: CPU core count
# description: The number of OCPU cores to be made available to the database
# default: 2
# visible:
# not:
# - use_existing_database
ocpu_count:
type: number
required: true
title: OCPU count
description: The number of OCPU cores to enable. Available cores are subject to your tenancy's service limits.
default: 1
visible:
not:
- use_existing_database
autonomous_database:
type: oci:database:autonomousdatabase:id
required: true
title: Autonomous Database
description: The Autonomous Database used by the application.
dependsOn:
compartmentId: ${compartment_id}
visible:
and:
- use_existing_database
autonomous_database_user:
type: string
required: true
title: DB username
default: ""
description: The username used to connect to the database.
visible:
and:
- use_existing_database
autonomous_database_password:
type: password
title: DB user password
required: true
description: The password of the user used to access the database.
visible:
and:
- use_existing_database
# Vault
use_existing_vault:
type: boolean
title: Use an existing key vault
required: true
default: true
description: This vault will be used to store the authentication token needed by the build and deploy pipelines to publish the container image to the container registry.
new_vault_display_name:
type: string
title: Key vault display name
description: A user-friendly name to help you easily identify the resource.
required: true
visible:
not:
- use_existing_vault
vault_compartment_id:
type: oci:identity:compartment:id
required: true
title: Compartment
description: The compartment containing the existing vault.
default: compartment_ocid
visible:
and:
- use_existing_vault
vault_id:
type: oci:kms:vault:id
required: true
title: Vault
description: Choose an existing vault used to store the authentication token.
dependsOn:
compartmentId: ${vault_compartment_id}
visible:
and:
- use_existing_vault
key_id:
type: oci:kms:key:id
required: true
title: Encryption key
description: This key will be used to encrypt the sensitive information stored as vault secrets.
dependsOn:
compartmentId: ${vault_compartment_id}
vaultId: ${vault_id}
visible:
and:
- use_existing_vault
# Application configuration
use_connection_url_env:
type: boolean
title: Set connection URL environment variable
default: true
description: Assuming that your application can consume an environment variable to configure the URL, this field can be used to specify the name of the environment variable.
connection_url_env:
type: string
title: Connection URL environment variable name
description: Specify the name of the environment variable. Its value will be set automatically by the stack.
required: true
default: "SPRING_DATASOURCE_URL"
visible: use_connection_url_env
use_username_env:
type: boolean
title: Set username environment variable
description: Assuming that your application can consume an environment variable to configure the database username, this field can be used to specify the name of the environment variable.
default: false
visible:
eq:
- application_source
- "IMAGE"
username_env:
type: string
title: Database user environment variable name
description: Only the name of the environment variable is needed. The value will be automatically set. If a new database is created, the database ADMIN user will be used.
required: true
default: "SPRING_DATASOURCE_USERNAME"
visible: use_username_env
use_password_env:
type: boolean
title: Set password environment variable
description: Assuming that your application can consume an environment variable to configure the database user's password, this field can be used to specify the name of the environment variable.
default: false
visible:
eq:
- application_source
- "IMAGE"
password_env:
type: string
title: Database user's password environment variable name
description: Specify the name of the environment variable. Its value will be set automatically by the stack. If a new database is created, the database ADMIN user will be used.
required: true
default: "SPRING_DATASOURCE_PASSWORD"
visible: use_password_env
use_tns_admin_env:
type: boolean
title: Set TNS_ADMIN environment variable
description: Assuming that your application can consume an environment variable to configure TNS_ADMIN, this field can be used to specify the name of the environment variable.
default: true
visible:
eq:
- application_source
- "IMAGE"
tns_admin_env:
type: string
title: TNS_ADMIN environment variable name
description: Specify the name of the environment variable (Ex. TNS_ADMIN).
required: true
default: "TNS_ADMIN"
visible:
and:
- use_tns_admin_env
- eq:
- application_source
- "IMAGE"
# SSL properties
use_default_ssl_configuration:
type: boolean
title: Use default SSL properties for Spring
description: The stack creates a self-signed certificate that will be used for the communication between the load balancer and the backends. This self-signed certificate is stored in a JKS keystore. The following properties can be used to configure the web server to use this JKS keystore. By default Spring boot properties will be used by the stack. Click on this checkbox to specify your own property names.
default: true
visible:
and:
- eq:
- application_type
- "JAR"
- not:
- eq:
- application_source
- "IMAGE"
port_property:
type: string
title: Server port number property name
default: "server.port"
required: true
description: Assuming that your application can consume a property to configure the server port, this field can be used to specify the name of the property.
visible:
not:
- use_default_ssl_configuration
keystore_property:
type: string
title: SSL keystore filename property name
default: "server.ssl.key-store"
required: true
description: Assuming that your application can consume a property to configure the SSL keystore filename, this field can be used to specify the name of the property.
visible:
not:
- use_default_ssl_configuration
key_alias_property:
type: string
title: SSL key alias property name
default: "server.ssl.key-alias"
required: true
description: Assuming that your application can consume a property to configure the SSL key alias property name, this field can be used to specify the name of the property.
visible:
not:
- use_default_ssl_configuration
keystore_password_property:
type: string
title: SSL keystore password property name
default: "server.ssl.key-store-password"
required: true
description: Assuming that your application can consume a property to configure the SSL keystore password property name, this field can be used to specify the name of the property.
visible:
not:
- use_default_ssl_configuration
keystore_type_property:
type: string
title: SSL keystore type property name
default: "server.ssl.key-store-type"
required: true
description: Assuming that your application can consume a property to configure the SSL keystore type property name, this field can be used to specify the name of the property.
visible:
not:
- use_default_ssl_configuration
cert_pem:
type: text
multiline: true
title: SSL certificate
required: true
visible:
eq:
- application_source
- "IMAGE"
private_key_pem:
type: text
multiline: true
title: Private key
required: true
visible:
eq:
- application_source
- "IMAGE"
ca_pem:
type: text
multiline: true
title: CA certificate
required: true
visible:
eq:
- application_source
- "IMAGE"
other_environment_variables:
type: string
title: Other environment variables
description: If your application can be configured through environment variables you can configure them here. Separate variables with semicolon (var1=value1;var2=value2).
vm_options:
type: string
title: JVM options
description: 'For example : -Xms=2G -Dspring.sql.init.data-locations=/temp/script.sql'
visible:
not:
- eq:
- application_source
- "IMAGE"
program_arguments:
type: string
title: Program arguments
description: These space-separated program arguments are passed to the java process at startup.
visible:
and :
- eq:
- application_type
- "JAR"
- not:
- eq:
- application_source
- "IMAGE"
# FQDN
create_fqdn:
type : boolean
required: true
default: true
title : Create DNS record
description: If you check this checkbox the stack will create a DNS record that will resolve to the load balancer's IP address.
zone :
type: string
required: true
title: DNS Zone
description : Domain name in which the host name will be created.
visible : create_fqdn
subdomain:
type: string
required: true
title: Host name
description: The host name will be created on the selected Zone and will resolve to the the load balancer's IP address.
visible : create_fqdn
certificate_ocid:
type: string
required: true
title: Certificate OCID
description: You must have a SSL certificate available in OCI Certificates service. Provide the certificate OCID for the host name.
visible : create_fqdn
# Network
create_new_vcn:
type: boolean
required: true
title: Create new VCN
default: true
vcn_compartment_id:
type: oci:identity:compartment:id
required: true
title: The compartment of the existing VCN.
default: compartment_ocid
visible:
not:
- create_new_vcn
existing_vcn_id:
type: oci:core:vcn:id
required: true
title: Select to VCN
visible:
not:
- create_new_vcn
dependsOn:
compartmentId: ${vcn_compartment_id}
vcn_cidr:
type: string
required: true
title: VCN IPv4 CIDR Blocks
description: This VCN will be used for all resources created by the stack.
default: "10.0.0.0/24"
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
visible: create_new_vcn
use_existing_app_subnet:
type: boolean
required: true
title: Use existing Application Subnet
default: false
visible:
not :
- create_new_vcn
existing_app_subnet_id:
type: oci:core:subnet:id
required: true
title: Select the application subnet
dependsOn:
compartmentId: ${vcn_compartment_id}
vcnId: ${existing_vcn_id}
hidePublicSubnet: true
visible: use_existing_app_subnet
app_subnet_cidr:
type: string
required: true
title: Application Subnet IPv4 CIDR Blocks
description: The container instances running the application will be created in this subnet.
default: "10.0.0.0/25"
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
visible:
not:
- use_existing_app_subnet
use_existing_db_subnet:
type: boolean
required: true
title: Use existing Database Subnet
default: false
visible:
and:
- not:
- create_new_vcn
- not:
- use_existing_database
existing_db_subnet_id:
type: oci:core:subnet:id
required: true
title: Select the database subnet
dependsOn:
compartmentId: ${vcn_compartment_id}
vcnId: ${existing_vcn_id}
hidePublicSubnet: true
visible: use_existing_db_subnet
db_subnet_cidr:
type: string
required: true
title: 'Database Subnet Creation: IPv4 CIDR Blocks'
description: 'The Autonomous Database will be created in this subnet. For example: 10.0.0.128/26'
default: "10.0.0.128/26"
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
visible:
and:
- not:
- use_existing_db_subnet
- not:
- use_existing_database
use_existing_lb_subnet:
type: boolean
required: true
title: Use existing Load Balancer Subnet
default: false
visible:
not :
- create_new_vcn
existing_lb_subnet_id:
type: oci:core:subnet:id
required: true
title: Select the load balancer subnet
dependsOn:
compartmentId: ${vcn_compartment_id}
vcnId: ${existing_vcn_id}
hidePublicSubnet: false
visible: use_existing_lb_subnet
lb_subnet_cidr:
type: string
required: true
title: Load balancer Subnet IPv4 CIDR Blocks
description: The load balancer will be created in this subnet.
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
default: "10.0.0.192/26"
visible:
not:
- use_existing_lb_subnet
open_https_port:
type: boolean
required: true
title: Open load balancer's HTTPS port
description: By checking this checkbox you agree to make the load balancer
subnet public and to open the HTTPS port of the load balancer to the
Internet.
default: false
# Container instances configuration
shape:
type: enum
required: true
title: Container instance shape
description: A shape is a template that determines the number of OCPUs, amount of memory, and other resources that are allocated to a container instance.
default: "CI.Standard.E3.Flex"
enum:
- CI.Standard.E3.Flex
- CI.Standard.E4.Flex
memory_in_gbs:
type: number
required: true
title: Memory (GB)
default: 8
minimum: 1
maximum: 1024
description: Min - 1 GB or a value matching the number of OCPUs, whichever is greater. Max - 64 GB per OCPU, up to 1024 GB total
ocpus:
type: number
required: true
title: OCPU
description: Min - 1 OCPU. Max - 64 OCPU
default: 2
minimum: 1
maximum: 64
# Load balancer
use_default_lb_configuration:
type: boolean
required: true
title: Use default load balancer configuration
default: true
maximum_bandwidth_in_mbps:
type: number
required: true
title: Maximum bandwidth (Mbps)
description : 10Mbps for always free load balancer
default: 10
visible:
not:
- use_default_lb_configuration
minimum_bandwidth_in_mbps:
type: number
required: true
title: Minimum bandwidth (Mbps)
description : 10Mbps for always free load balancer
default: 10
visible:
not:
- use_default_lb_configuration
health_checker_url_path:
type: string
required: true
title: URL path (URI)
description: This url will be used by the health checker to verify that the application is running
default: "/"
visible:
not:
- use_default_lb_configuration
health_checker_return_code:
type: number
required: true
title: Status code
description: Status code returned by the health checker url when the application is running
default: 200
visible:
not:
- use_default_lb_configuration
enable_session_affinity:
type: boolean
required: true
default: false
title: Enable cookie-based session persistence
visible:
not: use_default_lb_configuration
session_affinity:
type: enum
required: true
title: Session persistence
description: Specify whether the cookie is generated by your application server or by the load balancer.
enum:
- Enable application cookie persistence
- Enable load balancer cookie persistence
visible: enable_session_affinity
session_affinity_cookie_name:
type: string
required: true
title: Cookie name
discription: Specify '*' to match any cookie name.
default: X-Oracle-BMC-LBS-Route
visible: enable_session_affinity
outputGroups:
- title: Application
outputs:
- app_url
outputs:
app_url:
type: link
title: Open Application URL
visible: true