diff --git a/acs-swarm/.DS_Store b/acs-swarm/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/acs-swarm/.DS_Store differ diff --git a/acs-swarm/azuredeploy.json b/acs-swarm/azuredeploy.json new file mode 100644 index 0000000..21fad57 --- /dev/null +++ b/acs-swarm/azuredeploy.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsNamePrefix": { + "type": "string", + "metadata": { + "description": "Sets the domain name prefix for the 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 swarm nodes for the cluster. This value can be from 1 to 100" + }, + "minValue":1, + "maxValue":100 + }, + "agentVMSize": { + "type": "string", + "defaultValue": "Standard_D12_v2", + "allowedValues": [ + "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2" + ], + "metadata": { + "description": "The size of the Virtual Machine." + } + }, + "linuxAdminUsername": { + "type": "string", + "defaultValue": "azureuser", + "metadata": { + "description": "User name for the Linux Virtual Machines." + } + }, + "orchestratorType": { + "type": "string", + "defaultValue": "Swarm", + "allowedValues": [ + "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 Swarm managers 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'" + } + } + }, + "variables": { + "adminUsername":"[parameters('linuxAdminUsername')]", + "agentCount":"[parameters('agentCount')]", + "agentsEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'agents')]", + "agentVMSize":"[parameters('agentVMSize')]", + "masterCount":"[parameters('masterCount')]", + "mastersEndpointDNSNamePrefix":"[concat(parameters('dnsNamePrefix'),'mgmt')]", + "orchestratorType":"[parameters('orchestratorType')]", + "sshRSAPublicKey":"[parameters('sshRSAPublicKey')]" + }, + "resources": [ + { + "apiVersion": "2016-03-30", + "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": "agentpools", + "count": "[variables('agentCount')]", + "vmSize": "[variables('agentVMSize')]", + "dnsPrefix": "[variables('agentsEndpointDNSNamePrefix')]" + } + ], + "linuxProfile": { + "adminUsername": "[variables('adminUsername')]", + "ssh": { + "publicKeys": [ + { + "keyData": "[variables('sshRSAPublicKey')]" + } + ] + } + } + } + } + ], + "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]" + } + } +} \ No newline at end of file diff --git a/acs-swarm/azuredeploy.parameters.json b/acs-swarm/azuredeploy.parameters.json new file mode 100644 index 0000000..338a7f3 --- /dev/null +++ b/acs-swarm/azuredeploy.parameters.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "dnsNamePrefix": { + "value": "test-swarm" + }, + "agentCount": { + "value": 3 + }, + "agentVMSize" : { + "value": "Standard_D12_v2" + }, + "linuxAdminUsername": { + "value": "test-swarm" + }, + "orchestratorType": { + "value": "Swarm" + }, + "masterCount": { + "value": 1 + }, + "sshRSAPublicKey": { + "value": "" + } + } +} \ No newline at end of file