My presentation slide for the Global Azure Bootcamp Kuala Lumpur Malaysia 2016. Agenda includes Intro to Infrastructure-As-Code (IaC), IaC types and manifests, ARM Template intro, deployment methods, latest ARM template feature from Build 2016, ARM template deployment demo from the Quickstart templa...
My presentation slide for the Global Azure Bootcamp Kuala Lumpur Malaysia 2016. Agenda includes Intro to Infrastructure-As-Code (IaC), IaC types and manifests, ARM Template intro, deployment methods, latest ARM template feature from Build 2016, ARM template deployment demo from the Quickstart template, ARM Visualizer demo, ARM Template best practices and troubleshooting tips.
About Me Infrastructure As Code ARM Template Intro ARM Template Usage – Demo ARM Template Best Practice ARM Template Troubleshooting Tips Key Takeaways Q & A Agenda
About Me
Infrastructure As Code
Programmable Infrastructure Write Code to manage configurations & automate provisioning of infra. Types: Declarative v.s. Imperative ( What v.s. How ) Developers become more involved in defining configuration Ops get involved earlier in the development process Infrastructure As Code
Declarative v.s. Imperative Declarative (What) Imperative (How) Define WHAT it should be ( Desired State ) without specifying how it is being done in details Define HOW things should be done explicitly in details step s in order to achieve the desired result "resources": [ { "type": "<resource-type-name>", "name": "<name-of-the-resource>", "location": "<location-of-resource>", " dependsOn ": [ "<array-of-related-resource-names>" ], "properties": "<settings-for-the-resource>", "resources": [ "<array-of-child-resources>" ] } ] Write-Host "Selecting subscription '$ subscriptionId '"; Set- AzureRmContext - SubscriptionID $ subscriptionId ; $ resourceGroup = Get- AzureRmResourceGroup -Name $ resourceGroupName - ErrorAction SilentlyContinue if(!$ resourceGroup ) { Write-Host "Resource group '$ resourceGroupName ' does not exist. New- AzureRmResourceGroup -Name $ resourceGroupName -Location $ resourceGroupLocation } else{ Write-Host "Using existing resource group '$ resourceGroupName '"; }
Infrastructure As Code Manifest Vendor Manifest Microsoft Azure Resource Manager (ARM) Template Chef Chef Recipe Puppet Puppet Code Amazon AWS CloudFormation Template Google Google Cloud Platform Instance Template
ARM Template
JSON file Declarative Infrastructure As Code template Defines the resources to deploy Defines input parameters, variables and outputs from the deployment Deploy resources in a single, coordinated operation ARM Template Intro
Azure Portal Azure PowerShell Azure SDK (.NET, Java, Python, Node.js, Ruby, PHP) Azure CLI (Cross-Platform Command Line Interface ) Azure Resource Manager REST API Ways to Deploy ARM Template Deployment
New feature announced in //BUILD/ 2016 To generate ARM Template from existing resources contained in a Resource Group! Export ARM Template from Resource Group
ARM Template Usage – Demo
ARM Template Best Practice
Which resources types you need to deploy ? Where those resources will reside? Which version of the resource provider API you will use? Whether any of the resources must be deployed after other resources? Which values you want to pass in during deployment, and which values you want to define directly in the template? Whether you need to return values from the deployment? Plan Your ARM Template
Best Authoring Tool – Visual Studio 2015 Define Api Versions as variables instead of parameters Use expression function e.g. trim() , toLower () to format input data Azure Quick Start Template (GitHub ) Azure Resource Manager Schema (GitHub) ARM Template Authoring Best Practices
Infrastructure As Code + Declarative => Desired State Configuration Resources Provision ARM Template => Best Authoring Tool + Supporting Resources More than 100 Starter templates available Key Takeaways