SlideShare a Scribd company logo
Automating That "Other" OS 
Cooking with Chef on Windows 
Julian Dunn <jdunn@getchef.com> 
Engineering Lead – Field Solutions 
Chef Software, Inc. 
CloudDevelop Conference 
Columbus, OH 
October 2014
Doesn't scale
Jeffrey Snover and the Monad Manifesto
Evolution of Automation on Windows 
1996: WMI 
2003: 
Subsystem 
for Unix 
Applications 
1999: 
Services for UNIX 
2008: 
PowerShell 2.0 
& 
Server Core 
2006: 
PowerShell 1.0 
2013: 
PowerShell 4.0/ 
Desired State 
Configuration 
2012: 
PowerShell 3.0 
2014: 
PowerShell 5.0 
(Preview) 
2002: 
Monad 
Manifesto
The GUI isn't dead, but it's dying on 
the server OS. Don't be caught off-guard 
when it's finally gone. 
- Don Jones, Redmond Magazine, July 2011 
http://redmondmag.com/articles/2011/07/01/the-gui-is-dead.aspx
Declarative Configuration 
Management
Model your IT by describing what it 
should look like -- not how it should 
be done.
Imperative versus Declarative 
Imperative: 
PS C:> Add-WindowsFeature Web-WebServer 
Declarative: 
Configuration MySite { 
WindowsFeature IIS { 
Ensure = "Present" 
Name = "Web-Server" 
} 
}
Platform-Neutral Domain-Specific Language 
package 'httpd' 
template '/etc/httpd/conf/httpd.conf' do 
owner 'root' 
group 'root' 
action :create 
source 'httpd.conf.erb' 
notifies :reload, 'service[httpd]' 
End 
service 'httpd' do 
action [:start, :enable] 
end 
windows_feature 'IIS-WebServerRole' 
template 'c:inetpubwwwrootindex.html' do 
owner 'Administrator' 
group 'IIS_IUSRS' 
action :create 
source 'index.html.erb' 
notifies :reload, 'service[W3SVC]' 
End 
service 'W3SVC' do 
action [:start, :enable] 
end
Chef Mechanics 
• Recipes go in cookbooks 
• Cookbooks are uploaded to a Chef 
server 
• Nodes periodically check in and 
get their recipes to run ("run list") 
• If system state is already desired 
state, Chef makes no changes 
• "Convergence"
What's the Purpose of Declarative CM? 
• Consistent, reproducible configurations 
• Manage & deploy thousands of machines correctly 
• Deploy applications correctly 
• Keep them in compliance with declared policy 
+ = 
Infrastructure Applications Service
Wait, What About System Center?
Microsoft System Center 
• Advisor 
• App Controller 
• Configuration Manager (SCCM) 
• Data Protection Manager 
• Endpoint Protection 
• Orchestrator/SMA 
• Operations Manager 
• Service Manager 
• Virtual Machine Manager
System Center Configuration Manager 
• Origin: Started as Systems 
Management Server (1994), renamed 
SCCM in ~2007 
• Purpose: Manage large groups of 
computers running Windows, Windows 
Embedded, Mac OS X, and/or 
Linux/UNIX 
• Components: 
• Remote control 
• Patch management 
• Software distribution 
• OS deployment using MDT 
• Hardware/software inventory 
• System configuration
SCCM: The Good, Bad and the Ugly 
• Good: 
• Easy-to-use UI 
• Lots of functionality 
• Great for managing desktops 
• Integrates with other System Center products 
• Bad: 
• Prescriptive workflow 
• Point-and-click 
• Needs Active Directory 
• Hard to automate the automation 
• No easily versionable artifacts
SCCM and Chef 
• SCCM (Compliance Settings) 
• Configuration settings set via UI 
• Configuration item primitives 
• WMI, registry, scripts, applications 
• Shareable artifacts (baselines) 
• Restrictive workflow 
• Idempotence is up to you 
• Agent-based 
• Chef: 
• Configuration settings via plain text files 
• Resource primitives 
• file, template, service, powershell_script, etc. 
• Shareable & versionable artifacts 
(cookbooks) 
• Flexible workflow 
• Built-in idempotence 
• Agent-based
Demo
Provisioning with Chef on Microsoft Azure 
1. Upload content (cookbooks, roles, etc.) 
2. Request VM 
4. Register with Chef server 
5. Execute run_list 
3. Create VM, install Azure 
and Chef agents
Provisioning with Chef 
$ knife azure server create 
--azure-source-image a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd 
--bootstrap-protocol cloud-api 
--winrm-user chef 
--winrm-password DELETED 
--azure-dns-name DELETED 
-r "role[base-windows], role[fourthcoffee-classic]" 
........... 
Waiting for virtual machine to reach status 'provisioning'............vm state 'provisioning' reached after 2.6 minutes. 
Waiting for virtual machine to reach status 'ready'..........................vm state 'ready' reached after 6.23 minutes. 
. 
DNS Name: DELETED.cloudapp.net 
VM Name: DELETED 
Size: Medium 
Azure Source Image: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd 
Azure Service Location: East US 
Public Ip Address: XXXXXXXX 
Private Ip Address: YYYYYYYY 
WinRM Port: 5985 
Environment: _default
Provisioning with Chef 
Waiting for Resource Extension to reach status 'wagent provisioning'.... 
Resource extension state 'wagent provisioning' reached after 0.03 minutes. 
Waiting for Resource Extension to reach status 'installing'.................... 
Resource extension state 'installing' reached after 2.17 minutes. 
Waiting for Resource Extension to reach status 'provisioning'.................................... 
Resource extension state 'provisioning' reached after 4.33 minutes. 
Waiting for Resource Extension to reach status 'ready'.................... 
Resource extension state 'ready' reached after 2.16 minutes. 
. 
DNS Name: DELETED.cloudapp.net 
VM Name: DELETED 
Size: Medium 
Azure Source Image: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd 
Azure Service Location: East US 
Public Ip Address: XXXXXX 
Private Ip Address: YYYYYY 
WinRM Port: 5985 
Environment: _default 
Runlist: ["role[base-windows]", "role[fourthcoffee-classic]"]
Welcome to Fourth Coffee Corporation of Seattle
Pay no attention to the man behind the curtain 
windows_feature 'IIS-WebServerRole' do 
action :install 
end 
# Pre-requisite features for IIS-ASPNET45 that need to be installed first, in this order. 
%w{IIS-ISAPIFilter IIS-ISAPIExtensions NetFx3ServerFeatures NetFx4Extended-ASPNET45 IIS-NetFxExtensibility45}. 
each do |f| 
windows_feature f do 
action :install 
end 
end 
windows_feature 'IIS-ASPNET45' do 
action :install 
end
Pay no attention to the man behind the curtain 
remote_directory node['fourthcoffee']['install_path'] do 
source 'fourthcoffee' 
action :create 
end 
iis_pool 'FourthCoffee' do 
runtime_version '4.0' 
action :add 
end 
iis_site 'FourthCoffee' do 
protocol :http 
port 80 
path node['fourthcoffee']['install_path'] 
application_pool 'FourthCoffee' 
action [:add,:start] 
end
Challenges to Automation on Windows 
• No real package manager 
• Many COTS vendors don’t understand automation 
• UAC (User Access Control) 
• WinRM Quotas 
• Win32 Redirector 
• Not all preferences/state stored in registry 
• Reboots! 
• Other annoyances (KB2773898, KB2918614, KB2842230)
Desired State Configuration 
The Future of Automation on Windows
PowerShell DSC: The Future of Automation 
"DSC represents a significant break in administration, because it 
asks … administrators to not actually configure anything 
themselves. Instead, DSC asks administrators to describe, in fairly 
simple text files, how they would like a computer to be configured. 
The computer, in turn, reads that text file, and configures itself 
accordingly." 
- The DSC Book, Don Jones & Steve Murawski
The Relationship between DSC and Chef 
• As PerfMon is to Solarwinds, DSC is to Chef 
• DSC provides automation primitives that Chef recipes can call 
• It deliberately lacks the ecosystem: 
• Content distribution 
• Cross-platform support 
• Monitoring/logging/analytics 
• However, it brings a standard base for automation to Windows 
• No MSFT product in the future may ship without DSC modules!
Example DSC Code 
Configuration FourthCoffee 
{ 
# Install the IIS role 
WindowsFeature IIS 
{ 
Ensure = "Present" 
Name = "Web-Server" 
} 
# Install the ASP .NET 4.5 role 
WindowsFeature AspNet45 
{ 
Ensure = "Present" 
Name = "Web-Asp-Net45" 
} 
... 
}
DSC Invoked from Chef 
Configuration FourthCoffee 
{ 
# Install the IIS role 
WindowsFeature IIS 
{ 
Ensure = "Present" 
Name = "Web-Server" 
} 
# Install the ASP .NET 4.5 role 
WindowsFeature AspNet45 
{ 
Ensure = "Present" 
Name = "Web-Asp-Net45" 
} 
... 
} 
dsc_resource 'webserver' do 
resource_name :windowsfeature 
property :name, 'Web-Server' 
property :ensure, 'Present' 
end 
dsc_resource 'dotnet45' do 
resource_name :windowsfeature 
property :name, 'Web-Asp-Net45' 
property :ensure, 'Present' 
end
Testing Infrastructure Code
DevOps is a Two-Way Street 
• It's great when developers 
care about: 
• Uptime! 
• Scaling! 
• Deployment! 
• Argh! Put them on call! That'll 
teach them!
DevOps is a Two-Way Street 
• Sysadmins/infracoders have a lot to learn 
from developers as well! 
• Good developers: 
• Write unit tests 
• Write acceptance tests 
• Practice test-driven-development 
• Build confidence that their program code works 
correctly 
• Avoid breaking their applications 
• Good infracoders: 
• Do all of the above 
• Avoid breaking ALL THE THINGS
Testing on the desktop 
• Chef Ecosystem Tools: 
• Test Kitchen 
• Acceptance testing (ServerSpec) 
• Bring-your-own hypervisor (VirtualBox, VMWare 
Fusion/Workstation, Hyper-V…) and/or middleware 
(Vagrant) 
• Demo
Example Test Suite 
describe windows_feature('IIS-WebServer') do 
it { should be_installed } 
end 
describe port(80) do 
it { should be_listening } 
end 
describe file('C:inetpubFourthCoffeeDefault.cshtml') do 
it { should be_file } 
end
Test Kitchen Demo 
fourthcoffee ~$ kitchen test default-windows-2012R2 --destroy=never 
-----> Starting Kitchen (v1.3.0) 
-----> Cleaning up any prior instances of <default-windows-2012R2> 
-----> Testing <default-windows-2012R2> 
-----> Creating <default-windows-2012R2>... 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'win2012r2-datacenter-chef11.16.2'... 
Vagrant instance <default-windows-2012R2> created. 
Finished creating <default-windows-2012R2> (2m57.54s). 
-----> Converging <default-windows-2012R2>... 
-----> Chef Omnibus installation detected (true) 
Transferring files to <default-windows-2012R2> 
Concurrent threads set to :max_threads => 2 
[2014-10-13T19:16:36-07:00] INFO: Starting chef-zero on host localhost, port 8889 with repository at repository at 
C:/tmp/kitchen 
One version per cookbook 
[2014-10-13T19:16:40-07:00] INFO: *** Chef 11.16.2 *** 
[2014-10-13T19:16:40-07:00] INFO: Chef-client pid: 1656
Test Kitchen Demo 
[2014-10-13T19:19:10-07:00] INFO: Chef Run complete in 142.572914 seconds 
[2014-10-13T19:19:10-07:00] INFO: Running report handlers 
[2014-10-13T19:19:10-07:00] INFO: Report handlers complete 
Finished converging <default-windows-2012R2> (22m55.08s). 
-----> Setting up <default-windows-2012R2>... 
-----> Running postinstall for serverspec plugin 
Finished setting up <default-windows-2012R2> (0m45.62s). 
-----> Verifying <default-windows-2012R2>... 
-----> Running serverspec test suite 
Windows feature "IIS-WebServer" should be installed 
Port "80" should be listening 
File "C:inetpubFourthCoffeeDefault.cshtml" should be file 
Finished in 13.41 seconds (files took 0.48432 seconds to load) 
3 examples, 0 failures 
Finished verifying <default-windows-2012R2> (0m22.73s). 
Finished testing <default-windows-2012R2> (27m11.16s). 
-----> Kitchen is finished. (27m12.60s)
Summary 
• Don't point-and-click to administer your Windows servers 
• Learn PowerShell! 
• Learn declarative configuration management 
• Test your infrastructure code
Q&A
Automating That "Other" OS

