diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c13d7e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +base-template.parameters.json + diff --git a/bool-inline/README.md b/bool-inline/README.md deleted file mode 100644 index a8e8288..0000000 --- a/bool-inline/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Demonstratre concatenation - -This Microsoft Azure template demonstrates concatenation via an inline template. - - - - diff --git a/bool-inline/azuredeploy.json b/bool-inline/azuredeploy.json deleted file mode 100644 index 7587a20..0000000 --- a/bool-inline/azuredeploy.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sampleString": { - "type": "string", - "defaultValue": "hello", - "metadata": { - "description": "This is a sample string" - } - }, - "sampleInt": { - "type": "int", - "defaultValue": 5, - "metadata": { - "description": "This is a sample int" - } - }, - "sampleBool": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "This is a sample bool" - } - } - }, - "variables": { - }, - "resources": [ - { - "apiVersion": "2015-01-01", - "type": "Microsoft.Resources/deployments", - "name": "createVariables", - "dependsOn": [], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "https://raw.githubusercontent.com/anhowe/scratch/master/bool-inline/inline.json", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "sampleString": { - "value": "[parameters('sampleString')]" - }, - "sampleInt": { - "value": "[parameters('sampleInt')]" - }, - "sampleBool": { - "value": "[parameters('sampleBool')]" - } - } - } - } - ] -} diff --git a/bool-inline/inline.json b/bool-inline/inline.json deleted file mode 100644 index c81c582..0000000 --- a/bool-inline/inline.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json# ", - "contentVersion": "1.0.0.0", - "parameters": { - "sampleString": { - "type": "string", - "metadata": { - "description": "This is a sample string" - } - }, - "sampleInt": { - "type": "int", - "metadata": { - "description": "This is a sample int" - } - }, - "sampleBool": { - "type": "bool", - "metadata": { - "description": "This is a sample bool" - } - } - }, - "variables": { - "concatString": "[concat('samplestring',parameters('sampleString'))]", - "concatInt": "[concat('sampleint', parameters('sampleInt'))]", - "sampleBool1": "[parameters('sampleBool')]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "anhowe0902oms", - "apiVersion": "2015-05-01-preview", - "location": "Standard_GRS", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - } - ] -} diff --git a/bool/README.md b/bool/README.md deleted file mode 100644 index 33997fa..0000000 --- a/bool/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Demonstratre concatenation - -This Microsoft Azure template demonstrates concatenation. - - - - diff --git a/bool/azuredeploy.json b/bool/azuredeploy.json deleted file mode 100644 index 6d5e5fb..0000000 --- a/bool/azuredeploy.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "sampleString": { - "type": "string", - "defaultValue": "hello", - "metadata": { - "description": "This is a sample string" - } - }, - "sampleInt": { - "type": "int", - "defaultValue": 5, - "metadata": { - "description": "This is a sample int" - } - }, - "sampleBool": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "This is a sample bool" - } - } - }, - "variables": { - "concatString": "[concat('samplestring',parameters('sampleString'))]", - "concatInt": "[concat('sampleint', parameters('sampleInt'))]", - "concatBool": "[concat('samplebool', parameters('sampleBool'))]" - }, - "resources": [ - ] -} diff --git a/cservice/README.md b/cservice/README.md deleted file mode 100644 index 3bf2809..0000000 --- a/cservice/README.md +++ /dev/null @@ -1,190 +0,0 @@ -# Clusters with Mesos/Marathon/Chronos or Swarm Orchestrators - -These Microsoft Azure templates create various cluster combinations with Mesos/Marathon/Chronos or Swarm Orchestrators. - -Portal Launch Button|Cluster Type|Walkthrough Instructions ---- | --- | --- -|Mesos with windows jumpbox|[Mesos Cluster Walkthrough](#mesos-cluster-walkthrough) -|Swarm Cluster|[Swarm Cluster Walkthrough](#swarm-cluster-walkthrough) - -# Mesos Cluster Walkthrough - -Once your cluster has been created you will have a resource group containing 3 parts: - -1. a set of 1,3,5 masters in a master specific availability set. Each master's SSH can be accessed via the public dns address at ports 2200..2204 - -2. a set of agents behind in an agent specific availability set. The agent VMs must be accessed through the master, or jumpbox - -3. if chosen, a windows or linux jumpbox - -The following image is an example of a cluster with 1 jumpbox, 3 masters, and 3 agents: - -![Image of Mesos cluster on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos.png) - -You can see the following parts: - -1. **Mesos on port 5050** - Mesos is the distributed systems kernel that abstracts cpu, memory and other resources, and offers these to services named "frameworks" for scheduling of workloads. -2. **Marathon on port 8080** - Marathon is a scheduler for Mesos that is equivalent to init on a single linux machine: it schedules long running tasks for the whole cluster. -3. **Chronos on port 4400** - Chronos is a scheduler for Mesos that is equivalent to cron on a single linux machine: it schedules periodic tasks for the whole cluster. -4. **Docker on port 2375** - The Docker engine runs containerized workloads and each Master and Agent run the Docker engine. Mesos runs Docker workloads, and examples on how to do this are provided in the Marathon and Chronos walkthrough sections of this readme. -5. **Swarm on port 2376** - Swarm is an experimental framework from Docker used for scheduling docker style workloads. The Swarm framework is disabled by default because it has a showstopper bug where it grabs all the resources [link to Swarm show stopper!](https://github.com/docker/swarm/issues/1183). As a workaround, you will notice in the walkthrough below, you can run your Docker workloads in Marathon and Chronos. - -All VMs are on the same private subnet, 10.0.0.0/18, and fully accessible to each other. - -## Installation Notes - -Here are notes for troubleshooting: - * Internet Explorer does not work with Marathon ("Create" button does not work), so you will need to download Chrome or Firefox on the windows jumpbox. - * the installation log for the linux jumpbox, masters, and agents are in /var/log/azure/cluster-bootstrap.log - * even though the VMs finish quickly Mesos can take 5-15 minutes to install, check /var/log/azure/cluster-bootstrap.log for the completion status. - * the linux jumpbox is based on https://github.com/anhowe/ubuntu-devbox and will take 1 hour to configure. Visit https://github.com/anhowe/ubuntu-devbox to learn how to know when setup is completed, and then how to access the desktop via VNC and an SSH tunnel. - -## Template Parameters -When you launch the installation of the cluster, you need to specify the following parameters: -* `adminPassword`: self-explanatory -* `jumpboxEndpointDNSName`: this is the public DNS name for the entrypoint that SWARM is going to use to deploy containers in the cluster. -* `managementEndpointDNSName`: this is the public DNS name for the jumpbox that you will use to connect to the cluster. You just need to specify an unique name, the FQDN will be created by adding the necessary subdomains based on where the cluster is going to be created. Ex. MesosCluster, Azure will add westus.cloudapp.azure.com to create the FQDN for the jumpbox. -* `applicationEndpointDNSName`: this is the public DNS for the application. It has a load balancer with ports 80 and 443 open. -* `agentCount`: the number of Mesos Agents that you want to create in the cluster. You are allowed to create 1 to 100 agents -* `masterCount`: Number of Masters. Currently the template supports 3 configurations: 1, 3 and 5 Masters cluster configuration. -* `agentVMSize`: The type of VM that you want to use for each node in the cluster. The default size is D1 (1 core 3.5GB RAM) but you can change that if you expect to run workloads that require more RAM or CPU resources. -* `sshRSAPublicKey`: Configure all linux machines with the SSH rsa public key string. Use 'disabled' to not configure access with SSH rsa public key. - -## Marathon - -This walk through is based the wonderful digital ocean tutorial: https://www.digitalocean.com/community/tutorials/how-to-configure-a-production-ready-mesosphere-cluster-on-ubuntu-14-04 - -1. Get your endpoints to cluster - 1. browse to https://portal.azure.com - - 2. then click browse all, followed by "resource groups", and choose your resource group - - ![Image of resource groups in portal](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/portal-resourcegroups.png) - - 3. then expand your resources, and copy the dns names of your jumpbox (if chosen), and your NAT public ip addresses. - - ![Image of public ip addresses in portal](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/portal-publicipaddresses.png) - -2. Connect to your cluster - 1. linux jumpbox - start a VNC to the jumpbox using instructions https://github.com/anhowe/ubuntu-devbox. The jumpbox takes an hour to configure. If the desktop is not ready, you can tail /var/log/azure/cluster-bootstrap.log to watach installation. - 2. windows jumpbox - remote desktop to the windows jumpbox - 3. no jumpbox - SSH to port 2200 on your NAT creating a tunnel to port 5050 and port 8080. Then use the browser of your desktop to browse these ports. - -3. browse to the Mesos UI http://master0:5050 - 1. linux jumpbox - in top right corner choose Applications->Internet->Chrome and browse to http://master0:5050 - 2. windows jumpbox - open browser and browse to http://master0:5050 - 3. no jumpbox - browse to http://localhost:5050 - -4. Browse Mesos: - 1. scroll down the page and notice your resources of CPU and memory. These are your agents - - ![Image of Mesos cluster on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-webui.png) - - 2. On top of page, click frameworks and notice your Marathon and Swarm frameworks - - ![Image of Mesos cluster frameworks on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-frameworks.png) - - 3. On top of page, click agents and you can see your agents. On windows or linux jumpbox you can also drill down into the slave and see its logs. - - ![Image of Mesos agents on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-agents.png) - -5. browse and explore Marathon UI http://master0:8080 (or if using tunnel http://localhost:8080 ) - -6. start a long running job in Marathon *Note: Download Chrome to use this instruction. As of Nov 2015, there is a bug where the "Create" button does not work in Explorer* - 1. click "+New App" - 2. type "myfirstapp" for the id - 3. type "/bin/bash -c "for i in {1..5}; do echo MyFirstApp $i; sleep 1; done" for the command - 4. scroll to bottom and click create - - ![Image of Marathon new app dialog](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/marathon-newapp.png) - -7. you will notice the new app change state from not running to running - - ![Image of the new application status](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/marathon-newapp-status.png) - -8. browse back to Mesos http://master0:5050. You will notice the running tasks and the completed tasks. Click on the host of the completed tasks and also look at the sandbox. - - ![Image of Mesos completed tasks](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-completed-tasks.png) - -9. All nodes are running docker, so to run a docker app browse back to Marathon http://master0:8080, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to see that it has run: - - ![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/marathon-docker.png) - -## Chronos Walkthrough - -1. from the jumpbox browse to http://master0:4400/, and verify you see the Marathon Web UI: - - ![Image of Chronos UI](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/chronos-ui.png) - -2. Click Add and fill in the following details: - 1. Name - "MyFirstApp" - 2. Command - "echo "my first app on Chronos"" - 3. Owner, and Owner Name - you can put random information Here - 4. Schedule - Set to P"T1M" in order to run this every minute - - ![Image of adding a new scheduled operation in Chronos](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/chronos.png) - -3. Click Create - -4. Watch the task run, and then browse back to the Mesos UI http://master0:5050 and observe the output in the completed task. - -5. All nodes are running docker, so to run a docker app browse back to Chronos http://master0:4400, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to verify that it has run: - - ![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/chronos-docker.png) - - # Swarm Cluster Walkthrough - - Once your cluster has been created you will have a resource group containing 2 parts: - - 1. a set of 1,3,5 masters in a master specific availability set. Each master's SSH can be accessed via the public dns address at ports 2200..2204 - - 2. a set of agents behind in an agent specific availability set. The agent VMs must be accessed through the master. - - The following image is an example of a cluster with 3 masters, and 3 agents: - - ![Image of Swarm cluster on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/swarm.png) - - All VMs are on the same private subnet, 10.0.0.0/18, and fully accessible to each other. - -## Explore Swarm with Simple hello world - 1. After successfully deploying the template write down the two output master and agent FQDNs. - 2. SSH to port 2200 of the master FQDN - 3. Type `docker -H 10.0.0.5:2375 info` to see the status of the agent nodes. - ![Image of docker info](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/dockerinfo.png) - 4. Type `docker -H 10.0.0.5:2375 run hello-world` to see the hello-world test app run on one of the agents - -## Explore Swarm with a web-based Compose Script, then scale the script to all agents - 1. After successfully deploying the template write down the two output master and agent FQDNs. - 2. create the following docker-compose.yml file with the following content: -``` -web: - image: "yeasy/simple-web" - ports: - - "80:80" - restart: "always" -``` - 3. type `export DOCKER_HOST=10.0.0.5:2375` so that docker-compose automatically hits the swarm endpoints - 4. type `docker-compose up -d` to create the simple web server. this will take about a minute to pull the image - 5. once completed, type `docker ps` to see the running image. - ![Image of docker ps](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/dockerps.png) - 6. in your web browser hit the agent FQDN endpoint you recorded in step #1 and you should see the following page, with a counter that increases on each refresh. - ![Image of the web page](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/swarmbrowser.png) - 7. You can now scale the web application by typing `docker-compose scale web=3`, and this will scale to the rest of your agents. The Azure load balancer will automatically pick up the new containers. - ![Image of docker scaling](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/dockercomposescale.png) - -# Sample Workloads - -Try the following workloads to test your new mesos cluster. Run these on Marathon using the examples above - -1. **Folding@Home** - [docker run rgardler/fah](https://hub.docker.com/r/rgardler/fah/) - Folding@Home is searching for a cure for Cancer, Alzheimers, Parkinsons and other such diseases. Donate some compute time to this fantastic effort. - -2. **Mount Azure Files volume within Docker Container** - [docker run --privileged anhowe/azure-file-workload STORAGEACCOUNTNAME STORAGEACCOUNTKEY SHARENAME](https://github.com/anhowe/azure-file-workload) - From each container mount your Azure storage by using Azure files - -# Questions -**Q.** Why is there a jumpbox for the mesos Cluster? - -**A.** The jumpbox is used for easy troubleshooting on the private subnet. The Mesos Web UI requires access to all machines. Also the web UI. You could also consider using OpenVPN to access the private subnet. - -**Q.** My cluster just completed but Mesos is not up. - -**A.** After your template finishes, your cluster is still running installation. You can run "tail -f /var/log/azure/cluster-bootstrap.log" to verify the status has completed. diff --git a/cservice/azuredeploy.json b/cservice/azuredeploy.json deleted file mode 100644 index f9dbdd3..0000000 --- a/cservice/azuredeploy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "jumpboxOS": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "jumpboxEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the jumpbox. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "managementEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the container service. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "applicationEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the application. The concatenation of the domain name label 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 Mesos agents for the cluster. This value can be from 1 to 100" - }, - "allowedValues": [ - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, - 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 - ] - }, - "masterCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 1, - 3, - 5 - ], - "metadata": { - "description": "The number of Mesos masters for the cluster." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A1", - "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "sshRSAPublicKey": { - "type": "string", - "defaultValue": "disabled", - "metadata": { - "description": "Configure all linux machines with the SSH rsa public key string. Use 'disabled' to not configure access with SSH rsa public key." - } - } - }, - "variables": {}, - "resources": [ - { - "apiVersion": "2015-11-01-preview", - "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", - "name":"[concat('containerservice-',resourceGroup().name)]", - "properties": { - "orchestratorProfile": { - "orchestratorType": "Mesos" - }, - "masterProfile": { - "count": "[parameters('masterCount')]", - "dnsPrefix": "[parameters('managementEndpointDNSNamePrefix')]" - }, - "agentPoolProfiles": [ - { - "name": "agentpools", - "count": "[parameters('agentCount')]", - "vmSize": "[parameters('agentVMSize')]", - "dnsPrefix": "[parameters('applicationEndpointDNSNamePrefix')]" - } - ], - "osProfile": { - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "linuxConfiguration": { - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('sshRSAPublicKey')]" - } - ] - } - } - }, - "jumpboxProfile": { - "osType": "[parameters('jumpboxOS')]", - "dnsPrefix": "[parameters('jumpboxEndpointDNSNamePrefix')]" - } - } - } - ] -} diff --git a/cservice/azuredeploy.parameters.json b/cservice/azuredeploy.parameters.json deleted file mode 100644 index b6147ff..0000000 --- a/cservice/azuredeploy.parameters.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "adminUsername": { - "value": "azureuser" - }, - "adminPassword": { - "value": "password1234$" - }, - "jumpboxEndpointDNSNamePrefix": { - "value": "Windows" - }, - "jumpboxEndpointDNSNamePrefix": { - "value": "anhowe1116b" - }, - "managementEndpointDNSNamePrefix": { - "value": "anhowemgmt1116b" - }, - "applicationEndpointDNSNamePrefix": { - "value": "anhoweapp1116b" - }, - "agentCount": { - "value": 3 - }, - "masterCount": { - "value": 3 - }, - "agentVMSize" : { - "value": "Standard_A1" - }, - "sshRSAPublicKey": { - "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8fhkh3jpHUQsrUIezFB5k4Rq9giJM8G1Cr0u2IRMiqG++nat5hbOr3gODpTA0h11q9bzb6nJtK7NtDzIHx+w3YNIVpcTGLiUEsfUbY53IHg7Nl/p3/gkST3g0R6BSL7Hg45SfyvpH7kwY30MoVHG/6P3go4SKlYoHXlgaaNr3fMwUTIeE9ofvyS3fcr6xxlsoB6luKuEs50h0NGsE4QEnbfSY4Yd/C1ucc3mEw+QFXBIsENHfHfZYrLNHm2L8MXYVmAH8k//5sFs4Migln9GiUgEQUT6uOjowsZyXBbXwfT11og+syPkAq4eqjiC76r0w6faVihdBYVoc/UcyupgH azureuser@linuxvm" - } -} diff --git a/cservice/deployVM0.ps1 b/cservice/deployVM0.ps1 deleted file mode 100644 index 288aace..0000000 --- a/cservice/deployVM0.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$deployName="anhowe1116b" -$RGName=$deployName -$locName="Japan East" -$templateFile= "azuredeploy.json" -$templateParameterFile= "azuredeploy.parameters.json" -Switch-AzureMode -Name AzureResourceManager -New-AzureResourceGroup -Name $RGName -Location $locName -Force - -echo New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -TemplateFile $templateFile -New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -TemplateParameterFile $templateParameterFile -TemplateFile $templateFile diff --git a/cservice/images/chronos-docker.png b/cservice/images/chronos-docker.png deleted file mode 100644 index e1744ff..0000000 Binary files a/cservice/images/chronos-docker.png and /dev/null differ diff --git a/cservice/images/chronos-ui.png b/cservice/images/chronos-ui.png deleted file mode 100644 index 41395e9..0000000 Binary files a/cservice/images/chronos-ui.png and /dev/null differ diff --git a/cservice/images/chronos.png b/cservice/images/chronos.png deleted file mode 100644 index ab044e6..0000000 Binary files a/cservice/images/chronos.png and /dev/null differ diff --git a/cservice/images/completed-hello-world.png b/cservice/images/completed-hello-world.png deleted file mode 100644 index 587dd95..0000000 Binary files a/cservice/images/completed-hello-world.png and /dev/null differ diff --git a/cservice/images/dockercomposescale.png b/cservice/images/dockercomposescale.png deleted file mode 100644 index f220a88..0000000 Binary files a/cservice/images/dockercomposescale.png and /dev/null differ diff --git a/cservice/images/dockerinfo.png b/cservice/images/dockerinfo.png deleted file mode 100644 index abab83a..0000000 Binary files a/cservice/images/dockerinfo.png and /dev/null differ diff --git a/cservice/images/dockerps.png b/cservice/images/dockerps.png deleted file mode 100644 index 44182e6..0000000 Binary files a/cservice/images/dockerps.png and /dev/null differ diff --git a/cservice/images/marathon-docker.png b/cservice/images/marathon-docker.png deleted file mode 100644 index d83c806..0000000 Binary files a/cservice/images/marathon-docker.png and /dev/null differ diff --git a/cservice/images/marathon-newapp-status.png b/cservice/images/marathon-newapp-status.png deleted file mode 100644 index 1a8bd9f..0000000 Binary files a/cservice/images/marathon-newapp-status.png and /dev/null differ diff --git a/cservice/images/marathon-newapp.png b/cservice/images/marathon-newapp.png deleted file mode 100644 index 0d1576a..0000000 Binary files a/cservice/images/marathon-newapp.png and /dev/null differ diff --git a/cservice/images/mesos-agents.png b/cservice/images/mesos-agents.png deleted file mode 100644 index d401add..0000000 Binary files a/cservice/images/mesos-agents.png and /dev/null differ diff --git a/cservice/images/mesos-completed-tasks.png b/cservice/images/mesos-completed-tasks.png deleted file mode 100644 index 94aa18a..0000000 Binary files a/cservice/images/mesos-completed-tasks.png and /dev/null differ diff --git a/cservice/images/mesos-frameworks.png b/cservice/images/mesos-frameworks.png deleted file mode 100644 index 6c99a08..0000000 Binary files a/cservice/images/mesos-frameworks.png and /dev/null differ diff --git a/cservice/images/mesos-webui.png b/cservice/images/mesos-webui.png deleted file mode 100644 index 5483632..0000000 Binary files a/cservice/images/mesos-webui.png and /dev/null differ diff --git a/cservice/images/mesos.png b/cservice/images/mesos.png deleted file mode 100644 index 315b221..0000000 Binary files a/cservice/images/mesos.png and /dev/null differ diff --git a/cservice/images/portal-publicipaddresses.png b/cservice/images/portal-publicipaddresses.png deleted file mode 100644 index ed10b94..0000000 Binary files a/cservice/images/portal-publicipaddresses.png and /dev/null differ diff --git a/cservice/images/portal-resourcegroups.png b/cservice/images/portal-resourcegroups.png deleted file mode 100644 index 9fedb98..0000000 Binary files a/cservice/images/portal-resourcegroups.png and /dev/null differ diff --git a/cservice/images/swarm-framework.png b/cservice/images/swarm-framework.png deleted file mode 100644 index 7135bad..0000000 Binary files a/cservice/images/swarm-framework.png and /dev/null differ diff --git a/cservice/images/swarm.png b/cservice/images/swarm.png deleted file mode 100644 index 7fba327..0000000 Binary files a/cservice/images/swarm.png and /dev/null differ diff --git a/cservice/images/swarmbrowser.png b/cservice/images/swarmbrowser.png deleted file mode 100644 index 1263a29..0000000 Binary files a/cservice/images/swarmbrowser.png and /dev/null differ diff --git a/cservice/swarm.json b/cservice/swarm.json deleted file mode 100644 index 3fa307a..0000000 --- a/cservice/swarm.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "adminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "managementEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the container service. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "applicationEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the application. The concatenation of the domain name label 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 Mesos agents for the cluster. This value can be from 1 to 100" - }, - "allowedValues": [ - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, - 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 - ] - }, - "masterCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 1, - 3, - 5 - ], - "metadata": { - "description": "The number of Mesos masters for the cluster." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A1", - "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "sshRSAPublicKey": { - "type": "string", - "defaultValue": "disabled", - "metadata": { - "description": "Configure all linux machines with the SSH rsa public key string. Use 'disabled' to not configure access with SSH rsa public key." - } - } - }, - "variables": {}, - "resources": [ - { - "apiVersion": "2015-11-01-preview", - "type": "Microsoft.ContainerService/containerServices", - "location": "[resourceGroup().location]", - "name":"[concat('containerservice-',resourceGroup().name)]", - "properties": { - "orchestratorProfile": { - "orchestratorType": "Swarm" - }, - "masterProfile": { - "count": "[parameters('masterCount')]", - "dnsPrefix": "[parameters('managementEndpointDNSNamePrefix')]" - }, - "agentPoolProfiles": [ - { - "name": "agentpools", - "count": "[parameters('agentCount')]", - "vmSize": "[parameters('agentVMSize')]", - "dnsPrefix": "[parameters('applicationEndpointDNSNamePrefix')]" - } - ], - "osProfile": { - "adminUsername": "[parameters('adminUsername')]", - "linuxConfiguration": { - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('sshRSAPublicKey')]" - } - ] - } - } - } - } - } - ] -} diff --git a/dynamicNATRules/README.md b/dynamicNATRules/README.md deleted file mode 100644 index 85f163c..0000000 --- a/dynamicNATRules/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Dynamic NAT Rules - -This Microsoft Azure template demonstrates dynamic NAT rules. - - - - diff --git a/dynamicNATRules/azuredeploy.json b/dynamicNATRules/azuredeploy.json deleted file mode 100644 index 8d36fdd..0000000 --- a/dynamicNATRules/azuredeploy.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name prefix for the cluster." - } - } - }, - "variables": { - "managementPublicIPAddrName": "lb-nodes-ip", - "virtualNetworkName": "vnet", - "subnetNameNode": "subnet-nodes", - "addressPrefix":"10.0.0.0/16", - "subnetPrefixNode": "10.0.2.0/24", - "subnetRefNode": "[concat(resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName')),'/subnets/',variables('subnetNameNode'))]", - "nsgName": "node-nsg", - "nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]", - "nodesLbName": "nodes", - "nodesLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('nodesLbName'))]", - "nodesLbIPConfigName": "NodesLBFrontEnd", - "nodesLbIPConfigID": "[concat(variables('nodesLbID'),'/frontendIPConfigurations/', variables('nodesLbIPConfigName'))]", - "nodesLbBackendPoolName": "node-pool", - "agentNodeCount": 3, - "vmNameNode": "agent1" - }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('managementPublicIPAddrName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsName')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('nsgID')]" - ], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetNameNode')]", - "properties": { - "addressPrefix": "[variables('subnetPrefixNode')]", - "networkSecurityGroup": { - "id": "[variables('nsgID')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('nsgName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('vmNameNode'), copyIndex(1), '-nic')]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentNodeCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/loadBalancers/', variables('nodesLbName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Network/loadBalancers/', variables('nodesLbName'), '/inboundNatRules/', 'SSH-', variables('vmNameNode'), copyIndex(1))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat('10.0.2.', copyIndex(51))]", - "subnet": { - "id": "[variables('subnetRefNode')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('nodesLbID'), '/backendAddressPools/', variables('nodesLbBackendPoolName'))]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('nodesLbID'),'/inboundNatRules/SSH-',variables('vmNameNode'),copyindex(1))]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('nodesLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('managementPublicIPAddrName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('nodesLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('managementPublicIPAddrName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('nodesLbBackendPoolName')]" - } - ], - "probes": [], - "loadBalancingRules": [] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('nodesLbName'), '/', 'SSH-', variables('vmNameNode'), copyIndex(1))]", - "location": "[resourceGroup().location]", - "copy": { - "name": "lbLoopNode", - "count": "[variables('agentNodeCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/loadBalancers/', variables('nodesLbName'))]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('nodesLbIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(1)]", - "backendPort": 22, - "enableFloatingIP": false - } - } - ] -} diff --git a/dynamicNATRules/azuredeploy.parameters.json b/dynamicNATRules/azuredeploy.parameters.json deleted file mode 100644 index e5b296b..0000000 --- a/dynamicNATRules/azuredeploy.parameters.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "dnsName": { - "value": "containerservice-anhowe920d" - } - } -} diff --git a/exerciseStgNetCmp/README.md b/exerciseStgNetCmp/README.md deleted file mode 100644 index 120d5f3..0000000 --- a/exerciseStgNetCmp/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# A resource from each of Storage, Network, and Compute - -This verifies a network, storage, and compute resource can be created. - - - - diff --git a/exerciseStgNetCmp/azuredeploy.json b/exerciseStgNetCmp/azuredeploy.json deleted file mode 100644 index a97e6c0..0000000 --- a/exerciseStgNetCmp/azuredeploy.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "Unique name for a new storage account where the VM disks will be stored." - } - }, - "dnsName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name prefix for the cluster." - } - } - }, - "variables": { }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('newStorageAccountName')]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "Standard_LRS" - } - }, - { - "type": "Microsoft.Compute/availabilitySets", - "name": "avail-set", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "lb-nodes-ip", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsName')]" - } - } - } - ] -} diff --git a/exerciseStgNetCmp/azuredeploy.parameters.json b/exerciseStgNetCmp/azuredeploy.parameters.json deleted file mode 100644 index 0c288d3..0000000 --- a/exerciseStgNetCmp/azuredeploy.parameters.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "value": "samplestg920f" - }, - "dnsName": { - "value": "sampledns920f" - } - } -} diff --git a/gaexercise/logfileexists/README.md b/gaexercise/logfileexists/README.md deleted file mode 100644 index 25f9dc3..0000000 --- a/gaexercise/logfileexists/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Demonstratre concatenation - -This Microsoft Azure template demonstrates that the log file exists. - - - - diff --git a/gaexercise/logfileexists/azuredeploy.json b/gaexercise/logfileexists/azuredeploy.json deleted file mode 100644 index ec5fbe3..0000000 --- a/gaexercise/logfileexists/azuredeploy.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed." - } - }, - "adminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "dnsNameForPublicIP": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." - } - }, - "vmSize": { - "type": "string", - "defaultValue": "Standard_D14", - "allowedValues": [ - "Standard_A1", - "Standard_D1", - "Standard_D2", - "Standard_D3", - "Standard_D4", - "Standard_D11", - "Standard_D12", - "Standard_D13", - "Standard_D14" - ], - "metadata": { - "description": "The size of the Virtual Machine." - } - } - }, - "variables": { - "osImagePublisher": "Canonical", - "osImageOffer": "UbuntuServer", - "osImageSKU": "14.04.3-LTS", - "osImageVersion": "latest", - "nicName": "myVMNic", - "addressPrefix": "10.0.0.0/16", - "subnetName": "Subnet", - "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", - "publicIPAddressName": "myPublicIP", - "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", - "vmName": "linuxvm", - "vmSize": "[parameters('vmSize')]", - "virtualNetworkName": "MyVNET", - "windowsOSVersion": "2012-R2-Datacenter", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('newStorageAccountName')]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsNameForPublicIP')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computername": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/os-',variables('vmName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.2", - "settings": { - "commandToExecute": "/bin/bash -c 'echo \"while :; do date ; host linuxvm ; wget -O/dev/null http://google.com ; ifconfig ; ip a ; sleep 1 ; done\" | nohup /bin/bash > /var/log/azure/firstinstall.log 2>&1 &'" - } - } - } - ] -} diff --git a/gaexercise/nologfileexists/README.md b/gaexercise/nologfileexists/README.md deleted file mode 100644 index 112921a..0000000 --- a/gaexercise/nologfileexists/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Demonstratre concatenation - -This Microsoft Azure template demonstrates that the log file exists. - - - - diff --git a/gaexercise/nologfileexists/azuredeploy.json b/gaexercise/nologfileexists/azuredeploy.json deleted file mode 100644 index bd2d468..0000000 --- a/gaexercise/nologfileexists/azuredeploy.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed." - } - }, - "adminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "dnsNameForPublicIP": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." - } - } - }, - "variables": { - "osImagePublisher": "Canonical", - "osImageOffer": "UbuntuServer", - "osImageSKU": "14.04.3-LTS", - "osImageVersion": "latest", - "nicName": "myVMNic", - "addressPrefix": "10.0.0.0/16", - "subnetName": "Subnet", - "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", - "publicIPAddressName": "myPublicIP", - "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", - "vmName": "linuxvm", - "vmSize": "Standard_D2", - "virtualNetworkName": "MyVNET", - "windowsOSVersion": "2012-R2-Datacenter", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('newStorageAccountName')]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsNameForPublicIP')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computername": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/os-',variables('vmName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.2", - "settings": { - "commandToExecute": "/bin/bash -c 'echo \"while :; do date ; host linuxvm ; wget -O/dev/null http://google.com ; ifconfig ; ip a ; sleep 1 ; done\" | nohup /bin/bash > /var/log/azure/mesos-scalable-cluster-bootstrap.log 2>&1 &'" - } - } - } - ] -} diff --git a/linuxvm/README.md b/linuxvm/README.md deleted file mode 100644 index 6a370fa..0000000 --- a/linuxvm/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Linux VM that takes SSH key - -This demonstrates a Linux VM that takes an SSH Key and Password. - - - - diff --git a/linuxvm/azuredeploy.json b/linuxvm/azuredeploy.json deleted file mode 100644 index 274a82a..0000000 --- a/linuxvm/azuredeploy.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed." - } - }, - "adminUserName": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "sshKeyData": { - "type": "string", - "metadata": { - "description": "SSH rsa public key file as a string." - } - }, - "dnsNameForPublicIP": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." - } - } - }, - "variables": { - "vmSize": "Standard_D2", - "vmName": "linuxvm", - "osImagePublisher": "Canonical", - "osImageOffer": "UbuntuServer", - "osImageSKU": "14.04.3-LTS", - "osImageVersion": "latest", - "osDiskName": "osDisk1", - "addressPrefix": "10.0.0.0/16", - "subnet1Name": "Subnet-1", - "subnet1Prefix": "10.0.0.0/24", - "vmStorageAccountContainerName": "vhds", - "nicName": "sshNIC", - "publicIPAddressName": "sshPublicIP", - "publicIPAddressType": "Dynamic", - "storageAccountType": "Standard_LRS", - "virtualNetworkName": "sshVNET", - "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", - "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('newStorageAccountName')]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsNameForPublicIP')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnet1Name')]", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnet1Ref')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computername": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "linuxConfiguration": { - "disablePasswordAuthentication": "false", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[parameters('sshKeyData')]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', variables('osDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]" - } - } - } - } - ] -} diff --git a/linuxvm/azuredeploy.parameters.json b/linuxvm/azuredeploy.parameters.json deleted file mode 100644 index 562ca5a..0000000 --- a/linuxvm/azuredeploy.parameters.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "value": "anhowe922a" - }, - "dnsNameForPublicIP": { - "value": "anhowe922a" - }, - "adminPassword": { - "value": "password1234$" - }, - "sshKeyData": { - "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjsySy7dmJk5w1/WBxC1MfYRHvUycHscaC/LvmH2vIOOckP1/BVEBENrDzP+YC21EK65AS+3/sFdIHYaYu4Cc3tMYkS/7CQYN/mrkJH3HZ24HoLpReMsHfjE/EfYwkVOhms5KRMwbU+1NCdykBizTp1Aibv5hhPX9BYTaigoUOWMcWL9dszSBGz3KLQxGM7ddOe1dn7FC5HP6YBtYtd5g41KKxJDcIfoPQfLcPEPuZ1TpbHo6Y9+PCufx/JIT4E1l11sziGab3ZkdKjPM8Rj99r1hopuZq/FASx3yNbYtTDMhsAZQYL4npE6j/kPYJ/LJx+N3hz2j1/XtDsNHYBWHl azureuser@c1master1" - } - } -} diff --git a/mesos-marathon/README.md b/mesos-marathon/README.md deleted file mode 100644 index 90e31b6..0000000 --- a/mesos-marathon/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# Clusters with Mesos/Marathon/Chronos or Swarm Orchestrators - -These Microsoft Azure templates create various cluster combinations with Mesos/Marathon/Chronos or Swarm Orchestrators. - -Portal Launch Button|Cluster Type|Walkthrough Instructions ---- | --- | --- -|Mesos with no jumpbox|[Mesos Cluster Walkthrough](#mesos-cluster-walkthrough) -|Mesos with windows jumpbox|[Mesos Cluster Walkthrough](#mesos-cluster-walkthrough) -|Mesos with linux jumpbox|[Mesos Cluster Walkthrough](#mesos-cluster-walkthrough) -|Swarm Cluster|[Swarm Cluster Walkthrough](#swarm-cluster-walkthrough) - -# Mesos Cluster Walkthrough - -Once your cluster has been created you will have a resource group containing 3 parts: - -1. a set of 1,3,5 masters in a master specific availability set. Each master's SSH can be accessed via the public dns address at ports 2200..2204 - -2. a set of agents behind in an agent specific availability set. The agent VMs must be accessed through the master, or jumpbox - -3. if chosen, a windows or linux jumpbox - -The following image is an example of a cluster with 1 jumpbox, 3 masters, and 3 agents: - -![Image of Mesos cluster on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos.png) - -You can see the following parts: - -1. **Mesos on port 5050** - Mesos is the distributed systems kernel that abstracts cpu, memory and other resources, and offers these to services named "frameworks" for scheduling of workloads. -2. **Marathon on port 8080** - Marathon is a scheduler for Mesos that is equivalent to init on a single linux machine: it schedules long running tasks for the whole cluster. -3. **Chronos on port 4400** - Chronos is a scheduler for Mesos that is equivalent to cron on a single linux machine: it schedules periodic tasks for the whole cluster. -4. **Docker on port 2375** - The Docker engine runs containerized workloads and each Master and Agent run the Docker engine. Mesos runs Docker workloads, and examples on how to do this are provided in the Marathon and Chronos walkthrough sections of this readme. -5. **Swarm on port 2376** - Swarm is an experimental framework from Docker used for scheduling docker style workloads. The Swarm framework is disabled by default because it has a showstopper bug where it grabs all the resources [link to Swarm show stopper!](https://github.com/docker/swarm/issues/1183). As a workaround, you will notice in the walkthrough below, you can run your Docker workloads in Marathon and Chronos. - -All VMs are on the same private subnet, 10.0.0.0/18, and fully accessible to each other. - -## Installation Notes - -Here are notes for troubleshooting: - * the installation log for the linux jumpbox, masters, and agents are in /var/log/azure/cluster-bootstrap.log - * event though the VMs finish quickly Mesos can take 5-15 minutes to install, check /var/log/azure/cluster-bootstrap.log for the completion status. - * the linux jumpbox is based on https://github.com/anhowe/ubuntu-devbox and will take 1 hour to configure. Visit https://github.com/anhowe/ubuntu-devbox to learn how to know when setup is completed, and then how to access the desktop via VNC and an SSH tunnel. - -## Template Parameters -When you launch the installation of the cluster, you need to specify the following parameters: -* `adminPassword`: self-explanatory -* `jumpboxEndpointDNSName`: this is the public DNS name for the entrypoint that SWARM is going to use to deploy containers in the cluster. -* `managementEndpointDNSName`: this is the public DNS name for the jumpbox that you will use to connect to the cluster. You just need to specify an unique name, the FQDN will be created by adding the necessary subdomains based on where the cluster is going to be created. Ex. MesosCluster, Azure will add westus.cloudapp.azure.com to create the FQDN for the jumpbox. -* `applicationEndpointDNSName`: this is the public DNS for the application. It has a load balancer with ports 80 and 443 open. -* `agentCount`: the number of Mesos Agents that you want to create in the cluster. You are allowed to create 1 to 100 agents -* `masterCount`: Number of Masters. Currently the template supports 3 configurations: 1, 3 and 5 Masters cluster configuration. -* `agentVMSize`: The type of VM that you want to use for each node in the cluster. The default size is D1 (1 core 3.5GB RAM) but you can change that if you expect to run workloads that require more RAM or CPU resources. -* `sshRSAPublicKey`: Configure all linux machines with the SSH rsa public key string. Use 'disabled' to not configure access with SSH rsa public key. - -## Marathon - -This walk through is based the wonderful digital ocean tutorial: https://www.digitalocean.com/community/tutorials/how-to-configure-a-production-ready-mesosphere-cluster-on-ubuntu-14-04 - -1. Get your endpoints to cluster - 1. browse to https://portal.azure.com - - 2. then click browse all, followed by "resource groups", and choose your resource group - - ![Image of resource groups in portal](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/portal-resourcegroups.png) - - 3. then expand your resources, and copy the dns names of your jumpbox (if chosen), and your NAT public ip addresses. - - ![Image of public ip addresses in portal](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/portal-publicipaddresses.png) - -2. Connect to your cluster - 1. linux jumpbox - start a VNC to the jumpbox using instructions https://github.com/anhowe/ubuntu-devbox. The jumpbox takes an hour to configure. If the desktop is not ready, you can tail /var/log/azure/cluster-bootstrap.log to watach installation. - 2. windows jumpbox - remote desktop to the windows jumpbox - 3. no jumpbox - SSH to port 2200 on your NAT creating a tunnel to port 5050 and port 8080. Then use the browser of your desktop to browse these ports. - -3. browse to the Mesos UI http://master0:5050 - 1. linux jumpbox - in top right corner choose Applications->Internet->Chrome and browse to http://master0:5050 - 2. windows jumpbox - open browser and browse to http://master0:5050 - 3. no jumpbox - browse to http://localhost:5050 - -4. Browse Mesos: - 1. scroll down the page and notice your resources of CPU and memory. These are your agents - - ![Image of Mesos cluster on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-webui.png) - - 2. On top of page, click frameworks and notice your Marathon and Swarm frameworks - - ![Image of Mesos cluster frameworks on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-frameworks.png) - - 3. On top of page, click agents and you can see your agents. On windows or linux jumpbox you can also drill down into the slave and see its logs. - - ![Image of Mesos agents on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-agents.png) - -5. browse and explore Marathon UI http://master0:8080 (or if using tunnel http://localhost:8080 ) - -6. start a long running job in Marathon - 1. click "+New App" - 2. type "myfirstapp" for the id - 3. type "/bin/bash -c "for i in {1..5}; do echo MyFirstApp $i; sleep 1; done" for the command - 4. scroll to bottom and click create - - ![Image of Marathon new app dialog](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/marathon-newapp.png) - -7. you will notice the new app change state from not running to running - - ![Image of the new application status](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/marathon-newapp-status.png) - -8. browse back to Mesos http://master0:5050. You will notice the running tasks and the completed tasks. Click on the host of the completed tasks and also look at the sandbox. - - ![Image of Mesos completed tasks](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/mesos-completed-tasks.png) - -9. All nodes are running docker, so to run a docker app browse back to Marathon http://master0:8080, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to see that it has run: - - ![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/marathon-docker.png) - -## Chronos Walkthrough - -1. from the jumpbox browse to http://master0:4400/, and verify you see the Marathon Web UI: - - ![Image of Chronos UI](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/chronos-ui.png) - -2. Click Add and fill in the following details: - 1. Name - "MyFirstApp" - 2. Command - "echo "my first app on Chronos"" - 3. Owner, and Owner Name - you can put random information Here - 4. Schedule - Set to P"T1M" in order to run this every minute - - ![Image of adding a new scheduled operation in Chronos](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/chronos.png) - -3. Click Create - -4. Watch the task run, and then browse back to the Mesos UI http://master0:5050 and observe the output in the completed task. - -5. All nodes are running docker, so to run a docker app browse back to Chronos http://master0:4400, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to verify that it has run: - - ![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/chronos-docker.png) - - # Swarm Cluster Walkthrough - - Once your cluster has been created you will have a resource group containing 2 parts: - - 1. a set of 1,3,5 masters in a master specific availability set. Each master's SSH can be accessed via the public dns address at ports 2200..2204 - - 2. a set of agents behind in an agent specific availability set. The agent VMs must be accessed through the master. - - The following image is an example of a cluster with 3 masters, and 3 agents: - - ![Image of Swarm cluster on azure](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/swarm.png) - - All VMs are on the same private subnet, 10.0.0.0/18, and fully accessible to each other. - -## Explore Swarm with Simple hello world - 1. After successfully deploying the template write down the two output master and agent FQDNs. - 2. SSH to port 2200 of the master FQDN - 3. Type `docker -H 10.0.0.5:2375 info` to see the status of the agent nodes. - ![Image of docker info](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/dockerinfo.png) - 4. Type `docker -H 10.0.0.5:2375 run hello-world` to see the hello-world test app run on one of the agents - -## Explore Swarm with a web-based Compose Script, then scale the script to all agents - 1. After successfully deploying the template write down the two output master and agent FQDNs. - 2. create the following docker-compose.yml file with the following content: -``` -web: - image: "yeasy/simple-web" - ports: - - "80:80" - restart: "always" -``` - 3. type `export DOCKER_HOST=10.0.0.5:2375` so that docker-compose automatically hits the swarm endpoints - 4. type `docker-compose up -d` to create the simple web server. this will take about a minute to pull the image - 5. once completed, type `docker ps` to see the running image. - ![Image of docker ps](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/dockerps.png) - 6. in your web browser hit the agent FQDN endpoint you recorded in step #1 and you should see the following page, with a counter that increases on each refresh. - ![Image of the web page](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/swarmbrowser.png) - 7. You can now scale the web application by typing `docker-compose scale web=3`, and this will scale to the rest of your agents. The Azure load balancer will automatically pick up the new containers. - ![Image of docker scaling](https://raw.githubusercontent.com/anhowe/scratch/master/mesos-marathon/images/dockercomposescale.png) - -# Sample Workloads - -Try the following workloads to test your new mesos cluster. Run these on Marathon using the examples above - -1. **Folding@Home** - [docker run rgardler/fah](https://hub.docker.com/r/rgardler/fah/) - Folding@Home is searching for a cure for Cancer, Alzheimers, Parkinsons and other such diseases. Donate some compute time to this fantastic effort. - -2. **Mount Azure Files volume within Docker Container** - [docker run --privileged anhowe/azure-file-workload STORAGEACCOUNTNAME STORAGEACCOUNTKEY SHARENAME](https://github.com/anhowe/azure-file-workload) - From each container mount your Azure storage by using Azure files - -3. **Explore Docker Hub** - explore Docker Hub for 100,000+ different container workloads: https://hub.docker.com/explore/ - -# Questions -**Q.** Why is there a jumpbox for the mesos Cluster? - -**A.** The jumpbox is used for easy troubleshooting on the private subnet. The Mesos Web UI requires access to all machines. Also the web UI. You could also consider using OpenVPN to access the private subnet. - -**Q.** My cluster just completed but Mesos is not up. - -**A.** After your template finishes, your cluster is still running installation. You can run "tail -f /var/log/azure/cluster-bootstrap.log" to verify the status has completed. diff --git a/mesos-marathon/cluster.parameters.json b/mesos-marathon/cluster.parameters.json deleted file mode 100644 index 1aad715..0000000 --- a/mesos-marathon/cluster.parameters.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "windowsAdminPassword": { - "value": "password1234$" - }, - "jumpboxEndpointDNSNamePrefix": { - "value": "swarmjb1122g" - }, - "masterEndpointDNSNamePrefix": { - "value": "swarmmgmt1122g" - }, - "agentEndpointDNSNamePrefix": { - "value": "swarmapp1122g" - }, - "agentCount": { - "value": 3 - }, - "masterCount": { - "value": 3 - }, - "agentVMSize" : { - "value": "Standard_A1" - }, - "sshRSAPublicKey": { - "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8fhkh3jpHUQsrUIezFB5k4Rq9giJM8G1Cr0u2IRMiqG++nat5hbOr3gODpTA0h11q9bzb6nJtK7NtDzIHx+w3YNIVpcTGLiUEsfUbY53IHg7Nl/p3/gkST3g0R6BSL7Hg45SfyvpH7kwY30MoVHG/6P3go4SKlYoHXlgaaNr3fMwUTIeE9ofvyS3fcr6xxlsoB6luKuEs50h0NGsE4QEnbfSY4Yd/C1ucc3mEw+QFXBIsENHfHfZYrLNHm2L8MXYVmAH8k//5sFs4Migln9GiUgEQUT6uOjowsZyXBbXwfT11og+syPkAq4eqjiC76r0w6faVihdBYVoc/UcyupgH azureuser@linuxvm" - } -} diff --git a/mesos-marathon/deployVM0.ps1 b/mesos-marathon/deployVM0.ps1 deleted file mode 100644 index c1f635c..0000000 --- a/mesos-marathon/deployVM0.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -$randomString = [System.Guid]::NewGuid().GetHashCode().ToString("X") - -#$templateFile= "mesos-cluster-with-linux-jumpbox.json" -#$templateFile= "mesos-cluster-with-windows-jumpbox.json" -$templateFile= "mesos-cluster-with-no-jumpbox.json" -#$templateFile= "swarm-cluster-with-no-jumpbox.json" -#$templateParameterFile= "cluster.parameters.json" - -$deployName="$env:USERNAME$randomString" -$RGName=$deployName -$locName="East US 2" - -Switch-AzureMode -Name AzureResourceManager -New-AzureResourceGroup -Name $RGName -Location $locName -Force - -$templateParameters = @{ windowsAdminPassword="password1234$"; -jumpboxEndpointDNSNamePrefix="testjumpbox$randomString"; -masterEndpointDNSNamePrefix="testmaster$randomString"; -masterCount=1; -agentEndpointDNSNamePrefix="testagent$randomString"; -agentCount=1; -agentVMSize="Standard_A1"; -sshRSAPublicKey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8fhkh3jpHUQsrUIezFB5k4Rq9giJM8G1Cr0u2IRMiqG++nat5hbOr3gODpTA0h11q9bzb6nJtK7NtDzIHx+w3YNIVpcTGLiUEsfUbY53IHg7Nl/p3/gkST3g0R6BSL7Hg45SfyvpH7kwY30MoVHG/6P3go4SKlYoHXlgaaNr3fMwUTIeE9ofvyS3fcr6xxlsoB6luKuEs50h0NGsE4QEnbfSY4Yd/C1ucc3mEw+QFXBIsENHfHfZYrLNHm2L8MXYVmAH8k//5sFs4Migln9GiUgEQUT6uOjowsZyXBbXwfT11og+syPkAq4eqjiC76r0w6faVihdBYVoc/UcyupgH azureuser@linuxvm" -} - -echo New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -TemplateParameterObject $templateParameters -TemplateFile $templateFile -New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -TemplateParameterObject $templateParameters -TemplateFile $templateFile - -#echo New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -TemplateParameterFile $templateParameterFile -TemplateFile $templateFile -#New-AzureResourceGroupDeployment -Name $deployName -ResourceGroupName $RGName -TemplateParameterFile $templateParameterFile -TemplateFile $templateFile diff --git a/mesos-marathon/images/chronos-docker.png b/mesos-marathon/images/chronos-docker.png deleted file mode 100644 index e1744ff..0000000 Binary files a/mesos-marathon/images/chronos-docker.png and /dev/null differ diff --git a/mesos-marathon/images/chronos-ui.png b/mesos-marathon/images/chronos-ui.png deleted file mode 100644 index 41395e9..0000000 Binary files a/mesos-marathon/images/chronos-ui.png and /dev/null differ diff --git a/mesos-marathon/images/chronos.png b/mesos-marathon/images/chronos.png deleted file mode 100644 index ab044e6..0000000 Binary files a/mesos-marathon/images/chronos.png and /dev/null differ diff --git a/mesos-marathon/images/completed-hello-world.png b/mesos-marathon/images/completed-hello-world.png deleted file mode 100644 index 587dd95..0000000 Binary files a/mesos-marathon/images/completed-hello-world.png and /dev/null differ diff --git a/mesos-marathon/images/dockercomposescale.png b/mesos-marathon/images/dockercomposescale.png deleted file mode 100644 index f220a88..0000000 Binary files a/mesos-marathon/images/dockercomposescale.png and /dev/null differ diff --git a/mesos-marathon/images/dockerinfo.png b/mesos-marathon/images/dockerinfo.png deleted file mode 100644 index abab83a..0000000 Binary files a/mesos-marathon/images/dockerinfo.png and /dev/null differ diff --git a/mesos-marathon/images/dockerps.png b/mesos-marathon/images/dockerps.png deleted file mode 100644 index 44182e6..0000000 Binary files a/mesos-marathon/images/dockerps.png and /dev/null differ diff --git a/mesos-marathon/images/marathon-docker.png b/mesos-marathon/images/marathon-docker.png deleted file mode 100644 index d83c806..0000000 Binary files a/mesos-marathon/images/marathon-docker.png and /dev/null differ diff --git a/mesos-marathon/images/marathon-newapp-status.png b/mesos-marathon/images/marathon-newapp-status.png deleted file mode 100644 index 1a8bd9f..0000000 Binary files a/mesos-marathon/images/marathon-newapp-status.png and /dev/null differ diff --git a/mesos-marathon/images/marathon-newapp.png b/mesos-marathon/images/marathon-newapp.png deleted file mode 100644 index 0d1576a..0000000 Binary files a/mesos-marathon/images/marathon-newapp.png and /dev/null differ diff --git a/mesos-marathon/images/mesos-agents.png b/mesos-marathon/images/mesos-agents.png deleted file mode 100644 index d401add..0000000 Binary files a/mesos-marathon/images/mesos-agents.png and /dev/null differ diff --git a/mesos-marathon/images/mesos-completed-tasks.png b/mesos-marathon/images/mesos-completed-tasks.png deleted file mode 100644 index 94aa18a..0000000 Binary files a/mesos-marathon/images/mesos-completed-tasks.png and /dev/null differ diff --git a/mesos-marathon/images/mesos-frameworks.png b/mesos-marathon/images/mesos-frameworks.png deleted file mode 100644 index 6c99a08..0000000 Binary files a/mesos-marathon/images/mesos-frameworks.png and /dev/null differ diff --git a/mesos-marathon/images/mesos-webui.png b/mesos-marathon/images/mesos-webui.png deleted file mode 100644 index 5483632..0000000 Binary files a/mesos-marathon/images/mesos-webui.png and /dev/null differ diff --git a/mesos-marathon/images/mesos.png b/mesos-marathon/images/mesos.png deleted file mode 100644 index 315b221..0000000 Binary files a/mesos-marathon/images/mesos.png and /dev/null differ diff --git a/mesos-marathon/images/portal-publicipaddresses.png b/mesos-marathon/images/portal-publicipaddresses.png deleted file mode 100644 index ed10b94..0000000 Binary files a/mesos-marathon/images/portal-publicipaddresses.png and /dev/null differ diff --git a/mesos-marathon/images/portal-resourcegroups.png b/mesos-marathon/images/portal-resourcegroups.png deleted file mode 100644 index 9fedb98..0000000 Binary files a/mesos-marathon/images/portal-resourcegroups.png and /dev/null differ diff --git a/mesos-marathon/images/swarm-framework.png b/mesos-marathon/images/swarm-framework.png deleted file mode 100644 index 7135bad..0000000 Binary files a/mesos-marathon/images/swarm-framework.png and /dev/null differ diff --git a/mesos-marathon/images/swarm.png b/mesos-marathon/images/swarm.png deleted file mode 100644 index 7fba327..0000000 Binary files a/mesos-marathon/images/swarm.png and /dev/null differ diff --git a/mesos-marathon/images/swarmbrowser.png b/mesos-marathon/images/swarmbrowser.png deleted file mode 100644 index 1263a29..0000000 Binary files a/mesos-marathon/images/swarmbrowser.png and /dev/null differ diff --git a/mesos-marathon/mesos-cluster-with-linux-jumpbox.json b/mesos-marathon/mesos-cluster-with-linux-jumpbox.json deleted file mode 100644 index 0c12e74..0000000 --- a/mesos-marathon/mesos-cluster-with-linux-jumpbox.json +++ /dev/null @@ -1,1014 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "linuxAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Linux Virtual Machines (SSH or Password)." - } - }, - "linuxAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Linux Virtual Machine. Not Required. If not set, you must provide a SSH key." - } - }, - "sshRSAPublicKey": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "SSH public key used for auth to all Linux machines. Not Required. If not set, you must provide a password key." - } - }, - "windowsAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported)." - } - }, - "windowsAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Windows Jumpbox Virtual Machine." - } - }, - "jumpboxEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the jumpbox. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "masterEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the master IP Address. The concatenation of the domain name label and the regional DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "agentEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the agent pool IP Address. The concatenation of the domain name label and the regional 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 Mesos agents for the cluster. This value can be from 1 to 100" - }, - "allowedValues": [ - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, - 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 - ] - }, - "masterCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 1, - 3, - 5 - ], - "metadata": { - "description": "The number of Mesos masters for the cluster." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A1", - "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "linuxPublisher": { - "type": "string", - "defaultValue": "Canonical", - "metadata": { - "description": "This is the publisher of the image used by the linux cluster" - } - }, - "linuxOffer": { - "type": "string", - "defaultValue": "UbuntuServer", - "metadata": { - "description": "This is the offer of the image used by the linux cluster" - } - }, - "linuxSku": { - "type": "string", - "defaultValue": "14.04.3-LTS", - "metadata": { - "description": "This is the linux sku used by the linux cluster" - } - }, - "linuxVersion": { - "type": "string", - "defaultValue": "latest", - "metadata": { - "description": "This is the linux version used by the linux cluster" - } - }, - "windowsJumpboxPublisher": { - "type": "string", - "defaultValue": "MicrosoftVisualStudio", - "metadata": { - "description": "This is the windows publisher used by the windows jumpbox" - } - }, - "windowsJumpboxOffer": { - "type": "string", - "defaultValue": "VisualStudio", - "metadata": { - "description": "This is the windows offer used by the windows jumpbox" - } - }, - "windowsJumpboxSku": { - "type": "string", - "defaultValue": "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", - "metadata": { - "description": "This is the windows sku used by the windows jumpbox" - } - }, - "isValidation": { - "type": "int", - "defaultValue": 0, - "allowedValues": [0,1], - "metadata": { - "description": "This is testing in the validation region" - } - }, - "disablePasswordAuthentication": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "This setting controls whether password auth is disabled for Linux VMs provisioned by this template. Default is true which disables password and makes SSH key required." - } - }, - "setLinuxConfigurationForVMCreate": { - "type": "int", - "defaultValue": 1, - "allowedValues": [0,1], - "metadata": { - "description": "This setting controls whether Linux configuration with SSH Key is passed in VM PUT Payload. Defaults to 1. If SSH Key is blank, this must be set to 0." - } - }, - "nameSuffix": { - "type": "string", - "defaultValue": "01234567", - "metadata": { - "description": "A string to include in the names of resources created. Defaults to 0. Can not be blank." - } - }, - "vmsPerStorageAccount": { - "type": "int", - "defaultValue": 5, - "metadata": { - "description": "This specifies the number of VMs per storage accounts" - } - }, - "postInstallScriptURI": { - "type": "string", - "defaultValue": "disabled", - "metadata": { - "description": "After installation, this specifies a script to download and install. To disabled, set value to 'disabled'." - } - } - }, - "variables": { - "adminUsername": "[parameters('linuxAdminUsername')]", - "adminPassword": "[parameters('linuxAdminPassword')]", - "jumpboxEndpointDNSNamePrefix": "[tolower(parameters('jumpboxEndpointDNSNamePrefix'))]", - "masterEndpointDNSNamePrefix": "[tolower(parameters('masterEndpointDNSNamePrefix'))]", - "agentEndpointDNSNamePrefix": "[tolower(parameters('agentEndpointDNSNamePrefix'))]", - "agentCount": "[parameters('agentCount')]", - "masterCount": "[parameters('masterCount')]", - "agentVMSize": "[parameters('agentVMSize')]", - "sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", - "linuxPublisher": "[parameters('linuxPublisher')]", - "linuxOffer": "[parameters('linuxOffer')]", - "linuxSku": "[parameters('linuxSku')]", - "linuxVersion": "[parameters('linuxVersion')]", - "windowsJumpboxPublisher": "[parameters('windowsJumpboxPublisher')]", - "windowsJumpboxOffer": "[parameters('windowsJumpboxOffer')]", - "windowsJumpboxSku": "[parameters('windowsJumpboxSku')]", - "windowsAdminUsername": "[parameters('windowsAdminUsername')]", - "windowsAdminPassword": "[parameters('windowsAdminPassword')]", - "vmsPerStorageAccount": "[parameters('vmsPerStorageAccount')]", - "postInstallScriptURI": "[parameters('postInstallScriptURI')]", - - "nameSuffix": "[parameters('nameSuffix')]", - - "isValidation": "[parameters('isValidation')]", - "storageLocations": [ - "[resourceGroup().location]", - "East US 2 (Stage)" - ], - "storageLocation": "[variables('storageLocations')[variables('isValidation')]]", - - "sshKeyPath": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]", - "disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]", - "setLinuxConfigurationForVMCreate": "[parameters('setLinuxConfigurationForVMCreate')]", - "linuxConfigurations": [ - {}, - { - "disablePasswordAuthentication": "[variables('disablePasswordAuthentication')]", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[variables('sshRSAPublicKey')]" - } - ] - } - } - ], - "linuxConfiguration": "[variables('linuxConfigurations')[variables('setLinuxConfigurationForVMCreate')]]", - - "orchestratorName": "mesos", - - "masterPublicIPAddressName": "[concat(variables('orchestratorName'), '-master-ip-', variables('masterEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "agentPublicIPAddressName": "[concat(variables('orchestratorName'), '-agent-ip-', variables('agentEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "jumpboxPublicIPAddressName": "[concat(variables('orchestratorName'), '-jumpbox-ip-', variables('jumpboxEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - - "marathonEnabled": true, - "chronosEnabled": true, - "swarmEnabled": false, - "osImagePublisher": "[variables('linuxPublisher')]", - "osImageOffer": "[variables('linuxOffer')]", - "osImageSKU": "[variables('linuxSku')]", - "osImageVersion": "[variables('linuxVersion')]", - - "virtualNetworkName": "[concat(variables('orchestratorName'), '-vnet-', variables('nameSuffix'))]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetName": "[concat(variables('orchestratorName'), '-subnet')]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "addressPrefix": "10.0.0.0/16", - "subnetPrefix": "10.0.0.0/18", - "storageAccountType": "Standard_GRS", - "storageAccountPrefixes": [ - "0","6","c","i","o","u","1","7","d","j","p","v", - "2","8","e","k","q","w","3","9","f","l","r","x", - "4","a","g","m","s","y","5","b","h","n","t","z" - ], - "storageAccountPrefixesCount": "[length(variables('storageAccountPrefixes'))]", - "storageAccountBaseName": "[concat(uniqueString(variables('masterEndpointDNSNamePrefix')), variables('orchestratorName'))]", - "masterStorageAccountName": "[concat(variables('storageAccountBaseName'), '0')]", - "omsStorageAccount": "none", - "omsStorageAccountKey": "none", - "clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('swarmEnabled'),' ',variables('marathonEnabled'),' ',variables('chronosEnabled'),' ',variables('omsStorageAccount'),' ',variables('omsStorageAccountKey'),' ', variables('adminUsername'),' ',variables('postInstallScriptURI'))]", - - "jumpboxNSGName": "[concat(variables('orchestratorName'), '-jumpbox-nsg-', variables('nameSuffix'))]", - "jumpboxNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('jumpboxNSGName'))]", - "jumpboxAddr": 4, - "jumpboxVMName": "[concat('jb-', variables('nameSuffix'))]", - "jumpboxVMSize": "Standard_A1", - - "jumpboxLinuxInstallParameters": "[concat(variables('adminUsername'))]", - "jumpboxLinuxCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-ubuntu.sh ',variables('jumpboxLinuxInstallParameters'),' >> /var/log/azure/jumpbox-bootstrap.log 2>&1 &\" &')]", - - "setBrowserFirstTabDefaultPrefix": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Type String -Value http://\"", - "setBrowserFirstTabDefaultSuffix": "0:5050", - "jumpboxWindowsCustomScript": "[concat(variables('setBrowserFirstTabDefaultPrefix'),variables('masterVMNamePrefix'),variables('setBrowserFirstTabDefaultSuffix'))]", - - "masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]", - "masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]", - "masterVMNamePrefix": "[concat(variables('orchestratorName'), '-master-', variables('nameSuffix'), '-')]", - "masterFirstAddr": 5, - "masterAvailabilitySet": "[concat(variables('orchestratorName'), '-master-availabilitySet-', variables('nameSuffix'))]", - "masterLbName": "[concat(variables('orchestratorName'), '-master-lb-', variables('nameSuffix'))]", - "masterVMSize":"Standard_A1", - "masterLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('masterLbName'))]", - "masterLbIPConfigName": "[concat(variables('orchestratorName'), '-master-lbFrontEnd-', variables('nameSuffix'))]", - "masterLbIPConfigID": "[concat(variables('masterLbID'),'/frontendIPConfigurations/', variables('masterLbIPConfigName'))]", - "masterLbBackendPoolName": "[concat(variables('orchestratorName'), '-master-pool-', variables('nameSuffix'))]", - "masterCustomScript": "[concat('/bin/bash -c \"/bin/bash /opt/azure/containers/configure-mesos-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]", - - "agentNSGName": "agent-nsg", - "agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]", - "agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]", - "agentFirstAddr": 20, - "agentVMNamePrefix": "[concat(variables('orchestratorName'), '-agent-', variables('nameSuffix'), '-')]", - "agentAvailabilitySet": "[concat(variables('orchestratorName'), '-agent-availabilitySet-', variables('nameSuffix'))]", - "agentsLbName": "[concat(variables('orchestratorName'), '-agent-lb-', variables('nameSuffix'))]", - "agentsLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('agentsLbName'))]", - "agentsLbIPConfigName": "[concat(variables('orchestratorName'), '-agent-lbFrontEnd-', variables('nameSuffix'))]", - "agentsLbIPConfigID": "[concat(variables('agentsLbID'),'/frontendIPConfigurations/', variables('agentsLbIPConfigName'))]", - "agentsLbBackendPoolName": "[concat(variables('orchestratorName'), '-agent-pool-', variables('nameSuffix'))]", - "agentStorageAccountsCount": "[add(div(variables('agentCount'), variables('vmsPerStorageAccount')), mod(add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),2), add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),1)))]", - "agentsPerIPv4Octet": 200, - "agentCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-mesos-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]" - }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('jumpboxPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('jumpboxEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('jumpboxNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('jumpboxVMName'), '-nic')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('jumpboxPublicIPAddressName'))]", - "[variables('vnetID')]", - "[variables('jumpboxNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('jumpboxNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfig", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], variables('jumpboxAddr'))]", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('jumpboxPublicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('jumpboxVMName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('jumpboxVMName'), '-nic')]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('jumpboxVMSize')]" - }, - "osProfile": { - "computername": "[variables('jumpboxVMName')]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/7VYe2/bNhD/X5/i5hjBBlSWnT42ZDUGN3bbYI0dxE1RrC1SWjpbqi1SJanYXtd99h1JyW83ddAZiC2R9/jx3szRT8Eg4cGAqdjzFGrwZ56HYSygojSTOuEjyAc51zlEeDsQM0g4bUwmIDhkSQTVasWLmEYvU8Bmn4aed7T68Y7gkkmWokapNra81l/XV53rfueqWW14L3sXnfb5VbMSxCLFoLrYrHhvLrqti07zYyyU5iTrY4HwWqE8hVXK5ToYKRAlhqAQXW7fpkYIrTu5lQ3IC+BnIk3plM9zHupEcLWTzEOucomtv+mri3oq5PjnX7wvHsARuC3QMYKBDkYtJAokKjG5ZYMJEpnZubIL+BLZRMfzZo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VSjJpBrqSVShIzptQ08tK5eWhW7KuQEfXf3ZZa8BbR/fRpp/fcUxmbcqhUjXia391W5bIQdlqhOwuldaXq1LyXS5o3KJPh/BsUKIaeGUo8o2cPqDvCoTReYb0jd5lS8W5z14g0mFmReVaw7DfsDuLCO2//fHXz9qLXvmhd3rTP+61nrzrNxkGCcm6uev1Ov3/e695ctLqtF3R7OlxC+9l1/6YUY55b7fYVvR4k6iDid3RBhQB1GKxuwgc4PqayiOH23qHii3oT1N6am0ZOxVo58TMZDbb3DhI/I6NJQe3apzsMXZ5HEucHCaAlN9xSLNJDEsLx/2fr1f5yfA/OzW50mIxF7zqMbdHp7oN40Re/l3lPXdhdnL193VTZbmoGF9dRz16d76FdjhxmDliMY4bLDycEY7RC4oYonwZDlJyZSYTGUb9kWtRbM1iU08XaIr036vXdsBczwFksyXK7acIIAp1mDpK9SJXXomhSGwkxmqC5FQV2pgqo1VNZDty6H1q5PmEdTPAmzKWkkeuGpdGTR7UIByvHjLKxSQc4mPGOscwfOlqZ2lN8LzA7uLqgorNlE9R0H7vzX2j/AQUIKZyIEwAA\n path: /opt/azure/containers/configure-ubuntu.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('linuxPublisher')]", - "offer": "[variables('linuxOffer')]", - "sku": "[variables('linuxSku')]", - "version": "[variables('linuxVersion')]" - }, - "osDisk": { - "name": "[concat(variables('jumpboxVMName'),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('jumpboxVMName'), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('jumpboxVMName'), '-nic'))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('jumpboxVMName'),'/installcustomscript')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('jumpboxVMName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "commandToExecute": "[variables('jumpboxLinuxCustomScript')]" - } - } - }, - - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('masterStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('masterAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('masterPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('masterEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('masterLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('masterLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('masterPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('masterLbBackendPoolName')]" - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('masterLbName'), '/', 'SSH-', variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "masterLbLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('masterLbIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(2200)]", - "backendPort": 22, - "enableFloatingIP": false - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('masterNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]", - "[variables('vnetID')]", - "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]", - "[variables('masterNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('masterNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], copyIndex(variables('masterFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('masterLbID'), '/backendAddressPools/', variables('masterLbBackendPoolName'))]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/',variables('masterAvailabilitySet'))]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('masterAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('masterVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/+0aa1PbSPK7fsWscAXYtSzbwAZIebcIOBsqAVM25G435IKQxlixrFE0ksGw/u/X0zOjh5F5ZLNVW3WXqmBpHt09/e4erfxgX/qhfenwkWGsfPs/Y4Xss3DoX6UxJUeUM056ISWv2Y0h5k5HPid+yBMnCDhJRpQMWRCwaz+8Ii6bRCykYcJhoUVuGRtTGsX4MkFIE4cnVA04sZOMWFiYda5g71+i3eA0IdaNYVB3xIgJVMaJoEzCd4NUoAc65fmcxGehaXhOQo0I0MO+wb/2+kefP3T7g8Peccd0RhOa2PzaiSe7rUaz0bRux9aIJUP/xjQW2XYCJ4LlNOYLU8bR3uC029/vnR2fdmp3rbkaOOl33xz+G0baeuTNYX9wundw0IfBjbmkpnu89/p996BzgWeq3W3OyZ/EuR6T1bso9sOEJAz4T+O1WnN9vnoBkPp7p297x4v7th7Zt/+23zvuDRa3/fz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9URYPfu39X0SdAgEoLwAA\n path: /opt/azure/containers/configure-mesos-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('masterVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('masterCustomScript')]" - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountPrefixes')[mod(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),copyIndex(1))]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentStorageAccountsCount')]" - }, - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('agentAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('agentPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('agentEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('agentsLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('agentsLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('agentPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('agentsLbBackendPoolName')]" - } - ], - "loadBalancingRules": [ - { - "name": "LBRuleHTTP", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 80, - "backendPort": 80, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPProbe')]" - } - } - }, - { - "name": "LBRuleHTTPS", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 443, - "backendPort": 443, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPSProbe')]" - } - } - }, - { - "name": "LBRulePort8080", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 8080, - "backendPort": 8080, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpPort8080Probe')]" - } - } - } - ], - "probes": [ - { - "name": "tcpHTTPProbe", - "properties": { - "protocol": "tcp", - "port": 80, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpHTTPSProbe", - "properties": { - "protocol": "tcp", - "port": 443, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpPort8080Probe", - "properties": { - "protocol": "tcp", - "port": 8080, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - } - ], - "inboundNatRules": [] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('agentNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "http", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 210, - "direction": "Inbound" - } - }, - { - "name": "https", - "properties": { - "description": "Allow HTTPS", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 220, - "direction": "Inbound" - } - }, - { - "name": "Tcp8080", - "properties": { - "description": "Allow port 8080", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 230, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[variables('agentsLbID')]", - "[variables('vnetID')]", - "[variables('agentNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('agentNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0.0/18')[0], div(copyIndex(),variables('agentsPerIPv4Octet')), '.', add(mod(copyIndex(),variables('agentsPerIPv4Octet')), variables('agentFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/', variables('agentAvailabilitySet'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('agentAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('agentVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/+0aa1PbSPK7fsWscAXYtSzbwAZIebcIOBsqAVM25G435IKQxlixrFE0ksGw/u/X0zOjh5F5ZLNVW3WXqmBpHt09/e4erfxgX/qhfenwkWGsfPs/Y4Xss3DoX6UxJUeUM056ISWv2Y0h5k5HPid+yBMnCDhJRpQMWRCwaz+8Ii6bRCykYcJhoUVuGRtTGsX4MkFIE4cnVA04sZOMWFiYda5g71+i3eA0IdaNYVB3xIgJVMaJoEzCd4NUoAc65fmcxGehaXhOQo0I0MO+wb/2+kefP3T7g8Peccd0RhOa2PzaiSe7rUaz0bRux9aIJUP/xjQW2XYCJ4LlNOYLU8bR3uC029/vnR2fdmp3rbkaOOl33xz+G0baeuTNYX9wundw0IfBjbmkpnu89/p996BzgWeq3W3OyZ/EuR6T1bso9sOEJAz4T+O1WnN9vnoBkPp7p297x4v7th7Zt/+23zvuDRa3/fzItr19PNfx3lEXiH45RxH8dKPH33V/h+HtuZbM3h9n/e7ZoCtOuDM3TnqD08NjOPP794P9/uHJ6Vn/ULCoOTfe9o66B4f9jmmP2ITatWynaXw4QnQXI8aTEHh+IUbOjl4DVEW2XAGUc+qRVW43fvz4n6a18+l87SP+/HS+/mPNPm/Zq2KvEsSSvedr2e71H9V2vff13qA7OHt93D3tmK2m0JCGqbXvCJUdrCkNk11SKyiBWV5xElNQqGyJpGZhzRs/5gnZ87w4W5cpi146nQhm7OoT6GHNGzmBj3WiD42DZYxFrYPp4mudLGgXElMaqZOyIsGK8oBGU1AcWFN40wty3sJ8/mJWujd0W5MJC8mbNHSFYfPKZQYNOXi2vVv4c0yTaxaP19aNO4OQFSKn0KkJzSKCmwTcXQzeI5g6lwGFZWKmjwP0LXWCZDTrtGB4yGLig2Mkd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s1bxYi+n6wsdnwmEOdYKUIzCrE6CSd8k8e3bqSvejYOgV2fXgU/L2RYA6c9XA0CoUxIXPeZ4E0B3FLGS8CE8ZMDJs4oSpE9wzICGdvI5siHQ39j26nD8ifjwFZpFhS8EucBUgZ7VR5Q1lWeDS7s1qoDiXMUNuF+E3oIm4X6gAhPEYFNejpPar+WTmFSA8ck5Nkjqm8qpaTVVOovQvo83U302ukH4ayisgQQ/wpxCSILIHMxHepb8SH7Iprorqp2QAqtgsfnNWVjBckPd8RF8cb0KXyUKFR0mZSPpE8lUrfeZp5ruwjw0e+MqfUk0jNtJgDORDSRqhRPN+N24sNsqx3yuurSA96+D3UBbkcYjvCPLMwWf8+FHkp+RcOcx77WE9UaZTMTbf5irRySbPBFQS1CAHqip6i0WJXNhQUaaT3xs+tFqE1M6GaDyX23QG+d8+cMQfstmiwpnaY4DKVn3pit8kQAItugWeuM4v6bCuQOX3WRA+xr6L2T4bDvGmOquLZVkhNDP7Blwwyyxdr7abT75frSb2TzDXURoVcPzyC8ELw4Bd2Y7oMekukgV5fgJ1gRNZglBFZwPWkfYvL1rkheSMdB7ytG/AX/ERzYr9p902Y7t9URYPfu39X0SdAgEoLwAA\n path: /opt/azure/containers/configure-mesos-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://',variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))), '.blob.core.windows.net/vhds/', variables('agentVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(), '/configureagent')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('agentVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('agentCustomScript')]" - } - } - } - ], - "outputs": { - "jumpboxFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('jumpboxPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "masterFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "agentFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))).dnsSettings.fqdn]" - } - } -} diff --git a/mesos-marathon/mesos-cluster-with-no-jumpbox.json b/mesos-marathon/mesos-cluster-with-no-jumpbox.json deleted file mode 100644 index c3ae131..0000000 --- a/mesos-marathon/mesos-cluster-with-no-jumpbox.json +++ /dev/null @@ -1,885 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "linuxAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Linux Virtual Machines (SSH or Password)." - } - }, - "linuxAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Linux Virtual Machine. Not Required. If not set, you must provide a SSH key." - } - }, - "sshRSAPublicKey": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "SSH public key used for auth to all Linux machines. Not Required. If not set, you must provide a password key." - } - }, - "windowsAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported)." - } - }, - "windowsAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Windows Jumpbox Virtual Machine." - } - }, - "jumpboxEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the jumpbox. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "masterEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the master IP Address. The concatenation of the domain name label and the regional DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "agentEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the agent pool IP Address. The concatenation of the domain name label and the regional 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 Mesos agents for the cluster. This value can be from 1 to 100" - }, - "allowedValues": [ - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, - 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 - ] - }, - "masterCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 1, - 3, - 5 - ], - "metadata": { - "description": "The number of Mesos masters for the cluster." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A1", - "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "linuxPublisher": { - "type": "string", - "defaultValue": "Canonical", - "metadata": { - "description": "This is the publisher of the image used by the linux cluster" - } - }, - "linuxOffer": { - "type": "string", - "defaultValue": "UbuntuServer", - "metadata": { - "description": "This is the offer of the image used by the linux cluster" - } - }, - "linuxSku": { - "type": "string", - "defaultValue": "14.04.3-LTS", - "metadata": { - "description": "This is the linux sku used by the linux cluster" - } - }, - "linuxVersion": { - "type": "string", - "defaultValue": "latest", - "metadata": { - "description": "This is the linux version used by the linux cluster" - } - }, - "windowsJumpboxPublisher": { - "type": "string", - "defaultValue": "MicrosoftVisualStudio", - "metadata": { - "description": "This is the windows publisher used by the windows jumpbox" - } - }, - "windowsJumpboxOffer": { - "type": "string", - "defaultValue": "VisualStudio", - "metadata": { - "description": "This is the windows offer used by the windows jumpbox" - } - }, - "windowsJumpboxSku": { - "type": "string", - "defaultValue": "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", - "metadata": { - "description": "This is the windows sku used by the windows jumpbox" - } - }, - "isValidation": { - "type": "int", - "defaultValue": 0, - "allowedValues": [0,1], - "metadata": { - "description": "This is testing in the validation region" - } - }, - "disablePasswordAuthentication": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "This setting controls whether password auth is disabled for Linux VMs provisioned by this template. Default is true which disables password and makes SSH key required." - } - }, - "setLinuxConfigurationForVMCreate": { - "type": "int", - "defaultValue": 1, - "allowedValues": [0,1], - "metadata": { - "description": "This setting controls whether Linux configuration with SSH Key is passed in VM PUT Payload. Defaults to 1. If SSH Key is blank, this must be set to 0." - } - }, - "nameSuffix": { - "type": "string", - "defaultValue": "01234567", - "metadata": { - "description": "A string to include in the names of resources created. Defaults to 0. Can not be blank." - } - }, - "vmsPerStorageAccount": { - "type": "int", - "defaultValue": 5, - "metadata": { - "description": "This specifies the number of VMs per storage accounts" - } - }, - "postInstallScriptURI": { - "type": "string", - "defaultValue": "disabled", - "metadata": { - "description": "After installation, this specifies a script to download and install. To disabled, set value to 'disabled'." - } - } - }, - "variables": { - "adminUsername": "[parameters('linuxAdminUsername')]", - "adminPassword": "[parameters('linuxAdminPassword')]", - "jumpboxEndpointDNSNamePrefix": "[tolower(parameters('jumpboxEndpointDNSNamePrefix'))]", - "masterEndpointDNSNamePrefix": "[tolower(parameters('masterEndpointDNSNamePrefix'))]", - "agentEndpointDNSNamePrefix": "[tolower(parameters('agentEndpointDNSNamePrefix'))]", - "agentCount": "[parameters('agentCount')]", - "masterCount": "[parameters('masterCount')]", - "agentVMSize": "[parameters('agentVMSize')]", - "sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", - "linuxPublisher": "[parameters('linuxPublisher')]", - "linuxOffer": "[parameters('linuxOffer')]", - "linuxSku": "[parameters('linuxSku')]", - "linuxVersion": "[parameters('linuxVersion')]", - "windowsJumpboxPublisher": "[parameters('windowsJumpboxPublisher')]", - "windowsJumpboxOffer": "[parameters('windowsJumpboxOffer')]", - "windowsJumpboxSku": "[parameters('windowsJumpboxSku')]", - "windowsAdminUsername": "[parameters('windowsAdminUsername')]", - "windowsAdminPassword": "[parameters('windowsAdminPassword')]", - "vmsPerStorageAccount": "[parameters('vmsPerStorageAccount')]", - "postInstallScriptURI": "[parameters('postInstallScriptURI')]", - - "nameSuffix": "[parameters('nameSuffix')]", - - "isValidation": "[parameters('isValidation')]", - "storageLocations": [ - "[resourceGroup().location]", - "East US 2 (Stage)" - ], - "storageLocation": "[variables('storageLocations')[variables('isValidation')]]", - - "sshKeyPath": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]", - "disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]", - "setLinuxConfigurationForVMCreate": "[parameters('setLinuxConfigurationForVMCreate')]", - "linuxConfigurations": [ - {}, - { - "disablePasswordAuthentication": "[variables('disablePasswordAuthentication')]", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[variables('sshRSAPublicKey')]" - } - ] - } - } - ], - "linuxConfiguration": "[variables('linuxConfigurations')[variables('setLinuxConfigurationForVMCreate')]]", - - "orchestratorName": "mesos", - - "masterPublicIPAddressName": "[concat(variables('orchestratorName'), '-master-ip-', variables('masterEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "agentPublicIPAddressName": "[concat(variables('orchestratorName'), '-agent-ip-', variables('agentEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "jumpboxPublicIPAddressName": "[concat(variables('orchestratorName'), '-jumpbox-ip-', variables('jumpboxEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - - "marathonEnabled": true, - "chronosEnabled": true, - "swarmEnabled": false, - "osImagePublisher": "[variables('linuxPublisher')]", - "osImageOffer": "[variables('linuxOffer')]", - "osImageSKU": "[variables('linuxSku')]", - "osImageVersion": "[variables('linuxVersion')]", - - "virtualNetworkName": "[concat(variables('orchestratorName'), '-vnet-', variables('nameSuffix'))]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetName": "[concat(variables('orchestratorName'), '-subnet')]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "addressPrefix": "10.0.0.0/16", - "subnetPrefix": "10.0.0.0/18", - "storageAccountType": "Standard_GRS", - "storageAccountPrefixes": [ - "0","6","c","i","o","u","1","7","d","j","p","v", - "2","8","e","k","q","w","3","9","f","l","r","x", - "4","a","g","m","s","y","5","b","h","n","t","z" - ], - "storageAccountPrefixesCount": "[length(variables('storageAccountPrefixes'))]", - "storageAccountBaseName": "[concat(uniqueString(variables('masterEndpointDNSNamePrefix')), variables('orchestratorName'))]", - "masterStorageAccountName": "[concat(variables('storageAccountBaseName'), '0')]", - "omsStorageAccount": "none", - "omsStorageAccountKey": "none", - "clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('swarmEnabled'),' ',variables('marathonEnabled'),' ',variables('chronosEnabled'),' ',variables('omsStorageAccount'),' ',variables('omsStorageAccountKey'),' ', variables('adminUsername'),' ',variables('postInstallScriptURI'))]", - - "jumpboxNSGName": "[concat(variables('orchestratorName'), '-jumpbox-nsg-', variables('nameSuffix'))]", - "jumpboxNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('jumpboxNSGName'))]", - "jumpboxAddr": 4, - "jumpboxVMName": "[concat('jb-', variables('nameSuffix'))]", - "jumpboxVMSize": "Standard_A1", - - "jumpboxLinuxInstallParameters": "[concat(variables('adminUsername'))]", - "jumpboxLinuxCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-ubuntu.sh ',variables('jumpboxLinuxInstallParameters'),' >> /var/log/azure/jumpbox-bootstrap.log 2>&1 &\" &')]", - - "setBrowserFirstTabDefaultPrefix": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Type String -Value http://\"", - "setBrowserFirstTabDefaultSuffix": "0:5050", - "jumpboxWindowsCustomScript": "[concat(variables('setBrowserFirstTabDefaultPrefix'),variables('masterVMNamePrefix'),variables('setBrowserFirstTabDefaultSuffix'))]", - - "masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]", - "masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]", - "masterVMNamePrefix": "[concat(variables('orchestratorName'), '-master-', variables('nameSuffix'), '-')]", - "masterFirstAddr": 5, - "masterAvailabilitySet": "[concat(variables('orchestratorName'), '-master-availabilitySet-', variables('nameSuffix'))]", - "masterLbName": "[concat(variables('orchestratorName'), '-master-lb-', variables('nameSuffix'))]", - "masterVMSize":"Standard_A1", - "masterLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('masterLbName'))]", - "masterLbIPConfigName": "[concat(variables('orchestratorName'), '-master-lbFrontEnd-', variables('nameSuffix'))]", - "masterLbIPConfigID": "[concat(variables('masterLbID'),'/frontendIPConfigurations/', variables('masterLbIPConfigName'))]", - "masterLbBackendPoolName": "[concat(variables('orchestratorName'), '-master-pool-', variables('nameSuffix'))]", - "masterCustomScript": "[concat('/bin/bash -c \"/bin/bash /opt/azure/containers/configure-mesos-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]", - - "agentNSGName": "agent-nsg", - "agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]", - "agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]", - "agentFirstAddr": 20, - "agentVMNamePrefix": "[concat(variables('orchestratorName'), '-agent-', variables('nameSuffix'), '-')]", - "agentAvailabilitySet": "[concat(variables('orchestratorName'), '-agent-availabilitySet-', variables('nameSuffix'))]", - "agentsLbName": "[concat(variables('orchestratorName'), '-agent-lb-', variables('nameSuffix'))]", - "agentsLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('agentsLbName'))]", - "agentsLbIPConfigName": "[concat(variables('orchestratorName'), '-agent-lbFrontEnd-', variables('nameSuffix'))]", - "agentsLbIPConfigID": "[concat(variables('agentsLbID'),'/frontendIPConfigurations/', variables('agentsLbIPConfigName'))]", - "agentsLbBackendPoolName": "[concat(variables('orchestratorName'), '-agent-pool-', variables('nameSuffix'))]", - "agentStorageAccountsCount": "[add(div(variables('agentCount'), variables('vmsPerStorageAccount')), mod(add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),2), add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),1)))]", - "agentsPerIPv4Octet": 200, - "agentCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-mesos-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]" - }, - "resources": [ - - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('masterStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('masterAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('masterPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('masterEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('masterLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('masterLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('masterPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('masterLbBackendPoolName')]" - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('masterLbName'), '/', 'SSH-', variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "masterLbLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('masterLbIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(2200)]", - "backendPort": 22, - "enableFloatingIP": false - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('masterNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]", - "[variables('vnetID')]", - "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]", - "[variables('masterNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('masterNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], copyIndex(variables('masterFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('masterLbID'), '/backendAddressPools/', variables('masterLbBackendPoolName'))]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/',variables('masterAvailabilitySet'))]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('masterAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('masterVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/+0aa1PbSPK7fsWscAXYtSzbwAZIebcIOBsqAVM25G435IKQxlixrFE0ksGw/u/X0zOjh5F5ZLNVW3WXqmBpHt09/e4erfxgX/qhfenwkWGsfPs/Y4Xss3DoX6UxJUeUM056ISWv2Y0h5k5HPid+yBMnCDhJRpQMWRCwaz+8Ii6bRCykYcJhoUVuGRtTGsX4MkFIE4cnVA04sZOMWFiYda5g71+i3eA0IdaNYVB3xIgJVMaJoEzCd4NUoAc65fmcxGehaXhOQo0I0MO+wb/2+kefP3T7g8Peccd0RhOa2PzaiSe7rUaz0bRux9aIJUP/xjQW2XYCJ4LlNOYLU8bR3uC029/vnR2fdmp3rbkaOOl33xz+G0baeuTNYX9wundw0IfBjbmkpnu89/p996BzgWeq3W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bd2Y7oMekukgV5fgJ1gRNZglBFZwPWkfYvL1rkheSMdB7ytG/AX/ERzYr9p902Y7t9URYPfu39X0SdAgEoLwAA\n path: /opt/azure/containers/configure-mesos-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('masterVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('masterCustomScript')]" - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountPrefixes')[mod(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),copyIndex(1))]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentStorageAccountsCount')]" - }, - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('agentAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('agentPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('agentEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('agentsLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('agentsLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('agentPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('agentsLbBackendPoolName')]" - } - ], - "loadBalancingRules": [ - { - "name": "LBRuleHTTP", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 80, - "backendPort": 80, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPProbe')]" - } - } - }, - { - "name": "LBRuleHTTPS", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 443, - "backendPort": 443, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPSProbe')]" - } - } - }, - { - "name": "LBRulePort8080", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 8080, - "backendPort": 8080, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpPort8080Probe')]" - } - } - } - ], - "probes": [ - { - "name": "tcpHTTPProbe", - "properties": { - "protocol": "tcp", - "port": 80, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpHTTPSProbe", - "properties": { - "protocol": "tcp", - "port": 443, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpPort8080Probe", - "properties": { - "protocol": "tcp", - "port": 8080, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - } - ], - "inboundNatRules": [] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('agentNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "http", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 210, - "direction": "Inbound" - } - }, - { - "name": "https", - "properties": { - "description": "Allow HTTPS", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 220, - "direction": "Inbound" - } - }, - { - "name": "Tcp8080", - "properties": { - "description": "Allow port 8080", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 230, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[variables('agentsLbID')]", - "[variables('vnetID')]", - "[variables('agentNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('agentNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0.0/18')[0], div(copyIndex(),variables('agentsPerIPv4Octet')), '.', add(mod(copyIndex(),variables('agentsPerIPv4Octet')), variables('agentFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/', variables('agentAvailabilitySet'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('agentAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('agentVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/+0aa1PbSPK7fsWscAXYtSzbwAZIebcIOBsqAVM25G435IKQxlixrFE0ksGw/u/X0zOjh5F5ZLNVW3WXqmBpHt09/e4erfxgX/qhfenwkWGsfPs/Y4Xss3DoX6UxJUeUM056ISWv2Y0h5k5HPid+yBMnCDhJRpQMWRCwaz+8Ii6bRCykYcJhoUVuGRtTGsX4MkFIE4cnVA04sZOMWFiYda5g71+i3eA0IdaNYVB3xIgJVMaJoEzCd4NUoAc65fmcxGehaXhOQo0I0MO+wb/2+kefP3T7g8Peccd0RhOa2PzaiSe7rUaz0bRux9aIJUP/xjQW2XYCJ4LlNOYLU8bR3uC029/vnR2fdmp3rbkaOOl33xz+G0baeuTNYX9wundw0IfBjbmkpnu89/p996BzgWeq3W3OyZ/EuR6T1bso9sOEJAz4T+O1WnN9vnoBkPp7p297x4v7th7Zt/+23zvuDRa3/fzItr19PNfx3lEXiH45RxH8dKPH33V/h+HtuZbM3h9n/e7ZoCtOuDM3TnqD08NjOPP794P9/uHJ6Vn/ULCoOTfe9o66B4f9jmmP2ITatWynaXw4QnQXI8aTEHh+IUbOjl4DVEW2XAGUc+qRVW43fvz4n6a18+l87SP+/HS+/mPNPm/Zq2KvEsSSvedr2e71H9V2vff13qA7OHt93D3tmK2m0JCGqbXvCJUdrCkNk11SKyiBWV5xElNQqGyJpGZhzRs/5gnZ87w4W5cpi146nQhm7OoT6GHNGzmBj3WiD42DZYxFrYPp4mudLGgXElMaqZOyIsGK8oBGU1AcWFN40wty3sJ8/mJWujd0W5MJC8mbNHSFYfPKZQYNOXi2vVv4c0yTaxaP19a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oaQbpiTEkKIQvqc3H8vJukzSxfnnXlnpW+aOtzM+sTxkziFCpwDZGIRCOKmYvieC5s1bxYi+n6wsdnwmEOdYKUIzCrE6CSd8k8e3bqSvejYOgV2fXgU/L2RYA6c9XA0CoUxIXPeZ4E0B3FLGS8CE8ZMDJs4oSpE9wzICGdvI5siHQ39j26nD8ifjwFZpFhS8EucBUgZ7VR5Q1lWeDS7s1qoDiXMUNuF+E3oIm4X6gAhPEYFNejpPar+WTmFSA8ck5Nkjqm8qpaTVVOovQvo83U302ukH4ayisgQQ/wpxCSILIHMxHepb8SH7Iprorqp2QAqtgsfnNWVjBckPd8RF8cb0KXyUKFR0mZSPpE8lUrfeZp5ruwjw0e+MqfUk0jNtJgDORDSRqhRPN+N24sNsqx3yuurSA96+D3UBbkcYjvCPLMwWf8+FHkp+RcOcx77WE9UaZTMTbf5irRySbPBFQS1CAHqip6i0WJXNhQUaaT3xs+tFqE1M6GaDyX23QG+d8+cMQfstmiwpnaY4DKVn3pit8kQAItugWeuM4v6bCuQOX3WRA+xr6L2T4bDvGmOquLZVkhNDP7Blwwyyxdr7abT75frSb2TzDXURoVcPzyC8ELw4Bd2Y7oMekukgV5fgJ1gRNZglBFZwPWkfYvL1rkheSMdB7ytG/AX/ERzYr9p902Y7t9URYPfu39X0SdAgEoLwAA\n path: /opt/azure/containers/configure-mesos-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://',variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))), '.blob.core.windows.net/vhds/', variables('agentVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(), '/configureagent')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('agentVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('agentCustomScript')]" - } - } - } - ], - "outputs": { - "jumpboxFQDN": { - "type": "string", - "value": "" - }, - "masterFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "agentFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))).dnsSettings.fqdn]" - } - } -} diff --git a/mesos-marathon/mesos-cluster-with-windows-jumpbox.json b/mesos-marathon/mesos-cluster-with-windows-jumpbox.json deleted file mode 100644 index 21c3e57..0000000 --- a/mesos-marathon/mesos-cluster-with-windows-jumpbox.json +++ /dev/null @@ -1,1012 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "linuxAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Linux Virtual Machines (SSH or Password)." - } - }, - "linuxAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Linux Virtual Machine. Not Required. If not set, you must provide a SSH key." - } - }, - "sshRSAPublicKey": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "SSH public key used for auth to all Linux machines. Not Required. If not set, you must provide a password key." - } - }, - "windowsAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported)." - } - }, - "windowsAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Windows Jumpbox Virtual Machine." - } - }, - "jumpboxEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the jumpbox. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "masterEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the master IP Address. The concatenation of the domain name label and the regional DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "agentEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the agent pool IP Address. The concatenation of the domain name label and the regional 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 Mesos agents for the cluster. This value can be from 1 to 100" - }, - "allowedValues": [ - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, - 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 - ] - }, - "masterCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 1, - 3, - 5 - ], - "metadata": { - "description": "The number of Mesos masters for the cluster." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A1", - "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "linuxPublisher": { - "type": "string", - "defaultValue": "Canonical", - "metadata": { - "description": "This is the publisher of the image used by the linux cluster" - } - }, - "linuxOffer": { - "type": "string", - "defaultValue": "UbuntuServer", - "metadata": { - "description": "This is the offer of the image used by the linux cluster" - } - }, - "linuxSku": { - "type": "string", - "defaultValue": "14.04.3-LTS", - "metadata": { - "description": "This is the linux sku used by the linux cluster" - } - }, - "linuxVersion": { - "type": "string", - "defaultValue": "latest", - "metadata": { - "description": "This is the linux version used by the linux cluster" - } - }, - "windowsJumpboxPublisher": { - "type": "string", - "defaultValue": "MicrosoftVisualStudio", - "metadata": { - "description": "This is the windows publisher used by the windows jumpbox" - } - }, - "windowsJumpboxOffer": { - "type": "string", - "defaultValue": "VisualStudio", - "metadata": { - "description": "This is the windows offer used by the windows jumpbox" - } - }, - "windowsJumpboxSku": { - "type": "string", - "defaultValue": "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", - "metadata": { - "description": "This is the windows sku used by the windows jumpbox" - } - }, - "isValidation": { - "type": "int", - "defaultValue": 0, - "allowedValues": [0,1], - "metadata": { - "description": "This is testing in the validation region" - } - }, - "disablePasswordAuthentication": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "This setting controls whether password auth is disabled for Linux VMs provisioned by this template. Default is true which disables password and makes SSH key required." - } - }, - "setLinuxConfigurationForVMCreate": { - "type": "int", - "defaultValue": 1, - "allowedValues": [0,1], - "metadata": { - "description": "This setting controls whether Linux configuration with SSH Key is passed in VM PUT Payload. Defaults to 1. If SSH Key is blank, this must be set to 0." - } - }, - "nameSuffix": { - "type": "string", - "defaultValue": "01234567", - "metadata": { - "description": "A string to include in the names of resources created. Defaults to 0. Can not be blank." - } - }, - "vmsPerStorageAccount": { - "type": "int", - "defaultValue": 5, - "metadata": { - "description": "This specifies the number of VMs per storage accounts" - } - }, - "postInstallScriptURI": { - "type": "string", - "defaultValue": "disabled", - "metadata": { - "description": "After installation, this specifies a script to download and install. To disabled, set value to 'disabled'." - } - } - }, - "variables": { - "adminUsername": "[parameters('linuxAdminUsername')]", - "adminPassword": "[parameters('linuxAdminPassword')]", - "jumpboxEndpointDNSNamePrefix": "[tolower(parameters('jumpboxEndpointDNSNamePrefix'))]", - "masterEndpointDNSNamePrefix": "[tolower(parameters('masterEndpointDNSNamePrefix'))]", - "agentEndpointDNSNamePrefix": "[tolower(parameters('agentEndpointDNSNamePrefix'))]", - "agentCount": "[parameters('agentCount')]", - "masterCount": "[parameters('masterCount')]", - "agentVMSize": "[parameters('agentVMSize')]", - "sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", - "linuxPublisher": "[parameters('linuxPublisher')]", - "linuxOffer": "[parameters('linuxOffer')]", - "linuxSku": "[parameters('linuxSku')]", - "linuxVersion": "[parameters('linuxVersion')]", - "windowsJumpboxPublisher": "[parameters('windowsJumpboxPublisher')]", - "windowsJumpboxOffer": "[parameters('windowsJumpboxOffer')]", - "windowsJumpboxSku": "[parameters('windowsJumpboxSku')]", - "windowsAdminUsername": "[parameters('windowsAdminUsername')]", - "windowsAdminPassword": "[parameters('windowsAdminPassword')]", - "vmsPerStorageAccount": "[parameters('vmsPerStorageAccount')]", - "postInstallScriptURI": "[parameters('postInstallScriptURI')]", - - "nameSuffix": "[parameters('nameSuffix')]", - - "isValidation": "[parameters('isValidation')]", - "storageLocations": [ - "[resourceGroup().location]", - "East US 2 (Stage)" - ], - "storageLocation": "[variables('storageLocations')[variables('isValidation')]]", - - "sshKeyPath": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]", - "disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]", - "setLinuxConfigurationForVMCreate": "[parameters('setLinuxConfigurationForVMCreate')]", - "linuxConfigurations": [ - {}, - { - "disablePasswordAuthentication": "[variables('disablePasswordAuthentication')]", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[variables('sshRSAPublicKey')]" - } - ] - } - } - ], - "linuxConfiguration": "[variables('linuxConfigurations')[variables('setLinuxConfigurationForVMCreate')]]", - - "orchestratorName": "mesos", - - "masterPublicIPAddressName": "[concat(variables('orchestratorName'), '-master-ip-', variables('masterEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "agentPublicIPAddressName": "[concat(variables('orchestratorName'), '-agent-ip-', variables('agentEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "jumpboxPublicIPAddressName": "[concat(variables('orchestratorName'), '-jumpbox-ip-', variables('jumpboxEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - - "marathonEnabled": true, - "chronosEnabled": true, - "swarmEnabled": false, - "osImagePublisher": "[variables('linuxPublisher')]", - "osImageOffer": "[variables('linuxOffer')]", - "osImageSKU": "[variables('linuxSku')]", - "osImageVersion": "[variables('linuxVersion')]", - - "virtualNetworkName": "[concat(variables('orchestratorName'), '-vnet-', variables('nameSuffix'))]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetName": "[concat(variables('orchestratorName'), '-subnet')]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "addressPrefix": "10.0.0.0/16", - "subnetPrefix": "10.0.0.0/18", - "storageAccountType": "Standard_GRS", - "storageAccountPrefixes": [ - "0","6","c","i","o","u","1","7","d","j","p","v", - "2","8","e","k","q","w","3","9","f","l","r","x", - "4","a","g","m","s","y","5","b","h","n","t","z" - ], - "storageAccountPrefixesCount": "[length(variables('storageAccountPrefixes'))]", - "storageAccountBaseName": "[concat(uniqueString(variables('masterEndpointDNSNamePrefix')), variables('orchestratorName'))]", - "masterStorageAccountName": "[concat(variables('storageAccountBaseName'), '0')]", - "omsStorageAccount": "none", - "omsStorageAccountKey": "none", - "clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('swarmEnabled'),' ',variables('marathonEnabled'),' ',variables('chronosEnabled'),' ',variables('omsStorageAccount'),' ',variables('omsStorageAccountKey'),' ', variables('adminUsername'),' ',variables('postInstallScriptURI'))]", - - "jumpboxNSGName": "[concat(variables('orchestratorName'), '-jumpbox-nsg-', variables('nameSuffix'))]", - "jumpboxNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('jumpboxNSGName'))]", - "jumpboxAddr": 4, - "jumpboxVMName": "[concat('jb-', variables('nameSuffix'))]", - "jumpboxVMSize": "Standard_A1", - - "jumpboxLinuxInstallParameters": "[concat(variables('adminUsername'))]", - "jumpboxLinuxCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-ubuntu.sh ',variables('jumpboxLinuxInstallParameters'),' >> /var/log/azure/jumpbox-bootstrap.log 2>&1 &\" &')]", - - "setBrowserFirstTabDefaultPrefix": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Type String -Value http://\"", - "setBrowserFirstTabDefaultSuffix": "0:5050", - "jumpboxWindowsCustomScript": "[concat(variables('setBrowserFirstTabDefaultPrefix'),variables('masterVMNamePrefix'),variables('setBrowserFirstTabDefaultSuffix'))]", - - "masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]", - "masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]", - "masterVMNamePrefix": "[concat(variables('orchestratorName'), '-master-', variables('nameSuffix'), '-')]", - "masterFirstAddr": 5, - "masterAvailabilitySet": "[concat(variables('orchestratorName'), '-master-availabilitySet-', variables('nameSuffix'))]", - "masterLbName": "[concat(variables('orchestratorName'), '-master-lb-', variables('nameSuffix'))]", - "masterVMSize":"Standard_A1", - "masterLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('masterLbName'))]", - "masterLbIPConfigName": "[concat(variables('orchestratorName'), '-master-lbFrontEnd-', variables('nameSuffix'))]", - "masterLbIPConfigID": "[concat(variables('masterLbID'),'/frontendIPConfigurations/', variables('masterLbIPConfigName'))]", - "masterLbBackendPoolName": "[concat(variables('orchestratorName'), '-master-pool-', variables('nameSuffix'))]", - "masterCustomScript": "[concat('/bin/bash -c \"/bin/bash /opt/azure/containers/configure-mesos-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]", - - "agentNSGName": "agent-nsg", - "agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]", - "agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]", - "agentFirstAddr": 20, - "agentVMNamePrefix": "[concat(variables('orchestratorName'), '-agent-', variables('nameSuffix'), '-')]", - "agentAvailabilitySet": "[concat(variables('orchestratorName'), '-agent-availabilitySet-', variables('nameSuffix'))]", - "agentsLbName": "[concat(variables('orchestratorName'), '-agent-lb-', variables('nameSuffix'))]", - "agentsLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('agentsLbName'))]", - "agentsLbIPConfigName": "[concat(variables('orchestratorName'), '-agent-lbFrontEnd-', variables('nameSuffix'))]", - "agentsLbIPConfigID": "[concat(variables('agentsLbID'),'/frontendIPConfigurations/', variables('agentsLbIPConfigName'))]", - "agentsLbBackendPoolName": "[concat(variables('orchestratorName'), '-agent-pool-', variables('nameSuffix'))]", - "agentStorageAccountsCount": "[add(div(variables('agentCount'), variables('vmsPerStorageAccount')), mod(add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),2), add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),1)))]", - "agentsPerIPv4Octet": 200, - "agentCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-mesos-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]" - }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('jumpboxPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('jumpboxEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('jumpboxNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow RDP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "3389", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('jumpboxVMName'), '-nic')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('jumpboxPublicIPAddressName'))]", - "[variables('vnetID')]", - "[variables('jumpboxNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('jumpboxNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfig", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], variables('jumpboxAddr'))]", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('jumpboxPublicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('jumpboxVMName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('jumpboxVMName'), '-nic')]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('jumpboxVMSize')]" - }, - "osProfile": { - "computername": "[variables('jumpboxVMName')]", - "adminUsername": "[variables('windowsAdminUsername')]", - "adminPassword": "[variables('windowsAdminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('windowsJumpboxPublisher')]", - "offer": "[variables('windowsJumpboxOffer')]", - "sku": "[variables('windowsJumpboxSku')]", - "version": "latest" - }, - "osDisk": { - "name": "[concat(variables('jumpboxVMName'),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('jumpboxVMName'), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('jumpboxVMName'), '-nic'))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('jumpboxVMName'),'/installcustomscript')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('jumpboxVMName'))]" - ], - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.4", - "settings": { - "commandToExecute": "[variables('jumpboxWindowsCustomScript')]" - } - } - }, - - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('masterStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('masterAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('masterPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('masterEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('masterLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('masterLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('masterPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('masterLbBackendPoolName')]" - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('masterLbName'), '/', 'SSH-', variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "masterLbLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('masterLbIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(2200)]", - "backendPort": 22, - "enableFloatingIP": false - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('masterNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]", - "[variables('vnetID')]", - "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]", - "[variables('masterNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('masterNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], copyIndex(variables('masterFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('masterLbID'), '/backendAddressPools/', variables('masterLbBackendPoolName'))]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/',variables('masterAvailabilitySet'))]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('masterAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('masterVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/+0aa1PbSPK7fsWscAXYtSzbwAZIebcIOBsqAVM25G435IKQxlixrFE0ksGw/u/X0zOjh5F5ZLNVW3WXqmBpHt09/e4erfxgX/qhfenwkWGsfPs/Y4Xss3DoX6UxJUeUM056ISWv2Y0h5k5HPid+yBMnCDhJRpQMWRCwaz+8Ii6bRCykYcJhoUVuGRtTGsX4MkFIE4cnVA04sZOMWFiYda5g71+i3eA0IdaNYVB3xIgJVMaJoEzCd4NUoAc65fmcxGehaXhOQo0I0MO+wb/2+kefP3T7g8Peccd0RhOa2PzaiSe7rUaz0bRux9aIJUP/xjQW2XYCJ4LlNOYLU8bR3uC029/vnR2fdmp3rbkaOOl33xz+G0baeuTNYX9wundw0IfBjbmkpnu89/p996BzgWeq3W3OyZ/EuR6T1bso9sOEJAz4T+O1WnN9vnoBkPp7p297x4v7th7Zt/+23zvuDRa3/fzItr19PNfx3lEXiH45RxH8dKPH33V/h+HtuZbM3h9n/e7ZoCtOuDM3TnqD08NjOPP794P9/uHJ6Vn/ULCoOTfe9o66B4f9jmmP2ITatWynaXw4QnQXI8aTEHh+IUbOjl4DVEW2XAGUc+qRVW43fvz4n6a18+l87SP+/HS+/mPNPm/Zq2KvEsSSvedr2e71H9V2vff13qA7OHt93D3tmK2m0JCGqbXvCJUdrCkNk11SKyiBWV5xElNQqGyJpGZhzRs/5gnZ87w4W5cpi146nQhm7OoT6GHNGzmBj3WiD42DZYxFrYPp4mudLGgXElMaqZOyI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yMzBHvEilYr7WT+gdcJxZIZGDQ5ezIKZEDaUTTQfP0t4ZlnzzMLmGaWNEkgh3NTk3qoaQbpiTEkKIQvqc3H8vJukzSxfnnXlnpW+aOtzM+sTxkziFCpwDZGIRCOKmYvieC5s1bxYi+n6wsdnwmEOdYKUIzCrE6CSd8k8e3bqSvejYOgV2fXgU/L2RYA6c9XA0CoUxIXPeZ4E0B3FLGS8CE8ZMDJs4oSpE9wzICGdvI5siHQ39j26nD8ifjwFZpFhS8EucBUgZ7VR5Q1lWeDS7s1qoDiXMUNuF+E3oIm4X6gAhPEYFNejpPar+WTmFSA8ck5Nkjqm8qpaTVVOovQvo83U302ukH4ayisgQQ/wpxCSILIHMxHepb8SH7Iprorqp2QAqtgsfnNWVjBckPd8RF8cb0KXyUKFR0mZSPpE8lUrfeZp5ruwjw0e+MqfUk0jNtJgDORDSRqhRPN+N24sNsqx3yuurSA96+D3UBbkcYjvCPLMwWf8+FHkp+RcOcx77WE9UaZTMTbf5irRySbPBFQS1CAHqip6i0WJXNhQUaaT3xs+tFqE1M6GaDyX23QG+d8+cMQfstmiwpnaY4DKVn3pit8kQAItugWeuM4v6bCuQOX3WRA+xr6L2T4bDvGmOquLZVkhNDP7Blwwyyxdr7abT75frSb2TzDXURoVcPzyC8ELw4Bd2Y7oMekukgV5fgJ1gRNZglBFZwPWkfYvL1rkheSMdB7ytG/AX/ERzYr9p902Y7t9URYPfu39X0SdAgEoLwAA\n path: /opt/azure/containers/configure-mesos-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('masterVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('masterCustomScript')]" - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountPrefixes')[mod(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),copyIndex(1))]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentStorageAccountsCount')]" - }, - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('agentAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('agentPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('agentEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('agentsLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('agentsLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('agentPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('agentsLbBackendPoolName')]" - } - ], - "loadBalancingRules": [ - { - "name": "LBRuleHTTP", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 80, - "backendPort": 80, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPProbe')]" - } - } - }, - { - "name": "LBRuleHTTPS", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 443, - "backendPort": 443, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPSProbe')]" - } - } - }, - { - "name": "LBRulePort8080", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 8080, - "backendPort": 8080, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpPort8080Probe')]" - } - } - } - ], - "probes": [ - { - "name": "tcpHTTPProbe", - "properties": { - "protocol": "tcp", - "port": 80, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpHTTPSProbe", - "properties": { - "protocol": "tcp", - "port": 443, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpPort8080Probe", - "properties": { - "protocol": "tcp", - "port": 8080, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - } - ], - "inboundNatRules": [] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('agentNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "http", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 210, - "direction": "Inbound" - } - }, - { - "name": "https", - "properties": { - "description": "Allow HTTPS", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 220, - "direction": "Inbound" - } - }, - { - "name": "Tcp8080", - "properties": { - "description": "Allow port 8080", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 230, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[variables('agentsLbID')]", - "[variables('vnetID')]", - "[variables('agentNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('agentNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0.0/18')[0], div(copyIndex(),variables('agentsPerIPv4Octet')), '.', add(mod(copyIndex(),variables('agentsPerIPv4Octet')), variables('agentFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/', variables('agentAvailabilitySet'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('agentAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('agentVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/+0aa1PbSPK7fsWscAXYtSzbwAZIebcIOBsqAVM25G435IKQxlixrFE0ksGw/u/X0zOjh5F5ZLNVW3WXqmBpHt09/e4erfxgX/qhfenwkWGsfPs/Y4Xss3DoX6UxJUeUM056ISWv2Y0h5k5HPid+yBMnCDhJRpQMWRC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qfUk0jNtJgDORDSRqhRPN+N24sNsqx3yuurSA96+D3UBbkcYjvCPLMwWf8+FHkp+RcOcx77WE9UaZTMTbf5irRySbPBFQS1CAHqip6i0WJXNhQUaaT3xs+tFqE1M6GaDyX23QG+d8+cMQfstmiwpnaY4DKVn3pit8kQAItugWeuM4v6bCuQOX3WRA+xr6L2T4bDvGmOquLZVkhNDP7Blwwyyxdr7abT75frSb2TzDXURoVcPzyC8ELw4Bd2Y7oMekukgV5fgJ1gRNZglBFZwPWkfYvL1rkheSMdB7ytG/AX/ERzYr9p902Y7t9URYPfu39X0SdAgEoLwAA\n path: /opt/azure/containers/configure-mesos-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://',variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))), '.blob.core.windows.net/vhds/', variables('agentVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(), '/configureagent')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('agentVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('agentCustomScript')]" - } - } - } - ], - "outputs": { - "jumpboxFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('jumpboxPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "masterFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "agentFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))).dnsSettings.fqdn]" - } - } -} diff --git a/mesos-marathon/metadata.json b/mesos-marathon/metadata.json deleted file mode 100644 index 8118e2f..0000000 --- a/mesos-marathon/metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "itemDisplayName": "Create a Marathon/Chronos/Swarm enabled Mesos cluster", - "description": "This template creates a Docker capable Apache Mesos cluster with Marathon, Chronos, and Swarm on a configurable number of nodes.", - "summary": "Create a Docker capable Apache Mesos cluster on Microsoft Azure with the Marathon/Chronos/Swarm frameworks.", - "githubUsername": "anhowe", - "dateUpdated": "2015-10-26" -} diff --git a/mesos-marathon/parts/base-template.json b/mesos-marathon/parts/base-template.json index b12dfdc..21a6782 100644 --- a/mesos-marathon/parts/base-template.json +++ b/mesos-marathon/parts/base-template.json @@ -2,7 +2,7 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "linuxAdminUsername": { + "linuxAdminUsername": { "type": "string", "defaultValue": "azureuser", "metadata": { @@ -88,7 +88,8 @@ "Standard_A1", "Standard_A2", "Standard_A3", - "Standard_A4" + "Standard_A4", + "Standard_D4" ], "metadata": { "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." @@ -277,7 +278,7 @@ "jumpboxVMName": "[concat('jb-', variables('nameSuffix'))]", "jumpboxVMSize": "Standard_A1", - "jumpboxLinuxInstallParameters": "[concat(variables('adminUsername'))]", + "jumpboxLinuxInstallParameters": "[concat(variables('adminUsername'), ' ', variables('masterFirstAddr'), ' ', variables('masterCount'))]", "jumpboxLinuxCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-ubuntu.sh ',variables('jumpboxLinuxInstallParameters'),' >> /var/log/azure/jumpbox-bootstrap.log 2>&1 &\" &')]", "setBrowserFirstTabDefaultPrefix": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Type String -Value http://\"", diff --git a/mesos-marathon/parts/base-template.parameters.json b/mesos-marathon/parts/base-template.parameters.json deleted file mode 100644 index 1aad715..0000000 --- a/mesos-marathon/parts/base-template.parameters.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "windowsAdminPassword": { - "value": "password1234$" - }, - "jumpboxEndpointDNSNamePrefix": { - "value": "swarmjb1122g" - }, - "masterEndpointDNSNamePrefix": { - "value": "swarmmgmt1122g" - }, - "agentEndpointDNSNamePrefix": { - "value": "swarmapp1122g" - }, - "agentCount": { - "value": 3 - }, - "masterCount": { - "value": 3 - }, - "agentVMSize" : { - "value": "Standard_A1" - }, - "sshRSAPublicKey": { - "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8fhkh3jpHUQsrUIezFB5k4Rq9giJM8G1Cr0u2IRMiqG++nat5hbOr3gODpTA0h11q9bzb6nJtK7NtDzIHx+w3YNIVpcTGLiUEsfUbY53IHg7Nl/p3/gkST3g0R6BSL7Hg45SfyvpH7kwY30MoVHG/6P3go4SKlYoHXlgaaNr3fMwUTIeE9ofvyS3fcr6xxlsoB6luKuEs50h0NGsE4QEnbfSY4Yd/C1ucc3mEw+QFXBIsENHfHfZYrLNHm2L8MXYVmAH8k//5sFs4Migln9GiUgEQUT6uOjowsZyXBbXwfT11og+syPkAq4eqjiC76r0w6faVihdBYVoc/UcyupgH azureuser@linuxvm" - } -} diff --git a/mesos-marathon/parts/configure-mesos-cluster.sh b/mesos-marathon/parts/configure-mesos-cluster.sh index 6899adf..221c1a3 100644 --- a/mesos-marathon/parts/configure-mesos-cluster.sh +++ b/mesos-marathon/parts/configure-mesos-cluster.sh @@ -17,6 +17,10 @@ date ps ax SWARM_VERSION="ahmet/swarm:1.0.0-zk-hotfix" +MESOS_DNS_VERSION="0.5.1" +OPENRESTY_VERSION="ngx_openresty-1.9.3.1" +DCOS_ADMIN_ROUTE="https://github.com/clca/adminrouter-public.git" + ############# # Parameters ############# @@ -340,9 +344,9 @@ fi if ismaster ; then # Download and install mesos-dns sudo mkdir -p /usr/local/mesos-dns - sudo wget https://github.com/mesosphere/mesos-dns/releases/download/v0.2.0/mesos-dns-v0.2.0-linux-amd64.tgz - sudo tar zxvf mesos-dns-v0.2.0-linux-amd64.tgz - sudo mv mesos-dns-v0.2.0-linux-amd64 /usr/local/mesos-dns/mesos-dns + sudo wget https://github.com/mesosphere/mesos-dns/releases/download/v$MESOS_DNS_VERSION/mesos-dns-v$MESOS_DNS_VERSION-linux-amd64 + sudo mv mesos-dns-v$MESOS_DNS_VERSION-linux-amd64 /usr/local/mesos-dns/mesos-dns + sudo chmod +x /usr/local/mesos-dns/mesos-dns RESOLVER=`cat /etc/resolv.conf | grep nameserver | tail -n 1 | awk '{print $2}'` echo " @@ -390,16 +394,17 @@ if isagent ; then fi hostname -i | sudo tee /etc/mesos-slave/ip hostname | sudo tee /etc/mesos-slave/hostname - - # Add mesos-dns IP addresses to the head file, so they are at the top of the file - for i in `seq 0 $((MASTERCOUNT-1))` ; - do - MASTEROCTET=`expr $MASTERFIRSTADDR + $i` - IPADDR="${BASESUBNET}${MASTEROCTET}" - echo nameserver $IPADDR | sudo tee -a /etc/resolvconf/resolv.conf.d/head - done - service resolvconf restart fi +# Add mesos-dns IP addresses to the head file, so they are at the top of the file +for i in `seq 0 $((MASTERCOUNT-1))` ; +do + MASTEROCTET=`expr $MASTERFIRSTADDR + $i` + IPADDR="${BASESUBNET}${MASTEROCTET}" + echo nameserver $IPADDR | sudo tee -a /etc/resolvconf/resolv.conf.d/head + +done +cat /etc/resolvconf/resolv.conf.d/head +sudo service resolvconf restart ############################################## # configure init rules restart all processes @@ -461,6 +466,43 @@ then /bin/bash -c "wget --tries 20 --retry-connrefused --waitretry=15 -qO- $POSTINSTALLSCRIPTURI | nohup /bin/bash >> /var/log/azure/cluster-bootstrap-postinstall.log 2>&1 &" fi +############################################ +## Install NGNIX and DCOS Admin Route +############################################ +if ismaster; then +# install prereq + sudo apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \ + libssl-dev perl make build-essential + cd /home/$AZUREUSER + wget https://openresty.org/download/$OPENRESTY_VERSION.tar.gz + tar xzvf $OPENRESTY_VERSION.tar.gz + cd $OPENRESTY_VERSION + #build and install openResty + ./configure --with-luajit && make && make install + # git is already installed so can clone repos + cd /home/$AZUREUSER + git clone $DCOS_ADMIN_ROUTE + + sudo cp /home/$AZUREUSER/adminrouter-public/*.lua /usr/local/openresty/nginx/conf + ## testing only, certs will have to be replaced + sudo cp /home/$AZUREUSER/adminrouter-public/snakeoil.* /usr/local/openresty/nginx/conf + + sudo cp /home/$AZUREUSER/adminrouter-public/nginx.conf /usr/local/openresty/nginx/conf + + #install openresty startup script + wget https://gist.githubusercontent.com/vdel26/8805927/raw/249f907e465e98ac099437025218a15e55a34b4c/nginx + sudo cp /home/$AZUREUSER/nginx /etc/init.d/ + sudo chmod +x /etc/init.d/nginx + # create dir for NGINX log + sudo mkdir /var/log/nginx + sudo service nginx stop + sudo service nginx start + #cleanup + cd /home/$AZUREUSER + sudo rm -rf * +fi +############################################ + ps ax echo "Finished installing and configuring docker and swarm" date diff --git a/mesos-marathon/parts/configure-ubuntu.sh b/mesos-marathon/parts/configure-ubuntu.sh index df4e958..69f9a27 100644 --- a/mesos-marathon/parts/configure-ubuntu.sh +++ b/mesos-marathon/parts/configure-ubuntu.sh @@ -11,16 +11,24 @@ ps axjf ############# AZUREUSER=$1 +MASTERCOUNT=$3 +MASTERINITIALADDR=$2 HOMEDIR="/home/$AZUREUSER" VMNAME=`hostname` echo "User: $AZUREUSER" echo "User home dir: $HOMEDIR" echo "vmname: $VMNAME" +echo "Num of Masters:$MASTERCOUNT" +echo "Master Initial Addr: $MASTERINITIALADDR" + ################### # Common Functions ################### +#grant access to azure directory to check jumpbox-bootstrap.log file +sudo chmod 777 /var/log/azure/ + ensureAzureNetwork() { # ensure the host name is resolvable @@ -71,21 +79,12 @@ ensureAzureNetwork echo "Installing and configuring docker and swarm" -installDocker() -{ - for i in {1..10}; do - wget --tries 4 --retry-connrefused --waitretry=15 -qO- https://get.docker.com | sh - if [ $? -eq 0 ] - then - # hostname has been found continue - echo "Docker installed successfully" - break - fi - sleep 10 - done -} -time installDocker -sudo usermod -aG docker $AZUREUSER +time wget -qO- https://get.docker.com | sh + +# Start Docker and listen on :2375 (no auth, but in vnet) +echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H 0.0.0.0:2375"' | sudo tee /etc/default/docker +# the following insecure registry is for OMS +echo 'DOCKER_OPTS="$DOCKER_OPTS --insecure-registry 137.135.93.9"' | sudo tee -a /etc/default/docker sudo service docker restart ensureDocker() @@ -182,5 +181,42 @@ time wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64. time sudo dpkg -i google-chrome-stable_current_amd64.deb time sudo apt-get -y --force-yes install -f time rm /tmp/google-chrome-stable_current_amd64.deb + +################### +# Install Java +################### +sudo apt-get -y install openjdk-7-jre-headless + +################### +# Install pip & setup dcos directory +################### +sudo apt-get install -y python-pip + +sudo pip install virtualenv + +mkdir $HOMEDIR/dcos +sudo chown $AZUREUSER $HOMEDIR/dcos +cd $HOMEDIR/dcos +wget https://raw.githubusercontent.com/mesosphere/dcos-cli/master/bin/install/install-optout-dcos-cli.sh +bash ./install-optout-dcos-cli.sh . http://master.mesos --add-path yes + +# add DCOS_CONFIG env variable for DCOS CAssandra subcommands +echo DCOS_CONFIG=/home/$AZUREUSER/.dcos/dcos.toml > /home/$AZUREUSER/.bashrc + +######################################## +# generate nameserver IPs for resolvconf/resolv.conf.d/head file +# for mesos_dns so service names can be resolve from the jumpbox as well +######################################## + + for ((i=MASTERINITIALADDR; i> /var/log/azure/jumpbox-bootstrap.log 2>&1 &\" &')]", - - "setBrowserFirstTabDefaultPrefix": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Type String -Value http://\"", - "setBrowserFirstTabDefaultSuffix": "0:5050", - "jumpboxWindowsCustomScript": "[concat(variables('setBrowserFirstTabDefaultPrefix'),variables('masterVMNamePrefix'),variables('setBrowserFirstTabDefaultSuffix'))]", - - "masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]", - "masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]", - "masterVMNamePrefix": "[concat(variables('orchestratorName'), '-master-', variables('nameSuffix'), '-')]", - "masterFirstAddr": 5, - "masterAvailabilitySet": "[concat(variables('orchestratorName'), '-master-availabilitySet-', variables('nameSuffix'))]", - "masterLbName": "[concat(variables('orchestratorName'), '-master-lb-', variables('nameSuffix'))]", - "masterVMSize":"Standard_A1", - "masterLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('masterLbName'))]", - "masterLbIPConfigName": "[concat(variables('orchestratorName'), '-master-lbFrontEnd-', variables('nameSuffix'))]", - "masterLbIPConfigID": "[concat(variables('masterLbID'),'/frontendIPConfigurations/', variables('masterLbIPConfigName'))]", - "masterLbBackendPoolName": "[concat(variables('orchestratorName'), '-master-pool-', variables('nameSuffix'))]", - "masterCustomScript": "[concat('/bin/bash -c \"/bin/bash /opt/azure/containers/configure-swarm-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]", - - "agentNSGName": "agent-nsg", - "agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]", - "agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]", - "agentFirstAddr": 20, - "agentVMNamePrefix": "[concat(variables('orchestratorName'), '-agent-', variables('nameSuffix'), '-')]", - "agentAvailabilitySet": "[concat(variables('orchestratorName'), '-agent-availabilitySet-', variables('nameSuffix'))]", - "agentsLbName": "[concat(variables('orchestratorName'), '-agent-lb-', variables('nameSuffix'))]", - "agentsLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('agentsLbName'))]", - "agentsLbIPConfigName": "[concat(variables('orchestratorName'), '-agent-lbFrontEnd-', variables('nameSuffix'))]", - "agentsLbIPConfigID": "[concat(variables('agentsLbID'),'/frontendIPConfigurations/', variables('agentsLbIPConfigName'))]", - "agentsLbBackendPoolName": "[concat(variables('orchestratorName'), '-agent-pool-', variables('nameSuffix'))]", - "agentStorageAccountsCount": "[add(div(variables('agentCount'), variables('vmsPerStorageAccount')), mod(add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),2), add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),1)))]", - "agentsPerIPv4Octet": 200, - "agentCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-swarm-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('masterStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('masterAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('masterPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('masterEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('masterLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('masterLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('masterPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('masterLbBackendPoolName')]" - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('masterLbName'), '/', 'SSH-', variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "masterLbLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('masterLbIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(2200)]", - "backendPort": 22, - "enableFloatingIP": false - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('masterNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]", - "[variables('vnetID')]", - "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]", - "[variables('masterNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('masterNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], copyIndex(variables('masterFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('masterLbID'), '/backendAddressPools/', variables('masterLbBackendPoolName'))]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/',variables('masterAvailabilitySet'))]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('masterAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('masterVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/81YbXPbNhL+zl+xpTWNnYQi5cRzV2WUG8dWLp6LLY8kt53GvQoiIYtnkmAI0Hbq6r/f4o0i9eLabTpTf5CJxQK7++xid4Gdb/xpnPlTwueOs/PH/5wdOGLZLL4qCwqnlDMOg4zCO3bnyLnxPOYQZ1yQJOEg5hRmLEnYbZxdQcjSnGU0ExwZPfiVsWtK80INUrVTSrighkAKIuYsq82SK1z7p3R3OBXg3TkODecMXNSyEFIzvX+YlFI86qntIyJmmetERFAnR/G4bvTD4fD0l+/7w9HJ4Kzn8ltSpN1OO2gHrrMK0zlakFLckK9MOaeHo3F/eDS4OBv3WvedhSGcD/vv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j74MbFb2N2wX5ojJUsZbRF+2twm7snjql+NaAZOKGj3byAf7b7/twLdurZ2tGgLAno6inWxWWaRfm9XD8yr8Dz5V/x+plBNI5RcAAA==\n path: /opt/azure/containers/configure-swarm-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('masterVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('masterCustomScript')]" - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountPrefixes')[mod(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),copyIndex(1))]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentStorageAccountsCount')]" - }, - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('agentAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('agentPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('agentEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('agentsLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('agentsLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('agentPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('agentsLbBackendPoolName')]" - } - ], - "loadBalancingRules": [ - { - "name": "LBRuleHTTP", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 80, - "backendPort": 80, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPProbe')]" - } - } - }, - { - "name": "LBRuleHTTPS", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 443, - "backendPort": 443, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPSProbe')]" - } - } - }, - { - "name": "LBRulePort8080", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 8080, - "backendPort": 8080, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpPort8080Probe')]" - } - } - } - ], - "probes": [ - { - "name": "tcpHTTPProbe", - "properties": { - "protocol": "tcp", - "port": 80, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpHTTPSProbe", - "properties": { - "protocol": "tcp", - "port": 443, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpPort8080Probe", - "properties": { - "protocol": "tcp", - "port": 8080, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - } - ], - "inboundNatRules": [] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('agentNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "http", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 210, - "direction": "Inbound" - } - }, - { - "name": "https", - "properties": { - "description": "Allow HTTPS", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 220, - "direction": "Inbound" - } - }, - { - "name": "Tcp8080", - "properties": { - "description": "Allow port 8080", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 230, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[variables('agentsLbID')]", - "[variables('vnetID')]", - "[variables('agentNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('agentNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0.0/18')[0], div(copyIndex(),variables('agentsPerIPv4Octet')), '.', add(mod(copyIndex(),variables('agentsPerIPv4Octet')), variables('agentFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/', variables('agentAvailabilitySet'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('agentAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('agentVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAArsalYC/81YbXPbNhL+zl+xpTWNnYQi5cRzV2WUG8dWLp6LLY8kt53GvQoiIYtnkmAI0Hbq6r/f4o0i9eLabTpTf5CJxQK7++xid4Gdb/xpnPlTwueOs/PH/5wdOGLZLL4qCwqnlDMOg4zCO3bnyLnxPOYQZ1yQJOEg5hRmLEnYbZxdQcjSnGU0ExwZPfiVsWtK80INUrVTSrighkAKIuYsq82SK1z7p3R3OBXg3TkODecMXNSyEFIzvX+YlFI86qntIyJmmetERFAnR/G4bvTD4fD0l+/7w9HJ4Kzn8ltSpN1OO2gHrrMK0zlakFLckK9MOaeHo3F/eDS4OBv3WvedhSGcD/vvT35Eyr6lvD8ZjsaHx8dDJL5aOIc/XQz7F6O+HL5eOOeD0fjkDBk+fhwdDU/OxxfDE5w5WDjfn54dnvZ7kznjIkMlJpJycfoOV06U6S3NAb8BpxE84377+af/Bt53P1/uflL/XlzuPW/5lx3/mVxrNNuy9nK3Wr333Cy3a98djvqji3dn/XHP7QQSqLZr4T9V3sZwKjPRhVYNFbfJcV7QWXxXsWhtVnjexwUXcBhFRcVXoWdZb1IJRtdaYMkWGz2hPl+CNVoRmxKXNuHkcmCnKy/hbPXtbjx06jClKcvgfZmFMtz4RjaHZhzP2+Gv+HNGxS0rrnf3nHsHYAf0lDpq0t0gTQQ8hAXGdHJDpglFNjkzVAT6gZJEzL/0OkiesQJiPK5w32m3O/vB4g1EDOl6gcVJEeIZfILWv8CjnyGAnxUNZWbqQ+phYw3mhMOU0gx3L7NIniY8YyU1jBs0CcyUhq9piLaCctfwTAtKrtX3LF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psyJtBOknuoFw1F404Ibj0WNotrxU+SR6Ibim0Lp9DShhoZVXV+aLEuMP9jCHxztdLQBKi+MC+XYaA5tS1bu5Vz95zHOcZaLK/lj/KOHgUP8lYSpDc3di/pdRQX4OXgR0QQX6td9SZ62JUnMsUK04VLF+P9qojL1LBeuipy0xRLTBfzKiY/3N5T/Yx9UKjjBJBjR8m7ClEP9/vnqyDoyp9Lt07rSFpnE80vo7xJ35f0/U20Vd7XUtbrpqwDSTswtBuWlCmtqVeHpasGis9kAAkISW7JF45U/WhUx6rVeFZqQoW/yKUamjyJQ/UmhaNa6NqOTZdrq4Lfajheqe5LuDdgKxeq1Uo0Vtjr2mTNf+tWq4Ktcma39r3VdFeWUJYLn8h+X8IlSJzRgq+UyPaXNJFpJS/5PNqyoqp6dhGUOXiRsi6PaqGZ5gkVstmyr32m1ig/yD5H3nkazfzWHvxRrttkeM2hKmPUHNh7ugP/vjDWLiW6Nm96o4Rv8I4WIcRT7IFlwm5gbBszFPFSNaTXcXgt5bHZDHWSl3hzx+BhEedCgls9bYMXgtu4C+wHj74MbFb2N2wX5ojJUsZbRF+2twm7snjql+NaAZOKGj3byAf7b7/twLdurZ2tGgLAno6inWxWWaRfm9XD8yr8Dz5V/x+plBNI5RcAAA==\n path: /opt/azure/containers/configure-swarm-cluster.sh\n permissions: \"0744\"\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://',variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))), '.blob.core.windows.net/vhds/', variables('agentVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(), '/configureagent')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('agentVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('agentCustomScript')]" - } - } - } - ], - "outputs": { - "jumpboxFQDN": { - "type": "string", - "value": "" - }, - "masterFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "agentFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))).dnsSettings.fqdn]" - } - } -} diff --git a/nicscaling/README.md b/nicscaling/README.md deleted file mode 100644 index 41dd602..0000000 --- a/nicscaling/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Dynamic NAT Rules - -The nic scaling project allows to scale to 12,800 nodes. This is because 200 ips are allocated per each of the 64 octets on the subnet of 10.0.0.0/18 (10.0.0.0..10.0.63.255). - - - - diff --git a/nicscaling/azuredeploy.json b/nicscaling/azuredeploy.json deleted file mode 100644 index c1ab1d3..0000000 --- a/nicscaling/azuredeploy.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "virtualNetworkName": "VNET", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetName": "Subnet", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "addressPrefix": "10.0.0.0/16", - "subnetPrefix": "10.0.0.0/18", - "nodesPerIPv4Octet": 200, - "ipv4OctetOffset": 50, - "agentVMNamePrefix": "agent", - "agentCount": 220 - }, - "resources": [ - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "dependsOn": [], - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(1), '-nic')]", - "dependsOn": [ - "[variables('vnetID')]" - ], - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentCount')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0.0/18')[0], div(copyIndex(),variables('nodesPerIPv4Octet')), '.', add(mod(copyIndex(),variables('nodesPerIPv4Octet')), variables('ipv4OctetOffset')))]", - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - } - ] -} diff --git a/reliableCustomScriptExtension/README.md b/reliableCustomScriptExtension/README.md deleted file mode 100644 index d3cd478..0000000 --- a/reliableCustomScriptExtension/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# Reliable Script Execution - -This demonstrates a Linux VM that uses customData to write files, and then the custom script extension to execute them. - - - - - -# Make the Custom Script Execute Reliably - -The customData is used to write the files instead of the VM having to download the files. The custom script extension is used to execute instead of customData to induce the newtwork failure and then the script is run to handle the network failure. Alternatively if customData is used to execute, the network failure could come during the middle of the script. - -**NOTE: The custom script extension should come last in the dependency chain so that no further network changes will happen while the script runs.** - -Here is the procedure for how to implement a reliable script: - -Write your shell scripts with “ensureAzureNetwork()” at beginning to protect against 3 types of Azure network errors - -``` -#!/bin/bash - -####################################### -# wait for network to become ready -####################################### -ensureAzureNetwork() -{ - VMNAME=`hostname` - # ensure the host name is resolvable - hostResolveHealthy=1 - for i in {1..120}; do - host $VMNAME - if [ $? -eq 0 ] - then - # hostname has been found continue - hostResolveHealthy=0 - echo "the host name resolves" - break - fi - sleep 1 - done - if [ $hostResolveHealthy -ne 0 ] - then - echo "host name does not resolve, aborting install" - exit 1 - fi - - # ensure the network works - networkHealthy=1 - for i in {1..12}; do - wget -O/dev/null http://bing.com - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 10 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot download from bing, aborting install" - ifconfig - ip a - exit 2 - fi - # ensure the hostname -i works - networkHealthy=1 - for i in {1..120}; do - hostname -i - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 1 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot resolve ip address, aborting install" - ifconfig - ip a - exit 2 - fi - # ensure hostname -f works - networkHealthy=1 - for i in {1..120}; do - hostname -f - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 1 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot resolve hostname, aborting install" - ifconfig - ip a - exit 2 - fi -} -ensureAzureNetwork - -####################################### -# run the main program -####################################### -echo hello world -``` - -Encode your shell scripts into a single line using gen-oneline-customdata.py -``` -gen-oneline-customdata.py helloworld.sh -``` - -Add the resulting output to the "customData" portion of your VM: -``` -{ - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computername": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIALvUOFYC/61TTU/DMAy991eYdQeQ2LpxBE1oByQuGxIHLghp6eo20bJkNCkDpv13nKRl2hcMiRzSxnb8nv2c+CxJhUpSZngUxaetKIYlExZyXYJCu9TlDKyGFKd6jlAiyz5OToXKVCUOP2kbh1TnF9EqgmY9jcbD0d1gwrWxis1xQq4Ywi2wHME5wHlAGMI2Wr6xVCKFOc+jN+A9Mmn5x6BPZsdagFCw6ne7/ave+gYy7QF9qnZA9AaRwzO0b6GDr9CDF28jTFXTi6FhBZwZqh8VZa9UBlOtrFAV1oEHmPRqF065htZ2IaEKNK06JqWWzvx/LvzHSMQFuGIyrRxIILoPAx2FNfNv3gFxg5ZpNKC0bWAvgaW6JPoFNclYJmXgge8kuW+giHZFaKbAbYac9fmHtm+6vizQQuchyfAtUZWUwK1dXCduLIsuTdS/KrFDbF+FphIaJh6CflOhtyvDNsZxCXbgnAQ15DEJRE7l5KIIhwWwjTBXQZj1gQf1l3ddVsoLOmek1KLURcnmp79lVxZHKbUbBJlFX0MLLoxdBAAA\n path: /opt/azure/helloworld.sh\n permissions: \"0744\"\n\n')]", - "linuxConfiguration": { - "disablePasswordAuthentication": "false", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[parameters('sshKeyData')]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', variables('osDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]" - } - } - } -} -``` - -Then run the following in the custom script extension where "bash -c" is used to ensure a log file can be written: -``` -{ - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/configurevm')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "/bin/bash -c \"/bin/bash /opt/azure/helloworld.sh >> /var/log/azure/helloworld.log 2>&1\"" - } - } -} -``` diff --git a/reliableCustomScriptExtension/gen-oneline-customdata.py b/reliableCustomScriptExtension/gen-oneline-customdata.py deleted file mode 100644 index 1825e8f..0000000 --- a/reliableCustomScriptExtension/gen-oneline-customdata.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python -import base64 -import os -import gzip -import StringIO -import sys - -def buildYMLFile(files): - clusterYamlFile="""#cloud-config - -write_files: -%s -""" - writeFileBlock=""" - encoding: gzip - content: !!binary | - %s - path: /opt/azure/%s - permissions: "0744" -""" - filelines="" - for encodeFile in files: - # read the script file - with open(encodeFile) as f: - content = f.read() - compressedbuffer=StringIO.StringIO() - - # gzip the script file - with gzip.GzipFile(fileobj=compressedbuffer, mode='wb') as f: - f.write(content) - b64GzipStream=base64.b64encode(compressedbuffer.getvalue()) - filelines=filelines+(writeFileBlock % (b64GzipStream,encodeFile)) - - return clusterYamlFile % (filelines) - -def convertToOneArmTemplateLine(clusterYamlFile): - # remove the \r\n - oneline="\\n".join(clusterYamlFile.split("\n")) - oneline='\\"'.join(oneline.split('"')) - return oneline - -def usage(): - print - print " usage: %s file1 file2 file3 . . ." % os.path.basename(sys.argv[0]) - print - print " builds a one line custom data entry for writing one or" - print " more files to /opt/azure" - -if __name__ == "__main__": - if len(sys.argv)==1: - usage() - sys.exit(1) - - files = sys.argv[1:] - for file in files: - if not os.path.exists(file): - print "Error: file %s does not exist" - sys.exit(2) - - # build the yml file for cluster - yml = buildYMLFile(files) - - # convert yml file to one line - oneline = convertToOneArmTemplateLine(yml) - print '"customData": "[base64(\'%s\')]"' % (oneline) diff --git a/reliableCustomScriptExtension/helloworld.sh b/reliableCustomScriptExtension/helloworld.sh deleted file mode 100644 index 765db4f..0000000 --- a/reliableCustomScriptExtension/helloworld.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -####################################### -# wait for network to become ready -####################################### -ensureAzureNetwork() -{ - VMNAME=`hostname` - # ensure the host name is resolvable - hostResolveHealthy=1 - for i in {1..120}; do - host $VMNAME - if [ $? -eq 0 ] - then - # hostname has been found continue - hostResolveHealthy=0 - echo "the host name resolves" - break - fi - sleep 1 - done - if [ $hostResolveHealthy -ne 0 ] - then - echo "host name does not resolve, aborting install" - exit 1 - fi - - # ensure the network works - networkHealthy=1 - for i in {1..12}; do - wget -O/dev/null http://bing.com - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 10 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot download from bing, aborting install" - ifconfig - ip a - exit 2 - fi - # ensure the hostname -i works - networkHealthy=1 - for i in {1..120}; do - hostname -i - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 1 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot resolve ip address, aborting install" - ifconfig - ip a - exit 2 - fi - # ensure hostname -f works - networkHealthy=1 - for i in {1..120}; do - hostname -f - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 1 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot resolve hostname, aborting install" - ifconfig - ip a - exit 2 - fi -} -ensureAzureNetwork - -####################################### -# run the main program -####################################### -echo hello world diff --git a/reliableCustomScriptExtension/reliableCustomScript.json b/reliableCustomScriptExtension/reliableCustomScript.json deleted file mode 100644 index 04796b8..0000000 --- a/reliableCustomScriptExtension/reliableCustomScript.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed." - } - }, - "adminUserName": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "sshKeyData": { - "type": "string", - "metadata": { - "description": "SSH rsa public key file as a string." - } - }, - "dnsNameForPublicIP": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." - } - } - }, - "variables": { - "vmSize": "Standard_D2", - "vmName": "linuxvm", - "osImagePublisher": "Canonical", - "osImageOffer": "UbuntuServer", - "osImageSKU": "14.04.3-LTS", - "osImageVersion": "latest", - "osDiskName": "osDisk1", - "addressPrefix": "10.0.0.0/16", - "subnet1Name": "Subnet-1", - "subnet1Prefix": "10.0.0.0/24", - "vmStorageAccountContainerName": "vhds", - "nicName": "sshNIC", - "publicIPAddressName": "sshPublicIP", - "publicIPAddressType": "Dynamic", - "storageAccountType": "Standard_LRS", - "virtualNetworkName": "sshVNET", - "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", - "subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('newStorageAccountName')]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsNameForPublicIP')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnet1Name')]", - "properties": { - "addressPrefix": "[variables('subnet1Prefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnet1Ref')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computername": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAPT4alYC/+2VTW8TMRCG7/srhqYHkJps0iOoQj0gcWmROHBBSPXGs2urXk+wvQ2l6n9n/JFG3bSQQpE4kMNmPZ71+848tjx5UTfa1o3wqqom+/2qCayFDtCSA4thTe4SAkGDS+oRHAp5vfdSaP3g8PQ7P87zUi9fVTcVwKez89OzdycXinywoscLjk0gp0NQCHEC4gxoz6KezJVoDHJanPmYAvgehQnq+mTB4WhXg7Zws5jNFsfz2zcgieP5AzjMiimgW/gMh29hil9hDl9SjDVteok+Nq5ACc+Fo+XVBythSTZoO2BJfMDJvEzhUhEc3C8kV4H+oOQ03MvL9N7q9OcN4gpiMZJsFMlGd2VgarE4v/OdFbdqktCDpbCRPQLRkGP7HTfJB2FM9oHfmHVqoK7GEDb448PzZBn/pO3brq87DDD9UEu8qu1gDKgQVq/ruB+7GW+lZyUxMrZLYVMJbyaVk35FYT7GcF/jcQQjuYigSB7BUtg4lrS2hoSE1lEPsSOP0dEtV9rqLg9WILbMjqtieefcpIZN9ROwjU5LWeBfR/QXCZVDk1ouJY/8sxDaNrf9Uzrtfzp3xf0+m9sHrqin3JRusOnY9YJprRx1TvT7346xXoXGUNwMRlY/AEAH1nOvBwAA\n path: /opt/azure/helloworld.sh\n permissions: \"0744\"\n\n')]", - "linuxConfiguration": { - "disablePasswordAuthentication": "false", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[parameters('sshKeyData')]" - } - ] - } - } - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/', variables('osDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]" - } - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/configurevm')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "/bin/bash -c \"/bin/bash /opt/azure/helloworld.sh >> /var/log/azure/helloworld.log 2>&1\"" - } - } - } - ] -} diff --git a/stgscaling/README.md b/stgscaling/README.md deleted file mode 100644 index d50a958..0000000 --- a/stgscaling/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Scaling across 1296 storage accounts - -This enables scaling to 12960 vms by spreading across a 2 character prefix, where each prefix is 36 characters. - - - - diff --git a/stgscaling/azuredeploy.json b/stgscaling/azuredeploy.json deleted file mode 100644 index 631dc20..0000000 --- a/stgscaling/azuredeploy.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": { - "newStorageAccountNamePrefix": "anhowe921e", - "vmsPerStorageAccount": 10, - "agentCount": 20, - "storageAccountsCount": "[add(div(variables('agentCount'), variables('vmsPerStorageAccount')), mod(add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),2), add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),1)))]", - "storageAccountType": "Standard_LRS", - "storageAccountPrefix": [ - "0","6","c","i","o","u","1","7","d","j","p","v", - "2","8","e","k","q","w","3","9","f","l","r","x", - "4","a","g","m","s","y","5","b","h","n","t","z" - ], - "storageAccountPrefixCount": "[length(variables('storageAccountPrefix'))]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountPrefix')[mod(copyIndex(),variables('storageAccountPrefixCount'))],variables('storageAccountPrefix')[div(copyIndex(),variables('storageAccountPrefixCount'))],variables('newStorageAccountNamePrefix'),copyIndex(1))]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('storageAccountsCount')]" - }, - "properties": { - "accountType": "[variables('storageAccountType')]" - } - } - ] -} diff --git a/swarm/README.md b/swarm/README.md deleted file mode 100644 index b61e930..0000000 --- a/swarm/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Mesos cluster with Marathon and Swarm - -This Microsoft Azure template creates an Docker Swarm cluster on a configurable number of agent machines. - -Access the cluster via SSH on port 2211 on masterFQDN. - -Portal Launch Button|Cluster Type ---- | --- -|Swarm diff --git a/swarm/cluster.parameters.json b/swarm/cluster.parameters.json deleted file mode 100644 index 266a71b..0000000 --- a/swarm/cluster.parameters.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "jumpboxEndpointDNSNamePrefix": { - "value": "swarmjb1122g" - }, - "masterEndpointDNSNamePrefix": { - "value": "swarmmgmt1122g" - }, - "agentEndpointDNSNamePrefix": { - "value": "swarmapp1122g" - }, - "agentCount": { - "value": 3 - }, - "masterCount": { - "value": 3 - }, - "agentVMSize" : { - "value": "Standard_A1" - }, - "sshRSAPublicKey": { - "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8fhkh3jpHUQsrUIezFB5k4Rq9giJM8G1Cr0u2IRMiqG++nat5hbOr3gODpTA0h11q9bzb6nJtK7NtDzIHx+w3YNIVpcTGLiUEsfUbY53IHg7Nl/p3/gkST3g0R6BSL7Hg45SfyvpH7kwY30MoVHG/6P3go4SKlYoHXlgaaNr3fMwUTIeE9ofvyS3fcr6xxlsoB6luKuEs50h0NGsE4QEnbfSY4Yd/C1ucc3mEw+QFXBIsENHfHfZYrLNHm2L8MXYVmAH8k//5sFs4Migln9GiUgEQUT6uOjowsZyXBbXwfT11og+syPkAq4eqjiC76r0w6faVihdBYVoc/UcyupgH azureuser@linuxvm" - } -} diff --git a/swarm/configure-swarm-cluster.sh b/swarm/configure-swarm-cluster.sh deleted file mode 100644 index f17fe7e..0000000 --- a/swarm/configure-swarm-cluster.sh +++ /dev/null @@ -1,264 +0,0 @@ -#!/bin/bash - -########################################################### -# Configure Mesos One Box -# -# This installs the following components -# - zookeepr -# - mesos master -# - marathon -# - mesos agent -########################################################### - -set -x - -echo "starting mesos cluster configuration" -date -ps ax - -SWARM_VERSION="swarm:latest" -############# -# Parameters -############# - -MASTERCOUNT=${1} -MASTERPREFIX=${2} -MASTERFIRSTADDR=${3} -AZUREUSER=${4} -VMNAME=`hostname` -VMNUMBER=`echo $VMNAME | sed 's/.*[^0-9]\([0-9]\+\)*$/\1/'` -VMPREFIX=`echo $VMNAME | sed 's/\(.*[^0-9]\)*[0-9]\+$/\1/'` -BASESUBNET="10.0.0." - -echo "Master Count: $MASTERCOUNT" -echo "Master Prefix: $MASTERPREFIX" -echo "Master First Addr: $MASTERFIRSTADDR" -echo "vmname: $VMNAME" -echo "VMNUMBER: $VMNUMBER, VMPREFIX: $VMPREFIX" -echo "BASESUBNET: $BASESUBNET" -echo "AZUREUSER: $AZUREUSER" - -################### -# Common Functions -################### - -ensureAzureNetwork() -{ - # ensure the host name is resolvable - hostResolveHealthy=1 - for i in {1..120}; do - host $VMNAME - if [ $? -eq 0 ] - then - # hostname has been found continue - hostResolveHealthy=0 - echo "the host name resolves" - break - fi - sleep 1 - done - if [ $hostResolveHealthy -ne 0 ] - then - echo "host name does not resolve, aborting install" - exit 1 - fi - - # ensure the network works - networkHealthy=1 - for i in {1..12}; do - wget -O/dev/null http://bing.com - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 10 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, aborting install" - ifconfig - ip a - exit 2 - fi - # ensure the host ip can resolve - networkHealthy=1 - for i in {1..120}; do - hostname -i - if [ $? -eq 0 ] - then - # hostname has been found continue - networkHealthy=0 - echo "the network is healthy" - break - fi - sleep 1 - done - if [ $networkHealthy -ne 0 ] - then - echo "the network is not healthy, cannot resolve ip address, aborting install" - ifconfig - ip a - exit 2 - fi -} -ensureAzureNetwork -HOSTADDR=`hostname -i` - -ismaster () -{ - if [ "$MASTERPREFIX" == "$VMPREFIX" ] - then - return 0 - else - return 1 - fi -} -if ismaster ; then - echo "this node is a master" -fi - -isagent() -{ - if ismaster ; then - return 1 - else - return 0 - fi -} -if isagent ; then - echo "this node is an agent" -fi - -###################### -# resolve self in DNS -###################### - -echo "$HOSTADDR $VMNAME" | sudo tee -a /etc/hosts - -################ -# Install Docker -################ - -echo "Installing and configuring docker" - -time wget -qO- https://get.docker.com | sh -sudo usermod -aG docker $AZUREUSER -if isagent ; then - # Start Docker and listen on :2375 (no auth, but in vnet) - echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H 0.0.0.0:2375"' | sudo tee /etc/default/docker -fi - -echo "Installing docker compose" -curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose -chmod +x /usr/local/bin/docker-compose - -sudo service docker restart - -ensureDocker() -{ - # ensure that docker is healthy - dockerHealthy=1 - for i in {1..3}; do - sudo docker info - if [ $? -eq 0 ] - then - # hostname has been found continue - dockerHealthy=0 - echo "Docker is healthy" - sudo docker ps -a - break - fi - sleep 10 - done - if [ $dockerHealthy -ne 0 ] - then - echo "Docker is not healthy" - fi -} -ensureDocker - -############################################## -# configure init rules restart all processes -############################################## - -consulstr() -{ - consulargs="" - for i in `seq 0 $((MASTERCOUNT-1))` ; - do - MASTEROCTET=`expr $MASTERFIRSTADDR + $i` - IPADDR="${BASESUBNET}${MASTEROCTET}" - - if [ "$VMNUMBER" -eq "0" ] - then - consulargs="${consulargs}-bootstrap-expect $MASTERCOUNT " - fi - if [ "$VMNUMBER" -eq "$i" ] - then - consulargs="${consulargs}-advertise $IPADDR " - else - consulargs="${consulargs}-retry-join $IPADDR " - fi - done - echo $consulargs -} - -consulargs=$(consulstr) -MASTEROCTET=`expr $MASTERFIRSTADDR + $VMNUMBER` -VMIPADDR="${BASESUBNET}${MASTEROCTET}" -MASTER0IPADDR="${BASESUBNET}${MASTERFIRSTADDR}" - -if ismaster ; then - mkdir -p /data/consul - echo "consul: - image: \"progrium/consul\" - command: -server -node $VMNAME $consulargs - ports: - - \"8300:8300\" - - \"8301:8301\" - - \"8301:8301/udp\" - - \"8302:8302\" - - \"8302:8302/udp\" - - \"8400:8400\" - - \"8500:8500\" - volumes: - - \"/data/consul:/data\" - restart: \"always\" -swarm: - image: \"$SWARM_VERSION\" - command: manage --replication --advertise $HOSTADDR:2375 consul://$MASTER0IPADDR:8500/nodes - ports: - - \"2375:2375\" - links: - - \"consul\" - volumes: - - \"/etc/docker:/etc/docker\" - restart: \"always\" -" > /opt/azure/containers/docker-compose.yml - - pushd /opt/azure/containers/ - docker-compose up -d - popd - echo "completed starting docker swarm on the master" -fi - -if isagent ; then - echo "swarm: - image: \"$SWARM_VERSION\" - restart: \"always\" - command: join --advertise=$HOSTADDR:2375 consul://$MASTER0IPADDR:8500/nodes -" > /opt/azure/containers/docker-compose.yml - - pushd /opt/azure/containers/ - docker-compose up -d - popd - echo "completed starting docker swarm on the agent" -fi - -echo "processes at end of script" -ps ax -date -echo "completed mesos cluster configuration" diff --git a/swarm/gen-oneline-customdata.py b/swarm/gen-oneline-customdata.py deleted file mode 100644 index 1825e8f..0000000 --- a/swarm/gen-oneline-customdata.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python -import base64 -import os -import gzip -import StringIO -import sys - -def buildYMLFile(files): - clusterYamlFile="""#cloud-config - -write_files: -%s -""" - writeFileBlock=""" - encoding: gzip - content: !!binary | - %s - path: /opt/azure/%s - permissions: "0744" -""" - filelines="" - for encodeFile in files: - # read the script file - with open(encodeFile) as f: - content = f.read() - compressedbuffer=StringIO.StringIO() - - # gzip the script file - with gzip.GzipFile(fileobj=compressedbuffer, mode='wb') as f: - f.write(content) - b64GzipStream=base64.b64encode(compressedbuffer.getvalue()) - filelines=filelines+(writeFileBlock % (b64GzipStream,encodeFile)) - - return clusterYamlFile % (filelines) - -def convertToOneArmTemplateLine(clusterYamlFile): - # remove the \r\n - oneline="\\n".join(clusterYamlFile.split("\n")) - oneline='\\"'.join(oneline.split('"')) - return oneline - -def usage(): - print - print " usage: %s file1 file2 file3 . . ." % os.path.basename(sys.argv[0]) - print - print " builds a one line custom data entry for writing one or" - print " more files to /opt/azure" - -if __name__ == "__main__": - if len(sys.argv)==1: - usage() - sys.exit(1) - - files = sys.argv[1:] - for file in files: - if not os.path.exists(file): - print "Error: file %s does not exist" - sys.exit(2) - - # build the yml file for cluster - yml = buildYMLFile(files) - - # convert yml file to one line - oneline = convertToOneArmTemplateLine(yml) - print '"customData": "[base64(\'%s\')]"' % (oneline) diff --git a/swarm/swarm.json b/swarm/swarm.json deleted file mode 100644 index f74e0e6..0000000 --- a/swarm/swarm.json +++ /dev/null @@ -1,861 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "linuxAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Linux Virtual Machines (SSH or Password)." - } - }, - "linuxAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Linux Virtual Machine. Not Required. If not set, you must provide a SSH key." - } - }, - "sshRSAPublicKey": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "SSH public key used for auth to all Linux machines. Not Required. If not set, you must provide a password key." - } - }, - "windowsAdminUsername": { - "type": "string", - "defaultValue": "azureuser", - "metadata": { - "description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported)." - } - }, - "windowsAdminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Password for the Windows Jumpbox Virtual Machine." - } - }, - "jumpboxEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the jumpbox. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "masterEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the master IP Address. The concatenation of the domain name label and the regional DNS zone make up the fully qualified domain name associated with the public IP address." - } - }, - "agentEndpointDNSNamePrefix": { - "type": "string", - "metadata": { - "description": "Sets the Domain name label for the agent pool IP Address. The concatenation of the domain name label and the regional 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 Mesos agents for the cluster. This value can be from 1 to 100" - }, - "allowedValues": [ - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, - 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100 - ] - }, - "masterCount": { - "type": "int", - "defaultValue": 1, - "allowedValues": [ - 1, - 3, - 5 - ], - "metadata": { - "description": "The number of Mesos masters for the cluster." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A1", - "allowedValues": [ - "Standard_A1", - "Standard_A2", - "Standard_A3", - "Standard_A4" - ], - "metadata": { - "description": "The size of the Virtual Machine. Allowable machine values are 1 core (A1), 2 core (A2), 4 core (A3), 8 core (A4)." - } - }, - "linuxPublisher": { - "type": "string", - "defaultValue": "Canonical", - "metadata": { - "description": "This is the publisher of the image used by the linux cluster" - } - }, - "linuxOffer": { - "type": "string", - "defaultValue": "UbuntuServer", - "metadata": { - "description": "This is the offer of the image used by the linux cluster" - } - }, - "linuxSku": { - "type": "string", - "defaultValue": "14.04.3-LTS", - "metadata": { - "description": "This is the linux sku used by the linux cluster" - } - }, - "windowsJumpboxPublisher": { - "type": "string", - "defaultValue": "MicrosoftVisualStudio", - "metadata": { - "description": "This is the windows publisher used by the windows jumpbox" - } - }, - "windowsJumpboxOffer": { - "type": "string", - "defaultValue": "VisualStudio", - "metadata": { - "description": "This is the windows offer used by the windows jumpbox" - } - }, - "windowsJumpboxSku": { - "type": "string", - "defaultValue": "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", - "metadata": { - "description": "This is the windows sku used by the windows jumpbox" - } - }, - "isValidation": { - "type": "int", - "defaultValue": 0, - "allowedValues": [0,1], - "metadata": { - "description": "This is testing in the validation region" - } - }, - "disablePasswordAuthentication": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "This setting controls whether password auth is disabled for Linux VMs provisioned by this template. Default is true which disables password and makes SSH key required." - } - }, - "setLinuxConfigurationForVMCreate": { - "type": "int", - "defaultValue": 1, - "allowedValues": [0,1], - "metadata": { - "description": "This setting controls whether Linux configuration with SSH Key is passed in VM PUT Payload. Defaults to 1. If SSH Key is blank, this must be set to 0." - } - }, - "nameSuffix": { - "type": "string", - "defaultValue": "a", - "metadata": { - "description": "A string to include in the names of resources created. Defaults to blank." - } - } - }, - "variables": { - "adminUsername": "[parameters('linuxAdminUsername')]", - "adminPassword": "[parameters('linuxAdminPassword')]", - "jumpboxEndpointDNSNamePrefix": "[tolower(parameters('jumpboxEndpointDNSNamePrefix'))]", - "masterEndpointDNSNamePrefix": "[tolower(parameters('masterEndpointDNSNamePrefix'))]", - "agentEndpointDNSNamePrefix": "[tolower(parameters('agentEndpointDNSNamePrefix'))]", - "agentCount": "[parameters('agentCount')]", - "masterCount": "[parameters('masterCount')]", - "agentVMSize": "[parameters('agentVMSize')]", - "sshRSAPublicKey": "[parameters('sshRSAPublicKey')]", - "linuxPublisher": "[parameters('linuxPublisher')]", - "linuxOffer": "[parameters('linuxOffer')]", - "linuxSku": "[parameters('linuxSku')]", - "windowsJumpboxPublisher": "[parameters('windowsJumpboxPublisher')]", - "windowsJumpboxOffer": "[parameters('windowsJumpboxOffer')]", - "windowsJumpboxSku": "[parameters('windowsJumpboxSku')]", - "windowsAdminUsername": "[parameters('windowsAdminUsername')]", - "windowsAdminPassword": "[parameters('windowsAdminPassword')]", - - "nameSuffix": "[parameters('nameSuffix')]", - - "isValidation": "[parameters('isValidation')]", - "storageLocations": [ - "[resourceGroup().location]", - "East US 2 (Stage)" - ], - "storageLocation": "[variables('storageLocations')[variables('isValidation')]]", - - "sshKeyPath": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]", - "disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]", - "setLinuxConfigurationForVMCreate": "[parameters('setLinuxConfigurationForVMCreate')]", - "linuxConfigurations": [ - {}, - { - "disablePasswordAuthentication": "[variables('disablePasswordAuthentication')]", - "ssh": { - "publicKeys": [ - { - "path": "[variables('sshKeyPath')]", - "keyData": "[variables('sshRSAPublicKey')]" - } - ] - } - } - ], - "linuxConfiguration": "[variables('linuxConfigurations')[variables('setLinuxConfigurationForVMCreate')]]", - - "orchestratorName": "swarm", - - "masterPublicIPAddressName": "[concat(variables('orchestratorName'), '-master-ip-', variables('masterEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "agentPublicIPAddressName": "[concat(variables('orchestratorName'), '-agent-ip-', variables('agentEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - "jumpboxPublicIPAddressName": "[concat(variables('orchestratorName'), '-jumpbox-ip-', variables('jumpboxEndpointDNSNamePrefix'), '-', variables('nameSuffix'))]", - - "osImagePublisher": "[variables('linuxPublisher')]", - "osImageOffer": "[variables('linuxOffer')]", - "osImageSKU": "[variables('linuxSku')]", - "osImageVersion": "latest", - - "virtualNetworkName": "[concat(variables('orchestratorName'), '-vnet-', variables('nameSuffix'))]", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetName": "[concat(variables('orchestratorName'), '-subnet')]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", - "addressPrefix": "10.0.0.0/16", - "subnetPrefix": "10.0.0.0/18", - "storageAccountType": "Standard_LRS", - "storageAccountPrefixes": [ - "0","6","c","i","o","u","1","7","d","j","p","v", - "2","8","e","k","q","w","3","9","f","l","r","x", - "4","a","g","m","s","y","5","b","h","n","t","z" - ], - "storageAccountPrefixesCount": "[length(variables('storageAccountPrefixes'))]", - "vmsPerStorageAccount": 10, - "storageAccountBaseName": "[concat(uniqueString(variables('masterEndpointDNSNamePrefix')), variables('orchestratorName'))]", - "masterStorageAccountName": "[concat(variables('storageAccountBaseName'), '0')]", - "omsStorageAccount": "none", - "omsStorageAccountKey": "none", - "postInstallScriptURI": "disabled", - "singleQuote": "'", - "sshQuotedString": "[concat(' ', variables('singleQuote'), 'disabled', variables('singleQuote'), ' ')]", - "clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('adminUsername'))]", - - "jumpboxNSGName": "[concat(variables('orchestratorName'), '-jumpbox-nsg-', variables('nameSuffix'))]", - "jumpboxNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('jumpboxNSGName'))]", - "jumpboxAddr": 4, - "jumpboxVMName": "[concat(variables('orchestratorName'), '-jumpbox-', variables('nameSuffix'))]", - "jumpboxVMSize": "Standard_A1", - - "jumpboxLinuxInstallParameters": "[concat(variables('adminUsername'), variables('sshQuotedString'))]", - "jumpboxLinuxCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-ubuntu.sh ',variables('jumpboxLinuxInstallParameters'),' >> /var/log/azure/jumpbox-bootstrap.log 2>&1 &\" &')]", - - "setBrowserFirstTabDefaultPrefix": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Type String -Value http://\"", - "setBrowserFirstTabDefaultSuffix": "0:5050", - "jumpboxWindowsCustomScript": "[concat(variables('setBrowserFirstTabDefaultPrefix'),variables('masterVMNamePrefix'),variables('setBrowserFirstTabDefaultSuffix'))]", - - "masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]", - "masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]", - "masterVMNamePrefix": "[concat(variables('orchestratorName'), '-master-', variables('nameSuffix'), '-')]", - "masterFirstAddr": 5, - "masterAvailabilitySet": "[concat(variables('orchestratorName'), '-master-availabilitySet-', variables('nameSuffix'))]", - "masterLbName": "[concat(variables('orchestratorName'), '-master-lb-', variables('nameSuffix'))]", - "masterVMSize":"Standard_A1", - "masterLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('masterLbName'))]", - "masterLbIPConfigName": "[concat(variables('orchestratorName'), '-master-lbFrontEnd-', variables('nameSuffix'))]", - "masterLbIPConfigID": "[concat(variables('masterLbID'),'/frontendIPConfigurations/', variables('masterLbIPConfigName'))]", - "masterLbBackendPoolName": "[concat(variables('orchestratorName'), '-master-pool-', variables('nameSuffix'))]", - "masterCustomScript": "[concat('/bin/bash -c \"/bin/bash /opt/azure/containers/configure-swarm-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]", - - "agentNSGName": "agent-nsg", - "agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]", - "agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]", - "agentFirstAddr": 20, - "agentVMNamePrefix": "[concat(variables('orchestratorName'), '-agent-', variables('nameSuffix'), '-')]", - "agentAvailabilitySet": "[concat(variables('orchestratorName'), '-agent-availabilitySet-', variables('nameSuffix'))]", - "agentsLbName": "[concat(variables('orchestratorName'), '-agent-lb-', variables('nameSuffix'))]", - "agentsLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('agentsLbName'))]", - "agentsLbIPConfigName": "[concat(variables('orchestratorName'), '-agent-lbFrontEnd-', variables('nameSuffix'))]", - "agentsLbIPConfigID": "[concat(variables('agentsLbID'),'/frontendIPConfigurations/', variables('agentsLbIPConfigName'))]", - "agentsLbBackendPoolName": "[concat(variables('orchestratorName'), '-agent-pool-', variables('nameSuffix'))]", - "agentStorageAccountsCount": "[add(div(variables('agentCount'), variables('vmsPerStorageAccount')), mod(add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),2), add(mod(variables('agentCount'), variables('vmsPerStorageAccount')),1)))]", - "agentsPerIPv4Octet": 200, - "agentCustomScript": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash /opt/azure/containers/configure-swarm-cluster.sh ',variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[variables('masterStorageAccountName')]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('masterAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('masterPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('masterEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('masterLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('masterLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('masterPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('masterLbBackendPoolName')]" - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/loadBalancers/inboundNatRules", - "name": "[concat(variables('masterLbName'), '/', 'SSH-', variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "masterLbLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]" - ], - "properties": { - "frontendIPConfiguration": { - "id": "[variables('masterLbIPConfigID')]" - }, - "protocol": "tcp", - "frontendPort": "[copyIndex(2211)]", - "backendPort": 22, - "enableFloatingIP": false - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('masterNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "ssh", - "properties": { - "description": "Allow SSH", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 200, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[variables('masterLbID')]", - "[variables('vnetID')]", - "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]", - "[variables('masterNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('masterNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0/18')[0], copyIndex(variables('masterFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('masterLbID'), '/backendAddressPools/', variables('masterLbBackendPoolName'))]" - } - ], - "loadBalancerInboundNatRules": [ - { - "id": "[concat(variables('masterLbID'),'/inboundNatRules/SSH-',variables('masterVMNamePrefix'),copyIndex())]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', variables('masterVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/',variables('masterAvailabilitySet'))]", - "[variables('masterStorageAccountName')]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('masterAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('masterVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('masterVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAA+YUlYC/81YbVPbRhD+rl+xFZoBksiyIUxbZ9wOAdMwLZixIe00pPFZOmMVSafoTgZC/d+7d6eTJb8QSNOZwIys29u9fXnudve08Z03ChNvRPjEsja+/M/agAOWjMOrPKNwQjnj0EsovGa3lpw7n4QcwoQLEkUcxITCmEURuwmTK/BZnLKEJoIjowufGLumNM3UIFYrxYQLWhBIRsSEJZVZcoWy/8l2i1MB7q1lUX/CwEYrMyEt0+v7US7Vo53aPyJClthWQAS1UlSPcoPf9/snH952+4Pj3mnH5jcki9sRMnBhW4txOkMXYoor8oUp62R/cN7tH/QuTs87zn1rVhDO+t2j4z+QsmMoR8f9wfn+4WEfibsza//Pi373YtCVw5cz6+3J6f5JtzOcMC4SVDWUlIuT1zg/VB46mgP+AU4D2ORe49m7v5ruj+8vt96pn+eX288c77LlbUrZQv8a2cutUnr7WSFuZF/vD7qDi9en3fOO3Wo25L9tonyiQMVdkyeiDU7Fd7vOcZbRcXhbsmhrFniOwowL2A+CrOQrY2RYp7EMRtt4YMgmNnpCvb4A47Qi1jXOfcLJ+cBMl1jgbPlurzxb6szEMUvgKE98uav4SjaLJhyP1f4nfJxSccOy661t694C2AA9pU6UhBuki4BnLcOtG03JKKLIJmf6ikDfUBKJyV2nheQxyyDEUwn3rUajtdOcvYKAIV0LmDgpQjiGd+D8DC79CE14r2ioM1Ev0g6z12BCOIwoTXD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HK7ty/GQa+Lq0sLDaovivOxXCjWZUlna0S3G3rccAYj+WN9FHo6FHzQd5Sg0RzZeGOr4MwAzcFDy/8xNNml2VZD9vyRMZYXtpwaeN+v8rCPC5YL221c+MY60sb8yomP1zeVaXc3KWrcQJIsZnibRVRF9f7YbfZbMvHpV2ltSSttYrm5UFap+9I+s4q2iLvS6nrZV3XnqTtFbQpi/KYVsyrhqWtBoqvyAAyICS6IXccqfqzSDVWTu3DST1U+EQucHG/pVHoq68uOKpsXdOs6FptTPCcGvDKdE+Ge0VspaCSVqqxwl5XJiv4LXutCrbKme3K+1rXbVlCWSo8IltdGS5BwoRmfKFENu7iSKaVNOeTYI1EWfWMEOQpuIHyLg0qWzNOIypoAOX3rKLWKBxkkyPb/Vofu7b9fBR0qxyvAKoyRgXAztMB/HbDWOnHtVxZ9gA7F4odAxsD97MwRS791VB9QFxU8uAnx38B8pTHtq0VAAA=\n path: /opt/azure/containers/configure-swarm-cluster.sh\n permissions: \"0744\"\n\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://', variables('masterStorageAccountName'), '.blob.core.windows.net/vhds/', variables('masterVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('masterVMNamePrefix'), copyIndex(), '/configuremaster')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('masterCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('masterVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('masterCustomScript')]" - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[concat(variables('storageAccountPrefixes')[mod(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(copyIndex(),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),copyIndex(1))]", - "apiVersion": "2015-06-15", - "location": "[variables('storageLocation')]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentStorageAccountsCount')]" - }, - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/availabilitySets", - "name": "[variables('agentAvailabilitySet')]", - "location": "[resourceGroup().location]", - "properties": {} - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('agentPublicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "Dynamic", - "dnsSettings": { - "domainNameLabel": "[variables('agentEndpointDNSNamePrefix')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "name": "[variables('agentsLbName')]", - "type": "Microsoft.Network/loadBalancers", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))]" - ], - "properties": { - "frontendIPConfigurations": [ - { - "name": "[variables('agentsLbIPConfigName')]", - "properties": { - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('agentPublicIPAddressName'))]" - } - } - } - ], - "backendAddressPools": [ - { - "name": "[variables('agentsLbBackendPoolName')]" - } - ], - "loadBalancingRules": [ - { - "name": "LBRuleHTTP", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 80, - "backendPort": 80, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPProbe')]" - } - } - }, - { - "name": "LBRuleHTTPS", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 443, - "backendPort": 443, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpHTTPSProbe')]" - } - } - }, - { - "name": "LBRulePort8080", - "properties": { - "frontendIPConfiguration": { - "id": "[variables('agentsLbIPConfigID')]" - }, - "backendAddressPool": { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - }, - "protocol": "tcp", - "frontendPort": 8080, - "backendPort": 8080, - "enableFloatingIP": false, - "idleTimeoutInMinutes": 5, - "loadDistribution": "Default", - "probe": { - "id": "[concat(variables('agentsLbID'),'/probes/tcpPort8080Probe')]" - } - } - } - ], - "probes": [ - { - "name": "tcpHTTPProbe", - "properties": { - "protocol": "tcp", - "port": 80, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpHTTPSProbe", - "properties": { - "protocol": "tcp", - "port": 443, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - }, - { - "name": "tcpPort8080Probe", - "properties": { - "protocol": "tcp", - "port": 8080, - "intervalInSeconds": "5", - "numberOfProbes": "2" - } - } - ], - "inboundNatRules": [] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkSecurityGroups", - "name": "[variables('agentNSGName')]", - "location": "[resourceGroup().location]", - "properties": { - "securityRules": [ - { - "name": "http", - "properties": { - "description": "Allow HTTP", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "80", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 210, - "direction": "Inbound" - } - }, - { - "name": "https", - "properties": { - "description": "Allow HTTPS", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "443", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 220, - "direction": "Inbound" - } - }, - { - "name": "Tcp8080", - "properties": { - "description": "Allow port 8080", - "protocol": "Tcp", - "sourcePortRange": "*", - "destinationPortRange": "8080", - "sourceAddressPrefix": "*", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 230, - "direction": "Inbound" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[concat(variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "nicLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[variables('agentsLbID')]", - "[variables('vnetID')]", - "[variables('agentNSGID')]" - ], - "properties": { - "networkSecurityGroup": { - "id": "[variables('agentNSGID')]" - }, - "ipConfigurations": [ - { - "name": "ipConfigNode", - "properties": { - "privateIPAllocationMethod": "Static", - "privateIPAddress": "[concat(split(variables('subnetPrefix'),'0.0/18')[0], div(copyIndex(),variables('agentsPerIPv4Octet')), '.', add(mod(copyIndex(),variables('agentsPerIPv4Octet')), variables('agentFirstAddr')))]", - "subnet": { - "id": "[variables('subnetRef')]" - }, - "loadBalancerBackendAddressPools": [ - { - "id": "[concat(variables('agentsLbID'), '/backendAddressPools/', variables('agentsLbBackendPoolName'))]" - } - ] - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('agentVMNamePrefix'), 'nic-', copyIndex())]", - "[concat('Microsoft.Compute/availabilitySets/', variables('agentAvailabilitySet'))]" - ], - "properties": { - "availabilitySet": { - "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('agentAvailabilitySet'))]" - }, - "hardwareProfile": { - "vmSize": "[variables('agentVMSize')]" - }, - "osProfile": { - "computername": "[concat(variables('agentVMNamePrefix'), copyIndex())]", - "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]", - "customData": "[base64('#cloud-config\n\nwrite_files:\n - encoding: gzip\n content: !!binary |\n H4sIAA+YUlYC/81YbVPbRhD+rl+xFZoBksiyIUxbZ9wOAdMwLZixIe00pPFZOmMVSafoTgZC/d+7d6eTJb8QSNOZwIys29u9fXnudve08Z03ChNvRPjEsja+/M/agAOWjMOrPKNwQjnj0EsovGa3lpw7n4QcwoQLEkUcxITCmEURuwmTK/BZnLKEJoIjowufGLumNM3UIFYrxYQLWhBIRsSEJZVZcoWy/8l2i1MB7q1lUX/CwEYrMyEt0+v7US7Vo53aPyJClthWQAS1UlSPcoPf9/snH952+4Pj3mnH5jcki9sRMnBhW4txOkMXYoor8oUp62R/cN7tH/QuTs87zn1rVhDO+t2j4z+QsmMoR8f9wfn+4WEfibsza//Pi373YtCVw5cz6+3J6f5JtzOcMC4SVDWUlIuT1zg/VB46mgP+AU4D2ORe49m7v5ruj+8vt96pn+eX288c77LlbUrZQv8a2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N5f6GCCMwT4MqzUna2gS+O0/fSrdZIhmzr5rD62bUU/jhotkme1ctwouES55aX2ta12f1uQGVhG7XU3BxYq0n3/r88tYXJpjZszyi3GAKMhekGfOxSlD+1LUtXJrnERdmN+gxya54x7arSA+5gs/Z2qrcItzW9vYQXqmYqWDoud7BOd5GhvQ2zZZuCvAcHCw1kvn4TNUg27mft/gz576yxsy25lvILu8OttpLdtNe3k1V+537+WjmjhgT6CdJXbSL+qJ2HQK7uhdWq3PCJ+kjwZRixeYUHO1ooaMsTA8JY9HK7ty/GQa+Lq0sLDaovivOxXCjWZUlna0S3G3rccAYj+WN9FHo6FHzQd5Sg0RzZeGOr4MwAzcFDy/8xNNml2VZD9vyRMZYXtpwaeN+v8rCPC5YL221c+MY60sb8yomP1zeVaXc3KWrcQJIsZnibRVRF9f7YbfZbMvHpV2ltSSttYrm5UFap+9I+s4q2iLvS6nrZV3XnqTtFbQpi/KYVsyrhqWtBoqvyAAyICS6IXccqfqzSDVWTu3DST1U+EQucHG/pVHoq68uOKpsXdOs6FptTPCcGvDKdE+Ge0VspaCSVqqxwl5XJiv4LXutCrbKme3K+1rXbVlCWSo8IltdGS5BwoRmfKFENu7iSKaVNOeTYI1EWfWMEOQpuIHyLg0qWzNOIypoAOX3rKLWKBxkkyPb/Vofu7b9fBR0qxyvAKoyRgXAztMB/HbDWOnHtVxZ9gA7F4odAxsD97MwRS791VB9QFxU8uAnx38B8pTHtq0VAAA=\n path: /opt/azure/containers/configure-swarm-cluster.sh\n permissions: \"0744\"\n\n')]", - "linuxConfiguration": "[variables('linuxConfiguration')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(),'-osdisk')]", - "vhd": { - "uri": "[concat('http://',variables('storageAccountPrefixes')[mod(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(div(copyIndex(),variables('vmsPerStorageAccount')),variables('storageAccountPrefixesCount'))],variables('storageAccountBaseName'),add(1,div(copyIndex(),variables('vmsPerStorageAccount'))), '.blob.core.windows.net/vhds/', variables('agentVMNamePrefix'), copyIndex(), '-osdisk.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('agentVMNamePrefix'), copyIndex(), '/configureagent')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "copy": { - "name": "vmLoopNode", - "count": "[variables('agentCount')]" - }, - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('agentVMNamePrefix'), copyIndex())]" - ], - "properties": { - "publisher": "Microsoft.OSTCExtensions", - "type": "CustomScriptForLinux", - "typeHandlerVersion": "1.3", - "settings": { - "fileUris": [], - "commandToExecute": "[variables('agentCustomScript')]" - } - } - } - ], - "outputs": { - "jumpboxFQDN": { - "type": "string", - "value": "" - }, - "masterFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]" - }, - "agentFQDN": { - "type": "string", - "value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('agentPublicIPAddressName'))).dnsSettings.fqdn]" - } - } -} diff --git a/windowsvm/README.md b/windowsvm/README.md deleted file mode 100644 index e6307ac..0000000 --- a/windowsvm/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Scaling to 12800 static IP addresses using subnet 10.0.0.0/18 - -This demonstrates updating registry during installation so that browser settings can be modified. - - - - diff --git a/windowsvm/azuredeploy.json b/windowsvm/azuredeploy.json deleted file mode 100644 index 0dcac6c..0000000 --- a/windowsvm/azuredeploy.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "newStorageAccountName": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed." - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "dnsNameForPublicIP": { - "type": "string", - "metadata": { - "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." - } - } - }, - "variables": { - "osImagePublisher": "MicrosoftVisualStudio", - "osImageOffer": "VisualStudio", - "osImageSKU": "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", - "osImageVersion": "latest", - "OSDiskName": "osdiskforwindowssimple", - "nicName": "myVMNic", - "addressPrefix": "10.0.0.0/16", - "subnetName": "Subnet", - "subnetPrefix": "10.0.0.0/24", - "storageAccountType": "Standard_LRS", - "publicIPAddressName": "myPublicIP", - "publicIPAddressType": "Dynamic", - "vmStorageAccountContainerName": "vhds", - "vmName": "MyWindowsVM", - "vmSize": "Standard_D2", - "virtualNetworkName": "MyVNET", - "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "name": "[parameters('newStorageAccountName')]", - "apiVersion": "2015-05-01-preview", - "location": "[resourceGroup().location]", - "properties": { - "accountType": "[variables('storageAccountType')]" - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "location": "[resourceGroup().location]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]", - "dnsSettings": { - "domainNameLabel": "[parameters('dnsNameForPublicIP')]" - } - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "location": "[resourceGroup().location]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ] - } - }, - { - "apiVersion": "2015-06-15", - "type": "Microsoft.Compute/virtualMachines", - "name": "[variables('vmName')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]", - "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[variables('vmSize')]" - }, - "osProfile": { - "computername": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "[variables('osImagePublisher')]", - "offer": "[variables('osImageOffer')]", - "sku": "[variables('osImageSKU')]", - "version": "[variables('osImageVersion')]" - }, - "osDisk": { - "name": "osdisk", - "vhd": { - "uri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" - }, - "caching": "ReadWrite", - "createOption": "FromImage" - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "true", - "storageUri": "[concat('http://',parameters('newStorageAccountName'),'.blob.core.windows.net')]" - } - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'),'/installcustomscript')]", - "apiVersion": "2015-06-15", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.4", - "settings": { - "commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -command \"New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer' ; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation' -Name IntranetCompatibilityMode -Value 0 -Type DWord; New-Item -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' ; New-ItemProperty -Path HKLM:'\\SOFTWARE\\Policies\\Microsoft\\Internet Explorer\\Main' -Name 'Start Page' -Value http://www.google.com -Type String\"" - } - } - } - ] -}