github.com/openshift/installer@v1.4.17/upi/azure/04_bootstrap.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 "bootstrapIgnition" : { 20 "type" : "string", 21 "minLength" : 1, 22 "metadata" : { 23 "description" : "Bootstrap ignition content for the bootstrap cluster" 24 } 25 }, 26 "sshKeyData" : { 27 "type" : "securestring", 28 "defaultValue" : "Unused", 29 "metadata" : { 30 "description" : "Unused" 31 } 32 }, 33 "bootstrapVMSize" : { 34 "type" : "string", 35 "defaultValue" : "Standard_D4s_v3", 36 "metadata" : { 37 "description" : "The size of the Bootstrap Virtual Machine" 38 } 39 }, 40 "hyperVGen": { 41 "type": "string", 42 "metadata": { 43 "description": "VM generation image to use" 44 }, 45 "defaultValue": "V2", 46 "allowedValues": [ 47 "V1", 48 "V2" 49 ] 50 } 51 }, 52 "variables" : { 53 "location" : "[resourceGroup().location]", 54 "virtualNetworkName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-vnet')]", 55 "virtualNetworkID" : "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", 56 "masterSubnetName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-master-subnet')]", 57 "masterSubnetRef" : "[concat(variables('virtualNetworkID'), '/subnets/', variables('masterSubnetName'))]", 58 "masterLoadBalancerName" : "[parameters('baseName')]", 59 "internalLoadBalancerName" : "[concat(parameters('baseName'), '-internal-lb')]", 60 "sshKeyPath" : "/home/core/.ssh/authorized_keys", 61 "identityName" : "[concat(parameters('baseName'), '-identity')]", 62 "vmName" : "[concat(parameters('baseName'), '-bootstrap')]", 63 "nicName" : "[concat(variables('vmName'), '-nic')]", 64 "galleryName": "[concat('gallery_', replace(parameters('baseName'), '-', '_'))]", 65 "imageName" : "[concat(parameters('baseName'), if(equals(parameters('hyperVGen'), 'V2'), '-gen2', ''))]", 66 "clusterNsgName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-nsg')]", 67 "sshPublicIpAddressName" : "[concat(variables('vmName'), '-ssh-pip')]" 68 }, 69 "resources" : [ 70 { 71 "apiVersion" : "2018-12-01", 72 "type" : "Microsoft.Network/publicIPAddresses", 73 "name" : "[variables('sshPublicIpAddressName')]", 74 "location" : "[variables('location')]", 75 "sku": { 76 "name": "Standard" 77 }, 78 "properties" : { 79 "publicIPAllocationMethod" : "Static", 80 "dnsSettings" : { 81 "domainNameLabel" : "[variables('sshPublicIpAddressName')]" 82 } 83 } 84 }, 85 { 86 "apiVersion" : "2018-06-01", 87 "type" : "Microsoft.Network/networkInterfaces", 88 "name" : "[variables('nicName')]", 89 "location" : "[variables('location')]", 90 "dependsOn" : [ 91 "[resourceId('Microsoft.Network/publicIPAddresses', variables('sshPublicIpAddressName'))]" 92 ], 93 "properties" : { 94 "ipConfigurations" : [ 95 { 96 "name" : "pipConfig", 97 "properties" : { 98 "privateIPAllocationMethod" : "Dynamic", 99 "publicIPAddress": { 100 "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('sshPublicIpAddressName'))]" 101 }, 102 "subnet" : { 103 "id" : "[variables('masterSubnetRef')]" 104 }, 105 "loadBalancerBackendAddressPools" : [ 106 { 107 "id" : "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', variables('masterLoadBalancerName'), '/backendAddressPools/', variables('masterLoadBalancerName'))]" 108 }, 109 { 110 "id" : "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', variables('internalLoadBalancerName'), '/backendAddressPools/internal-lb-backend')]" 111 } 112 ] 113 } 114 } 115 ] 116 } 117 }, 118 { 119 "apiVersion" : "2018-06-01", 120 "type" : "Microsoft.Compute/virtualMachines", 121 "name" : "[variables('vmName')]", 122 "location" : "[variables('location')]", 123 "identity" : { 124 "type" : "userAssigned", 125 "userAssignedIdentities" : { 126 "[resourceID('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]" : {} 127 } 128 }, 129 "dependsOn" : [ 130 "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" 131 ], 132 "properties" : { 133 "hardwareProfile" : { 134 "vmSize" : "[parameters('bootstrapVMSize')]" 135 }, 136 "osProfile" : { 137 "computerName" : "[variables('vmName')]", 138 "adminUsername" : "core", 139 "adminPassword" : "NotActuallyApplied!", 140 "customData" : "[parameters('bootstrapIgnition')]", 141 "linuxConfiguration" : { 142 "disablePasswordAuthentication" : false 143 } 144 }, 145 "storageProfile" : { 146 "imageReference": { 147 "id": "[resourceId('Microsoft.Compute/galleries/images', variables('galleryName'), variables('imageName'))]" 148 }, 149 "osDisk" : { 150 "name": "[concat(variables('vmName'),'_OSDisk')]", 151 "osType" : "Linux", 152 "createOption" : "FromImage", 153 "managedDisk": { 154 "storageAccountType": "Premium_LRS" 155 }, 156 "diskSizeGB" : 100 157 } 158 }, 159 "networkProfile" : { 160 "networkInterfaces" : [ 161 { 162 "id" : "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" 163 } 164 ] 165 } 166 } 167 }, 168 { 169 "apiVersion" : "2018-06-01", 170 "type": "Microsoft.Network/networkSecurityGroups/securityRules", 171 "name" : "[concat(variables('clusterNsgName'), '/bootstrap_ssh_in')]", 172 "location" : "[variables('location')]", 173 "dependsOn" : [ 174 "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]" 175 ], 176 "properties": { 177 "protocol" : "Tcp", 178 "sourcePortRange" : "*", 179 "destinationPortRange" : "22", 180 "sourceAddressPrefix" : "*", 181 "destinationAddressPrefix" : "*", 182 "access" : "Allow", 183 "priority" : 100, 184 "direction" : "Inbound" 185 } 186 } 187 ] 188 }