More Related Content

What's hot

Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 
Drupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsDrupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The Basics
John Smith
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
Martin Etmajer
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
wajrcs
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Leveraging Ansible for CI/CD
Leveraging Ansible for CI/CDLeveraging Ansible for CI/CD
Leveraging Ansible for CI/CD
Shippable
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
Josh Padnick
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
Knoldus Inc.
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
Raimonds Simanovskis
 
Learning chef
Learning chefLearning chef
Learning chef
Jonathan Carrillo
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
Paolo Tonin
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
Juan Diego Pereiro Arean
 
Automating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and ChefAutomating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and Chefkamalikamj
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
Michael Bahr
 
Ansible - A 'crowd' introduction
Ansible - A 'crowd' introductionAnsible - A 'crowd' introduction
Ansible - A 'crowd' introduction
Manuel de la Peña Peña
 
Chef introduction
Chef introductionChef introduction
Chef introduction
FENG Zhichao
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
Chef Software, Inc.
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
Jonathan Weiss
 

What's hot (20)

Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
 
Drupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsDrupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The Basics
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Leveraging Ansible for CI/CD
Leveraging Ansible for CI/CDLeveraging Ansible for CI/CD
Leveraging Ansible for CI/CD
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
Learning chef
Learning chefLearning chef
Learning chef
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
 
