github.com/openshift/installer@v1.4.17/upi/azure/06_workers.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      "workerIgnition" : {
    20        "type" : "string",
    21        "metadata" : {
    22          "description" : "Ignition content for the worker nodes"
    23        }
    24      },
    25      "numberOfNodes" : {
    26        "type" : "int",
    27        "defaultValue" : 3,
    28        "minValue" : 2,
    29        "maxValue" : 30,
    30        "metadata" : {
    31          "description" : "Number of OpenShift compute nodes to deploy"
    32        }
    33      },
    34      "sshKeyData" : {
    35        "type" : "securestring",
    36        "defaultValue" : "Unused",
    37        "metadata" : {
    38          "description" : "Unused"
    39        }
    40      },
    41      "nodeVMSize" : {
    42        "type" : "string",
    43        "defaultValue" : "Standard_D4s_v3",
    44        "metadata" : {
    45          "description" : "The size of the each Node Virtual Machine"
    46        }
    47      },
    48      "hyperVGen": {
    49        "type": "string",
    50        "metadata": {
    51          "description": "VM generation image to use"
    52        },
    53        "defaultValue": "V2",
    54        "allowedValues": [
    55          "V1",
    56          "V2"
    57        ]
    58      }
    59    },
    60    "variables" : {
    61      "location" : "[resourceGroup().location]",
    62      "virtualNetworkName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-vnet')]",
    63      "virtualNetworkID" : "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
    64      "nodeSubnetName" : "[concat(if(not(empty(parameters('vnetBaseName'))), parameters('vnetBaseName'), parameters('baseName')), '-worker-subnet')]",
    65      "nodeSubnetRef" : "[concat(variables('virtualNetworkID'), '/subnets/', variables('nodeSubnetName'))]",
    66      "infraLoadBalancerName" : "[parameters('baseName')]",
    67      "sshKeyPath" : "/home/capi/.ssh/authorized_keys",
    68      "identityName" : "[concat(parameters('baseName'), '-identity')]",
    69      "galleryName": "[concat('gallery_', replace(parameters('baseName'), '-', '_'))]",
    70      "imageName" : "[concat(parameters('baseName'), if(equals(parameters('hyperVGen'), 'V2'), '-gen2', ''))]",
    71      "copy" : [
    72        {
    73          "name" : "vmNames",
    74          "count" :  "[parameters('numberOfNodes')]",
    75          "input" : "[concat(parameters('baseName'), '-worker-', variables('location'), '-', copyIndex('vmNames', 1))]"
    76        }
    77      ]
    78    },
    79    "resources" : [
    80      {
    81        "apiVersion" : "2019-05-01",
    82        "name" : "[concat('node', copyIndex())]",
    83        "type" : "Microsoft.Resources/deployments",
    84        "copy" : {
    85          "name" : "nodeCopy",
    86          "count" : "[length(variables('vmNames'))]"
    87        },
    88        "properties" : {
    89          "mode" : "Incremental",
    90          "template" : {
    91            "$schema" : "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    92            "contentVersion" : "1.0.0.0",
    93            "resources" : [
    94              {
    95                "apiVersion" : "2018-06-01",
    96                "type" : "Microsoft.Network/networkInterfaces",
    97                "name" : "[concat(variables('vmNames')[copyIndex()], '-nic')]",
    98                "location" : "[variables('location')]",
    99                "properties" : {
   100                  "ipConfigurations" : [
   101                    {
   102                      "name" : "pipConfig",
   103                      "properties" : {
   104                        "privateIPAllocationMethod" : "Dynamic",
   105                        "subnet" : {
   106                          "id" : "[variables('nodeSubnetRef')]"
   107                        }
   108                      }
   109                    }
   110                  ]
   111                }
   112              },
   113              {
   114                "apiVersion" : "2018-06-01",
   115                "type" : "Microsoft.Compute/virtualMachines",
   116                "name" : "[variables('vmNames')[copyIndex()]]",
   117                "location" : "[variables('location')]",
   118                "tags" : {
   119                  "kubernetes.io-cluster-ffranzupi": "owned"
   120                },
   121                "identity" : {
   122                  "type" : "userAssigned",
   123                  "userAssignedIdentities" : {
   124                    "[resourceID('Microsoft.ManagedIdentity/userAssignedIdentities/', variables('identityName'))]" : {}
   125                  }
   126                },
   127                "dependsOn" : [
   128                  "[concat('Microsoft.Network/networkInterfaces/', concat(variables('vmNames')[copyIndex()], '-nic'))]"
   129                ],
   130                "properties" : {
   131                  "hardwareProfile" : {
   132                    "vmSize" : "[parameters('nodeVMSize')]"
   133                  },
   134                  "osProfile" : {
   135                    "computerName" : "[variables('vmNames')[copyIndex()]]",
   136                    "adminUsername" : "capi",
   137                    "adminPassword" : "NotActuallyApplied!",
   138                    "customData" : "[parameters('workerIgnition')]",
   139                    "linuxConfiguration" : {
   140                      "disablePasswordAuthentication" : false
   141                    }
   142                  },
   143                  "storageProfile" : {
   144                    "imageReference": {
   145                      "id": "[resourceId('Microsoft.Compute/galleries/images', variables('galleryName'), variables('imageName'))]"
   146                    },
   147                    "osDisk" : {
   148                      "name": "[concat(variables('vmNames')[copyIndex()],'_OSDisk')]",
   149                      "osType" : "Linux",
   150                      "createOption" : "FromImage",
   151                      "managedDisk": {
   152                        "storageAccountType": "Premium_LRS"
   153                      },
   154                      "diskSizeGB": 128
   155                    }
   156                  },
   157                  "networkProfile" : {
   158                    "networkInterfaces" : [
   159                      {
   160                        "id" : "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vmNames')[copyIndex()], '-nic'))]",
   161                        "properties": {
   162                          "primary": true
   163                        }
   164                      }
   165                    ]
   166                  }
   167                }
   168              }
   169            ]
   170          }
   171        }
   172      }
   173    ]
   174  }