Chef and PowerShell DSC - Integrating Infrastructure as Code Technologies
1. Chef and PowerShell DSC
Microsoft TechEd 2014
Julian Dunn
Senior Consultant, Chef
May 12, 2014
2. Chef: Infrastructure as Code
• Declarative (like PowerShell DSC)
• Cross-platform
• Rich toolchain and testing
ecosystem
• Use cases:
• Configuration Management
• Application Deployment
• Continuous Delivery
windows_feature 'Web-Server' do
action :install
end
package 'httpd' do
action :install
end
3. Use PowerShell DSC Resources in Chef
include_dsc 'WindowsFeature'
dsc_windowsfeature 'iis' do
dsc_name 'Web-Server'
dsc_ensure 'Present'
end
Corresponds to DSC
Resource Name
Native Chef resource syntax
with mapping rules to avoid
reserved words in Chef
language (dsc_ prefix)
4. Mix and Match Chef Native Resources & DSC
dsc_windowsfeature 'iis' do
dsc_name 'Web-Server'
dsc_ensure 'Present'
end
iis_pool 'FourthCoffee' do
runtime_version "4.0"
action :add
end
DSC Resource
Non-DSC Chef Resource
7. Chef, Windows, PowerShell DSC and Azure
• PowerShell DSC native support
shipping soon (2014 Q2/Q3 target)
• Native Azure portal integration
• 3 Microsoft Chef Cookbooks
• Technical docs maintained by Chef
• Highlighted at //Build & ChefConf
• Come visit us in booth 747!
This is Mark Russinovitch of Microsoft presenting the native Azure integration at ChefConf – come by our booth to see more or find the video at youtube.com/getchef
Key points:
Chef is baked INTO the Azure portal for customer option to use Chef
Microsoft is participating in the Chef community with Azure cookbooks
Joint engineering to create Powershell integration
Technical docs and support via Chef
You can also use PowerShell with Desired State Configuration.
PowerShell Desired State Configuration provides a tool-agnostic configuration management platform. DSC enables you to make your resources configurable in such a way that your customers can then choose whatever configuration management tool they prefer. This enables a modern DevOps workflow through collaboration with market leaders like Chef.
Items with an x are experimental. The team is very aggressive in ensuring resources are enabled using DSC.
DSC uses a DMTF standards based file format for managing resources. Those configuration files can be created by, or embedded in, a Chef Recipe. As Microsoft continue to invest in DSC we will see the power of tools like Chef really coming into their own when applied to the Windows ecosystem.