Automating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and ChefAutomating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and Chef
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Ansible - A 'crowd' introduction
Ansible - A 'crowd' introductionAnsible - A 'crowd' introduction
Ansible - A 'crowd' introduction
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 

Viewers also liked

Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014
Julian Dunn
 
What Makes a Good Cookbook?
What Makes a Good Cookbook?What Makes a Good Cookbook?
What Makes a Good Cookbook?
Julian Dunn
 
Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014Julian Dunn
 
Chef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConfChef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConfJulian Dunn
 
Configuration Management Isn't Everything
Configuration Management Isn't EverythingConfiguration Management Isn't Everything
Configuration Management Isn't Everything
Julian Dunn
 
An Introduction to Shef, the Chef Shell
An Introduction to Shef, the Chef ShellAn Introduction to Shef, the Chef Shell
An Introduction to Shef, the Chef Shell
Julian Dunn
 
Chef on AIX
Chef on AIXChef on AIX
Chef on AIX
Julian Dunn
 
Improving Your Mac Productivity
Improving Your Mac ProductivityImproving Your Mac Productivity
Improving Your Mac Productivity
Julian Dunn
 
Chef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarketChef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarket
Julian Dunn
 
ChefConf 2013: Beginner Chef Antipatterns
ChefConf 2013: Beginner Chef AntipatternsChefConf 2013: Beginner Chef Antipatterns
ChefConf 2013: Beginner Chef Antipatterns
Julian Dunn
 
