Chapter 3. DevOps Automation Primer
Azure was launched in early 2010 with Azure Service Management (ASM) as its base technology platform for provisioning, organizing, and managing IaaS and PaaS services. During the Build 2014 event, Microsoft introduced a new Azure technology platform, Azure Resource Manager (ARM). There are inherent issues with Azure Service Management in terms of performance, concurrency, extensibility, and scalability of services. It was becoming difficult for Microsoft to introduce newer, consistent, and scalable services because of the way ASM was designed and architected. Azure Resource Manager was introduced to overcome these challenges and provide an architecture that is extensible, scalable, and provide additional advance features not available with ASM.
Before 2014, System Center Configuration Manager (SCCM) was the prime configuration management software from Microsoft and with cloud gaining popularity, there was need of a lightweight configuration management platform that could easily scale and run everywhere including cloud and on-premises. Desired State Configuration (DSC) was launched in 2014 as part of Windows Management Framework (WMF) 4.0 and has become stable and robust with the release of WMF 5.0. Windows Server 2016 and Windows 10 come with WMF 5.0 installed out-of-the-box. DSC is a lightweight configuration management platform capable of running and configuring multiple operating systems, services, and environments. PowerShell has long been a part of Windows. It is the de-facto standard and used ubiquitously for administration and the management of infrastructure, environment, and services.
In this chapter, I will introduce Azure Resource Manager, describe its concepts, benefits and advantages, architecture, and show some of its features. The chapter will continue with Azure Resource Manager templates. Templates are a deployment feature of ARM and enables Infrastructure as Code and DevOps implementation. I will show how templates are defined and authored, its features and components like linking, dependencies, expressions, monitoring and auditing deployments, and tools for authoring them.
Next, PowerShell will be introduced. It is a scripting language and command-line shell used for automation, administration, and management of servers, services and environments. A PowerShell-based utility Pester will be another important topic in this chapter. Pester is a unit and integration testing tool for PowerShell scripts and environments. It helps in validating infrastructure and environments through assertion, comparing desired with actual output. The chapter ends with how all these technologies come together and help in enabling DevOps. DSC is based on PowerShell. Azure templates use both DSC and PowerShell for provisioning and management of Azure resources. I will try to cover these technologies as much as possible in this chapter. However, because this book is on DevOps, these topics will not be covered in complete detail as each of them demands their own book.
Subsequent sections will introduce DSC, describe its different architectures and concepts, show its configuration features, how it manages environments using dependencies, partial configuration, PowerShell cmdlets, and DSC resources.