-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.yaml
executable file
·304 lines (261 loc) · 7.69 KB
/
schema.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
title: "Use OCI DevOps with Functions"
description: "Create Function and DevOps Deploy service to manage your Functions deployments."
schemaVersion: 1.1.0
version: "20190304"
locale: "en"
#################
# Variable Groups
#################
variableGroups:
- title: General Configuration
visible: false
variables:
- tenancy_ocid
- region
- user_ocid
- fingerprint
- private_key_path
- network_cidrs
- app_version
- app_version2
- deploy_pipeline_deploy_pipeline_parameters_items_default_value
- deploy_pipeline_deploy_pipeline_parameters_items_description
- deploy_pipeline_deploy_pipeline_parameters_items_name
- compartment_ocid
- release
- title: Required Configuration
visible: true
variables:
- app_name
- ocir_user_name
- ocir_user_password
- execute_deployment
- show_advanced
- title: DevOps Project
visible: true
variables:
- compartment_id
- project_description
- project_logging_config_is_archiving_enabled
- project_logging_config_display_name_prefix
- project_logging_config_retention_period_in_days
- title: Function & Network Configuration
visible: true
variables:
- VCN-CIDR
- fnsubnet-CIDR
- ocir_repo_name
- title: DevOps Environments
visible:
and:
- show_advanced
variables:
- environment_type
- title: DevOps Artifacts
visible:
and:
- show_advanced
variables:
- deploy_artifact_source_type
- deploy_artifact_type
- argument_substitution_mode
- title: Pipelines & Stages
visible:
and:
- show_advanced
variables:
- deploy_stage_deploy_stage_type
- deploy_stage_namespace
- title: Policy Settings
description: Policy setting for the stack deployment
visible: true
variables:
- create_dynamic_group_for_devops_pipln_in_compartment
- create_dynamic_group_for_nodes_in_compartment
- existent_dynamic_group_for_nodes_in_compartment
- create_compartment_policies
- create_tenancy_policies
######################
# Variable Definitions
######################
variables:
compartment_id:
type: oci:identity:compartment:id
title: "Compartment"
description: "The compartment in which to create resources"
required: true
app_name:
type: string
title: "HelloWorldFn"
required: true
show_advanced:
type: boolean
title: "Show advanced options?"
description: "Shows advanced options, allowing enable customer-managed encryption keys, select your ssh key, select/unselect cluster utilities, do not create policies, and other advanced options"
visible: true
default: false
execute_deployment:
type: boolean
title: "Execute deployment in DevOps Pipeline?"
description: "Choose if you want to start deployment in DevOps Pipeline as a part of this Terraform automation."
visible: true
default: false
## Function
VCN-CIDR:
type: string
required: false
default: "10.0.0.0/16"
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])$"
description: "VCN CIDR block where you want to create the App/Function resources."
fnsubnet-CIDR:
type: string
required: false
default: "10.0.1.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])$"
description: "Subnet CIDR block where you want to create the App/Function resources."
ocir_repo_name:
type: string
required: true
visibile: true
title: "OCIR repository name"
description: "Oracle Cloud Infrastructure Registry repository name (for example functions)"
ocir_user_name:
type: string
required: true
visibile: true
title: "OCIR username"
description: "Oracle Cloud Infrastructure Registry username (your OCI username)"
ocir_user_password:
type: password
required: true
visibile: true
title: "OCIR user password"
description: "Oracle Cloud Infrastructure Registry user password (your OCI user authtoken)"
## DevOps
project_description:
type: string
title: "Project description"
description: "Choose DevOps Project description"
default: "DevOps Project for Function deployment"
required: false
project_logging_config_is_archiving_enabled:
type: boolean
title: "Archiving enabled for Project Logging"
description: "Archiving enabled for Project Logging"
default: false
required: true
visible:
and:
- show_advanced
project_logging_config_display_name_prefix:
type: string
title: "Prefix for Logging Config"
description: "Prefix for Logging Config"
default: "fn-"
required: true
visible:
and:
- show_advanced
project_logging_config_retention_period_in_days:
type: number
title: "Project Logs retention period"
description: "Days to retain logs from the Project."
minimum: 1
maximum: 128
multipleOf: 1
default: 30
required: true
visible:
and:
- show_advanced
#############
# Environment
#############
environment_type:
type: enum
enum:
- "FUNCTION"
title: "Environment Type"
description: "The type of environment to target. Stack currently supports only FUNCTION"
default: "FUNCTION"
visible:
and:
- show_advanced
############
# Artifacts
############
deploy_artifact_source_type:
type: enum
enum:
- "OCIR"
title: "Artifact Source Type"
description: "The source type of artifact. Stack currently supports only OCIR"
default: "OCIR"
deploy_artifact_type:
type: enum
enum:
- "DOCKER_IMAGE"
title: "Artifact Type"
description: "The type of Artifact. Stack currently supports only DOCKER_IMAGE"
default: "DOCKER_IMAGE"
argument_substitution_mode:
type: enum
enum:
- "NONE"
title: "Argument substitution for the Artifact"
description: "Artifacts can have arguments that are substituted with values are runtime. Stack currently supports only NONE"
default: "NONE"
###########
# Pipeline
###########
create_dynamic_group_for_devops_pipln_in_compartment:
type: boolean
title: "Create a Dynamic Group for DevOps Pipelines"
description: "You need to be an administrator to do this. Alternatively you can have the administrator create Dynamic group for you."
default: true
deploy_stage_deploy_stage_type:
type: enum
enum:
- "DEPLOY_FUNCTION"
title: "Stage Type"
description: "DevOps Stage Type"
default: "DEPLOY_FUNCTION"
deploy_stage_namespace:
type: string
title: "Namespace to use"
description: "namespace to use for deployment."
default: "default"
create_dynamic_group_for_nodes_in_compartment:
type: boolean
title: "Create Dynamic Group for Worker Nodes in the Compartment"
required: true
visible:
and:
- show_advanced
existent_dynamic_group_for_nodes_in_compartment:
type: string
required: true
title: "Existent Dynamic Group"
visible:
and:
- and:
- show_advanced
- or:
- create_compartment_policies
- create_tenancy_policies
- not:
- create_dynamic_group_for_nodes_in_compartment
create_compartment_policies:
type: boolean
title: "Create Compartment Policies"
required: true
visible:
and:
- show_advanced
create_tenancy_policies:
type: boolean
title: "Create Tenancy Policies"
required: true
visible:
and:
- show_advanced