github.com/openshift/installer@v1.4.17/upi/azure/05_masters.json (about) 1 { 2 "$schema" : "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 "contentVersion" : "1.0.0.0", 4 "parameters" : { 5 "baseName" : { 6 "type" : "string", 7 "minLength" : 1, 8 "metadata" : { 9 "description" : "Base name to be used in resource names (usually the cluster's Infra ID)" 10 } 11 }, 12 "vnetBaseName": { 13 "type": "string", 14 "defaultValue": "", 15 "metadata" : { 16 "description" : "The specific customer vnet's base name (optional)" 17 } 18 }, 19 "masterIgnition" : { 20 "type" : "string", 21 "metadata" : { 22 "description" : "Ignition content for the master nodes" 23 } 24 }, 25 "numberOfMasters" : { 26 "type" : "int", 27 "defaultValue" : 3, 28 "minValue" : 2, 29 "maxValue" : 30, 30 "metadata" : { 31 "description" : "Number of OpenShift masters to deploy" 32 } 33 }, 34 "sshKeyData" : { 35 "type" : "securestring", 36 "defaultValue" : "Unused", 37 "metadata" : { 38 "description" : "Unused" 39 } 40 }, 41 "privateDNSZoneName" : { 42 "type" : "string", 43 "defaultValue" : "", 44 "metadata" : { 45 "description" : "unused" 46 } 47 }, 48 "masterVMSize" : { 49 "type" : "string", 50 "defaultValue" : "Standard_D8s_v3", 51 "metadata" : { 52 "description" : "The size of the Master Virtual Machines" 53 } 54 }, 55 "diskSizeGB" : { 56 "type" : "int", 57 "defaultValue" : 1024, 58 "metadata" : { 59 "description" : "Size of the Master VM OS disk, in GB" 60 } 61 }, 62 "hyperVGen": { 63 "type": "string", 64 "metadata": { 65 "description": "VM generation image to use" 66 }, 67 "defaultValue": "V2", 68 "allowedValues": [ 69 "V1", 70 "V2" 71 ] 72 } 73 }, 74 "variables" : { 75 "location" : "[resourceGroup().location]", 76 "virtualNetworkName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-vnet')]", 77 "virtualNetworkID" : "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", 78 "masterSubnetName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-master-subnet')]", 79 "masterSubnetRef" : "[concat(variables('virtualNetworkID'), '/subnets/', variables('masterSubnetName'))]", 80 "masterLoadBalancerName" : "[parameters('baseName')]", 81 "internalLoadBalancerName" : "[concat(parameters('baseName'), '-internal-lb')]", 82 "sshKeyPath" : "/home/core/.ssh/authorized_keys", 83 "identityName" : "[concat(parameters('baseName'), '-identity')]", 84 "galleryName": "[concat('gallery_', replace(parameters('baseName'), '-', '_'))]", 85 "imageName" : "[concat(parameters('baseName'), if(equals(parameters('hyperVGen'), 'V2'), '-gen2', ''))]", 86 "copy" : [ 87 { 88 "name" : "vmNames", 89 "count" : "[parameters('numberOfMasters')]", 90 "input" : "[concat(parameters('baseName'), '-master-', copyIndex('vmNames'))]" 91 } 92 ] 93 }, 94 "resources" : [ 95 { 96 "apiVersion" : "2018-06-01", 97 "type" : "Microsoft.Network/networkInterfaces", 98 "copy" : { 99 "name" : "nicCopy", 100 "count" : "[length(variables('vmNames'))]" 101 }, 102 "name" : "[concat(variables('vmNames')[copyIndex()], '-nic')]", 103 "location" : "[variables('location')]", 104 "properties" : { 105 "ipConfigurations" : [ 106 { 107 "name" : "pipConfig", 108 "properties" : { 109 "privateIPAllocationMethod" : "Dynamic", 110 "subnet" : { 111 "id" : "[variables('masterSubnetRef')]" 112 }, 113 "loadBalancerBackendAddressPools" : [ 114 { 115 "id" : "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', variables('masterLoadBalancerName'), '/backendAddressPools/', variables('masterLoadBalancerName'))]" 116 }, 117 { 118 "id" : "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', variables('internalLoadBalancerName'), '/backendAddressPools/internal-lb-backend')]" 119 } 120 ] 121 } 122 } 123 ] 124 } 125 }, 126 { 127 "apiVersion" : "2018-06-01", 128 "type" : "Microsoft.Compute/virtualMachines", 129 "copy" : { 130 "name" : "vmCopy", 131 "count" : "[length(variables('vmNames'))]" 132 }, 133 "name" : "[variables('vmNames')[copyIndex()]]", 134 "location" : "[variables('location')]", 135 "identity" : { 136 "type" : "userAssigned", 137 "userAssignedIdentities" : { 138 "[resourceID('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]" : {} 139 } 140 }, 141 "dependsOn" : [ 142 "[concat('Microsoft.Network/networkInterfaces/', concat(variables('vmNames')[copyIndex()], '-nic'))]" 143 ], 144 "properties" : { 145 "hardwareProfile" : { 146 "vmSize" : "[parameters('masterVMSize')]" 147 }, 148 "osProfile" : { 149 "computerName" : "[variables('vmNames')[copyIndex()]]", 150 "adminUsername" : "core", 151 "adminPassword" : "NotActuallyApplied!", 152 "customData" : "[parameters('masterIgnition')]", 153 "linuxConfiguration" : { 154 "disablePasswordAuthentication" : false 155 } 156 }, 157 "storageProfile" : { 158 "imageReference": { 159 "id": "[resourceId('Microsoft.Compute/galleries/images', variables('galleryName'), variables('imageName'))]" 160 }, 161 "osDisk" : { 162 "name": "[concat(variables('vmNames')[copyIndex()], '_OSDisk')]", 163 "osType" : "Linux", 164 "createOption" : "FromImage", 165 "caching": "ReadOnly", 166 "writeAcceleratorEnabled": false, 167 "managedDisk": { 168 "storageAccountType": "Premium_LRS" 169 }, 170 "diskSizeGB" : "[parameters('diskSizeGB')]" 171 } 172 }, 173 "networkProfile" : { 174 "networkInterfaces" : [ 175 { 176 "id" : "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmNames')[copyIndex()], '-nic'))]", 177 "properties": { 178 "primary": false 179 } 180 } 181 ] 182 } 183 } 184 } 185 ] 186 }