An Introduction to DevOps with Chef
An Introduction to DevOps with ChefAn Introduction to DevOps with Chef
An Introduction to DevOps with ChefJulian Dunn
 
Chef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationChef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous Integration
Julian Dunn
 

Viewers also liked (12)

Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014
 
What Makes a Good Cookbook?
What Makes a Good Cookbook?What Makes a Good Cookbook?
What Makes a Good Cookbook?
 
Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014
 
Chef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConfChef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConf
 
Configuration Management Isn't Everything
Configuration Management Isn't EverythingConfiguration Management Isn't Everything
Configuration Management Isn't Everything
 
An Introduction to Shef, the Chef Shell
An Introduction to Shef, the Chef ShellAn Introduction to Shef, the Chef Shell
An Introduction to Shef, the Chef Shell
 
Chef on AIX
Chef on AIXChef on AIX
Chef on AIX
 
Improving Your Mac Productivity
Improving Your Mac ProductivityImproving Your Mac Productivity
Improving Your Mac Productivity
 
Chef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarketChef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarket
 
ChefConf 2013: Beginner Chef Antipatterns
ChefConf 2013: Beginner Chef AntipatternsChefConf 2013: Beginner Chef Antipatterns
ChefConf 2013: Beginner Chef Antipatterns
 
An Introduction to DevOps with Chef
An Introduction to DevOps with ChefAn Introduction to DevOps with Chef
An Introduction to DevOps with Chef
 
Chef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationChef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous Integration
 

Similar to Automating That "Other" OS

Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
Ben Hall
 
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
CodeMill digital skills
 
MS Cloud Day - Deploying and monitoring windows azure applications
MS Cloud Day - Deploying and monitoring windows azure applicationsMS Cloud Day - Deploying and monitoring windows azure applications
MS Cloud Day - Deploying and monitoring windows azure applicationsSpiffy
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
Sharon James
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
Ben Hall
 
Sdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint FinalSdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint FinalStephen Rose
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
Sharkrit JOBBO
 
Server 2016 sneak peek
Server 2016 sneak peekServer 2016 sneak peek
Server 2016 sneak peek
Michael Rüefli
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
Creating Virtual Infrastructure
Creating Virtual InfrastructureCreating Virtual Infrastructure
Creating Virtual InfrastructureJake Weston
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
Tomica Kaniski
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in Containers
WSO2
 
