powerhsell dsc for chef veterans
TRANSCRIPT
S T E V E N M U R A W S K I - @ S t e v e n M u r a w s k i
D A M I E N C A R O - @ d c a r o
A p r i l 2 , 2 0 1 5
Feature DSC Chef
Configuration as Code Yes Yes
Domain Specific Language (DSL) Yes Yes
DSL embedded within Script Language Yes - PowerShell Yes – Ruby
“Resource” Concept Yes Yes
Configurable resource attributes Yes – “Property” Yes – “Attribute”
Idempotence of operations Yes Yes
Convergence Yes Yes
Client agent / tool Yes – LCM / Start-
DSCConfiguration
Yes – chef-client / chef-
client
Feature DSC Chef
Configuration as Code Yes Yes
Domain Specific Language (DSL) Yes Yes
DSL embedded within Script Language Yes - PowerShell Yes – Ruby
“Resource” Concept Yes Yes
Configurable resource attributes Yes – “Property” Yes – “Attribute”
Idempotence of operations Yes Yes
Convergence Yes Yes
Client agent / tool Yes – LCM / Start-
DSCConfiguration
Yes – chef-client / chef-
client
# Chef
env 'editor' do
key_name "EDITOR"value "emacs"
end
# DSC
environment editor{ Name = "EDITOR" Value = "emacs"
}
dsc_script 'myexample1' docode <<-EOH
File TestFile{
Ensure = "Present"DestinationPath= "c:\\demo\\test.txt"Contents= "Hello World"
}EOH
end
not i f i ca t ion
dsc_resource 'myexample2' do
resource :windowsfeatureproperty :ensure, "Present"property :name, "Web-Server"
end
h t t p : / / b i t . l y / c h e f c o n f _ d s c
h t t p s : / / s u p e r m a r k e t . c h e f . i o /
h t t p : / / w w w. p o w e r s h e l l . o r g
• STEVEN MURAWSKI - @StevenMurawsk i
• DAMIEN CARO - @dcaro
• Bookmark fo r more in fo rmat ion on M ic roso f t and DevOps:
h t tp : / /aka .ms/devops
• DevOps resources fo r Prac t i t i oners : h t tp : / /aka .ms/devopsmva
• Key sess ions to a t tend @ Chef
Date Title Speaker(s)
Wed @ 1:30-2:10p Microsoft Presents: Chef in Action on Azure Eugene Chigirinskiy;
Kundana Palagiri
Thurs @ 1:15-1:55p PowerShell from the Ground Up Jeffery Snover
Thurs @ 1:15-1:55p Automate what you can, document what you can’t and have
the wisdom to know the difference
Jessica DeVita
Thurs @ 2:10-2:5o Windows PowerShell Desired State Config (DSC) for
Veteran Chefs
Damien Caro; Steven
Murawski