Managing windows with Puppet and Chocolatey
-
Upload
sethmcbean -
Category
Technology
-
view
741 -
download
0
description
Transcript of Managing windows with Puppet and Chocolatey
![Page 1: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/1.jpg)
Managing Windowswith
Puppet and Chocolatey
Seth McBeanSchool Aide | FLAGS High SchoolNYC DIIT School Technology Summit – 2014/07/30
![Page 2: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/2.jpg)
Who am I?
School Aide at FLAGS High School (07X520) serving as Tech Coordinator since 2008.
Seth McBean
![Page 3: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/3.jpg)
Let’s start with “Why?”
Why manage?Why automate?
Why care?Why stay awake?
![Page 4: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/4.jpg)
Why manage/automate?
SpeedConsistencyTo get rid of those problems that nag me
![Page 5: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/5.jpg)
What is management?
Management is simply the process of getting the good stuff that we want into computers and removing the bad stuff that we dont want.
![Page 6: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/6.jpg)
How do we typically get stuff onto computers?
Imaging – bake everything in and when it grows stale and unwieldy, reimage (re-bake) it
It’s how we do it. It’s how we’ve done it
….but can we do it better?
![Page 7: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/7.jpg)
How do we typically get stuff onto computers?
Deploy packages:→ Store installer packages somewhere
(external drive, file server, etc.) → Use some method to push the packages to
the computers and install them (scripts, AD Group Policy, PDQ Deploy, etc.)
Better….but is there yet a better way?
![Page 8: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/8.jpg)
Get Chocolatey
It’s way better… why?
Chocolatey is aware of what it installs
It’s also aware when there’s a new version
![Page 9: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/9.jpg)
Get Chocolatey – The Install
from CMD.exe as Administrator:@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
– OR – via Powershell as Administrator:iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
Reads like Dickens, doesnt it?!
![Page 10: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/10.jpg)
Run Chocolatey
Install the current java vmc:\> cinst javaruntime
Uninstall an old versionc:\> cuninst javaruntime -Version 6.0.31.1
Upgrade to the latest versionc:\> cup javaruntime
![Page 11: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/11.jpg)
It even does Windows Features
List all available Windows Featuresc:\> clist -source windowsfeatures
Install TFTP Clientc:\> cinst -source windowsfeatures TFTP
(Generally more useful for Windows server)
![Page 12: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/12.jpg)
Why Puppet?
Because we’re humans...
Humans are inventive and resourceful and...
Humans are HORRIBLE at repetitive tasks
Computers and software are way better at repeated tasks… once they’re told what to do
![Page 13: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/13.jpg)
What is Puppet?
A configuration management/reporting system
Ookay...what’s that?
Puppet provides a way of telling Windows how it should run and what it should do
![Page 14: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/14.jpg)
How does Puppet interact with Windows?
Puppet uses a Master which is simply a linux hosted program that interacts with an Agent process running on the client machine.
The Master collects Facts from the client and uses that information to compile a catalog of instructions that declare the ultimate state of how Resources should look on the client.
![Page 15: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/15.jpg)
How does Puppet interact with Windows?
The client runs the instructions and reports its activity as well as any errors back to the Master
Client: “Hey Master, I did what you said and here’s how it went...”Master: “Atta boy! That’s a good Puppet!”
![Page 16: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/16.jpg)
![Page 17: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/17.jpg)
What are Resources?
Resources are the things that Puppet manages
Resources can be: Files, Services, Packages, Users, Groups, Scheduled Tasks...
Puppet uses instructions contained in simple text files called Manifests to declare the end state of Resources
![Page 18: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/18.jpg)
What is a Manifest?
A Manifest is a plain text file containing instructions written in a declarative language that Puppet uses to define how Resources should be
package { 'javaruntime': ensure => 'latest’, provider => ‘chocolatey’,}
“Tell Chocolatey, he had better make sure my java is fresh in the morning!!”
![Page 19: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/19.jpg)
So what’s this Provider thing?
...and what does Chocolatey have to do with all this?
Chocolatey is a Provider for Puppet, which means it’s a method used to install programs which are represented as a type of resource referred to as Packages
![Page 20: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/20.jpg)
Okay… you’d better you show me
DEMO TIME!!!
![Page 21: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/21.jpg)
Everybody needs somebodyWhere to get help?
Docs: http://docs.puppetlabs.com/Training: https://puppetlabs.com/learnYoutube: http://j.mp/puppetlabs-youtubePuppet Group: http://j.mp/puppet-users-groupChocolatey Group: http://j.mp/chocolatey-groupPuppetNYC Meetup: http://j.mp/puppet-nyc-meetupPodcast: http://j.mp/puppetlabs-podcastIRC: #puppet and #chocolatey on Freenode
![Page 22: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/22.jpg)
Useful things to watch
What is Puppet?http://youtu.be/j8ImF23jZAg
Getting Started with the Learning Puppet VMhttp://youtu.be/8wTiFUZDVfo
Getting Started with Puppethttp://youtu.be/TdAmAj3eaFI
![Page 23: Managing windows with Puppet and Chocolatey](https://reader034.fdocuments.net/reader034/viewer/2022051323/54b7214c4a7959b8098b4693/html5/thumbnails/23.jpg)
Keep in touch
Google+: http://google.com/+SethMcBeanLinkedIn: http://www.linkedin.
com/SethMcBean
Email:[email protected]