IBM Notes in the Cloud
IBM Notes in the CloudIBM Notes in the Cloud
IBM Notes in the Cloud
Stephen Beagles
 
V mware view™ poc jumpstart service
V mware view™ poc jumpstart serviceV mware view™ poc jumpstart service
V mware view™ poc jumpstart service
solarisyougood
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
Michaël Perrin
 
ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014
ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014
ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014ChinaNetCloud
 
CCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero Cosainz
CCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero CosainzCCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero Cosainz
CCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero Cosainz
walk2talk srl
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
Prabin Silwal
 
Tech Ed 2008 Israel Server Management 360
Tech Ed 2008 Israel   Server Management 360Tech Ed 2008 Israel   Server Management 360
Tech Ed 2008 Israel Server Management 360Amit Gatenyo
 

Similar to Automating That "Other" OS (20)

Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
 
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
 
MS Cloud Day - Deploying and monitoring windows azure applications
MS Cloud Day - Deploying and monitoring windows azure applicationsMS Cloud Day - Deploying and monitoring windows azure applications
MS Cloud Day - Deploying and monitoring windows azure applications
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Sdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint FinalSdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint Final
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
 
Server 2016 sneak peek
Server 2016 sneak peekServer 2016 sneak peek
Server 2016 sneak peek
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Creating Virtual Infrastructure
Creating Virtual InfrastructureCreating Virtual Infrastructure
Creating Virtual Infrastructure
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in Containers
 
IBM Notes in the Cloud
IBM Notes in the CloudIBM Notes in the Cloud
IBM Notes in the Cloud
 
V mware view™ poc jumpstart service
V mware view™ poc jumpstart serviceV mware view™ poc jumpstart service
V mware view™ poc jumpstart service
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 
ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014
ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014
ChinaNetCloud - Cloud Operations for Gaming - Tencent July 2014
 
CCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero Cosainz
CCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero CosainzCCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero Cosainz
CCI2017 - Windows Server 2016 - Ready for the cloud - Giampiero Cosainz
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
Tech Ed 2008 Israel Server Management 360
Tech Ed 2008 Israel   Server Management 360Tech Ed 2008 Israel   Server Management 360
Tech Ed 2008 Israel Server Management 360
 

Recently uploaded

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 

Recently uploaded (20)

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 

