SlideShare a Scribd company logo
1 of 19
Download to read offline
Cooking Without the Windows Cookbook
Adam Edwards
adamed@opscode.com
@adamedx
Software Engineer
Opscode, Inc.
How to use Chef on Unix…
•  First, set up your knife workstation
•  Upload the Unix cookbook
•  Write some Unix recipes…
•  knife	
  cookbook	
  upload them
•  Edit your run list
•  Converge!
•  Upload the “Unix cookbook?”
•  HAHAHAHAHAHA
•  But there is a Windows cookbook...
So what’s this Windows cookbook?
•  A cookbook can add resources that aren’t supported by
chef-client alone
•  Easy way to add early support for the Windows platform
•  Lots of goodies that make managing Windows possible:
•  windows_batch
•  windows_registry
•  windows_package
•  windows_task
•  windows_reboot
•  So much more – cool stuff!
•  It gives you power!
But I have to take it everywhere…
•  Seems like I’m always tossing ‘windows’ into metadata.rb
•  Even for the simplest recipes
•  If I’m on Windows, can’t Chef just “know” that I’m using the
Windows cookbook?
•  The other chefs can do the basics with no cookbooks…
•  Package, script / bash, many others all there on Unix
•  Oh, and there’s a separate PowerShell cookbook you need, too
•  You do use PowerShell, right?
•  PSST, it’s better than bash J
Welcome to the kids table…
Oh and it infects Unix admins too
•  For Unix, admins can reuse popular cookbooks that support Windows
•  And those cookbooks often require the Windows cookbook
•  So now those Unix admins need the Windows cookbook
•  Limits dependences we add to Windows cookbook
•  Case in point: git cookbook
•  https://github.com/opscode-cookbooks/git/blob/master/metadata.rb
on your
OK, I’m convinced, no more Windows cookbook!
•  Let’s get rid of it!
•  Well, maybe not, after all, there is an Ubuntu cookbook…
•  Hey, put all the common goodies in chef-client!
•  Registry, batch, powershell, package, etc.
•  And while we’re at it, let’s make some improvements!
•  And also add lots of spec tests!
•  Then we spice up Windows cookbooks with power tools
•  Not necessities
•  Now you can write more Windows recipes without Windows cookbook
•  Common tasks on Windows get easy!
Introducing a few new resources / features
•  Chef 11 adds new resources to chef-client
•  registry_key, released in 11.0
•  powershell, in master, release pending
•  batch, in master, release pending
•  They support explicit control of 32-bit / 64-bit functionality
•  More on that later
•  Replaces analogs in Windows cookbook
•  And chef-client as a Windows service also in Chef 11 master
•  Can be configured at chef-client MSI installation time
•  So you don’t have to use chef-client cookbook
•  It’s also more robust, lightweight
A word on 32 / 64-bit
•  The new resources include an “architecture” attribute
•  :i386 for x86, :x86_64 for x64
•  Defaults to :x86_64 on x64 Windows, :i386 otherwise
•  Wow64 (32-bit on 64-bit) is very confusing
•  You must be running in a 64-bit process to see 64-bit things
•  Same for 32-bit processes
•  Windows cookbook resources can’t see 32-bit only registry
•  Causes weird, inexplicable anomalies
•  Need weird hacks, workarounds not always feasible
•  But new resources let you control this, no more unpredictability!
•  Our Unix friends just won’t understand J
Wow6432Node,	

SysWow64	

	

WAT???!!!
registry_key
•  Usage is significantly different than the windows_registry resource
•  Values are modeled explicitly in addition to keys
•  So not a drop-in replacement, but more robust as a result
•  registry_key	
  "HKLMSoftwareMyAppMyConfig"	
  do	
  	
  
	
  	
  values	
  [{	
  
	
  	
  	
  	
  :name	
  =>	
  "NewRegistryKeyValue",	
  
	
  	
  	
  	
  :type	
  =>	
  :multi_string,	
  	
  
	
  	
  	
  	
  :data	
  =>	
  foo0bar00	
  
	
  	
  }]	
  
	
  	
  architecture	
  :i386	
  
	
  	
  action	
  :create	
  	
  
end	
  
•  You can control 32/64-bit!
powershell / batch
•  Analogs to powershell, windows_batch
•  Essentially drop-in replacements
•  Just change resource names, remove cookbook dependencies
•  batch	
  "batch_x86"	
  do	
  
	
  	
  architecture	
  :i386	
  
	
  	
  code	
  <<-­‐EOH	
  
	
  	
  echo	
  I	
  am	
  an	
  %PROCESSOR_ARCHITECTURE%	
  script.	
  >	
  c:arch.txt	
  
	
  	
  EOH	
  
