24. Important Links
Windows Package Management
https://chocolatey.org/
Powershell Objects
http://s.basg.nl/1vdVyxx
25. List of Modules
puppetlabs/mssql
rismoney/chocolatey
badgerious/windows_env
martezr/rdp
rmsphd/windows_firewall
adenning/winntp
puppetlabs/acl
puppetlabs/registry
puppetlabs/reboot
joshcooper/powershell
puppetlabs/dism
puppetlabs/inifile
26. Final Notes
Presentation is online
http://s.basg.nl/puppetwindows
You can find me on Google+
http://google.com/+basgrolleman
Hinweis der Redaktion
Initial Slide
So, a quick introduction, my name is Bas Grolleman and I have been freelancing for over 8 years now, keeping myself running on a healthy mix of good espresso, sarcasm and whisky.
From those 8 years, 6 where spend getting large sets of machines to do the same thing using puppet.
And now I’m training to be a Scrum Master, because in practice, when they call in the freelancer there is this huge wishlist combined with an even larger technical debt. And I think scrum is one of the best ways to show quick results but make sure there is enough time for improvement.
I’ll quickly go over the structure of this presentation.
I don’t like windows, but that’s not saying much, I don’t like Mac either. And avocado’s, terrible things.
Still, here I am on stage talking about Windows, so why?
In the end it comes down to a single thing
This is what happens, the reality of work
My first experience was with Kobo, (show ereader), the ebook company
Windows setups with puppet needed a lot of reboots, and where inconsistent.
Brought it down to 2 reboots and reliable results.
I might have actually enjoyed it a few times, as solving problems is fun.
But my hair is short for a reason, it’s not all quad cores and multi screen setups.
I’m a positive guy, so it will mostly be a do’s kind of presentation.
At least 3.3 - Because of the Reboot module
Newer is better, as windows support is improving
Obvious right?
If it is possible to make one piece of code that works on Linux/Windows without OS Specific stuff, do that.
You can cheat with default parameters.
When this is not the case, do not spread case statements everywhere
Put Generic stuff at the top
Case statement with Kernel for the rest
Add comments when you skip stuff and why
You might want to use separate files ( profile::base::windows, profile::base::linux )
Windows requires reboots, and I might want to have a chat with the guy that thought rebooting wasn’t so bad.
This requires some thought, because your puppet runs will be broken up
Check out the puppetlabs/reboot module
Fixes the issue by stopping puppet for reboot, avoiding half configured stuff
Figure out what pieces of code go together
Limit the amount of reboots
Use fixed versions, nobody is happy when half the datacenter starts rebooting.
Avoid reboots in future
I don’t know powershell in depth, but I steal
But I know enough to see what kind of code I’m reading
Get a good powershell module (Joshcooper or Puppetlabs)
Have a look at Powershell ISE when writing scripts
Lead Developer - Jeffrey Snover, had excellent talk during Devops in Amsterdam
puppetlabs/Registry
Lot’s of stuff done in registry instead of files, crucial difference
rismoney/chocolatey module
I skipped this, but it saves a lot of time
Package management / auto upgrades
Create a module with just checks
Windows Only
Linux Only
Use the $caller_module_name variable and a define to give clear hints
Fork, even without code getting pulled, someone might help out on your version of the module
Lot’s of work needs to be done
Don’t worry about doing pull requests
A few things I would recommend you should not be doing
This will result in 2 systems wanting to control
If required, make sure to check if changes aren’t returning frequently
Avoid user management with a domain controller
Fix stuff in one place
If it only works when you have a set of hiera code, it’s hard to debug
It’s even harder to implement later
Mix Slashes, try to use backwards slashes all the time
Works for file
Doesn’t work for exec
When in doubt, escape the slashes, it will work on both cases
Windows is object based
Files should be the last place to look
Check registry
Check objects using powershell
This is a future reference for those looking at the presentation later
If I have time to spare, I could go into one of the modules more in-depth