forked from oracle-quickstart/oci-github-actions-runner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
orm.yaml
executable file
·554 lines (476 loc) · 15.1 KB
/
orm.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
# Title shown in Application Information tab.
title: GitHub Actions Runner
# Sub Title shown in Application Information tab.
description: The runner is the application that runs a job from a GitHub Actions workflow. It is used by GitHub Actions in the hosted virtual environments, or you can self-host the runner in your own environment.
schemaVersion: 1.1.0
version: "20201028"
informationalText: The runner is the application that runs a job from a GitHub Actions workflow. It is used by GitHub Actions in the hosted virtual environments, or you can self-host the runner in your own environment. It is not recommend to use self-hosted Runners on public repos. More information on https://github.com/actions/runner
locale: "en"
variableGroups:
- title: "Hidden Variable Group"
visible: false
variables:
#"variables used internally - not exposed to end user"
- tenancy_ocid
- region
- ad_number
- compute_image_strategy_enum
- network_strategy_enum
- subnet_type_enum
- nsg_config_enum
- title: "GitHub Actions Runner Configuration"
variables:
- github_url
- github_runner_registration_token
- number_of_runners
- github_runner_label_list
- github_runner_version
- title: "Compute Configuration"
variables:
- compute_compartment_ocid
- availability_domain_name
- vm_display_name
- hostname_label
- compute_shape
- flex_shape_memory
- flex_shape_ocpus
- compute_image_strategy
- operating_system
- platform_image_ocid
- custom_image_ocid
- ssh_public_key
- title: "Virtual Cloud Network"
variables:
- network_compartment_ocid
- network_strategy
- network_configuration_strategy
- vcn_id
- vcn_display_name
- vcn_dns_label
- vcn_cidr_block
- title: "Subnet"
visible: #($network_strategy == ""Use Existing VCN and Subnet"") OR (network_configuration_strategy == "Customize Network Configuration")
or:
- eq:
- network_strategy
- "Use Existing VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
variables:
- subnet_type
- subnet_id
- subnet_display_name
- subnet_dns_label
- subnet_cidr_block
- nsg_configuration_strategy
- title: "Network Security Group"
visible: #($nsg_configuration_strategy == "Customize Network Security Group")
eq:
- nsg_configuration_strategy
- "Customize Network Security Group"
variables:
- nsg_display_name
- nsg_source_cidr
- nsg_ssh_port
- nsg_http_port
- nsg_https_port
- title: "Additional Configuration Options"
variables:
- tag_key_name
- tag_value
######################################################
############## VARIABLES #############
######################################################
variables:
# Hidden variables
######################################################
############## HIDDEN VARIABLES #############
######################################################
tenancy_ocid:
type: string
title: Tenancy ID
description: The Oracle Cloud Identifier (OCID) for your tenancy
required: true
region:
type: oci:identity:region:name
title: Region
description: The region in which to create all resources
required: true
ad_number:
type: string
required: false
description: Availability Domain Number (Not used)
#########################################################
############## GitHub Runner VARIABLES #############
########################################################
github_url:
type: string
required: true
title: GitHub URL (Organization or Repository)
github_runner_registration_token:
type: string
required: true
title: GitHub Actions Runner Registration Token
github_runner_label_list:
type: string
required: true
title: Runner Tag List
number_of_runners:
type: number
required: true
title: Number of Runner Instances
github_runner_version:
type: string
required: false
title: GitHub Actions Runner Version
tag_key_name:
type: string
required: true
title: Tag key name
tag_value:
type: string
required: true
title: Tag value
######################################################
############## COMPUTE VARIABLES #############
######################################################
operating_system:
type: enum
title: Operating System
description: Select the Operating System
enum:
# - "CentOS 6"
# - "CentOS 7"
# - "Oracle Autonomous Linux 7"
# - "Oracle Linux 6"
# - "Oracle Linux 7"
# - "Oracle Linux 8"
# - "Ubuntu 16.04"
# - "Ubuntu 18.04"
- "Ubuntu 20.04"
required: true
default: "Ubuntu 20.04"
compute_image_strategy:
type: enum
title: Compute Image Strategy
description: Use either a Platform or Custom Image
enum:
- "Platform Image"
- "Custom Image"
required: true
default: "Platform Image"
platform_image_ocid:
visible: #($compute_image_strategy == """Platform Image""")
eq:
- compute_image_strategy
- "Platform Image"
type: oci:core:image:id
required: true
title: Platform Image
dependsOn:
compartmentId: compute_compartment_ocid
operatingSystem: "Canonical Ubuntu"
operatingSystemVersion: "20.04"
shape: compute_shape
custom_image_ocid:
visible: #($compute_image_strategy == """Custom Image""")
eq:
- compute_image_strategy
- "Custom Image"
type: string
required: true
title: Custom Image
dependsOn:
compartmentId: compute_compartment_ocid
compute_compartment_ocid:
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_name:
type: oci:identity:availabilitydomain:name
dependsOn:
regionName: region
compartmentId: compute_compartment_ocid
required: true
title: Availability Domain
description: Availability Domain
ssh_public_key:
type: oci:core:ssh:publickey
required: true
title: Public SSH Key
description: Public SSH Key to access GitHub Actions Runner instance via SSH
vm_display_name:
type: string
required: true
title: Instance Name
description: The name of the Instance
compute_shape:
type: oci:core:instanceshape:name
default: VM.Standard.A1.Flex
title: Compute Shape
required: true
dependsOn:
compartmentId: compute_compartment_ocid
flex_shape_ocpus:
visible:
or:
- eq:
- compute_shape
- "VM.Standard.E3.Flex"
- eq:
- compute_shape
- "VM.Standard.E4.Flex"
- eq:
- compute_shape
- "VM.Standard.A1.Flex"
type: integer
default: 1
title: Flex Shape OCPUs
minimum: 1
maximum: 64
required: false
description: Maximum of 64 OCPUs
flex_shape_memory:
visible:
or:
- eq:
- compute_shape
- "VM.Standard.E3.Flex"
- eq:
- compute_shape
- "VM.Standard.E4.Flex"
- eq:
- compute_shape
- "VM.Standard.A1.Flex"
type: integer
default: 6
title: Flex Shape Memory
minimum: 1
maximum: 1024
required: false
description: Minimum 1GB or 6GB. Maximum of 64GB per OCPU up to 1024GB
hostname_label:
type: string
required: false
title: DNS Hostname Label
######################################################
############## NETWORK VARIABLES #############
######################################################
network_compartment_ocid:
type: oci:identity:compartment:id
required: true
title: Network Compartment
description: The compartment in which to create all Network resources
default: compartment_ocid
# Network Type Options
network_strategy:
type: enum
title: Network Strategy
description: Create or use existing Network Stack (VCN and Subnet)
enum:
- "Create New VCN and Subnet"
- "Use Existing VCN and Subnet"
required: true
default: "Create New VCN and Subnet"
# Network Configuration
network_configuration_strategy:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: enum
title: Configuration Strategy
description: Use recommended configuration or customize it
enum:
- "Use Recommended Configuration"
- "Customize Network Configuration"
required: true
default: "Use Recommended Configuration"
######## VCN ########
vcn_display_name:
visible: #($network_strategy == ""Create New VCN and Subnet"") AND (network_configuration_strategy == "Customize Network Configuration")
and:
- eq:
- network_strategy
- "Create New VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
type: string
required: true
title: Name
description: The name of the new Virtual Cloud Network (VCN)
vcn_id:
visible: #($network_strategy == "Use Existing VCN and Subnet")
eq:
- network_strategy
- "Use Existing VCN and Subnet"
type: oci:core:vcn:id
dependsOn:
compartmentId: network_compartment_ocid
required: true
title: Existing VCN
description: An existing Virtual Cloud Network (VCN) in which to create the compute instances, network resources, and load balancers. If not specified, a new VCN is created.
vcn_cidr_block:
visible: #($network_strategy == ""Create New VCN and Subnet"") AND (network_configuration_strategy == "Customize Network Configuration")
and:
- eq:
- network_strategy
- "Create New VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
type: string
required: true
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])$"
title: CIDR Block
description: The CIDR of the new Virtual Cloud Network (VCN). If you plan to peer this VCN with another VCN, the VCNs must not have overlapping CIDRs.
vcn_dns_label:
visible: #($network_strategy == ""Create New VCN and Subnet"") AND (network_configuration_strategy == "Customize Network Configuration")
and:
- eq:
- network_strategy
- "Create New VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
type: string
required: true
title: DNS Label
maxLenght: 15
description: VCN DNS Label. Only letters and numbers, starting with a letter. 15 characters max.
######## MANAGEMENT SUBNET ########
subnet_type:
# visible: #($network_strategy == ""Create New VCN and Subnet"")
# eq:
# - network_strategy
# - "Create New VCN and Subnet"
type: enum
title: Subnet Type
description: Choose between private and public subnets
enum:
- "Private Subnet"
- "Public Subnet"
required: true
default: "Public Subnet"
subnet_display_name:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: string
required: true
title: Name
description: The name of the new Subnet
subnet_cidr_block:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: string
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])$"
required: true
title: CIDR Block
description: The CIDR of the new Subnet. The new subnet's CIDR should not overlap with any other subnet CIDRs.
subnet_id:
visible: #($network_strategy == "Use Existing VCN and Subnet")
eq:
- network_strategy
- "Use Existing VCN and Subnet"
type: oci:core:subnet:id
dependsOn:
vcnId: vcn_id
compartmentId: network_compartment_ocid
hidePublicSubnet:
eq:
- subnet_type
- "Private Subnet"
hidePrivateSubnet:
eq:
- subnet_type
- "Public Subnet"
default: ''
required: true
title: Existing Subnet
description: An existing Management subnet. This subnet must already be present in the chosen VCN.
subnet_dns_label:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: string
required: true
title: DNS Label
maxLenght: 15
description: Subnet DNS Label. Only letters and numbers, starting with a letter. 15 characters max.
######################################################
############## SECURITY VARIABLES #############
######################################################
nsg_configuration_strategy:
visible: true
type: enum
title: Network Security Group Configuration
description: Choose Network Security Rules Strategy
enum:
- "Use Recommended Configuration"
- "Customize Network Security Group"
required: true
default: "Use Recommended Configuration"
nsg_display_name:
type: string
required: false
title: Name
nsg_ssh_port:
type: number
required: false
default: 22
title: SSH Port Number
nsg_http_port:
type: number
required: false
default: 80
title: HTTP Port Number
nsg_https_port:
type: number
required: false
default: 443
title: HTTPS Port Number
nsg_source_cidr:
type: string
required: false
default: "0.0.0.0/0"
title: Allowed Ingress Traffic (CIDR Block)
#############################################
########### OUTPUT GROUPS ############
#############################################
outputGroups:
- title: "Connection Details"
outputs:
- instance_public_ip
- instance_private_ip
- server_url
#############################################
############## OUTPUTS ##############
#############################################
outputs:
vcn_cidr_block:
type: string
title: VCN CIDR
visible: false
instance_id:
type: ocid
visible: false
instance_public_ip:
type: link
title: Public IP
visible: #($subnet_type == "Public Subnet")
eq:
- subnet_type
- "Public Subnet"
instance_private_ip:
type: link
title: Private IP
visible: true