end	
  
•  powershell	
  “powershell_x64"	
  do	
  
	
  	
  architecture	
  :x86_64	
  
	
  	
  code	
  <<-­‐EOH	
  
	
  	
  cd	
  wsman:localhostshell;	
  si	
  MaxMemoryPerShellMB	
  8192	
  
	
  	
  EOH	
  
end	
  
Demo: Registry, Powershell –
No cookbooks
More Windows resources to come
•  Move remaining common resources to chef-client
•  Package
•  May unify ServerManager (aka windows_feature), DISM
•  Scheduled Tasks
•  Steroid enhanced cron
•  Reboot
•  More core resources => we can remove Windows dependency from git, other cookbooks
Bonus: Chef-Client as a (lightweight!) Windows service
•  Chef-client in master ships with chef-service-manager
•  Run chef-­‐service-­‐manager	
  -­‐a	
  to install chef-client as a Windows service
•  Or just install it via the MSI (graphical or msiexec)
•  Obviates need to use chef-client cookbook
•  Updated implementation eliminates polling / busy wait
•  Just sleeps until a timer event, no cpu, memory pages out
•  Shuts down via alertable thread
Demo – chef-client service
Not just more features, more Windows contributors!
•  Opscode is investing in Windows
•  Engineers Seth Chisamore, John Keiser, others added Windows support, 2011, Q1 2012
•  H2 2012: More Opscode developers joined the fun:
•  Lamont Granquist
•  Prajakta Purohit
•  Serdar Sutay
•  Adam Edwards
•  Not just staffing, but sharing Windows across the engineering teams
•  Community is investing in Windows
•  Contributions increasing as we gain Windows users
•  Example: See the Nordstrom Unicorns about Mixlib::Shellout, Printer LWRP, chef-vault…
•  Doug Ireton, Kevin Moser, more…
Beyond cookbooks – more Chef for Windows!
•  We are not done – more good things coming to Chef on Windows!
•  What if the chef-client msi made knife workstation experience better?
•  What if I had an actual editor on my knife workstation?
•  Maybe even a better terminal (ConEmu anyone?)
•  Can we take more advantage of Windows coolness?
•  Can knife and PowerShell work better together?
•  64-bit (Ruby 2.0) Chef-client?
•  Let your voice be heard – http://community.opscode.com
•  Happy 10th Anniversary Windows Server 2003 and x64 Windows!
•  Launched April 24, 2003, San Francisco, CA
Windows CAN because CODE CAN
Cooking on Windows without the Windows Cookbook

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
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefMichael Lihs
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with AnsibleMartin Etmajer
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction Robert Reiz
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansiblewajrcs
 
Leveraging Ansible for CI/CD
Leveraging Ansible for CI/CDLeveraging Ansible for CI/CD
Leveraging Ansible for CI/CDShippable
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Software, Inc.
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with ChefRaimonds Simanovskis
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaJuan Diego Pereiro Arean
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to ChefKnoldus Inc.
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefChef Software, Inc.
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and YouBryan Berry
 
CLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsCLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsZachary Stevens
 
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 BasicsJohn Smith
 
Testable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerTestable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerMandi Walls
 

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.
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with Chef
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
Leveraging Ansible for CI/CD
Leveraging Ansible for CI/CDLeveraging Ansible for CI/CD
Leveraging Ansible for CI/CD
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Docker
DockerDocker
Docker
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
 
Learning chef
Learning chefLearning chef
Learning chef
 
CLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsCLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with Jenkins
 
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
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
 
Testable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerTestable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and Docker
 

Similar to Cooking on Windows without the Windows Cookbook

Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitJennifer Davis
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Chef
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Molliewillemstuursma
 
Chef - Administration for programmers
Chef - Administration for programmersChef - Administration for programmers
Chef - Administration for programmersmrsabo
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsNETWAYS
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Object Oriented Programming I
Object Oriented Programming IObject Oriented Programming I
Object Oriented Programming Iraven_rainagi
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAlberto Molina Coballes
 
Emerging chef patterns and practices
Emerging chef patterns and practicesEmerging chef patterns and practices
Emerging chef patterns and practicesOwain Perry
 
Chef at WebMD
Chef at WebMDChef at WebMD
Chef at WebMDadamleff
 
Chef + AWS + CodeIgniter
Chef + AWS + CodeIgniterChef + AWS + CodeIgniter
Chef + AWS + CodeIgniterciconf
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPuppet
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpowerMoya Brannan
 

Similar to Cooking on Windows without the Windows Cookbook (20)

Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment Restaurant
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Chef Jumpstart
Chef JumpstartChef Jumpstart
Chef Jumpstart
 
What's new in chef 12
What's new in chef 12 What's new in chef 12
What's new in chef 12
 
Chef - Administration for programmers
Chef - Administration for programmersChef - Administration for programmers
Chef - Administration for programmers
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Object Oriented Programming I
Object Oriented Programming IObject Oriented Programming I
Object Oriented Programming I
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Emerging chef patterns and practices
Emerging chef patterns and practicesEmerging chef patterns and practices
Emerging chef patterns and practices
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
Chef at WebMD
Chef at WebMDChef at WebMD
Chef at WebMD
 
Chef + AWS + CodeIgniter
Chef + AWS + CodeIgniterChef + AWS + CodeIgniter
Chef + AWS + CodeIgniter
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
 
Php on Windows
Php on WindowsPhp on Windows
Php on Windows
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpower
 

More from Chef Software, Inc.

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Software, Inc.
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Software, Inc.
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Chef Software, Inc.
 
Utility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceUtility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceChef Software, Inc.
 
Using Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenUsing Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenChef Software, Inc.
 
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundSDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundChef Software, Inc.
 
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChef Software, Inc.
 
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Chef Software, Inc.
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleChef Software, Inc.
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef Software, Inc.
 
Push jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefPush jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefChef Software, Inc.
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreChef Software, Inc.
 
Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?Chef Software, Inc.
 
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...Chef Software, Inc.
 
Growing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large OrganizationGrowing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large OrganizationChef Software, Inc.
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Chef Software, Inc.
 
Creating a culture for Continuous Delivery
Creating a culture for Continuous DeliveryCreating a culture for Continuous Delivery
Creating a culture for Continuous DeliveryChef Software, Inc.
 

More from Chef Software, Inc. (20)

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Opscode tech festa july 2013
Opscode tech festa   july 2013Opscode tech festa   july 2013
Opscode tech festa july 2013
 
Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013
 
Utility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceUtility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right Science
 
The Berkshelf Way
The Berkshelf WayThe Berkshelf Way
The Berkshelf Way
 
Using Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenUsing Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey Hulten
 
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundSDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
 
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
 
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo Schlossnagle
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
 
Push jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefPush jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private Chef
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
 
Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?
 
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
 
Growing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large OrganizationGrowing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large Organization
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
 
Creating a culture for Continuous Delivery
Creating a culture for Continuous DeliveryCreating a culture for Continuous Delivery
Creating a culture for Continuous Delivery
 

Recently uploaded

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Cooking on Windows without the Windows Cookbook

  • 1.
  • 2. Cooking Without the Windows Cookbook Adam Edwards adamed@opscode.com @adamedx Software Engineer Opscode, Inc.
  • 3. How to use Chef on Unix… •  First, set up your knife workstation •  Upload the Unix cookbook •  Write some Unix recipes… •  knife  cookbook  upload them •  Edit your run list •  Converge! •  Upload the “Unix cookbook?” •  HAHAHAHAHAHA •  But there is a Windows cookbook...
  • 4. So what’s this Windows cookbook? •  A cookbook can add resources that aren’t supported by chef-client alone •  Easy way to add early support for the Windows platform •  Lots of goodies that make managing Windows possible: •  windows_batch •  windows_registry •  windows_package •  windows_task •  windows_reboot •  So much more – cool stuff! •  It gives you power!
  • 5. But I have to take it everywhere… •  Seems like I’m always tossing ‘windows’ into metadata.rb •  Even for the simplest recipes •  If I’m on Windows, can’t Chef just “know” that I’m using the Windows cookbook? •  The other chefs can do the basics with no cookbooks… •  Package, script / bash, many others all there on Unix •  Oh, and there’s a separate PowerShell cookbook you need, too •  You do use PowerShell, right? •  PSST, it’s better than bash J
  • 6. Welcome to the kids table…
  • 7. Oh and it infects Unix admins too •  For Unix, admins can reuse popular cookbooks that support Windows •  And those cookbooks often require the Windows cookbook •  So now those Unix admins need the Windows cookbook •  Limits dependences we add to Windows cookbook •  Case in point: git cookbook •  https://github.com/opscode-cookbooks/git/blob/master/metadata.rb on your
  • 8. OK, I’m convinced, no more Windows cookbook! •  Let’s get rid of it! •  Well, maybe not, after all, there is an Ubuntu cookbook… •  Hey, put all the common goodies in chef-client! •  Registry, batch, powershell, package, etc. •  And while we’re at it, let’s make some improvements! •  And also add lots of spec tests! •  Then we spice up Windows cookbooks with power tools •  Not necessities •  Now you can write more Windows recipes without Windows cookbook •  Common tasks on Windows get easy!
  • 9. Introducing a few new resources / features •  Chef 11 adds new resources to chef-client •  registry_key, released in 11.0 •  powershell, in master, release pending •  batch, in master, release pending •  They support explicit control of 32-bit / 64-bit functionality •  More on that later •  Replaces analogs in Windows cookbook •  And chef-client as a Windows service also in Chef 11 master •  Can be configured at chef-client MSI installation time •  So you don’t have to use chef-client cookbook •  It’s also more robust, lightweight
  • 10. A word on 32 / 64-bit •  The new resources include an “architecture” attribute •  :i386 for x86, :x86_64 for x64 •  Defaults to :x86_64 on x64 Windows, :i386 otherwise •  Wow64 (32-bit on 64-bit) is very confusing •  You must be running in a 64-bit process to see 64-bit things •  Same for 32-bit processes •  Windows cookbook resources can’t see 32-bit only registry •  Causes weird, inexplicable anomalies •  Need weird hacks, workarounds not always feasible •  But new resources let you control this, no more unpredictability! •  Our Unix friends just won’t understand J Wow6432Node, SysWow64 WAT???!!!
  • 11. registry_key •  Usage is significantly different than the windows_registry resource •  Values are modeled explicitly in addition to keys •  So not a drop-in replacement, but more robust as a result •  registry_key  "HKLMSoftwareMyAppMyConfig"  do        values  [{          :name  =>  "NewRegistryKeyValue",          :type  =>  :multi_string,            :data  =>  foo0bar00      }]      architecture  :i386      action  :create     end   •  You can control 32/64-bit!
  • 12. powershell / batch •  Analogs to powershell, windows_batch •  Essentially drop-in replacements •  Just change resource names, remove cookbook dependencies •  batch  "batch_x86"  do      architecture  :i386      code  <<-­‐EOH      echo  I  am  an  %PROCESSOR_ARCHITECTURE%  script.  >  c:arch.txt      EOH   end   •  powershell  “powershell_x64"  do      architecture  :x86_64      code  <<-­‐EOH      cd  wsman:localhostshell;  si  MaxMemoryPerShellMB  8192      EOH   end  
  • 13. Demo: Registry, Powershell – No cookbooks
  • 14. More Windows resources to come •  Move remaining common resources to chef-client •  Package •  May unify ServerManager (aka windows_feature), DISM •  Scheduled Tasks •  Steroid enhanced cron •  Reboot •  More core resources => we can remove Windows dependency from git, other cookbooks
  • 15. Bonus: Chef-Client as a (lightweight!) Windows service •  Chef-client in master ships with chef-service-manager •  Run chef-­‐service-­‐manager  -­‐a  to install chef-client as a Windows service •  Or just install it via the MSI (graphical or msiexec) •  Obviates need to use chef-client cookbook •  Updated implementation eliminates polling / busy wait •  Just sleeps until a timer event, no cpu, memory pages out •  Shuts down via alertable thread
  • 17. Not just more features, more Windows contributors! •  Opscode is investing in Windows •  Engineers Seth Chisamore, John Keiser, others added Windows support, 2011, Q1 2012 •  H2 2012: More Opscode developers joined the fun: •  Lamont Granquist •  Prajakta Purohit •  Serdar Sutay •  Adam Edwards •  Not just staffing, but sharing Windows across the engineering teams •  Community is investing in Windows •  Contributions increasing as we gain Windows users •  Example: See the Nordstrom Unicorns about Mixlib::Shellout, Printer LWRP, chef-vault… •  Doug Ireton, Kevin Moser, more…
  • 18. Beyond cookbooks – more Chef for Windows! •  We are not done – more good things coming to Chef on Windows! •  What if the chef-client msi made knife workstation experience better? •  What if I had an actual editor on my knife workstation? •  Maybe even a better terminal (ConEmu anyone?) •  Can we take more advantage of Windows coolness? •  Can knife and PowerShell work better together? •  64-bit (Ruby 2.0) Chef-client? •  Let your voice be heard – http://community.opscode.com •  Happy 10th Anniversary Windows Server 2003 and x64 Windows! •  Launched April 24, 2003, San Francisco, CA Windows CAN because CODE CAN