<commit_before>{
  "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "clusterName": {
      "type": "string",
      "defaultValue": "es-azure",
      "metadata": {
        "description": "The name of the cluster."
      }
    },
    "vmSku": {
      "type": "string",
      "defaultValue": "Standard_D1_v2",
      "metadata": {
        "description": "Size of VMs in the VM Scale Set."
      }
    },
    "masterSize": {
      "type": "string",
      "defaultValue": "Standard_D3_v2",
      "metadata": {
        "description": "Size of master VMs."
      }
    },
    "ubuntuOSVersion": {
      "type": "string",
      "defaultValue": "16.04-LTS",
      "allowedValues": [
        "16.04-LTS"
      ],
      "metadata": {
        "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version."
      }
    },
    "vmssName": {
      "type": "string",
      "metadata": {
        "description": "String used as a base for naming resources. Must be 3-61 characters in length and globally unique across Azure. A hash is prepended to this string for some resources, and resource-specific information is appended."
      },
      "maxLength": 61
    },
    "instanceCount": {
      "type": "int",
      "metadata": {
        "description": "Number of VM instances (1000 or less)."
      },
      "maxValue": 1000
    },
    "adminUsername": {
      "type": "string",
      "metadata": {
        "description": "Admin username on all VMs."
      }
    },
    "adminKey": {
      "type": "securestring",
      "metadata": {
        "description": "Public key for ssh access"
      }
    },
    "templateBase": {
      "type": "string",
      "defaultValue": "https://raw.githubusercontent.com/hglkrijger/azure-quickstart-templates/master",
      "metadata": {
        "description": "Change this value to your repo name if deploying from a fork"
      }
    }
  },
  "variables": {
    "storageAccountType": "Standard_LRS",
    "namingInfix": "[toLower(parameters('vmssName'))]",
    "longNamingInfix": "[resourceGroup().name]",
    "addressPrefix": "10.0.0.0/8",
    "subnetPrefix": "10.0.0.0/16",
    "virtualNetworkName": "[concat(variables('namingInfix'), '-vnet')]",
    "publicIpAddressName": "[concat(variables('namingInfix'), '-pip')]",
    "publicIpAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpAddressName'))]",
    "subnetName": "[concat(variables('namingInfix'), '-subnet')]",
    "loadBalancerName": "[concat(variables('namingInfix'), '-lb')]",
    "loadBalancerId": "[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]",
    "backendPoolName": "[concat(variables('namingInfix'), '-bepool')]",
    "nicName": "[concat(variables('namingInfix'), '-nic')]",
    "masterName": "[concat(variables('namingInfix'), '-master')]",
    "availabilitySetName": "[concat(variables('namingInfix'), '-master-set')]",
    "nsgName": "[concat(variables('namingInfix'), '-master-nsg')]",
    "ipConfigName": "[concat(variables('namingInfix'), '-ipconfig')]",
    "frontendIpConfigId": "[concat(variables('loadBalancerId'),'/frontendIPConfigurations/loadBalancerFrontEnd')]",
    "loadBalancerPoolId": "[concat(variables('loadBalancerId'),'/backendAddressPools/', variables('backendPoolName'))]",
    "loadBalancerProbeId": "[concat(variables('loadBalancerId'),'/probes/tcpProbe')]",
    "sshProbeId": "[concat(variables('loadBalancerId'),'/probes/sshProbe')]",
    "masterStorageAccountName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'master')]",
    "osType": {
      "publisher": "Canonical",
      "offer": "UbuntuServer",
      "sku": "[parameters('ubuntuOSVersion')]",
      "version": "latest"
    },
    "keyPath": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
    "imageReference": "[variables('osType')]",
    "computeApiVersion": "2016-04-30-preview",
    "networkApiVersion": "2016-03-30",
    "storageApiVersion": "2015-06-15",
    "insightsApiVersion": "2015-04-01",
    "templateBaseUrl": "[concat(parameters('templateBase'), '/elasticsearch-vmss/')]",
    "diskSetupScriptUrl": "[concat(parameters('templateBase'), '/shared_scripts/ubuntu/vm-disk-utils-0.1.sh')]"
  },
  "resources": [
    {
      "apiVersion": "[variables('networkApiVersion')]",
      "type": "Microsoft.Network/networkSecurityGroups",
      "name": "[variables('nsgName')]",
      "location": "[resourceGroup().location]",
      "properties": {
        "securityRules": [
            {
            "name": "ssh",
            "properties": {
              "description": "Allows inbound ssh traffic",
              "protocol": "Tcp",
              "sourcePortRange": "22",
              "destinationPortRange": "22",
              "sourceAddressPrefix": "*",
              "destinationAddressPrefix": "*",
              "access": "Allow",
              "priority": 100,
              "direction": "Inbound"
            }
          },
          {
            "name": "Elasticsearch",
            "properties": {
              "description": "Allows inbound HTTP traffic from anyone",
              "protocol": "Tcp",
              "sourcePortRange": "5601",
              "destinationPortRange": "5601",
              "sourceAddressPrefix": "*",
              "destinationAddressPrefix": "*",
              "access": "Allow",
              "priority": 200,
              "direction": "Inbound"
            }
          }
        ]
      }
    },
    {
      "type": "Microsoft.Network/virtualNetworks",
      "name": "[variables('virtualNetworkName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('networkApiVersion')]",
      "properties": {
        "addressSpace": {
          "addressPrefixes": [
            "[variables('addressPrefix')]"
          ]
        },
        "subnets": [
          {
            "name": "[variables('subnetName')]",
            "properties": {
              "addressPrefix": "[variables('subnetPrefix')]"
            }
          }
        ]
      }
    },
    {
      "type": "Microsoft.Storage/storageAccounts",
      "name": "[variables('masterStorageAccountName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('storageApiVersion')]",
      "properties": {
        "accountType": "[variables('storageAccountType')]"
      }
    },
    {
      "type": "Microsoft.Network/publicIPAddresses",
      "name": "[variables('publicIpAddressName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('networkApiVersion')]",
      "properties": {
        "publicIPAllocationMethod": "Dynamic",
        "dnsSettings": {
          "domainNameLabel": "[variables('longNamingInfix')]"
        }
      }
    },
    {
      "type": "Microsoft.Network/loadBalancers",
      "name": "[variables('loadBalancerName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('networkApiVersion')]",
      "dependsOn": [<commit_msg>update domain name for validation<commit_after>{
  "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "clusterName": {
      "type": "string",
      "defaultValue": "es-azure",
      "metadata": {
        "description": "The name of the cluster."
      }
    },
    "vmSku": {
      "type": "string",
      "defaultValue": "Standard_D1_v2",
      "metadata": {
        "description": "Size of VMs in the VM Scale Set."
      }
    },
    "masterSize": {
      "type": "string",
      "defaultValue": "Standard_D3_v2",
      "metadata": {
        "description": "Size of master VMs."
      }
    },
    "ubuntuOSVersion": {
      "type": "string",
      "defaultValue": "16.04-LTS",
      "allowedValues": [
        "16.04-LTS"
      ],
      "metadata": {
        "description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version."
      }
    },
    "vmssName": {
      "type": "string",
      "metadata": {
        "description": "String used as a base for naming resources. Must be 3-61 characters in length and globally unique across Azure. A hash is prepended to this string for some resources, and resource-specific information is appended."
      },
      "maxLength": 61
    },
    "instanceCount": {
      "type": "int",
      "metadata": {
        "description": "Number of VM instances (1000 or less)."
      },
      "maxValue": 1000
    },
    "adminUsername": {
      "type": "string",
      "metadata": {
        "description": "Admin username on all VMs."
      }
    },
    "adminKey": {
      "type": "securestring",
      "metadata": {
        "description": "Public key for ssh access"
      }
    },
    "templateBase": {
      "type": "string",
      "defaultValue": "https://raw.githubusercontent.com/hglkrijger/azure-quickstart-templates/master",
      "metadata": {
        "description": "Change this value to your repo name if deploying from a fork"
      }
    }
  },
  "variables": {
    "storageAccountType": "Standard_LRS",
    "namingInfix": "[toLower(parameters('vmssName'))]",
    "longNamingInfix": "[resourceGroup().name]",
    "domainNameLabel": "[variables('namingInfix')]",
    "addressPrefix": "10.0.0.0/8",
    "subnetPrefix": "10.0.0.0/16",
    "virtualNetworkName": "[concat(variables('namingInfix'), '-vnet')]",
    "publicIpAddressName": "[concat(variables('namingInfix'), '-pip')]",
    "publicIpAddressId": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpAddressName'))]",
    "subnetName": "[concat(variables('namingInfix'), '-subnet')]",
    "loadBalancerName": "[concat(variables('namingInfix'), '-lb')]",
    "loadBalancerId": "[resourceId('Microsoft.Network/loadBalancers', variables('loadBalancerName'))]",
    "backendPoolName": "[concat(variables('namingInfix'), '-bepool')]",
    "nicName": "[concat(variables('namingInfix'), '-nic')]",
    "masterName": "[concat(variables('namingInfix'), '-master')]",
    "availabilitySetName": "[concat(variables('namingInfix'), '-master-set')]",
    "nsgName": "[concat(variables('namingInfix'), '-master-nsg')]",
    "ipConfigName": "[concat(variables('namingInfix'), '-ipconfig')]",
    "frontendIpConfigId": "[concat(variables('loadBalancerId'),'/frontendIPConfigurations/loadBalancerFrontEnd')]",
    "loadBalancerPoolId": "[concat(variables('loadBalancerId'),'/backendAddressPools/', variables('backendPoolName'))]",
    "loadBalancerProbeId": "[concat(variables('loadBalancerId'),'/probes/tcpProbe')]",
    "sshProbeId": "[concat(variables('loadBalancerId'),'/probes/sshProbe')]",
    "masterStorageAccountName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'master')]",
    "osType": {
      "publisher": "Canonical",
      "offer": "UbuntuServer",
      "sku": "[parameters('ubuntuOSVersion')]",
      "version": "latest"
    },
    "keyPath": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
    "imageReference": "[variables('osType')]",
    "computeApiVersion": "2016-04-30-preview",
    "networkApiVersion": "2016-03-30",
    "storageApiVersion": "2015-06-15",
    "insightsApiVersion": "2015-04-01",
    "templateBaseUrl": "[concat(parameters('templateBase'), '/elasticsearch-vmss/')]",
    "diskSetupScriptUrl": "[concat(parameters('templateBase'), '/shared_scripts/ubuntu/vm-disk-utils-0.1.sh')]"
  },
  "resources": [
    {
      "apiVersion": "[variables('networkApiVersion')]",
      "type": "Microsoft.Network/networkSecurityGroups",
      "name": "[variables('nsgName')]",
      "location": "[resourceGroup().location]",
      "properties": {
        "securityRules": [
            {
            "name": "ssh",
            "properties": {
              "description": "Allows inbound ssh traffic",
              "protocol": "Tcp",
              "sourcePortRange": "22",
              "destinationPortRange": "22",
              "sourceAddressPrefix": "*",
              "destinationAddressPrefix": "*",
              "access": "Allow",
              "priority": 100,
              "direction": "Inbound"
            }
          },
          {
            "name": "Elasticsearch",
            "properties": {
              "description": "Allows inbound HTTP traffic from anyone",
              "protocol": "Tcp",
              "sourcePortRange": "5601",
              "destinationPortRange": "5601",
              "sourceAddressPrefix": "*",
              "destinationAddressPrefix": "*",
              "access": "Allow",
              "priority": 200,
              "direction": "Inbound"
            }
          }
        ]
      }
    },
    {
      "type": "Microsoft.Network/virtualNetworks",
      "name": "[variables('virtualNetworkName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('networkApiVersion')]",
      "properties": {
        "addressSpace": {
          "addressPrefixes": [
            "[variables('addressPrefix')]"
          ]
        },
        "subnets": [
          {
            "name": "[variables('subnetName')]",
            "properties": {
              "addressPrefix": "[variables('subnetPrefix')]"
            }
          }
        ]
      }
    },
    {
      "type": "Microsoft.Storage/storageAccounts",
      "name": "[variables('masterStorageAccountName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('storageApiVersion')]",
      "properties": {
        "accountType": "[variables('storageAccountType')]"
      }
    },
    {
      "type": "Microsoft.Network/publicIPAddresses",
      "name": "[variables('publicIpAddressName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('networkApiVersion')]",
      "properties": {
        "publicIPAllocationMethod": "Dynamic",
        "dnsSettings": {
          "domainNameLabel": "[variables('domainNameLabel')]"
        }
      }
    },
    {
      "type": "Microsoft.Network/loadBalancers",
      "name": "[variables('loadBalancerName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('networkApiVersion')]",
      "dependsOn": [
{'fraction_non_alphanumeric': 0.18572127823229145, 'fraction_numerical': 0.014264736731697085, 'mean_word_length': 2.818958611481976, 'pattern_counts': {'":': 285, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6066327', 'n_tokens_mistral': 4293, 'n_tokens_neox': 4103, 'n_words': 732}