github.com/openshift/installer@v1.4.17/upi/azurestack/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      "workerIgnition" : {
    13        "type" : "string",
    14        "metadata" : {
    15          "description" : "Ignition content for the worker nodes"
    16        }
    17      },
    18      "numberOfNodes" : {
    19        "type" : "int",
    20        "defaultValue" : 3,
    21        "minValue" : 2,
    22        "maxValue" : 30,
    23        "metadata" : {
    24          "description" : "Number of OpenShift compute nodes to deploy"
    25        }
    26      },
    27      "sshKeyData" : {
    28        "type" : "securestring",
    29        "metadata" : {
    30          "description" : "SSH RSA public key file as a string"
    31        }
    32      },
    33      "diagnosticsStorageAccountName": {
    34        "type": "string"
    35      },
    36      "nodeVMSize" : {
    37        "type" : "string",
    38        "defaultValue" : "Standard_DS4_v2",
    39        "metadata" : {
    40          "description" : "The size of the each Node Virtual Machine"
    41        }
    42      }
    43    },
    44    "variables" : {
    45      "location" : "[resourceGroup().location]",
    46      "virtualNetworkName" : "[concat(parameters('baseName'), '-vnet')]",
    47      "virtualNetworkID" : "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
    48      "nodeSubnetName" : "[concat(parameters('baseName'), '-worker-subnet')]",
    49      "nodeSubnetRef" : "[concat(variables('virtualNetworkID'), '/subnets/', variables('nodeSubnetName'))]",
    50      "infraLoadBalancerName" : "[parameters('baseName')]",
    51      "sshKeyPath" : "/home/core/.ssh/authorized_keys",
    52      "identityName" : "[concat(parameters('baseName'), '-identity')]",
    53      "imageName" : "[parameters('baseName')]",
    54      "masterAvailabilitySetName" : "[concat(parameters('baseName'), '-cluster')]",
    55      "numberOfNodes" : "[parameters('numberOfNodes')]",
    56      "vms" : {
    57        "copy" : [
    58          {
    59          "name" : "vmNames",
    60          "count" :  "[parameters('numberOfNodes')]",
    61          "input" : {
    62              "name" : "[concat(parameters('baseName'), string('-worker-'), string(copyIndex('vmNames')))]"
    63          }
    64        }
    65      ]
    66    }
    67    },
    68    "resources" : [
    69      {
    70        "name": "[parameters('diagnosticsStorageAccountName')]",
    71        "type": "Microsoft.Storage/storageAccounts",
    72        "apiVersion": "2017-10-01",
    73        "location": "[variables('location')]",
    74        "properties": {},
    75        "kind": "Storage",
    76        "sku": {
    77          "name": "Standard_LRS"
    78        }
    79      },
    80      {
    81        "apiVersion" : "2017-10-01",
    82        "type" : "Microsoft.Network/networkInterfaces",
    83        "location": "[variables('location')]",
    84        "copy" : {
    85          "name" : "nicCopy",
    86          "count" : "[variables('numberOfNodes')]"
    87        },
    88        "name" : "[concat(variables('vms').vmNames[copyIndex()].name, '-nic')]",
    89        "properties" : {
    90          "ipConfigurations" : [
    91            {
    92              "name" : "pipConfig",
    93              "properties" : {
    94                "privateIPAllocationMethod" : "Dynamic",
    95                "subnet" : {
    96                  "id" : "[variables('nodeSubnetRef')]"
    97                }
    98              }
    99            }
   100          ]
   101        }
   102      },
   103      {
   104        "apiVersion" : "2017-12-01",
   105        "type" : "Microsoft.Compute/virtualMachines",
   106        "location" : "[variables('location')]",
   107        "copy" : {
   108          "name" : "vmCopy",
   109          "count" : "[variables('numberOfNodes')]"
   110        },
   111        "name" : "[variables('vms').vmNames[copyIndex()].name]",
   112        "dependsOn" : [
   113          "[concat('Microsoft.Network/networkInterfaces/', concat(variables('vms').vmNames[copyIndex()].name, '-nic'))]",
   114          "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]"
   115        ],
   116        "properties" : {
   117          "availabilitySet": {
   118            "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('masterAvailabilitySetName'))]"
   119          },
   120          "hardwareProfile" : {
   121            "vmSize" : "[parameters('nodeVMSize')]"
   122          },
   123          "osProfile" : {
   124            "computerName" : "[variables('vms').vmNames[copyIndex()].name]",
   125            "adminUsername" : "core",
   126            "customData" : "[parameters('workerIgnition')]",
   127            "linuxConfiguration" : {
   128              "disablePasswordAuthentication" : true,
   129              "ssh" : {
   130                "publicKeys" : [
   131                  {
   132                    "path" : "[variables('sshKeyPath')]",
   133                    "keyData" : "[parameters('sshKeyData')]"
   134                  }
   135                ]
   136              }
   137            }
   138          },
   139          "storageProfile" : {
   140            "imageReference": {
   141              "id": "[resourceId('Microsoft.Compute/images', variables('imageName'))]"
   142            },
   143            "osDisk" : {
   144              "name": "[concat(variables('vms').vmNames[copyIndex()].name,'_OSDisk')]",
   145              "osType" : "Linux",
   146              "createOption" : "FromImage",
   147              "managedDisk": {
   148                "storageAccountType": "Standard_LRS"
   149              },
   150              "diskSizeGB": 128
   151            }
   152          },
   153          "networkProfile" : {
   154            "networkInterfaces" : [
   155              {
   156                "id" : "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('vms').vmNames[copyIndex()].name, '-nic'))]",
   157                "properties": {
   158                  "primary": true
   159                }
   160              }
   161            ]
   162          },
   163          "diagnosticsProfile": {
   164            "bootDiagnostics": {
   165              "enabled": true,
   166              "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('diagnosticsStorageAccountName'))).primaryEndpoints.blob]"
   167            }
   168          }
   169        }
   170      }
   171    ]
   172  }