Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ARMing the Octopus

ARMing the Octopus

How many arms does an Octopus have? No - this is not the start of a bad joke. But the answer is that there is room for a new type of ARM on the Octopus.

Come and join Paul as he talks about Azure Resource Manager (ARM) and how we used ARM templates to create a one-click deployment for an Octopus 3.0 environment. You'll also come away understanding why it is crucial that you learn about ARM and how it provides a great surface for deploying and managing your Azure resources.

This was a talk I delivered at the Brisbane Azure User Group:
http://www.meetup.com/Brisbane-Azure-User-Group/events/223218942/

The demo run-list and commands are available in the following Gist:
https://gist.github.com/paulbouwer/8ae860699595c59b1e62

The ARM Template is available on GitHub:
https://github.com/paulbouwer/azure-quickstart-templates/tree/master/octopusdeploy3-single-vm-windows

Paul Bouwer

July 10, 2015
Tweet

More Decks by Paul Bouwer

Other Decks in Technology

Transcript

  1. • Tenants • Subscriptions • Resource Groups • Resource Providers

    • Resources • Role Based Access Control • Linked Resources • Tags • Management Locks • Template Deployments API
  2. { "$schema": "http://schema.management.azure.com/schemas/ 2015-01-01/deploymentTemplate.json#", "contentVersion": "<version-number-of-template>", "parameters": { <parameter-definitions-of-template> },

    "variables": { <variable-definitions-of-template> }, "resources": [ { <definition-of-resources-to-deploy> } ], "outputs": { <outputs-of-template> } } deployment template
  3. "octopusAdminUsername" : { "type": "string", "defaultValue": "admin", "metadata": { "description":

    "Admin username for the Octopus Deploy web application." } } parameters
  4. "resources": [ { "apiVersion": "<api-version-of-resource>", "type": "<resource-provider-namespace/resource-type-name>", "name": "<name-of-the-resource>", "location":

    "<location-of-resource>", "tags": "<name-value-pairs-for-resource-tagging>", "dependsOn": [ "<array-of-related-resource-names>" ], "properties": "<settings-for-the-resource>", "resources": [ "<array-of-dependent-resources>" ] } ] resources
  5. "resources": [ { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('vmStorageAccountName')]", "location":

    "[variables('location')]", "tags": { "env": "trial", "vendor": "Octopus Deploy" }, "properties": { "accountType": "[variables('vmStorageAccountType')]" } } ] resources
  6. parameters(parameterName) Returns a parameter value that is provided when the

    deployment is executed. variables(variableName) Returns a variable that is defined in the template. concat(arg1,arg2,arg3,...) Combines multiple string values. This function can take any number of arguments. functions
  7. { "$schema": "http://schema.management.azure.com/schemas/ 2015-01-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { "location": {

    "value": "" }, "vmStorageAccountName": { "value": "" }, "vmAdminUsername": { "value": "" }, "vmAdminPassword": { "value": "" }, "networkDnsName": { "value": "" }, … "octopusAdminUsername": { "value": "" }, "octopusAdminPassword": { "value": "" } } } parameter file
  8. • Create Resource Group • Deploy into Resource Group •

    Template File • Parameter File • Portal • PS, xplat-cli, armclient • REST, .NET API
  9. PowerShell PS> New-AzureResourceGroup -Name OctopusTrial -Location "West US" xplat-cli >

    azure group create --name OctopusTrial --location "West US" create resource group
  10. PowerShell PS> New-AzureResourceGroupDeployment -ResourceGroupName OctopusTrial -DeploymentName OctopusTrialDeployment -TemplateFile azuredeploy.json -TemplateParameterFile

    azuredeploy-parameters.json xplat-cli > azure group deployment create "OctopusTrial" "OctopusTrialDeployment" --template-file azuredeploy.json --parameters-file azuredeploy-parameters.json deploy into resource group