Download - Become an Automation Ninja in 60 Minutes
AZURE STACK
AZURE
OFFICE 365
ENTERPRISE MOBILITY SUITE
OPERATIONS MANAGEMENT SUITE
AZURE STACK
HYPER-V
WINDOWS
Become an automation-
in 60 minutes
Michael Rueefli (MVP)
AZURE STACK
Michael Rueefli
Cloud Architect @ itnetX AG (CH)
MVP Cloud & Datacenter Management
Blog: www.miru.ch
Twitter: @drmiru
AZURE STACK
Session objectives
And enable you to...Know available tools and techniques
which free you up from....
AZURE STACK
Microsoft Automation Landscape
Partners
OEMs
Management
Products
ISVs
Automation
Products
Windows Server
PowerShellPowerShell Workflow
Just Enough Admin
Desired State Configuration
Microsoft
System Center
Service Management Automation
Orchestrator
Azure
Azure Automation
Azure DSC
AZURE STACK
System Center Orchestrator
• 32Bit-engine
• Graphical process authoring
• Integration Packs for 3rd
party systems
• oData Web Service API
• Beloved Silverlight console
AZURE STACK
Service Management Automation
• A feature shipped with SC Orchestrator 2012 R2
• Scalable, 64bit automation engine based on PowerShell Workflows
• No drag n' drop GUI
• Basic administration via Windows Azure Pack Admin Portal
AZURE STACK
SMA ArchitectureWAP Admin
Portal
REST API
Web Service
WorkerWorkerWorker
SMA DB
SCOM
SCSM
SCCM
SCVMM
SCORCH
3rd Party
AZURE STACK
Powershell Workflow
• Part of Powershell / WinRM since version 3.0
• PowerShell syntax
• Windows Workflow Foundation (WF/xaml)
execution
• Supports checkpoints / resuming
• Selective parallel / sequential execution OOB
AZURE STACK
PowerShell Workflow Anatomy
Runbook Input
Get Variables, Credentials
Logic / Work
Inline Script
AZURE STACK
Authoring Workflows• Azure Automation Authoring Toolkit
https://www.powershellgallery.com/packages/AzureAutomationAuthoringToolkit/0.2.2
• PowerShell ISE Steroidshttp://www.powertheshell.com/isesteroids2/
• PowerShell Project Explorerhttps://gallery.technet.microsoft.com/Powershell-ISE-Explorer-bfc92307
• Service Management Automation Whitepaperhttps://gallery.technet.microsoft.com/Service-Management-fcd75828
AZURE STACK
PowerShell Workflow Best Practices
• Handle errors properly (try{} catch {} finally {})
• Use inline scripts wisely• As a workaround
• Split large inline activities
• Respect naming conventionshttps://technet.microsoft.com/en-us/library/dd878270(v=vs.85).aspxhttps://technet.microsoft.com/en-us/library/ms714428(v=vs.85).aspx
• Use central logging (e.g. SQL database)
• Be modular (parent / child / helper)
• Use custom modules for frequent used functions
AZURE STACK
Modular Runbook ConstructPrevent…
Parent• Process
Logic
Child • Pattern
Helper • Pattern
Use…
AZURE STACK
Azure Automation
• SMA as a cloud service
• Runbooks / assets stored centrally
• Textual / graphical editor experience
• Integrated source control
• Hybrid runbook worker
• Native PowerShell script support (new!)
AZURE STACK
Hybrid Runbook Worker
Azure Automation
Worker Group NY
Worker Group SF
• On prem server
• MS Mgmt Agent (OMS)
• Local execution
• Reports results back to
OMS / Azure Automation
• Choose worker group
• No S2S VPN / Express Route
required
AZURE STACK
Hybrid Cloud Automation
Azure Automation
Worker Group NY
Worker Group SFPrivate Cloud
Provider Cloud
AZURE STACK
PowerShell DSC
How to configure your heterogenous cloud?• Centrally
• Scalable
• Multiplatform
• Lightweight
Desired State Configuration
DOMAIN JOINED WORKGROUP LINUX
Config Repository
AZURE STACKPowerShell DSC in a nutshell• Extension to PowerShell / WMF
• Enforce configuration / prevent configuration drift
• Idempotence: function produces exact the same result regardless if executed once or many
times
• PowerShell used to create DSC Configurations (declaration)
• Extremely lightweight and scalable
• Also available on Linux!
AZURE STACKWhat can I configure using DSC?
https://github.com/PowerShell/DscResources/tree/master/xDscResources
AZURE STACKPowerShell DSC Architecture
Pull Server• Resources
• Modules
• Configs
Authoring• PS 4.0
• PS 5.0
• Any tool Target
Systems
Local Configuration
ManagerStaging & Push
Staging Pull
HTTPS
AZURE STACKDSC Use Cases / Scenarios
• Private- / Hybrid Cloud Deployments
• DevOps / Operations of large server farms
• Enhancement for IaaS VM Roles
• Azure IaaS
• DSC capabilities will be included in SCCM 2016
AZURE STACKWMF 5.0 DSC Enhancements
• Partial Configurations
• Selective Push/Pull per configuration
• Cross-Computer Dependencies
• Side by Side Module / Resource Installations
AZURE STACKPartial Configurations
Pull Server OS
• Resources
• Modules
• Configs
Authoring
Target Systems
Local Configuration
Manager
Staging Pull
HTTPS
Pull Server Web
• Resources
• Modules
• Configs
Pull
HTTPSAuthoring Staging
AZURE STACKIt’s Production Preview…
Can we used it now?
Get it fromhttp://blogs.msdn.com/b/powershell/archive/2015/08/31/windows-
management-framework-5-0-production-preview-is-now-available.aspx
Officially Supported until 3 months after RTM
AZURE STACKAzure Automation DSC
• Full featured Pull Server
• Accessible via HTTPS
• GUI and PowerShell managed
• Reporting
Get started…
https://azure.microsoft.com/en-us/documentation/articles/automation-dsc-overview/