{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "_artifactsLocation": { "type": "string", "defaultValue": "[deployment().properties.templateLink.uri]", "metadata": { "description": "The base URI where artifacts required by this template are located, including a trailing '/'" } }, "_artifactsLocationSasToken": { "type": "securestring", "defaultValue": "", "metadata": { "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured." } }, "loadBalancerType": { "type": "string", "defaultValue": "internal", "allowedValues": [ "internal", "external" ], "metadata": { "description": "Setup the load balancer internal or external." } }, "influxTags": { "type": "object", "defaultValue": { "provider": "influxdata", "tracking": "pid-300e07de-2c76-5904-be70-589ac8f15cf8" }, "metadata": { "description": "Unique identifiers to allow the Azure Infrastructure to understand the origin of resources deployed to Azure. You do not need to supply a value for this." } }, "chronograf": { "type": "string", "defaultValue": "No", "allowedValues": [ "Yes", "No" ], "metadata": { "description": "Provision a single instance with Chronograf service installed." } }, "monitor": { "type": "string", "defaultValue": "No", "allowedValues": [ "Yes", "No" ], "metadata": { "description": "Provision a single instance with InfluxDB-OSS service installed." } }, "vmDataDiskSize": { "type": "string", "defaultValue": "32GiB", "allowedValues": [ "32GiB", "64GiB", "128GiB", "256GiB", "512GiB", "1TiB" ], "metadata": { "description": "The disk size of each attached managed disk, 32GiB, 64GiB, 128GiB, 256 GiB, 512GiB, 1TiB, 2TiB, 4TiB, 8TiB, 16TiB and 32TiB. Default is 1TiB. For Premium Storage, this equates to P6, P10, P15, P20, P30, P40, P50, P60, P70 and P80, respectively." } }, "vmSizeDataNodes": { "type": "string", "defaultValue": "Standard_DS2_v2", "allowedValues": [ "Standard_DS1_v2", "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_D2s_v3", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D48s_v3", "Standard_D64s_v3", "Standard_D2as_v4", "Standard_D4as_v4", "Standard_D8as_v4", "Standard_D16as_v4", "Standard_D32as_v4", "Standard_D48as_v4", "Standard_D64as_v4", "Standard_D96as_v4" ], "metadata": { "description": "Size of the InfluxEnterprise data nodes" } }, "vmDataNodeCount": { "type": "int", "defaultValue": 2, "metadata": { "description": "Number of InfluxEnterprise data nodes" } }, "vmSizeMetaNodes": { "type": "string", "defaultValue": "Standard_D1_v2", "allowedValues": [ "Standard_A1_v2", "Standard_A2_v2", "Standard_A4_v2", "Standard_A8_v2", "Standard_A2m_v2", "Standard_A4m_v2", "Standard_A8m_v2", "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2" ], "metadata": { "description": "Size of the InfluxEnterprise meta nodes, 3 instances will be provisioned" } }, "adminUsername": { "type": "string", "metadata": { "description": "Admin username used when provisioning all virtual machines" } }, "password": { "type": "secureObject", "metadata": { "description": "Password is a complex object parameter, we support both authenticating through username/pass or ssh keys." } }, "influxdbUsername": { "type": "string", "metadata": { "description": "InfluxDB Enterpise username for admin user with ALL PRIVILEGES" } }, "influxdbPassword": { "type": "securestring", "metadata": { "description": "InfluxDB Enterpise password for admin user with ALL PRIVILEGES" } }, "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Location where resources will be provisioned. A value of 'ResourceGroup' will deploy the resource to the same location of the resource group the resources are provisioned into" } }, "virtualNetworkName": { "type": "string", "defaultValue": "influx-vnet", "metadata": { "description": "Virtual Network" } } }, "variables": { "password": { "password": "[if(equals(parameters('password').authenticationType,'password'),parameters('password').password,json('null'))]", "authenticationType": "[parameters('password').authenticationType]", "sshPublicKey": "[if(equals(parameters('password').authenticationType,'sshPublicKey'),parameters('password').sshPublicKey,json('null'))]" }, "location": "[parameters('location')]", "chronoScriptUrl": "[uri(parameters('_artifactsLocation'), concat('scripts/chronograf-install.sh', parameters('_artifactsLocationSasToken')))]", "influxdbScriptUrl": "[uri(parameters('_artifactsLocation'), concat('scripts/influxdb-install.sh', parameters('_artifactsLocationSasToken')))]", "enterpriseScriptUrl": "[uri(parameters('_artifactsLocation'), concat('scripts/enterprise-configure.sh', parameters('_artifactsLocationSasToken')))]", "diskScriptUrl": "[uri(parameters('_artifactsLocation'), concat('scripts/autopart.sh', parameters('_artifactsLocationSasToken')))]", "sharedTemplateUrl": "[uri(parameters('_artifactsLocation'), concat('partials/shared-resources.json', parameters('_artifactsLocationSasToken')))]", "metaTemplateUrl": "[uri(parameters('_artifactsLocation'), concat('machines/metanodes-resources.json', parameters('_artifactsLocationSasToken')))]", "chronografTemplateUrl": "[uri(parameters('_artifactsLocation'), concat('machines/chronograf-resources.json', parameters('_artifactsLocationSasToken')))]", "monitorTemplateUrl": "[uri(parameters('_artifactsLocation'), concat('machines/monitor-resources.json', parameters('_artifactsLocationSasToken')))]", "commonInstallParams": "[concat(' -u ', parameters('influxdbUsername'), ' -p ', parameters('influxdbPassword'))]", "clusterInstallParams": "[concat(' -c ', parameters('vmDataNodeCount'), ' -m ', parameters('monitor'))]", "osSettings": { "imageReference": { "publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": "latest" }, "vmSizeDataNodes": "[parameters('vmSizeDataNodes')]", "vmSizeMetaNodes": "[parameters('vmSizeMetaNodes')]", "vmDataNodeCount": "[parameters('vmDataNodeCount')]", "influxTags": "[parameters('influxTags')]", "vmDefaultSize": "Standard_DS2_v2", "extensionSettings": { "meta": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", "typeHandlerVersion": "2.0", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('diskScriptUrl')]", "[variables('enterpriseScriptUrl')]" ], "commandToExecute": "[concat('bash enterprise-configure.sh -s meta', variables('clusterInstallParams'), variables('commonInstallParams'))]" } }, "data": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", "typeHandlerVersion": "2.0", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('diskScriptUrl')]", "[variables('enterpriseScriptUrl')]" ], "commandToExecute": "[concat('bash enterprise-configure.sh -s data', variables('clusterInstallParams'), variables('commonInstallParams'))]" } }, "leader": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", "typeHandlerVersion": "2.0", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('diskScriptUrl')]", "[variables('enterpriseScriptUrl')]" ], "commandToExecute": "[concat('bash enterprise-configure.sh -s leader', variables('clusterInstallParams'), variables('commonInstallParams'))]" } }, "chronograf": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", "typeHandlerVersion": "2.0", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('chronoScriptUrl')]" ], "commandToExecute": "bash chronograf-install.sh" } }, "monitor": { "publisher": "Microsoft.Azure.Extensions", "type": "CustomScript", "typeHandlerVersion": "2.0", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[variables('influxdbScriptUrl')]" ], "commandToExecute": "[concat('bash influxdb-install.sh', variables('commonInstallParams'))]" } } } }, "locations": { "eastus": { "platformFaultDomainCount": 3 }, "eastus2": { "platformFaultDomainCount": 3 }, "centralus": { "platformFaultDomainCount": 3 }, "northcentralus": { "platformFaultDomainCount": 3 }, "southcentralus": { "platformFaultDomainCount": 3 }, "westus": { "platformFaultDomainCount": 3 }, "canadacentral": { "platformFaultDomainCount": 3 }, "northeurope": { "platformFaultDomainCount": 3 }, "westeurope": { "platformFaultDomainCount": 3 } }, "networkSettings": { "platformFaultDomainCount": "[if(contains(variables('locations'), variables('location')), variables('locations')[variables('location')].platformFaultDomainCount, 2)]", "metaNodesIpPrefix": "10.0.0.1", "dataNodesIpPrefix": "10.0.1.1", "managementPort": "22", "virtualNetworkName": "[parameters('virtualNetworkName')]", "addressPrefix": "10.0.0.0/16", "subnet": { "meta": { "name": "meta", "prefix": "10.0.0.0/24", "vnet": "[parameters('virtualNetworkName')]" }, "data": { "name": "data", "prefix": "10.0.1.0/24", "vnet": "[parameters('virtualNetworkName')]" } } }, "lbBackEndPoolsAdded": { "backendPools": [ { "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', 'lb-influxdb', 'LBBE')]" } ] }, "dataLBSettings": "[variables('lbBackEndPoolsAdded')]", "dataDiskSizes": { "32GiB": 32, "64GiB": 64, "128GiB": 128, "256GiB": 256, "512GiB": 512, "1TiB": 1024 }, "dataNodeStorageSettings": { "diskSize": "[variables('dataDiskSizes')[parameters('vmDataDiskSize')]]" }, "dataTemplateUrl": "[uri(parameters('_artifactsLocation'), concat('machines/datanodes-resources.json', parameters('_artifactsLocationSasToken')))]" }, "resources": [ { "name": "pid-300e07de-2c76-5904-be70-589ac8f15cf8", "type": "Microsoft.Resources/deployments", "apiVersion": "2019-08-01", "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "resources": [ ] } } }, { "name": "metanodes", "type": "Microsoft.Resources/deployments", "apiVersion": "2019-08-01", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', 'shared')]", "[concat('Microsoft.Resources/deployments/', 'datanodes')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('metaTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "adminUsername": { "value": "[parameters('adminUsername')]" }, "password": { "value": "[variables('password')]" }, "location": { "value": "[variables('location')]" }, "namespace": { "value": "meta" }, "networkSettings": { "value": "[variables('networkSettings')]" }, "osSettings": { "value": "[variables('osSettings')]" } } } }, { "name": "shared", "type": "Microsoft.Resources/deployments", "apiVersion": "2019-08-01", "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('sharedTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "location": { "value": "[variables('location')]" }, "networkSettings": { "value": "[variables('networkSettings')]" }, "loadBalancerType": { "value": "[parameters('loadBalancerType')]" }, "ilbIpAddress": { "value": "10.0.0.100" } } } }, { "name": "datanodes", "type": "Microsoft.Resources/deployments", "apiVersion": "2019-08-01", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', 'shared')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('dataTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "adminUsername": { "value": "[parameters('adminUsername')]" }, "password": { "value": "[variables('password')]" }, "location": { "value": "[variables('location')]" }, "storageSettings": { "value": "[variables('dataNodeStorageSettings')]" }, "namespace": { "value": "data" }, "networkSettings": { "value": "[variables('networkSettings')]" }, "osSettings": { "value": "[variables('osSettings')]" }, "lbBackendPools": { "value": "[variables('dataLBSettings')]" } } } }, { "condition": "[equals(parameters('chronograf'), 'Yes')]", "name": "chronograf", "type": "Microsoft.Resources/deployments", "apiVersion": "2019-08-01", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', 'shared')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('chronografTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "adminUsername": { "value": "[parameters('adminUsername')]" }, "password": { "value": "[variables('password')]" }, "location": { "value": "[variables('location')]" }, "namespace": { "value": "chronograf" }, "networkSettings": { "value": "[variables('networkSettings')]" }, "osSettings": { "value": "[variables('osSettings')]" } } } }, { "condition": "[equals(parameters('monitor'), 'Yes')]", "name": "monitor", "type": "Microsoft.Resources/deployments", "apiVersion": "2019-08-01", "dependsOn": [ "[concat('Microsoft.Resources/deployments/', 'shared')]" ], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('monitorTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "adminUsername": { "value": "[parameters('adminUsername')]" }, "password": { "value": "[variables('password')]" }, "location": { "value": "[variables('location')]" }, "namespace": { "value": "monitor" }, "networkSettings": { "value": "[variables('networkSettings')]" }, "osSettings": { "value": "[variables('osSettings')]" } } } } ] }