Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save russellseymour/8e128bc244b075b79247e89b9875dca1 to your computer and use it in GitHub Desktop.
Save russellseymour/8e128bc244b075b79247e89b9875dca1 to your computer and use it in GitHub Desktop.
{
"handler": "Microsoft.Compute.MultiVm",
"version": "0.0.1-preview",
"parameters": {
"basics": [
{
"name": "Name",
"type": "Microsoft.Common.TextBox",
"label": "Virtual Machine name",
"toolTip": "The name of the Virtual Machine.",
"constraints": {
"required": true
}
},
{
"name": "adminUsername",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "Username",
"toolTip": "Admin username for the machine",
"osPlatform": "Linux",
"defaultValue": "azure",
"constraints": {
"required": true
}
},
{
"name": "SSHCredentials",
"type": "Microsoft.Compute.CredentialsCombo",
"label": {
"authenticationType": "Authentication type",
"password": "Password",
"confirmPassword": "Confirm password",
"sshPublicKey": "SSH public key"
},
"toolTip": {
"authenticationType": "Authentication Type for the Linux Virtual Machine",
"password": "Password for the Virtual Machine",
"sshPublicKey": "SSH Public Key for the Virtual Machine"
},
"constraints": {
"required": true
},
"options": {
"hideConfirmation": false
},
"osPlatform": "Linux"
}
],
"steps": [
{
"name": "VirtualMachineConfig",
"label": "Virtual machine settings",
"subLabel": {
"preValidation": "Configure the Chef Server virtual machine",
"postValidation": "Done"
},
"bladeTitle": "Virtual machine settings",
"elements": [
{
"name": "Size",
"type": "Microsoft.Compute.SizeSelector",
"label": "Virtual machine size",
"toolTip": "The size of virtual machine to provision.",
"recommendedSizes": [
"Standard_A3",
"Standard_A4",
"Standard_D4"
],
"constraints": {
"allowedSizes": [
"Standard_A3",
"Standard_A4",
"Standard_D2",
"Standard_D3",
"Standard_D4",
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2"
],
"required": true
},
"osPlatform": "Linux",
"count": "1"
},
{
"name": "storageAccount",
"type": "Microsoft.Storage.StorageAccountSelector",
"label": "Storage account",
"toolTip": "Storage Account for the Virtual Machine's Disks",
"defaultValue": {
"type": "Standard_LRS",
"name": "[take(replace(guid(), '-', ''), 15)]"
},
"constraints": {
"allowedTypes": [
"Standard_LRS",
"Standard_GRS",
"Premium_LRS"
],
"required": true
}
},
{
"name": "publicIpAddress",
"type": "Microsoft.Network.PublicIpAddressCombo",
"label": {
"publicIpAddress": "Public IP address",
"domainNameLabel": "DNS label"
},
"toolTip": {
"domainNameLabel": "DNS label for the Virtual Machine's public IP address."
},
"defaultValue": {
"publicIpAddressName": "ChefServerPublicIPAddress",
"domainNameLabel": "[basics('Name')]"
},
"options": {
"hideNone": true
}
},
{
"name": "virtualNetwork",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual network",
"subnets": "Subnets"
},
"toolTip": {
"virtualNetwork": "Virtual Network Name",
"subnets": "Subnets requied for the Chef Server solution"
},
"defaultValue": {
"name": "vnet01",
"addressPrefixSize": "/22"
},
"constraints": {
"minAddressPrefixSize": "/22"
},
"subnets": {
"subnet1": {
"label": "Chef subnet",
"defaultValue": {
"name": "chefserver-subnet",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 12,
"requireContiguousAddresses": false
}
}
}
}
]
},
{
"name": "ChefServerSetup",
"label": "Chef Server Setup",
"subLabel": {
"preValidation": "Specify Licence",
"postValidation": "Delightful"
},
"bladeTitle": "Chef Server Licence",
"elements": [
{
"name": "SKU",
"type": "Microsoft.Common.DropDown",
"label": "Chef Server Licence",
"toolTip": "Chef Server licence to use",
"defaultValue": "25 Nodes with support",
"constraints": {
"allowedValues": [
{
"label": "Bring Your Own Licence",
"value": "chefbyol"
},
{
"label": "25 Nodes with support",
"value": "azure_marketplace-25"
},
{
"label": "50 Nodes with support",
"value": "azure_marketplace-50"
},
{
"label": "100 Nodes with support",
"value": "azure_marketplace-100"
},
{
"label": "150 Nodes with support",
"value": "azure_marketplace-150"
},
{
"label": "200 Nodes with support",
"value": "azure_marketplace-200"
},
{
"label": "250 Nodes with support",
"value": "azure_marketplace-250"
}
],
"required": true
},
"osPlatform": "Linux",
"count": 1
},
{
"name": "chefServerSignupDisable",
"type": "Microsoft.Common.OptionsGroup",
"label": "Disable Signup",
"defaultValue": "No",
"toolTip": "By default the Chef Server allows people to sign up from the Management Console. Select 'Yes' to disable this",
"constraints": {
"allowedValues": [
{
"label": "No",
"value": "false"
},
{
"label": "Yes",
"value": "true"
}
]
},
"visible": true
},
{
"name": "configurechef",
"type": "Microsoft.Common.OptionsGroup",
"label": "Configure Chef Server",
"defaultValue": "No",
"toolTip": "Select 'Yes' and then complete the form below if the Chef Server should be configured automatically",
"constraints": {
"allowedValues": [
{
"label": "No",
"value": "no"
},
{
"label": "Yes",
"value": "yes"
}
]
},
"visible": true
}
]
},
{
"name": "ChefServerConfiguration",
"label": "Chef Server Configuration",
"subLabel": {
"preValidation": "Create Organization and Initial User",
"postValidation": "Perfect"
},
"bladeTitle": "Chef Server Configuration",
"elements": [
{
"name": "chefServerOrg",
"type": "Microsoft.Common.TextBox",
"label": "Organization",
"toolTip": "Name of the initial organization to create on the Chef Server",
"visible": true,
"constraints": {
"required": "[contains(steps('ChefServerSetup').configurechef, 'yes')]"
}
},
{
"name": "chefServerFirstName",
"type": "Microsoft.Common.TextBox",
"label": "First Name",
"toolTip": "User first name",
"visible": true,
"constraints": {
"required": "[contains(steps('ChefServerSetup').configurechef, 'yes')]"
}
},
{
"name": "chefServerLastName",
"type": "Microsoft.Common.TextBox",
"label": "Last Name",
"toolTip": "User last name",
"visible": true,
"constraints": {
"required": "[contains(steps('ChefServerSetup').configurechef, 'yes')]"
}
},
{
"name": "chefServerEmailAddress",
"type": "Microsoft.Common.TextBox",
"label": "Email Address",
"toolTip": "Email address for the initial user",
"visible": true,
"constraints": {
"required": "[contains(steps('ChefServerSetup').configurechef, 'yes')]"
}
},
{
"name": "chefServerUser",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "Console User",
"toolTip": "Initial user to create for access to the Chef Server Management console",
"osPlatform": "Linux",
"constraints": {
"required": "[contains(steps('ChefServerSetup').configurechef, 'yes')]"
},
"defaultValue": "chefadmin"
},
{
"name": "chefServerUserPassword",
"type": "Microsoft.Common.PasswordBox",
"label": {
"password": "Password",
"confirmPassword": "Confirm Password"
},
"toolTip": "Password for the chef server user",
"options": {
"hideConfirmation": false
},
"visible": true,
"constraints": {
"required": "[contains(steps('ChefServerSetup').configurechef, 'yes')]"
}
}
]
}
],
"outputs": {
"vmName": "[basics('Name')]",
"adminUsername": "[basics('adminUsername')]",
"adminPassword": "[basics('SSHCredentials').password]",
"sshPublicKey": "[basics('SSHCredentials').sshPublicKey]",
"authenticationType" : "[basics('SSHCredentials').authenticationType]",
"vmSize": "[steps('VirtualMachineConfig').Size]",
"location": "[location()]",
"resourceGroupName": "[steps('VirtualMachineConfig').storageAccount.resourceGroup]",
"storageAccountName": "[steps('VirtualMachineConfig').storageAccount.name]",
"storageAccountType": "[steps('VirtualMachineConfig').storageAccount.type]",
"storageAccountNewOrExisting" : "[steps('VirtualMachineConfig').storageAccount.newOrExisting]",
"publicIPAddressName" : "[steps('VirtualMachineConfig').publicIpAddress.name]",
"publicIPDnsName" : "[steps('VirtualMachineConfig').publicIpAddress.domainNameLabel]",
"publicIPNewOrExisting" : "[steps('VirtualMachineConfig').publicIpAddress.newOrExistingOrNone]",
"virtualNetworkName" : "[steps('VirtualMachineConfig').virtualNetwork.name]",
"virtualNetworkAddressPrefix" : "[steps('VirtualMachineConfig').virtualNetwork.addressPrefix]",
"virtualNetworkNewOrExisting": "[steps('VirtualMachineConfig').virtualNetwork.newOrExisting]",
"subnetName" : "[steps('VirtualMachineConfig').virtualNetwork.subnets.subnet1.name]",
"subnetPrefix" : "[steps('VirtualMachineConfig').virtualNetwork.subnets.subnet1.addressPrefix]",
"chefServerSku" : "[steps('ChefServerSetup').SKU]",
"chefServerSignupDisable": "[steps('ChefServerSetup').chefServerSignupDisable]",
"chefServerConfigure": "[steps('ChefServerSetup').configurechef]",
"chefServerOrg": "[steps('ChefServerConfiguration').chefServerOrg]",
"chefServerFirstName": "[steps('ChefServerConfiguration').chefServerFirstName]",
"chefServerLastName": "[steps('ChefServerConfiguration').chefServerLastName]",
"chefServerEmailAddress": "[steps('ChefServerConfiguration').chefServerEmailAddress]",
"chefServerUser": "[steps('ChefServerConfiguration').chefServerUser]",
"chefServerUserPassword": "[steps('ChefServerConfiguration').chefServerUserPassword]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment