Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
412 lines (411 sloc) 15.7 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Email": {
"type": "string",
"minLength": 5,
"maxLength": 100,
"metadata": {
"description": "Your email address (won't be shared or shown anywhere)"
}
},
"FullName": {
"type": "string",
"minLength": 5,
"maxLength": 50,
"metadata": {
"description": "Your full name to be displayed on the global dashboards"
}
},
"TeamName": {
"type": "string",
"minLength": 3,
"maxLength": 100,
"metadata": {
"description": "Your team name to be displayed on the global dashboards"
}
},
"CompanyName": {
"type": "string",
"minLength": 3,
"maxLength": 50,
"metadata": {
"description": "Your company name to be displayed on the global dashboards"
}
},
"CountryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"metadata": {
"description": "Your country ISO2 code to be displayed on the global dashboards. Check <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2' target='_new'>Wikipedia</a> for more info"
}
},
"LabKeyCode": {
"type": "string",
"minLength": 3,
"maxLength": 50,
"metadata": {
"description": "The code that identifies your Bootcamp headquarter. Ask to staff for it"
}
},
"VirtualMachinesSku": {
"type": "string",
"defaultValue": "Standard_A1",
"allowedValues": [
"Standard_A1",
"Standard_D1",
"Standard_D1_v2",
"Standard_F1"
],
"metadata": {
"description": "Size of the virtual machines for the Azure Batch pool"
}
},
"InstanceCount": {
"type": "int",
"defaultValue": 2,
"metadata": {
"description": "Number of virtual machine instances (20 or less). Note: check the available cores in your subscription before setting up a big number. You can start by 1 or 2 virtual machines and change the number of them later on the portal"
},
"maxValue": 20
}
},
"variables": {
"ClientUniqueName": "[concat('gab', substring(toLower(uniqueString(resourceGroup().id)), 0, 8))]",
"StorageAccountName": "[concat(variables('ClientUniqueName'), 'sa')]",
"StorageAccountType": "Standard_LRS",
"BatchAccountName": "[concat(variables('ClientUniqueName'), 'ba')]",
"AutomationAccountName": "[concat(tolower(replace(replace(resourceGroup().name, ' ', ''), '_', '')), 'aa')]",
"AutomationSku": "Basic",
"Runbooks.GetNewBatch.Name": "Get-NewBatch",
"Runbooks.GetNewBatch.Description": "Gets a new set of data to process",
"Runbooks.GetNewBatch.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/Get-NewBatch.ps1",
"Runbooks.CreateBatchPool.Name": "Create-BatchPool",
"Runbooks.CreateBatchPool.Description": "Creates the batch pool",
"Runbooks.CreateBatchPool.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/Create-BatchPool.ps1",
"Runbooks.SetupJobSchedules.Name": "Setup-JobSchedules",
"Runbooks.SetupJobSchedules.Description": "Creates the job schedules to get more inputs",
"Runbooks.SetupJobSchedules.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/Setup-JobSchedules.ps1",
"AzureRM.Profile.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/AzureRM.Profile.zip",
"AzureRM.Automation.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/AzureRM.Automation.zip",
"AzureRM.Batch.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/AzureRM.Batch.zip",
"CreateBatchPoolJob.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/CreateBatchPoolJob.json",
"SetupJobSchedules.Uri": "https://globalazurebootcamp.blob.core.windows.net/release/assets/SetupJobSchedules.json",
"NewGuid.Uri": "http://gab2017.trafficmanager.net/api/Templates/NewGuid?numberOfGuids=2"
},
"resources": [
{
"apiVersion": "2015-01-01",
"name": "MyGuids",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('NewGuid.Uri')]",
"contentVersion": "1.0.0.0"
}
}
},
{
"name": "[variables('StorageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[resourceGroup().location]",
"apiVersion": "2016-01-01",
"sku": {
"name": "[variables('StorageAccountType')]"
},
"dependsOn": [],
"tags": {
"displayName": "Storage Account"
},
"kind": "Storage"
},
{
"type": "Microsoft.Batch/batchAccounts",
"name": "[variables('BatchAccountName')]",
"apiVersion": "2015-12-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]"
],
"tags": {
"displayName": "Batch Account"
},
"properties": {
"autoStorage": {
"storageAccountId": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name,'/providers/Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]"
}
}
},
{
"name": "[variables('AutomationAccountName')]",
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-10-31",
"location": "[resourceGroup().location]",
"dependsOn": [
"MyGuids",
"[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]"
],
"tags": {
"displayName": "Automation Account"
},
"properties": {
"sku": {
"name": "[variables('AutomationSku')]"
}
},
"resources": [
{
"type": "variables",
"name": "Email",
"apiVersion": "2015-10-31",
"properties": {
"isEncrypted": false,
"value": "[concat('\"', parameters('Email'), '\"')]",
"description": ""
},
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('AutomationAccountName'))]"
]
},
{
"type": "variables",
"name": "FullName",
"apiVersion": "2015-10-31",
"properties": {
"isEncrypted": false,
"value": "[concat('\"', parameters('FullName'), '\"')]",
"description": ""
},
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('AutomationAccountName'))]"
]
},
{
"type": "variables",
"name": "TeamName",
"apiVersion": "2015-10-31",
"properties": {
"isEncrypted": false,
"value": "[concat('\"', parameters('TeamName'), '\"')]",
"description": ""
},
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('AutomationAccountName'))]"
]
},
{
"type": "variables",
"name": "CompanyName",
"apiVersion": "2015-10-31",
"properties": {
"isEncrypted": false,
"value": "[concat('\"', parameters('CompanyName'), '\"')]",
"description": ""
},
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('AutomationAccountName'))]"
]
},
{
"type": "variables",
"name": "LabKeyCode",
"apiVersion": "2015-10-31",
"properties": {
"isEncrypted": false,
"value": "[concat('\"', parameters('LabKeyCode'), '\"')]",
"description": ""
},
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('AutomationAccountName'))]"
]
},
{
"type": "variables",
"name": "CountryCode",
"apiVersion": "2015-10-31",
"properties": {
"isEncrypted": false,
"value": "[concat('\"', parameters('CountryCode'), '\"')]",
"description": ""
},
"dependsOn": [
"[resourceId('Microsoft.Automation/automationAccounts', variables('AutomationAccountName'))]"
]
},
{
"type": "modules",
"name": "AzureRM.Profile",
"apiVersion": "2015-10-31",
"tags": {
"displayName": "Modules - AzureRM.Profile"
},
"properties": {
"contentLink": {
"uri": "[variables('AzureRM.Profile.Uri')]"
}
},
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]"
]
},
{
"type": "modules",
"name": "AzureRM.Automation",
"apiVersion": "2015-10-31",
"tags": {
"displayName": "Modules - AzureRM.Automation"
},
"properties": {
"contentLink": {
"uri": "[variables('AzureRM.Automation.Uri')]"
}
},
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/modules/AzureRM.Profile')]"
]
},
{
"type": "modules",
"name": "AzureRM.Batch",
"apiVersion": "2015-10-31",
"tags": {
"displayName": "Modules - AzureRM.Batch"
},
"properties": {
"contentLink": {
"uri": "[variables('AzureRM.Batch.Uri')]"
}
},
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/modules/AzureRM.Profile')]"
]
},
{
"name": "[variables('Runbooks.CreateBatchPool.Name')]",
"type": "runbooks",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/modules/AzureRM.Batch')]"
],
"tags": {
"displayName": "Runbook - Create-BatchPool"
},
"properties": {
"runbookType": "PowerShell",
"logProgress": "false",
"logVerbose": "false",
"description": "[variables('Runbooks.CreateBatchPool.Description')]",
"publishContentLink": {
"uri": "[variables('Runbooks.CreateBatchPool.Uri')]",
"version": "1.0.0.0"
}
}
},
{
"name": "[variables('Runbooks.SetupJobSchedules.Name')]",
"type": "runbooks",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/modules/AzureRM.Automation')]"
],
"tags": {
"displayName": "Runbook - Setup-JobSchedules"
},
"properties": {
"runbookType": "PowerShell",
"logProgress": "false",
"logVerbose": "false",
"description": "[variables('Runbooks.SetupJobSchedules.Description')]",
"publishContentLink": {
"uri": "[variables('Runbooks.SetupJobSchedules.Uri')]",
"version": "1.0.0.0"
}
}
},
{
"name": "[variables('Runbooks.GetNewBatch.Name')]",
"type": "runbooks",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/modules/AzureRM.Batch')]"
],
"tags": {
"displayName": "Runbook - Get-NewBatch"
},
"properties": {
"runbookType": "PowerShell",
"logProgress": "false",
"logVerbose": "false",
"description": "[variables('Runbooks.GetNewBatch.Description')]",
"publishContentLink": {
"uri": "[variables('Runbooks.GetNewBatch.Uri')]",
"version": "1.0.0.0"
}
}
},
{
"apiVersion": "2015-01-01",
"name": "CreateBatchPoolJob",
"type": "Microsoft.Resources/deployments",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/modules/AzureRM.Automation')]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/runbooks/',variables('Runbooks.CreateBatchPool.Name'))]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('CreateBatchPoolJob.Uri')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"automationAccountName": { "value": "[variables('AutomationAccountName')]" },
"jobName": { "value": "[reference('MyGuids').outputs.guid0.value]" },
"runbookName": { "value": "[variables('Runbooks.CreateBatchPool.Name')]" },
"batchAccountName": { "value": "[variables('BatchAccountName')]" },
"virtualMachinesSku": { "value": "[parameters('VirtualMachinesSku')]" },
"instanceCount": { "value": "[parameters('InstanceCount')]" }
}
}
},
{
"apiVersion": "2015-01-01",
"name": "SetupJobSchedules",
"type": "Microsoft.Resources/deployments",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/runbooks/',variables('Runbooks.GetNewBatch.Name'))]",
"[concat('Microsoft.Automation/automationAccounts/', variables('AutomationAccountName'), '/runbooks/',variables('Runbooks.SetupJobSchedules.Name'))]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('SetupJobSchedules.Uri')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"jobName": { "value": "[reference('MyGuids').outputs.guid1.value]" },
"runbookName": { "value": "[variables('Runbooks.SetupJobSchedules.Name')]" },
"automationAccountName": { "value": "[variables('AutomationAccountName')]" },
"batchAccountName": { "value": "[variables('BatchAccountName')]" },
"runbookGetNewBatch": { "value": "[variables('Runbooks.GetNewBatch.Name')]" }
}
}
}
]
}
],
"outputs": {
}
}