automating your microsoft azure environment (devlink 2014)
DESCRIPTION
Discussion of various automation options available in the Microsoft Azure platform - Azure Automation, PowerShell, Azure Management Libraries, Azure Resource Manager, and Brewmaster.TRANSCRIPT
![Page 1: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/1.jpg)
Automating Your Microsoft Azure Environment
![Page 3: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/3.jpg)
17
COLUMBUS, OH OCTOBER 17, 2014 CLOUDDEVELOP.ORG
![Page 4: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/4.jpg)
Today’s Agenda1. Why Automation in Azure2. Azure Management Library3. PowerShell4. Azure Automation5. Brewmaster*
* I am employed by Aditi. Brewmaster is an Aditi service.
![Page 5: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/5.jpg)
Why Automation?Azure is highly automated• Service healing• Internal resources
Time to provision full environments• Compute, storage, etc.
Deployment to multiple geographies• Change only configuration / parameters
![Page 6: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/6.jpg)
Why Automation?
#1 Source of Failed Projects (IMO)
Humans Terrible at Repetitive Tasks
![Page 7: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/7.jpg)
A Few Options
REST API• Service Management
• Resource Manager
![Page 8: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/8.jpg)
A Few Options
REST API• Service Management
• Resource Manager
Azure Management Library
![Page 9: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/9.jpg)
A Few Options
REST API• Service
Management• Resource
Manager
Azure Management Library
PowerShell• Invoke REST• Service
Management• Resource
Manager
![Page 10: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/10.jpg)
A Few Options
REST API• Service
Management• Resource
Manager
Azure Management Library
PowerShell• Invoke REST• Service
Management• Resource
Manager
XPlat CLI• ??
![Page 11: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/11.jpg)
A Few Options
REST API• Service
Management• Resource
Manager
Azure Management Library
PowerShell• Invoke REST• Service
Management• Resource
Manager
XPlat CLI• ??
Azure Automation
![Page 12: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/12.jpg)
A Few Options
REST API• Service
Management• Resource
Manager
Azure Management Library
PowerShell• Invoke REST• Service
Management• Resource
Manager
XPlat CLI• ??
Azure Automation
Brewmaster
![Page 13: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/13.jpg)
Microsoft Azure Management Library
![Page 14: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/14.jpg)
Microsoft Azure Management LibraryConsistent modern libraries over the Azure REST API
Source: http://www.BradyGaster.com
![Page 15: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/15.jpg)
Microsoft Azure Management Library
Source: http://www.BradyGaster.com
![Page 16: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/16.jpg)
Microsoft Azure Management LibraryScenarios• Integration Testing• Custom provisioning of services (SaaS)• Dev/Test• Resource Governance
• Anything you may want to automate
![Page 17: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/17.jpg)
Microsoft Azure Management LibraryGet all or just the ones you need
![Page 18: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/18.jpg)
MAML
Create Web SiteCreate Storage AccountCreate and Deploy Web Role
![Page 19: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/19.jpg)
• Get the MAML Libraries from NuGet• Microsoft.WindowsAzure.Management
• Get Active Directory Authentication Library• Microsoft.IdentityModel.Clients.ActiveDirectory (search “ADAL”)
• Authenticate against AAD or use ClientCredential• Use Microsoft Account or Organization
• Use resource specific client to perform actions• StorageManagementClient, ComputeManagementClient, etc.
Recap
![Page 20: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/20.jpg)
PowerShell
![Page 21: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/21.jpg)
PowerShell CmdletsGet the goods
http://azure.microsoft.com/en-us/downloads/
https://github.com/Azure/azure-sdk-tools/releases
![Page 22: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/22.jpg)
PowerShellUse cmdlets and/or REST APIs
Ability to script complex environments• Template with an XML parameters file• PowerShell learning curve
Consistent Deployments• Build server or developer machine
![Page 23: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/23.jpg)
Authentication OptionsInteractive• Azure AD
> Add-AzureAccountVERBOSE: Account "[email protected]" has been added.VERBOSE: Subscription "Cloud Practice Sales Demos" is selected as the default subscription.VERBOSE: To view all the subscriptions, please use Get-AzureSubscription.VERBOSE: To switch to a different subscription, please use Select-AzureSubscription.
* Tip – Profile data stored in C:\Users\<user>\AppData\Roaming\Windows Azure Powershell
![Page 24: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/24.jpg)
Authentication OptionsProgrammatic• Management certificate• New –credentials option
$userName = "<your organizational account user name>"
$securePassword = ConvertTo-SecureString -String "<your organizational account password>" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($userName, $securePassword)
Add-AzureAccount -Credential $cred http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/
![Page 25: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/25.jpg)
PowerShell:Service Management
Create VMs with custom script extensionDeploy a Cloud Service
![Page 26: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/26.jpg)
Resource ManagerWhat is Azure Resource Manager?
Resource Group
Unit of Management• Lifecycle• Identity• Grouping
One Resource -> One Resource Group
![Page 27: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/27.jpg)
RepeatabilityProvide• Idempotency• Orchestration• Resource configuration
Ability To• Source control• Parameterized input/output
SQL - A Website VirtualMachines
SQL-AWebsite
[SQL CONFIG] VM (2x)
DEPENDS ON SQLDEPENDS ON SQL
SQLCONFIG
Image source - http://channel9.msdn.com/Events/Build/2014/2-607
![Page 28: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/28.jpg)
JSON Templates
![Page 29: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/29.jpg)
What You NeedAzure Resource Manager Tools Preview (VS2013)
![Page 30: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/30.jpg)
What You NeedPowerShell (v0.8.7.1)
Switch-AzureMode AzureResourceManagerGet-AzureResourceGroupGalleryTemplate –Identity
Microsoft
![Page 31: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/31.jpg)
PowerShell:Resource Manager
Create new deployment from gallery (WebSite + SQL)
Create customized image(WebSite + SQL + Redis + WebDeploy)
![Page 32: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/32.jpg)
Azure Automation
![Page 33: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/33.jpg)
What is Azure Automation?IT process automation solution for Azure• Creation, monitoring, deployment, & maintenance• PowerShell Workflow engine• Runbooks• Leverage existing PowerShell scripts
![Page 34: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/34.jpg)
Azure Automation
Stop VMs on a Schedule
![Page 35: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/35.jpg)
Brewmaster
![Page 36: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/36.jpg)
BrewmasterAutomated provisioning and deployment in Azure1. Choose Template 2. Configure
Parameters3. Deploy
![Page 37: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/37.jpg)
Brewmaster TemplatesPre-built templates for popular server workloadsSharePoint, AD, SQL Server Always On, ARR, etc.DSC and PowerShell
Template SDKhttps://github.com/AditiTechnologiesJSON-basedC# Fluent Syntax Builder (NuGet)
![Page 38: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/38.jpg)
Brewmaster
Create SQL Server AlwaysOn deployment
![Page 39: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/39.jpg)
Choices . . . When to UseMAML
• PCL (WinPhone/WinStore)
• Higher level languages
PowerShell
• DevOps• Templates• Build Servers• Quicker than portal
Azure Automation
• Schedule Tasks• Integrate with Other
Services• System Center scripts
Brewmaster
• Templates for server workloads
• IaaS-only
Azure Resource Manager
• Future for Azure API• New, well-defined
topology• Unable to export from
cloud
![Page 40: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/40.jpg)
ResourcesMAML• http://www.jeff.wilcox.name/2014/04/wamlmaml/ • http://
www.bradygaster.com/post/announcing-the-general-availability-of-the-microsoft-azure-management-libraries-for-net
PowerShell• ARM - http://channel9.msdn.com/Events/Build/2014/2-607 • http://michaelwasham.com/windows-azure-powershell-reference-guide/
Azure Resource Manager• http://azure.microsoft.com/blog/2014/08/11/azure-resource-manager-tools-preview/• http://
blogs.msdn.com/b/rmattsampson/archive/2014/08/19/azure-resource-manager-tools-for-visual-studio.aspx
Azure Automation• http://azure.microsoft.com/blog/tag/azure-automation/
Brewmaster• http://brewmaster.aditicloud.com
![Page 41: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/41.jpg)
Questions?
![Page 42: Automating Your Microsoft Azure Environment (DevLink 2014)](https://reader035.vdocuments.mx/reader035/viewer/2022062405/556cc9f5d8b42aba548b5074/html5/thumbnails/42.jpg)
Thank You!Michael S. CollierPrincipal Cloud Architect
[email protected]@MichaelCollierwww.MichaelSCollier.com