Automating That "Other" OS

  • 1. Automating That "Other" OS Cooking with Chef on Windows Julian Dunn <jdunn@getchef.com> Engineering Lead – Field Solutions Chef Software, Inc. CloudDevelop Conference Columbus, OH October 2014
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 8. Jeffrey Snover and the Monad Manifesto
  • 9. Evolution of Automation on Windows 1996: WMI 2003: Subsystem for Unix Applications 1999: Services for UNIX 2008: PowerShell 2.0 & Server Core 2006: PowerShell 1.0 2013: PowerShell 4.0/ Desired State Configuration 2012: PowerShell 3.0 2014: PowerShell 5.0 (Preview) 2002: Monad Manifesto
  • 10. The GUI isn't dead, but it's dying on the server OS. Don't be caught off-guard when it's finally gone. - Don Jones, Redmond Magazine, July 2011 http://redmondmag.com/articles/2011/07/01/the-gui-is-dead.aspx
  • 12. Model your IT by describing what it should look like -- not how it should be done.
  • 13. Imperative versus Declarative Imperative: PS C:> Add-WindowsFeature Web-WebServer Declarative: Configuration MySite { WindowsFeature IIS { Ensure = "Present" Name = "Web-Server" } }
  • 14. Platform-Neutral Domain-Specific Language package 'httpd' template '/etc/httpd/conf/httpd.conf' do owner 'root' group 'root' action :create source 'httpd.conf.erb' notifies :reload, 'service[httpd]' End service 'httpd' do action [:start, :enable] end windows_feature 'IIS-WebServerRole' template 'c:inetpubwwwrootindex.html' do owner 'Administrator' group 'IIS_IUSRS' action :create source 'index.html.erb' notifies :reload, 'service[W3SVC]' End service 'W3SVC' do action [:start, :enable] end
  • 15. Chef Mechanics • Recipes go in cookbooks • Cookbooks are uploaded to a Chef server • Nodes periodically check in and get their recipes to run ("run list") • If system state is already desired state, Chef makes no changes • "Convergence"
  • 16. What's the Purpose of Declarative CM? • Consistent, reproducible configurations • Manage & deploy thousands of machines correctly • Deploy applications correctly • Keep them in compliance with declared policy + = Infrastructure Applications Service
  • 17. Wait, What About System Center?
  • 18. Microsoft System Center • Advisor • App Controller • Configuration Manager (SCCM) • Data Protection Manager • Endpoint Protection • Orchestrator/SMA • Operations Manager • Service Manager • Virtual Machine Manager
  • 19. System Center Configuration Manager • Origin: Started as Systems Management Server (1994), renamed SCCM in ~2007 • Purpose: Manage large groups of computers running Windows, Windows Embedded, Mac OS X, and/or Linux/UNIX • Components: • Remote control • Patch management • Software distribution • OS deployment using MDT • Hardware/software inventory • System configuration
  • 20. SCCM: The Good, Bad and the Ugly • Good: • Easy-to-use UI • Lots of functionality • Great for managing desktops • Integrates with other System Center products • Bad: • Prescriptive workflow • Point-and-click • Needs Active Directory • Hard to automate the automation • No easily versionable artifacts
  • 21. SCCM and Chef • SCCM (Compliance Settings) • Configuration settings set via UI • Configuration item primitives • WMI, registry, scripts, applications • Shareable artifacts (baselines) • Restrictive workflow • Idempotence is up to you • Agent-based • Chef: • Configuration settings via plain text files • Resource primitives • file, template, service, powershell_script, etc. • Shareable & versionable artifacts (cookbooks) • Flexible workflow • Built-in idempotence • Agent-based
  • 22. Demo
  • 23. Provisioning with Chef on Microsoft Azure 1. Upload content (cookbooks, roles, etc.) 2. Request VM 4. Register with Chef server 5. Execute run_list 3. Create VM, install Azure and Chef agents
  • 24. Provisioning with Chef $ knife azure server create --azure-source-image a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd --bootstrap-protocol cloud-api --winrm-user chef --winrm-password DELETED --azure-dns-name DELETED -r "role[base-windows], role[fourthcoffee-classic]" ........... Waiting for virtual machine to reach status 'provisioning'............vm state 'provisioning' reached after 2.6 minutes. Waiting for virtual machine to reach status 'ready'..........................vm state 'ready' reached after 6.23 minutes. . DNS Name: DELETED.cloudapp.net VM Name: DELETED Size: Medium Azure Source Image: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd Azure Service Location: East US Public Ip Address: XXXXXXXX Private Ip Address: YYYYYYYY WinRM Port: 5985 Environment: _default
  • 25. Provisioning with Chef Waiting for Resource Extension to reach status 'wagent provisioning'.... Resource extension state 'wagent provisioning' reached after 0.03 minutes. Waiting for Resource Extension to reach status 'installing'.................... Resource extension state 'installing' reached after 2.17 minutes. Waiting for Resource Extension to reach status 'provisioning'.................................... Resource extension state 'provisioning' reached after 4.33 minutes. Waiting for Resource Extension to reach status 'ready'.................... Resource extension state 'ready' reached after 2.16 minutes. . DNS Name: DELETED.cloudapp.net VM Name: DELETED Size: Medium Azure Source Image: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd Azure Service Location: East US Public Ip Address: XXXXXX Private Ip Address: YYYYYY WinRM Port: 5985 Environment: _default Runlist: ["role[base-windows]", "role[fourthcoffee-classic]"]
  • 26. Welcome to Fourth Coffee Corporation of Seattle
  • 27. Pay no attention to the man behind the curtain windows_feature 'IIS-WebServerRole' do action :install end # Pre-requisite features for IIS-ASPNET45 that need to be installed first, in this order. %w{IIS-ISAPIFilter IIS-ISAPIExtensions NetFx3ServerFeatures NetFx4Extended-ASPNET45 IIS-NetFxExtensibility45}. each do |f| windows_feature f do action :install end end windows_feature 'IIS-ASPNET45' do action :install end
  • 28. Pay no attention to the man behind the curtain remote_directory node['fourthcoffee']['install_path'] do source 'fourthcoffee' action :create end iis_pool 'FourthCoffee' do runtime_version '4.0' action :add end iis_site 'FourthCoffee' do protocol :http port 80 path node['fourthcoffee']['install_path'] application_pool 'FourthCoffee' action [:add,:start] end
  • 29. Challenges to Automation on Windows • No real package manager • Many COTS vendors don’t understand automation • UAC (User Access Control) • WinRM Quotas • Win32 Redirector • Not all preferences/state stored in registry • Reboots! • Other annoyances (KB2773898, KB2918614, KB2842230)
  • 30. Desired State Configuration The Future of Automation on Windows
  • 31. PowerShell DSC: The Future of Automation "DSC represents a significant break in administration, because it asks … administrators to not actually configure anything themselves. Instead, DSC asks administrators to describe, in fairly simple text files, how they would like a computer to be configured. The computer, in turn, reads that text file, and configures itself accordingly." - The DSC Book, Don Jones & Steve Murawski
  • 32. The Relationship between DSC and Chef • As PerfMon is to Solarwinds, DSC is to Chef • DSC provides automation primitives that Chef recipes can call • It deliberately lacks the ecosystem: • Content distribution • Cross-platform support • Monitoring/logging/analytics • However, it brings a standard base for automation to Windows • No MSFT product in the future may ship without DSC modules!
  • 33. Example DSC Code Configuration FourthCoffee { # Install the IIS role WindowsFeature IIS { Ensure = "Present" Name = "Web-Server" } # Install the ASP .NET 4.5 role WindowsFeature AspNet45 { Ensure = "Present" Name = "Web-Asp-Net45" } ... }
  • 34. DSC Invoked from Chef Configuration FourthCoffee { # Install the IIS role WindowsFeature IIS { Ensure = "Present" Name = "Web-Server" } # Install the ASP .NET 4.5 role WindowsFeature AspNet45 { Ensure = "Present" Name = "Web-Asp-Net45" } ... } dsc_resource 'webserver' do resource_name :windowsfeature property :name, 'Web-Server' property :ensure, 'Present' end dsc_resource 'dotnet45' do resource_name :windowsfeature property :name, 'Web-Asp-Net45' property :ensure, 'Present' end
  • 36. DevOps is a Two-Way Street • It's great when developers care about: • Uptime! • Scaling! • Deployment! • Argh! Put them on call! That'll teach them!
  • 37. DevOps is a Two-Way Street • Sysadmins/infracoders have a lot to learn from developers as well! • Good developers: • Write unit tests • Write acceptance tests • Practice test-driven-development • Build confidence that their program code works correctly • Avoid breaking their applications • Good infracoders: • Do all of the above • Avoid breaking ALL THE THINGS
  • 38. Testing on the desktop • Chef Ecosystem Tools: • Test Kitchen • Acceptance testing (ServerSpec) • Bring-your-own hypervisor (VirtualBox, VMWare Fusion/Workstation, Hyper-V…) and/or middleware (Vagrant) • Demo
  • 39. Example Test Suite describe windows_feature('IIS-WebServer') do it { should be_installed } end describe port(80) do it { should be_listening } end describe file('C:inetpubFourthCoffeeDefault.cshtml') do it { should be_file } end
  • 40. Test Kitchen Demo fourthcoffee ~$ kitchen test default-windows-2012R2 --destroy=never -----> Starting Kitchen (v1.3.0) -----> Cleaning up any prior instances of <default-windows-2012R2> -----> Testing <default-windows-2012R2> -----> Creating <default-windows-2012R2>... Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'win2012r2-datacenter-chef11.16.2'... Vagrant instance <default-windows-2012R2> created. Finished creating <default-windows-2012R2> (2m57.54s). -----> Converging <default-windows-2012R2>... -----> Chef Omnibus installation detected (true) Transferring files to <default-windows-2012R2> Concurrent threads set to :max_threads => 2 [2014-10-13T19:16:36-07:00] INFO: Starting chef-zero on host localhost, port 8889 with repository at repository at C:/tmp/kitchen One version per cookbook [2014-10-13T19:16:40-07:00] INFO: *** Chef 11.16.2 *** [2014-10-13T19:16:40-07:00] INFO: Chef-client pid: 1656
  • 41. Test Kitchen Demo [2014-10-13T19:19:10-07:00] INFO: Chef Run complete in 142.572914 seconds [2014-10-13T19:19:10-07:00] INFO: Running report handlers [2014-10-13T19:19:10-07:00] INFO: Report handlers complete Finished converging <default-windows-2012R2> (22m55.08s). -----> Setting up <default-windows-2012R2>... -----> Running postinstall for serverspec plugin Finished setting up <default-windows-2012R2> (0m45.62s). -----> Verifying <default-windows-2012R2>... -----> Running serverspec test suite Windows feature "IIS-WebServer" should be installed Port "80" should be listening File "C:inetpubFourthCoffeeDefault.cshtml" should be file Finished in 13.41 seconds (files took 0.48432 seconds to load) 3 examples, 0 failures Finished verifying <default-windows-2012R2> (0m22.73s). Finished testing <default-windows-2012R2> (27m11.16s). -----> Kitchen is finished. (27m12.60s)
  • 42. Summary • Don't point-and-click to administer your Windows servers • Learn PowerShell! • Learn declarative configuration management • Test your infrastructure code
  • 43. Q&A

Editor's Notes

  1. Ok, I admit it – I am an old Linux nerd.
  2. But I also administered one of these.
  3. This is how I used to manage Active Directory. Point and click
  4. Also, this sort of thing. Microsoft has nice wizards.
  5. This is still extant in Windows Server Tech Preview (Windows Server 10).
  6. Anecdote about customer that employs people to sit around with dozens of RDP sessions on Patch Tuesday just to click 'Windows Update'
  7. To Microsoft's credit, they've recognized this early. Or at least Jeffrey Snover, the author of the "Monad Manifesto", did. What the Monad Manifesto did is that it recognized the UNIX model – of a command line in which operators could string together operations – was fundamentally sound. And it extended it to an object-based language, which makes Powershell even more powerful than Bourne Shell. It took a while for concepts to bake out, but here we are! Monad Shell – became PowerShell, an object-oriented shell Monad Remote Scripting – became PowerShell Remoting (WinRM)
  8. Although this is obviously not to scale, you can see that MSFT is really speeding up the release cadence of automation features. You can see that Jeffrey Snover learned a lot of lessons from the success and failure of things like WMI and SFU, wrote the Monad Manifesto and then has spent the last 12+ years building all the components to make it a reality.
  9. http://redmondmag.com/articles/2011/07/01/the-gui-is-dead.aspx
  10. Change your model by changing your Chef code.
  11. So yes, Chef started out on the Unix/Linux platform, but as people saw the writing on the wall about Windows and the GUI, they wanted to extend the same automation primitives to this platform. Most shops are not homogenous – they often have both Linux/Unix and Windows. What we're looking at is a Chef recipe to install a webserver. You can see that Chef tells the system what to do, not how. Chef's job is to translate the what into the how, across a broad swath of Oses, infrastructure, applications It is OS-neutral and deployment neutral. Use the same code to deploy on metal, cloud, VMs, whatever.
  12. A lot of these are product acquisitions. They are loosely-integrated, some better than others, but it's definitely a work in progress. Example: Often can be more than one agent on a box to do certain things. MSFT is making headway to try and make it a more seamless experience.
  13. "Manage" is a loaded term, which I'll get into in a second.
  14. Good: Nice UI, easy to explore OS deployment Patch management System inventory MDM integration w/Intune Great client management Integration with other System Center products Bad: UI prescribes a workflow Requires Active Directory Not a great automation story (can't automate the automation) No easily versionable artifacts Changes require manual interaction with UI
  15. Insert a diagram here showing how this works
  16. We can try this live but I'll have to come back to it while we run through some more slides knife azure server create –azure-vm-size Small --azure-source-image a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd --bootstrap-protocol cloud-api --winrm-user chef --winrm-password C00kingWithChef$ --azure-dns-name columbus1--tcp-endpoints 3389:3389,80:80 -r "role[base-windows],role[fourthcoffee-classic]"
  17. Chocolatey/NuGet will help with the package management problem. There is still a crapton of legacy stuff out there, and a variety of packaging formats. Not all of them can deal with inplace upgrades. COTS vendors don't understand automation: Some products can't be installed in Server Core Some products can't be installed over PoSH remote sessions or unattended sessions KB2773898 – you can't install MSUs over WinRM KB2918614 – broken patches to Windows that prevent MSIs from installing KB2842230 – WinRM quotas not respected on older operating systems
  18. Hmm, sounds a lot like Chef, right?
  19. So if MSFT provides a standard set of automation hooks in their own products and hammers ISVs to ship the same hooks, then the app space and OS space have a uniform automation framework now.
  20. NOTE: try to find something that maps closer to a piece of Chef code
  21. NOTE: try to find something that maps closer to a piece of Chef code
  22. Talk about the use cases here. I just used Chef on my desktop to spin up a VM and install exactly the same things I installed on my "real" VM, and ran some acceptance tests. How cool is that? Have the demo prepared (started up) before going on-stage, because it might not work again. Just scrollback in the terminal buffer.