elk-acs-kubernetes/createUiDefinition.json

817 строки
37 KiB
JSON

{
"$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": "userName",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "Controller Username",
"defaultValue": "",
"toolTip": "Username for accessing Kubernetes cluster and Kibana. Must be a valid Ubuntu username.",
"constraints": {
"required": true,
"regex": "^(?!(?:adm|admin|audio|backup|bin|cdrom|crontab|daemon|dialout|dip|disk|fax|floppy|fuse|games|gnats|irc|kmem|landscape|libuuid|list|lp|mail|man|messagebus|mlocate|netdev|news|nobody|nogroup|operator|plugdev|proxy|root|sasl|shadow|src|ssh|sshd|staff|sudo|sync|sys|syslog|tape|tty|users|utmp|uucp|video|voice|whoopsie|www\\-data)$)\\w+$",
"validationMessage": "Username must not be a reserved Ubuntu username."
},
"osPlatform": "Linux",
"visible": true
},
{
"name": "password",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Controller Password",
"confirmPassword": "Confirm Controller Password"
},
"toolTip": "Default password for accessing Kubernetes cluster and Kibana.",
"constraints": {
"required": true,
"regex": "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-\\.]).{12,}$",
"validationMessage": "Password must be at least 12 characters long and contain at least one lower case, upper case, digit and special character."
},
"visible": true
}
],
"steps": [
{
"name": "commonSettings",
"label": "Common Settings",
"subLabel": {
"preValidation": "Required",
"postValidation": "Done"
},
"bladeTitle": "Common Settings",
"elements": [
{
"name": "dnsNamePrefix",
"type": "Microsoft.Common.TextBox",
"label": "Dns prefix",
"defaultValue": "",
"toolTip": "Dns prefix for Controller and Kubernetes.",
"constraints": {
"required": true
},
"visible": true
},
{
"name": "registryUrl",
"type": "Microsoft.Common.TextBox",
"label": "Registry url",
"defaultValue": "",
"toolTip": "If you want to use a public registry service e.g. Docker Hub, put repository url here. Otherwise, leave it blank.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "eventHubNamespace",
"type": "Microsoft.Common.TextBox",
"label": "Event hub namespace",
"defaultValue": "undefined",
"toolTip": "Target event hub namespace. If you don't want to stream in event hub events, leave it as is.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "eventHubKeyName",
"type": "Microsoft.Common.TextBox",
"label": "Event hub key name",
"defaultValue": "undefined",
"toolTip": "Name of the shared access policy. If you don't want to stream in event hub events, leave it as is.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "eventHubKey",
"type": "Microsoft.Common.TextBox",
"label": "Event hub key value",
"defaultValue": "undefined",
"toolTip": "Shared access key. If you don't want to stream in event hub events, leave it as is.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "eventHubEntityPath",
"type": "Microsoft.Common.TextBox",
"label": "List of event hubs",
"defaultValue": "undefined",
"toolTip": "Comma seperated list of event hubs of the logstash plugin input stream. If you don't want to stream in event hub events, leave it as is.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "eventHubPartitionnumber",
"type": "Microsoft.Common.TextBox",
"label": "Event hub partition count",
"defaultValue": "4",
"toolTip": "Partition count of event hubs. If you don't want to stream in event hub events, leave it as is.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "eventHubThreadWaitSec",
"type": "Microsoft.Common.TextBox",
"label": "Thread wait interval(s)",
"defaultValue": "10",
"toolTip": "Logstash event hub plugin thread wait interval in seconds. If you don't want to stream in event hub events, leave it as is.",
"constraints": {
"required": false
},
"visible": true
},
{
"name": "storageAccountSku",
"type": "Microsoft.Common.DropDown",
"label": "Data node storage account sku",
"toolTip": "Storage account sku to be used as Elasticsearch data node.<br>For detailed information about storage account sku, refer to [Azure Storage Account Replication](https://docs.microsoft.com/en-us/azure/storage/storage-introduction#replication-for-durability-and-high-availability).",
"defaultValue": "Standard locally-redundant storage(Standard_LRS)",
"constraints": {
"required": true,
"allowedValues": [
{
"label": "Standard locally-redundant storage(Standard_LRS)",
"value": "Standard_LRS"
},
{
"label": "Premium locally-redundant storage(Premium_LRS)",
"value": "Premium_LRS"
}
]
}
},
{
"name": "authenticationMode",
"type": "Microsoft.Common.OptionsGroup",
"label": "Authentication Mode",
"defaultValue": "BasicAuth",
"toolTip": "Authentication mode for accessing Kubernetes dashboard.",
"constraints": {
"required": true,
"allowedValues": [
{
"label": "Basic Authentication",
"value": "BasicAuth"
},
{
"label": "Azure Active Directory",
"value": "AzureAD"
}
]
},
"visible": true
},
{
"name": "azureAdClientId",
"type": "Microsoft.Common.TextBox",
"label": "Azure AD client ID",
"defaultValue": "undefined",
"toolTip": "Azure AD client ID(Application ID). If deploying with BasicAuth, leave it as is.",
"constraints": {
"required": false
},
"visible": "[equals('AzureAD', steps('commonSettings').authenticationMode)]"
},
{
"name": "azureAdClientSecret",
"type": "Microsoft.Common.TextBox",
"label": "Azure AD client secret",
"defaultValue": "undefined",
"toolTip": "Azure AD client secret/key. If deploying with BasicAuth, leave it as is.",
"constraints": {
"required": false
},
"visible": "[equals('AzureAD', steps('commonSettings').authenticationMode)]"
},
{
"name": "tenant",
"type": "Microsoft.Common.TextBox",
"label": "Azure AD tenant",
"defaultValue": "undefined",
"toolTip": "Azure AD tenant(e.g. contoso.onmicrosoft.com). If deploying with BasicAuth, leave it as is.",
"constraints": {
"required": false
},
"visible": "[equals('AzureAD', steps('commonSettings').authenticationMode)]"
}
]
},
{
"name": "k8sSettings",
"label": "Kubernetes Cluster Settings",
"subLabel": {
"preValidation": "Required",
"postValidation": "Done"
},
"bladeTitle": "Kubernetes Cluster Settings",
"elements": [
{
"name": "agentCount",
"type": "Microsoft.Common.DropDown",
"label": "Agent Count",
"toolTip": "The number of agent nodes of Kubernetes cluster.",
"defaultValue": "1",
"constraints": {
"allowedValues": [
{
"label": "1",
"value": 1
},
{
"label": "2",
"value": 2
},
{
"label": "3",
"value": 3
},
{
"label": "4",
"value": 4
},
{
"label": "5",
"value": 5
},
{
"label": "6",
"value": 6
},
{
"label": "7",
"value": 7
},
{
"label": "8",
"value": 8
},
{
"label": "9",
"value": 9
},
{
"label": "10",
"value": 10
},
{
"label": "11",
"value": 11
},
{
"label": "12",
"value": 12
},
{
"label": "13",
"value": 13
},
{
"label": "14",
"value": 14
},
{
"label": "15",
"value": 15
},
{
"label": "16",
"value": 16
},
{
"label": "17",
"value": 17
},
{
"label": "18",
"value": 18
},
{
"label": "19",
"value": 19
},
{
"label": "20",
"value": 20
},
{
"label": "21",
"value": 21
},
{
"label": "22",
"value": 22
},
{
"label": "23",
"value": 23
},
{
"label": "24",
"value": 24
},
{
"label": "25",
"value": 25
},
{
"label": "26",
"value": 26
},
{
"label": "27",
"value": 27
},
{
"label": "28",
"value": 28
},
{
"label": "29",
"value": 29
},
{
"label": "30",
"value": 30
},
{
"label": "31",
"value": 31
},
{
"label": "32",
"value": 32
},
{
"label": "33",
"value": 33
},
{
"label": "34",
"value": 34
},
{
"label": "35",
"value": 35
},
{
"label": "36",
"value": 36
},
{
"label": "37",
"value": 37
},
{
"label": "38",
"value": 38
},
{
"label": "39",
"value": 39
},
{
"label": "40",
"value": 40
},
{
"label": "41",
"value": 41
},
{
"label": "42",
"value": 42
},
{
"label": "43",
"value": 43
},
{
"label": "44",
"value": 44
},
{
"label": "45",
"value": 45
},
{
"label": "46",
"value": 46
},
{
"label": "47",
"value": 47
},
{
"label": "48",
"value": 48
},
{
"label": "49",
"value": 49
},
{
"label": "50",
"value": 50
},
{
"label": "51",
"value": 51
},
{
"label": "52",
"value": 52
},
{
"label": "53",
"value": 53
},
{
"label": "54",
"value": 54
},
{
"label": "55",
"value": 55
},
{
"label": "56",
"value": 56
},
{
"label": "57",
"value": 57
},
{
"label": "58",
"value": 58
},
{
"label": "59",
"value": 59
},
{
"label": "60",
"value": 60
},
{
"label": "61",
"value": 61
},
{
"label": "62",
"value": 62
},
{
"label": "63",
"value": 63
},
{
"label": "64",
"value": 64
},
{
"label": "65",
"value": 65
},
{
"label": "66",
"value": 66
},
{
"label": "67",
"value": 67
},
{
"label": "68",
"value": 68
},
{
"label": "69",
"value": 69
},
{
"label": "70",
"value": 70
},
{
"label": "71",
"value": 71
},
{
"label": "72",
"value": 72
},
{
"label": "73",
"value": 73
},
{
"label": "74",
"value": 74
},
{
"label": "75",
"value": 75
},
{
"label": "76",
"value": 76
},
{
"label": "77",
"value": 77
},
{
"label": "78",
"value": 78
},
{
"label": "79",
"value": 79
},
{
"label": "80",
"value": 80
},
{
"label": "81",
"value": 81
},
{
"label": "82",
"value": 82
},
{
"label": "83",
"value": 83
},
{
"label": "84",
"value": 84
},
{
"label": "85",
"value": 85
},
{
"label": "86",
"value": 86
},
{
"label": "87",
"value": 87
},
{
"label": "88",
"value": 88
},
{
"label": "89",
"value": 89
},
{
"label": "90",
"value": 90
},
{
"label": "91",
"value": 91
},
{
"label": "92",
"value": 92
},
{
"label": "93",
"value": 93
},
{
"label": "94",
"value": 94
},
{
"label": "95",
"value": 95
},
{
"label": "96",
"value": 96
},
{
"label": "97",
"value": 97
},
{
"label": "98",
"value": 98
},
{
"label": "99",
"value": 99
},
{
"label": "100",
"value": 100
}
]
},
"visible": true
},
{
"name": "agentVMSize",
"type": "Microsoft.Compute.SizeSelector",
"label": "Agent Node Size",
"toolTip": "VM size of agent node.",
"recommendedSizes": [
"Standard_DS2_v2",
"Standard_DS3_v2"
],
"constraints": {
"allowedSizes": [
"Standard_A0",
"Standard_A1",
"Standard_A2",
"Standard_A3",
"Standard_A4",
"Standard_A1_v2",
"Standard_A2_v2",
"Standard_A4_v2",
"Standard_A8_v2",
"Standard_A2m_v2",
"Standard_A4m_v2",
"Standard_A8m_v2",
"Standard_D2",
"Standard_D3",
"Standard_D4",
"Standard_D11",
"Standard_D12",
"Standard_D13",
"Standard_D14",
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_D11_v2",
"Standard_D12_v2",
"Standard_D13_v2",
"Standard_D14_v2",
"Standard_DS2",
"Standard_DS3",
"Standard_DS4",
"Standard_DS11",
"Standard_DS12",
"Standard_DS13",
"Standard_DS14",
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_DS11_v2",
"Standard_DS12_v2",
"Standard_DS13_v2",
"Standard_DS14_v2",
"Standard_G1",
"Standard_G2",
"Standard_G3",
"Standard_G4",
"Standard_G5",
"Standard_GS1",
"Standard_GS2",
"Standard_GS3",
"Standard_GS4",
"Standard_GS5"
]
},
"osPlatform": "Linux",
"count": "[steps('k8sSettings').agentCount]",
"visible": true
},
{
"name": "masterCount",
"type": "Microsoft.Common.DropDown",
"label": "Master Count",
"toolTip": "The number of master nodes of Kubernetes cluster. This value can only be 1, 3 or 5.",
"defaultValue": "1",
"constraints": {
"allowedValues": [
{
"label": "1",
"value": 1
},
{
"label": "3",
"value": 3
},
{
"label": "5",
"value": 5
}
]
},
"visible": true
}
]
},
{
"name": "securitySettings",
"label": "Security Settings",
"subLabel": {
"preValidation": "Required",
"postValidation": "Done"
},
"bladeTitle": "Security Settings",
"elements": [
{
"name": "sshRSAPublicKey",
"osPlatform": "Linux",
"label": {
"authenticationType": "",
"password": "",
"confirmPassword": "",
"sshPublicKey": "SSH public key"
},
"toolTip": {
"sshPublicKey": "SSH public key for Controller communicating with Kubernetes cluster. <br>[Generating SSH key pair online](https://microsoft.github.io/elk-acs-kubernetes/)."
},
"type": "Microsoft.Compute.CredentialsCombo",
"constraints": {
"required": true
},
"options": {
"hidePassword": true
},
"visible": true
},
{
"name": "privateKey",
"type": "Microsoft.Common.TextBox",
"label": "Base64 encoded SSH private key",
"toolTip": "SSH private key for Controller communicating with Kubernetes cluster. The key must be base64 encoded. <br>[Generating SSH key pair online](https://microsoft.github.io/elk-acs-kubernetes/).",
"constraints": {
"required": true
},
"visible": true
},
{
"name": "servicePrincipalClientId",
"type": "Microsoft.Common.TextBox",
"label": "Service principal client ID",
"toolTip": "The Client ID of service principal object for accessing Azure resources. <br>[Creating a Service Principal](https://go.microsoft.com/fwlink/?linkid=834427).",
"constraints": {
"required": true
},
"visible": true
},
{
"name": "servicePrincipalClientSecret",
"type": "Microsoft.Common.TextBox",
"label": "Service principal client secret",
"toolTip": "The Client Secret of the service principal object for accessing Azure resources. <br>[Creating a Service Principal](https://go.microsoft.com/fwlink/?linkid=834427).",
"constraints": {
"required": true
},
"visible": true
}
]
}
],
"outputs": {
"dnsNamePrefix": "[steps('commonSettings').dnsNamePrefix]",
"registryUrl": "[steps('commonSettings').registryUrl]",
"eventHubNamespace": "[steps('commonSettings').eventHubNamespace]",
"eventHubKeyName": "[steps('commonSettings').eventHubKeyName]",
"eventHubKey": "[steps('commonSettings').eventHubKey]",
"eventHubEntityPath": "[steps('commonSettings').eventHubEntityPath]",
"eventHubPartitionnumber": "[steps('commonSettings').eventHubPartitionnumber]",
"eventHubThreadWaitSec": "[steps('commonSettings').eventHubThreadWaitSec]",
"storageAccountSku": "[steps('commonSettings').storageAccountSku]",
"authenticationMode": "[steps('commonSettings').authenticationMode]",
"azureAdClientId": "[steps('commonSettings').azureAdClientId]",
"azureAdClientSecret": "[steps('commonSettings').azureAdClientSecret]",
"tenant": "[steps('commonSettings').tenant]",
"agentCount": "[steps('k8sSettings').agentCount]",
"agentVMSize": "[steps('k8sSettings').agentVMSize]",
"linuxAdminUsername": "[basics('userName')]",
"masterCount": "[steps('k8sSettings').masterCount]",
"sshRSAPublicKey": "[steps('securitySettings').sshRSAPublicKey.sshPublicKey]",
"privateKey": "[steps('securitySettings').privateKey]",
"servicePrincipalClientId": "[steps('securitySettings').servicePrincipalClientId]",
"servicePrincipalClientSecret": "[steps('securitySettings').servicePrincipalClientSecret]",
"adminPassword": "[basics('password')]",
"location": "[location()]"
}
}
}