forked from haroldwongms/amp-openshift-container-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
createUiDefinition.json
354 lines (354 loc) · 10.9 KB
/
createUiDefinition.json
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
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Compute.MultiVm",
"version": "0.1.2-preview",
"parameters": {
"basics": [{
"name": "adminUsername",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "VM Admin User Name",
"defaultValue": "clusteradmin",
"toolTip": "The name of the Admin User for initial SSH access to all OCP Nodes.",
"constraints": {
"required": true
},
"osPlatform": "Linux"
}, {
"name": "adminPassword",
"type": "Microsoft.Compute.CredentialsCombo",
"label": {
"authenticationType": "Authentication Type",
"password": "Password",
"confirmPassword": "Confirm password",
"sshPublicKey": "SSH Public Key for VM Admin User"
},
"toolTip": {
"authenticationType": "Authentication type",
"password": "Password",
"sshPublicKey": "SSH Public Key for the VM Admin User. Corresponds to the Private Key in the Key Vault that was configured as part of the pre-work."
},
"constraints": {
"required": true
},
"options": {
"hideConfirmation": false,
"hidePassword": true
},
"osPlatform": "Linux"
}],
"steps": [{
"name": "infrastructureSettings",
"label": "Infrastructure Settings",
"subLabel": {
"preValidation": "Configure Infrastructure Settings",
"postValidation": "Done"
},
"bladeTitle": "Infrastructure Settings",
"elements": [{
"name": "openshiftClusterPrefix",
"type": "Microsoft.Common.TextBox",
"label": "OCP Cluster Name Prefix",
"defaultValue": "ocpcluster",
"toolTip": "The Prefix for the name of the OCP Nodes. Must be between 1 and 20 characters.",
"constraints": {
"required": true,
"regex": "^[a-z0-9A-Z]{1,20}$",
"validationMessage": "Only alphanumeric characters are allowed, and the value must be 1-20 characters long."
}
}, {
"name": "clusterSize",
"type": "Microsoft.Common.OptionsGroup",
"label": "OpenShift Cluster Size",
"defaultValue": "Medium",
"toolTip": "The size of Cluster to deploy - Small, Medium or Large.",
"constraints": {
"allowedValues": [
{
"label": "Small",
"value": "small"
},
{
"label": "Medium",
"value": "medium"
},
{
"label": "Large",
"value": "large"
}
]
},
"visible": true
}, {
"name": "clusterSizeSmall",
"type": "Microsoft.Common.OptionsGroup",
"label": "Small Cluster Configuration",
"defaultValue": "",
"toolTip": "For display purposes only",
"constraints": {
"allowedValues": [
{
"label": "1 Bastion Node of size Standard DS2v2",
"value": "bastion"
},
{
"label": "1 Master Node of size Standard DS2v2",
"value": "master"
},
{
"label": "1 Infra Node of size Standard DS2v2",
"value": "infra"
},
{
"label": "2 App Node of size Standard DS2v2",
"value": "node"
},
{
"label": "128 GB Data Disk for Docker Volume per VM",
"value": "disk"
},
{
"label": "Total Cores Required: 10",
"value": "cores"
}
]
},
"visible": "[equals(steps('infrastructureSettings').clusterSize, 'small')]"
}, {
"name": "clusterSizeMedium",
"type": "Microsoft.Common.OptionsGroup",
"label": "Medium Cluster Configuration",
"defaultValue": "",
"toolTip": "For display purposes only",
"constraints": {
"allowedValues": [
{
"label": "1 Bastion Node of size Standard DS2v2",
"value": "bastion"
},
{
"label": "3 Master Nodes of size Standard DS3v2",
"value": "master"
},
{
"label": "2 Infra Nodes of size Standard DS3v2",
"value": "infra"
},
{
"label": "4 App Nodes of size Standard DS3v2",
"value": "node"
},
{
"label": "256 GB Data Disk for Docker Volume per VM",
"value": "disk"
},
{
"label": "Total Cores Required: 38",
"value": "cores"
}
]
},
"visible": "[equals(steps('infrastructureSettings').clusterSize, 'medium')]"
}, {
"name": "clusterSizeLarge",
"type": "Microsoft.Common.OptionsGroup",
"label": "Large Cluster Configuration",
"defaultValue": "",
"toolTip": "For display purposes only",
"constraints": {
"allowedValues": [
{
"label": "1 Bastion Node of size Standard DS2v2",
"value": "bastion"
},
{
"label": "3 Master Nodes of size Standard DS3v2",
"value": "master"
},
{
"label": "2 Infra Nodes of size Standard DS3v2",
"value": "infra"
},
{
"label": "6 App Nodes of size Standard DS4v2",
"value": "node"
},
{
"label": "512 GB Data Disk for Docker Volume",
"value": "disk"
},
{
"label": "Total Cores Required: 70",
"value": "cores"
}
]
},
"visible": "[equals(steps('infrastructureSettings').clusterSize, 'large')]"
}, {
"name": "keyVaultResourceGroup",
"type": "Microsoft.Common.TextBox",
"label": "Key Vault Resource Group Name",
"toolTip": "Name of the Resource Group that contains the Key Vault used to store the Private Key.",
"constraints": {
"required": true
}
}, {
"name": "keyVaultName",
"type": "Microsoft.Common.TextBox",
"label": "Key Vault Name",
"toolTip": "Name of the Key Vault that contains the Secret used to store the Private Key.",
"constraints": {
"required": true
}
}, {
"name": "keyVaultSecret",
"type": "Microsoft.Common.TextBox",
"label": "Secret Name",
"toolTip": "Name of the Secret that contains the Private Key.",
"constraints": {
"required": true
}
}]
}, {
"name": "openShiftSettings",
"label": "OpenShift Container Platform Settings",
"subLabel": {
"preValidation": "Configure OpenShift Container Platform Settings",
"postValidation": "Done"
},
"bladeTitle": "OpenShift Container Platform Settings",
"elements": [{
"name": "openshiftPassword",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "OpenShift Admin User Password",
"confirmPassword": "Confirm OpenShift Admin User Password"
},
"toolTip": "Password for the OpenShift Admin User - not the VM Admin User.",
"constraints": {
"required": true
},
"options": {
"hideConfirmation": false
}
}, {
"name": "rhsmUsername",
"type": "Microsoft.Common.TextBox",
"label": "Red Hat Subscription Manager User Name",
"toolTip": "User Name to access your Red Hat Subscription - access.redhat.com. This is used to register the RHEL instance to your subscription and will not be stored by Microsoft or Red Hat.",
"constraints": {
"required": true
}
}, {
"name": "rhsmPassword",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Red Hat Subscription Manager User Password",
"confirmPassword": "Confirm Password"
},
"toolTip": "Password to access your Red Hat Subscription - access.redhat.com. This is used to register the RHEL instance to your subscription and will not be stored by Microsoft or Red Hat.",
"constraints": {
"required": true
},
"options": {
"hideConfirmation": true
}
}, {
"name": "rhsmPoolId",
"type": "Microsoft.Common.TextBox",
"label": "Red Hat Subscription Manager Pool ID",
"toolTip": "The Pool ID that contains OpenShift Container Platform entitlement. Ensure you have enough entitlements of OpenShift Container Platform for the installation of the cluster.",
"constraints": {
"required": true
}
}, {
"name": "enableAzure",
"type": "Microsoft.Common.OptionsGroup",
"label": "Configure Azure Cloud Provider",
"defaultValue": "No",
"toolTip": "Configure OpenShift to use Azure Cloud Provider. Necessary if using Azure disk attach for persistent volumes.",
"constraints": {
"allowedValues": [
{
"label": "Yes",
"value": "true"
},
{
"label": "No",
"value": "false"
}
]
},
"visible": "[not(equals(steps('infrastructureSettings').clusterSize, 'small'))]"
}, {
"name": "aadClientId",
"type": "Microsoft.Common.TextBox",
"label": "Azure AD Service Principal Client ID GUID",
"toolTip": "Azure AD Service Principal Client ID GUID - also known as AppID.",
"constraints": {
"required": true,
"regex": "^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$"
},
"visible": "[equals(steps('openShiftSettings').enableAzure, 'true')]"
}, {
"name": "aadClientSecret",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Azure AD Service Principal Client ID Secret",
"confirmPassword": "Confirm Password"
},
"toolTip": "Azure AD Service Principal Client ID Secret.",
"constraints": {
"required": true
},
"options": {
"hideConfirmation": true
},
"visible": "[equals(steps('openShiftSettings').enableAzure, 'true')]"
}, {
"name": "defaultSubDomainType",
"type": "Microsoft.Common.DropDown",
"label": "Default Router Subdomain",
"toolTip": "Select xipio for testing or custom to enter your own subdomain for production.",
"defaultValue": "nipio",
"constraints": {
"allowedValues": [{
"label": "nipio",
"value": "nipio"
}, {
"label": "custom",
"value": "custom"
}]
}
}, {
"name": "defaultSubDomain",
"type": "Microsoft.Common.TextBox",
"label": "Enter your custom subdomain",
"toolTip": "The custom subdomain to expose applications.",
"constraints": {
"regex": "^([A-z0-9]+(-[A-z0-9]+)*\\.)+[a-z]{2,}$",
"required": true
},
"visible": "[equals(steps('openShiftSettings').defaultSubDomainType, 'custom')]"
}]
}],
"outputs": {
"location": "[location()]",
"sshPublicKey": "[basics('adminPassword').sshPublicKey]",
"clusterSize": "[steps('infrastructureSettings').clusterSize]",
"openshiftClusterPrefix": "[steps('infrastructureSettings').openshiftClusterPrefix]",
"adminUsername": "[basics('adminUsername')]",
"openshiftPassword": "[steps('openShiftSettings').openshiftPassword]",
"rhsmUsername": "[steps('openShiftSettings').rhsmUsername]",
"rhsmPassword": "[steps('openShiftSettings').rhsmPassword]",
"rhsmPoolId": "[steps('openShiftSettings').rhsmPoolId]",
"keyVaultResourceGroup": "[steps('infrastructureSettings').keyVaultResourceGroup]",
"keyVaultName": "[steps('infrastructureSettings').keyVaultName]",
"keyVaultSecret": "[steps('infrastructureSettings').keyVaultSecret]",
"enableAzure": "[steps('openShiftSettings').enableAzure]",
"aadClientId": "[steps('openShiftSettings').aadClientId]",
"aadClientSecret": "[steps('openShiftSettings').aadClientSecret]",
"defaultSubDomainType": "[steps('openShiftSettings').defaultSubDomainType]",
"defaultSubDomain": "[steps('openShiftSettings').defaultSubDomain]"
}
}
}