forked from apooniajjn/oci-arch-wordpress-mds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.yaml
executable file
·573 lines (518 loc) · 13.5 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
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
title: "Deploy WordPress CMS on OCI with MDS"
stackDescription: "Deploy WordPress CMS on OCI with MySQL Database Service"
schemaVersion: 1.2.0
version: "20201104"
locale: "en"
variableGroups:
- title: General Configuration
visible: false
variables:
- tenancy_ocid
- region
- release
- title: Required Configuration
visible: true
variables:
- compartment_ocid
- availablity_domain_name
- admin_password
- wp_password
- wp_site_admin_pass
- numberOfNodes
- show_advanced
- title: Load Balancer Configuration
visible:
and:
- show_advanced
variables:
- lb_shape
- flex_lb_min_shape
- flex_lb_max_shape
- title: Bastion Configuration
visible:
and:
- show_advanced
variables:
- use_bastion_service
- bastion_shape
- bastion_flex_shape_ocpus
- bastion_flex_shape_memory
- title: Network Optional Configuration
visible:
and:
- show_advanced
variables:
- vcn
- vcn_cidr
- title: Compute Optional Configuration
visible:
and:
- show_advanced
variables:
- ssh_public_key
- instance_os
- linux_os_version
- label_prefix
- node_shape
- node_flex_shape_ocpus
- node_flex_shape_memory
- title: File Storage Service Optional Configuration
visible:
and:
- show_advanced
variables:
- use_shared_storage
- title: WordPress Optional Configuration
visible:
and:
- show_advanced
variables:
- wp_site_admin_email
- wp_site_admin_user
- wp_plugins
- wp_themes
- wp_name
- wp_schema
- wp_site_url
- wp_site_title
- title: MDS Optional Configuration
visible:
and:
- show_advanced
variables:
- mysql_shape
- admin_username
- mysql_is_highly_available
variables:
show_advanced:
type: boolean
title: "Show advanced options?"
description: "Shows advanced options."
visible: true
default: false
compartment_ocid:
type: oci:identity:compartment:id
required: true
visibile: true
title: "Compartment"
description: "Compartment where your WordPress and MDS will be deployed."
region:
type: oci:identity:region:name
required: true
visibile: true
title: "Region"
description: "Choose Region where your WordPress and MDS will be deployed."
availablity_domain_name:
type: oci:identity:availabilitydomain:name
required: true
visibile: true
title: "Availability Domain to be chosen"
description: "Choose Availability Domain where your WordPress and MDS will be deployed."
dependsOn:
regionName: ${region}
compartmentId: ${compartment_ocid}
admin_password:
type: password
required: true
title: "MySQL Database System Admin User's Password"
description: "Choose password for MySQL Database System admin user."
pattern: "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?]).{8,32}$"
wp_password:
type: password
required: true
title: "MySQL Database System WordPress User's Password"
description: "Choose MySQL Database System Password for WordPress User."
pattern: "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?]).{8,32}$"
wp_site_title:
type: string
required: false
visible: true
title: "WordPress Site Title"
description: "Define WordPress Site Title"
wp_site_admin_user:
type: string
required: true
visible: true
default: "admin"
title: "WordPress Site Admin Username"
description: "Define WordPress Site Admin Username"
numberOfNodes:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 2
title: "How many WordPress Nodes?"
description: "Choose number of WordPress Nodes to be deployed (more then one will create LoadBalancer)."
use_bastion_service:
type: boolean
visible:
gt:
- numberOfNodes
- 1
default: false
required: false
title: "Use OCI Bastion Service"
description: "Check the box to use OCI Bastion Service instead of Bastion Host VM."
use_shared_storage:
type: boolean
visible:
gt:
- numberOfNodes
- 1
default: true
required: false
title: "Use OCI File Storage Service"
description: "Check the box to use OCI FSS for WordPress multinode setup (shared WP-CONTENT directory)."
bastion_shape:
type: oci:core:instanceshape:name
required: false
title: "BastionVM Shape"
description: "A shape is a template that determines the number of CPUs, amount of memory, and other resources allocated to a newly created instance."
default: "VM.Standard.E3.Flex"
visible:
and:
- gt:
- numberOfNodes
- 1
- eq:
- use_bastion_service
- false
dependsOn:
compartmentId: ${compartment_ocid}
bastion_flex_shape_ocpus:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 1
title: "BastionVM Flex Shape OCPUs"
description: "Choose number of OCPUs for Flex Shape."
visible:
and:
- gt:
- numberOfNodes
- 1
- eq:
- use_bastion_service
- false
- or:
- eq:
- bastion_shape
- "VM.Standard.E3.Flex"
- eq:
- bastion_shape
- "VM.Standard.E4.Flex"
- eq:
- bastion_shape
- "VM.Standard.A1.Flex"
- eq:
- bastion_shape
- "VM.Optimized3.Flex"
bastion_flex_shape_memory:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 1
title: "BastionVM Flex Shape Memory (GB)"
description: "Choose number GB for Flex Shape Memory."
visible:
and:
- gt:
- numberOfNodes
- 1
- eq:
- use_bastion_service
- false
- or:
- eq:
- bastion_shape
- "VM.Standard.E3.Flex"
- eq:
- bastion_shape
- "VM.Standard.E4.Flex"
- eq:
- bastion_shape
- "VM.Standard.A1.Flex"
- eq:
- bastion_shape
- "VM.Optimized3.Flex"
wp_site_admin_pass:
type: password
required: true
visible: true
title: "WordPress Site Admin Password"
description: "Define WordPress Site Admin Password"
wp_site_admin_email:
type: string
visible: true
required: true
default: "[email protected]"
title: "WordPress Site Admin Email"
description: "Define WordPress Site Admin E-mail"
vcn:
type: string
visible: false
required: true
title: "VCN name"
description: "Type VCN name where your WordPress and MDS will be deployed."
vcn_cidr:
type: string
visible: false
required: false
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: "VCN CIDR"
description: "Choose VCN CIDR for your WordPress and MDS deployments."
node_shape:
type: oci:core:instanceshape:name
required: false
title: "Wordpress node shape"
description: "Choose Instance Shape for WordPress host."
default: "VM.Standard.E3.Flex"
dependsOn:
compartmentId: ${compartment_ocid}
ssh_public_key:
type: oci:core:ssh:publickey
title: "Public SSH Key"
description: "Choose public SSH Key to be uploaded into compute instances."
required: false
instance_os:
type: enum
required: false
visible: false
title: "Instance OS"
description: "An Operating System that determines the operating system for WordPress host."
default: "Oracle Linux"
enum:
- "Oracle Linux"
node_flex_shape_ocpus:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 1
title: "Flex Shape OCPUs"
description: "Choose number of OCPUs for Flex Shape."
visible:
and:
- or:
- eq:
- node_shape
- "VM.Standard.E3.Flex"
- eq:
- node_shape
- "VM.Standard.E4.Flex"
- eq:
- node_shape
- "VM.Standard.A1.Flex"
- eq:
- node_shape
- "VM.Optimized3.Flex"
node_flex_shape_memory:
type: number
required: false
minimum: 1
maximum: 128
multipleOf: 1
default: 10
title: "Flex Shape Memory (GB)"
description: "Choose number GB for Flex Shape Memory."
visible:
and:
- or:
- eq:
- node_shape
- "VM.Standard.E3.Flex"
- eq:
- node_shape
- "VM.Standard.E4.Flex"
- eq:
- node_shape
- "VM.Standard.A1.Flex"
- eq:
- node_shape
- "VM.Optimized3.Flex"
linux_os_version:
type: enum
required: false
visible: false
title: "Instance OS version"
description: "An Operating System version that determines the operating system version for WordPress host."
default: "8"
enum:
- "8"
lb_shape:
type: enum
title: "LoadBalancer Shape"
description: "Choose LoadBalancer Shape"
default: "flexible"
required: false
enum:
- "flexible"
- "100Mbps"
- "10Mbps"
- "10Mbps-Micro"
- "400Mbps"
- "8000Mbps"
visible:
gt:
- numberOfNodes
- 1
flex_lb_min_shape:
type: enum
required: false
default: "10"
title: "LB Flex Min Shape"
description: "Choose Minimum Shape for Flex Load Balancer."
enum:
- "10"
- "100"
- "1000"
- "400"
- "8000"
visible:
and:
- eq:
- lb_shape
- "flexible"
- gt:
- numberOfNodes
- 1
flex_lb_max_shape:
type: enum
required: false
default: "100"
title: "LB Flex Max Shape"
description: "Choose Maximum Shape for Flex Load Balancer."
enum:
- "10"
- "100"
- "1000"
- "400"
- "8000"
visible:
and:
- eq:
- lb_shape
- "flexible"
- gt:
- numberOfNodes
- 1
mysql_shape:
type: enum
required: false
default: "MySQL.VM.Standard.E3.1.8GB"
title: "MySQL Database System Shape"
description: "Choose MySQL Database System Shape for your MDS deployments."
enum:
- "VM.Standard.E2.1"
- "VM.Standard.E2.2"
- "VM.Standard.E2.4"
- "VM.Standard.E2.8"
- "MySQL.VM.Standard.E3.1.8GB"
- "MySQL.VM.Standard.E3.1.16GB"
- "MySQL.VM.Standard.E3.2.32GB"
- "MySQL.VM.Standard.E3.4.64GB"
- "MySQL.VM.Standard.E3.8.128GB"
- "MySQL.VM.Standard.E3.16.256GB"
- "MySQL.VM.Standard.E3.24.384GB"
- "MySQL.VM.Standard.E3.32.512GB"
- "MySQL.VM.Standard.E3.48.768GB"
- "MySQL.VM.Standard.E3.64.1024GB"
- "MySQL.HeatWave.VM.Standard.E3"
mysql_is_highly_available:
type: boolean
title: "MySQL Database System in HA?"
description: "Choose if MySQL Database System should be highly available."
visible: true
default: false
label_prefix:
type: string
required: false
visible: false
title: "WordPress Hostname Prefix"
description: "Type WordPress Hostname Prefix."
admin_username:
type: string
required: false
title: "MySQL Admin Username"
description: "Type MySQL Database Service's admin username."
minLength: 1
maxLength: 14
pattern: "^[a-zA-Z][a-zA-Z0-9]+$"
wp_name:
type: string
required: false
title: "MySQL WordPress Username"
description: "Type MySQL Username for WordPress."
minLength: 2
maxLength: 14
pattern: "^[a-zA-Z][a-zA-Z0-9]+$"
wp_schema:
type: string
required: false
title: "MySQL WordPress Schema"
description: "Type MySQL Schema/Database for WordPress."
wp_plugins:
type: array
items:
type: string
pattern: "^[a-zA-Z0-9\\-]+$"
required: true
title: "WordPress Plugins"
default: ["hello-dolly","elementor"]
minItems: 1
uniqueItems: true
description: "Define WordPress Plugins to be installed with wp-cli (minimum 1 plugin)."
wp_themes:
type: array
items:
type: string
pattern: "^[a-zA-Z0-9\\-]+$"
required: true
title: "WordPress Themes"
default: ["lodestar", "twentysixteen"]
minItems: 1
uniqueItems: true
description: "Define WordPress Themes to be installed with wp-cli (minimum 1 theme)."
wp_site_url:
type: string
required: false
title: "WordPress Site URL"
description: "Define WordPress Site URL"
release:
type: string
required: false
visible: false
title: "Reference Architecture Release (OCI Architecture Center)"
outputs:
wordpress_wp-admin_url:
title: "WordPress CMS WP-Admin URL"
displayText: "WordPress CMS WP-Admin URL"
type: string
visible: true
wordpress_wp-admin_user:
title: "WordPress CMS WP-Admin User"
displayText: "WordPress CMS WP-Admin User"
type: string
visible: true
wordpress_wp-admin_password:
title: "WordPress CMS WP-Admin Password"
displayText: "WordPress CMS WP-Admin Password"
type: string
visible: true
wordpress_public_ip:
title: "WordPress CMS Public IP"
displayText: "WordPress CMS Public IP"
type: string
visible: true
mds_private_ip:
title: "MDS Private IP"
displayText: "MDS Private IP"
type: string
visible: true