Created
April 27, 2017 21:01
-
-
Save kevinlisota/3dae162010495af5c39053fb94058705 to your computer and use it in GitHub Desktop.
ACS ARM template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"masterDnsNamePrefix": { | |
"type": "string", | |
"metadata": { | |
"description": "Sets the Domain name prefix for the Master nodes in a cluster. The concatenation of the domain name and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." | |
} | |
}, | |
"agentDnsNamePrefix": { | |
"type": "string", | |
"metadata": { | |
"description": "Sets the Domain name prefix for the Agent nodes in a cluster. The concatenation of the domain name and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." | |
} | |
}, | |
"agentCount": { | |
"type": "int", | |
"defaultValue": 1, | |
"metadata": { | |
"description": "The number of agents for the cluster. This value can be from 1 to 100 (note, for Kubernetes clusters you will also get 1 or 2 public agents in addition to these seleted masters)" | |
}, | |
"minValue": 1, | |
"maxValue": 100 | |
}, | |
"agentVMSize": { | |
"type": "string", | |
"defaultValue": "Standard_D2", | |
"allowedValues": [ | |
"Standard_A0", | |
"Standard_A1", | |
"Standard_A1_v2", | |
"Standard_A10", | |
"Standard_A11", | |
"Standard_A2", | |
"Standard_A2_v2", | |
"Standard_A2m_v2", | |
"Standard_A3", | |
"Standard_A4", | |
"Standard_A4_v2", | |
"Standard_A4m_v2", | |
"Standard_A5", | |
"Standard_A6", | |
"Standard_A7", | |
"Standard_A8", | |
"Standard_A8_v2", | |
"Standard_A8m_v2", | |
"Standard_A9", | |
"Standard_D1", | |
"Standard_D1_v2", | |
"Standard_D11", | |
"Standard_D11_v2", | |
"Standard_D12", | |
"Standard_D12_v2", | |
"Standard_D13", | |
"Standard_D13_v2", | |
"Standard_D14", | |
"Standard_D14_v2", | |
"Standard_D15_v2", | |
"Standard_D2", | |
"Standard_D2_v2", | |
"Standard_D3", | |
"Standard_D3_v2", | |
"Standard_D4", | |
"Standard_D4_v2", | |
"Standard_D5_v2", | |
"Standard_DS1", | |
"Standard_DS1_v2", | |
"Standard_DS11", | |
"Standard_DS11_v2", | |
"Standard_DS12", | |
"Standard_DS12_v2", | |
"Standard_DS13", | |
"Standard_DS13_v2", | |
"Standard_DS14", | |
"Standard_DS14_v2", | |
"Standard_DS15_v2", | |
"Standard_DS2", | |
"Standard_DS2_v2", | |
"Standard_DS3", | |
"Standard_DS3_v2", | |
"Standard_DS4", | |
"Standard_DS4_v2", | |
"Standard_DS5_v2", | |
"Standard_F1", | |
"Standard_F16", | |
"Standard_F16s", | |
"Standard_F1s", | |
"Standard_F2", | |
"Standard_F2s", | |
"Standard_F4", | |
"Standard_F4s", | |
"Standard_F8", | |
"Standard_F8s", | |
"Standard_G1", | |
"Standard_G2" | |
], | |
"metadata": { | |
"description": "The size of the Virtual Machine." | |
} | |
}, | |
"linuxAdminUsername": { | |
"type": "string", | |
"defaultValue": "azureuser", | |
"metadata": { | |
"description": "User name for the Linux Virtual Machines." | |
} | |
}, | |
"windowsAgentAdminUsername": { | |
"type": "string", | |
"defaultValue": "azureuser", | |
"metadata": { | |
"description": "User name for the Windows Agent Node Virtual Machines." | |
} | |
}, | |
"windowsAgentAdminPassword": { | |
"type": "securestring", | |
"metadata": { | |
"description": "Password for the Windows Agent Node Virtual Machines" | |
}, | |
"defaultValue": "n/a" | |
}, | |
"orchestratorType": { | |
"type": "string", | |
"defaultValue": "Kubernetes", | |
"allowedValues": [ | |
"Kubernetes", | |
"DCOS", | |
"Swarm" | |
], | |
"metadata": { | |
"description": "The type of orchestrator used to manage the applications on the cluster." | |
} | |
}, | |
"masterCount": { | |
"type": "int", | |
"defaultValue": 1, | |
"allowedValues": [ | |
1, | |
3, | |
5 | |
], | |
"metadata": { | |
"description": "The number of masters for the cluster." | |
} | |
}, | |
"sshRSAPublicKey": { | |
"type": "string", | |
"metadata": { | |
"description": "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'" | |
} | |
}, | |
"enableDiagnostics": { | |
"type": "bool", | |
"defaultValue": false, | |
"metadata": { | |
"description": "Enable or disable VM diagnostics." | |
} | |
}, | |
"servicePrincipalClientId": { | |
"metadata": { | |
"description": "Client ID (used by cloudprovider)" | |
}, | |
"type": "securestring", | |
"defaultValue": "n/a" | |
}, | |
"servicePrincipalClientSecret": { | |
"metadata": { | |
"description": "The Service Principal Client Secret." | |
}, | |
"type": "securestring", | |
"defaultValue": "n/a" | |
}, | |
"osType": { | |
"type": "string", | |
"defaultValue": "Linux", | |
"allowedValues": [ | |
"Linux", | |
"Windows" | |
], | |
"metadata": { | |
"description": "The type of operating system." | |
} | |
} | |
}, | |
"variables": { | |
"adminUsername": "[parameters('linuxAdminUsername')]", | |
"agentCount": "[parameters('agentCount')]", | |
"agentsEndpointDNSNamePrefix": "[parameters('agentDnsNamePrefix')]", | |
"agentVMSize": "[parameters('agentVMSize')]", | |
"masterCount": "[parameters('masterCount')]", | |
"mastersEndpointDNSNamePrefix": "[parameters('masterDnsNamePrefix')]", | |
"orchestratorType": "[parameters('orchestratorType')]", | |
"sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", | |
"enableDiagnostics": "[parameters('enableDiagnostics')]", | |
"servicePrincipalClientId": "[parameters('servicePrincipalClientId')]", | |
"servicePrincipalClientSecret": "[parameters('servicePrincipalClientSecret')]", | |
"useServicePrincipalDictionary": { | |
"DCOS": 0, | |
"Swarm": 0, | |
"Kubernetes": 1 | |
}, | |
"useServicePrincipal": "[variables('useServicePrincipalDictionary')[variables('orchestratorType')]]", | |
"servicePrincipalFields": [ | |
null, | |
{ | |
"ClientId": "[parameters('servicePrincipalClientId')]", | |
"Secret": "[parameters('servicePrincipalClientSecret')]" | |
} | |
], | |
"osType": "[parameters('osType')]", | |
"osProfileDictionary": { | |
"Linux": 0, | |
"Windows": 1 | |
}, | |
"useWindowsOnKubernetes": "[add(variables('useServicePrincipalDictionary')[variables('orchestratorType')], variables('osProfileDictionary')[variables('osType')])]", | |
"windowsProfileFields": [ | |
null, | |
null, | |
{ | |
"adminUsername": "[parameters('windowsAgentAdminUsername')]", | |
"adminPassword": "[parameters('windowsAgentAdminPassword')]" | |
} | |
] | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2017-01-31", | |
"type": "Microsoft.ContainerService/containerServices", | |
"location": "[resourceGroup().location]", | |
"name": "[concat('containerservice-',resourceGroup().name)]", | |
"properties": { | |
"orchestratorProfile": { | |
"orchestratorType": "[variables('orchestratorType')]" | |
}, | |
"masterProfile": { | |
"count": "[variables('masterCount')]", | |
"dnsPrefix": "[variables('mastersEndpointDNSNamePrefix')]" | |
}, | |
"agentPoolProfiles": [ | |
{ | |
"name": "agentpool", | |
"count": "[variables('agentCount')]", | |
"vmSize": "[variables('agentVMSize')]", | |
"dnsPrefix": "[variables('agentsEndpointDNSNamePrefix')]", | |
"osType": "[variables('osType')]" | |
} | |
], | |
"diagnosticsProfile": { | |
"vmDiagnostics": { | |
"enabled": "[variables('enableDiagnostics')]" | |
} | |
}, | |
"linuxProfile": { | |
"adminUsername": "[variables('adminUsername')]", | |
"ssh": { | |
"publicKeys": [ | |
{ | |
"keyData": "[variables('sshRSAPublicKey')]" | |
} | |
] | |
} | |
}, | |
"windowsProfile": "[variables('windowsProfileFields')[variables('useWindowsOnKubernetes')]]", | |
"servicePrincipalProfile": "[variables('servicePrincipalFields')[variables('useServicePrincipal')]]" | |
} | |
} | |
], | |
"outputs": { | |
"masterFQDN": { | |
"type": "string", | |
"value": "[reference(concat('Microsoft.ContainerService/containerServices/', 'containerservice-', resourceGroup().name)).masterProfile.fqdn]" | |
}, | |
"sshMaster0": { | |
"type": "string", | |
"value": "[concat('ssh ', variables('adminUsername'), '@', reference(concat('Microsoft.ContainerService/containerServices/', 'containerservice-', resourceGroup().name)).masterProfile.fqdn, ' -A -p 2200')]" | |
}, | |
"agentFQDN": { | |
"type": "string", | |
"value": "[reference(concat('Microsoft.ContainerService/containerServices/', 'containerservice-', resourceGroup().name)).agentPoolProfiles[0].fqdn]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment