DevOps and Windows
-
Upload
todd-pigram -
Category
Technology
-
view
125 -
download
0
description
Transcript of DevOps and Windows
DevOps and Windows
Who am I?Left the corp world for a Solution/Service Provider in 2011
Prior to 2011, primarily focused on Windows and Citrix
Now Linux, Chef, vCloud and Apace CloudStack/Citrix CloudPlatform as well as above. Prefer XenServer
http://twitter.com/pigram86
http://www.todpigram.com
http://github.com/pigram86
Windows automation
Management in past were batch and command files along with Ghost an Ghost walker
Altiris
POSH
System Center
My TaskFind a tool to use with both Linux and Windows
Needed to work with vCloud and CloudStack
Provide Configuration Management and Desired State Config
Be consistent and repeatable
Be efficient and quick
Puppet vs Chef - my choices
Challenges Part 1Not a developer - I didn’t know Ruby
I didn’t know anything about Puppet or Chef
Learning Went to www.codeacademy.com and took the Ruby portion
Bought a Infinite Skills Ruby for Beginners course on www.udemy.com
Sat through both Puppetlabs learning course and the learnchef.getchef.com training
Built both the free open source version of Puppet Server and Chef Server in home lab
Started coding with both on Windows as most of my customers are Windows based
My Dev EnvironmentMacbook Pro 13” mid-2012 OS X 10.10
Chefdk
git
chruby with ruby-build - ruby 2.1.2/1.9.3
Vagrant, Veewee, Packer, Bento
Berkshelf and Test-kitchen with kitchen-driver-vagrant_provision, foodcritic
MDT server - for Autounattend.xml - both for builds and templates
Virtualbox and VMware Fusion
Sublime Text 3 with package control - Chef, DashDoc, Sublime-rubocop
Dash
Use Version Control
Chef and Windows
• Chef provided cookbooks • chef_handler-1.16 • powershell-3.0.7 - pulls in ms_dotnet • windows-1.34.6
Using Chef with Windows
• Reboots • Roles and Features • PageFile • Registry • Installing Software
Reboots
• Both Puppet and Chef were working great until I started combining recipes/modules in a continuous run list.
• Major issue…neither handled pending reboots
reboot_pending.rb• Alex Vinyar (Chef) provided me with a library file to
handle pending reboots. This was added to Chef Client 11.12
• I still use it in all my cookbooks
Using windows_reboot
Install Roles and Features
• DISM - windows_feature
• PowerShell - powershell_script
• Caveat with PowerShell, if role/feature needs a reboot, you have to separate them
DSIM - windows_feature
powershell_script
Windows Pagefile• Use Ohai to grab total memory
• Differs between OS and Hypervisor
• Differs between XenServer and vSphere
• Differs between W2k8R2 and W2012/2012r2
Case Statement for Pagefile
Setting Pagefile - 4GB
Registry
• using registry_key to set registry setting
• Include recursive true
• Use attributes for actual keys
• use ‘/‘ or ‘\\' for ruby to recognize the path
Set registry settingsAttribute
Recipe
Installing Software• using windows_package
• using batch and windows_zipfile
• Installing standalone software
• Installing software that requires the entire ISO
• Always use not_if and only_if for idempotence
• use attributes
Installing filezilla - Standalone
Install Citrix XenDesktop
Testing
For Linux - test kitchen
For Windows mostly utilizing my home chef server and my custom windows boxes for Vagrant
I use Veewee to create the VM, then export to .box. Chef-Client is installed as well as service.
Test to prevent this