managing windows with puppet and chocolatey

23
Managing Windows with Puppet and Chocolatey Seth McBean School Aide | FLAGS High School NYC DIIT School Technology Summit – 2014/07/30

Upload: sethmcbean

Post on 15-Jan-2015

739 views

Category:

Technology


0 download

DESCRIPTION

Workshop slides for NYC DIIT School Technology Summit 2014 presentation about managing Windows packages with Chocolatey and Puppet

TRANSCRIPT

Page 1: Managing windows with Puppet and Chocolatey

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

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

Let’s start with “Why?”

Why manage?Why automate?

Why care?Why stay awake?

Page 4: Managing windows with Puppet and Chocolatey

Why manage/automate?

SpeedConsistencyTo get rid of those problems that nag me

Page 5: Managing windows with Puppet and Chocolatey

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

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

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

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

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

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

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

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

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

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

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
Page 17: Managing windows with Puppet and Chocolatey

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

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

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

Okay… you’d better you show me

DEMO TIME!!!

Page 21: Managing windows with Puppet and Chocolatey

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

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

Keep in touch

Google+: http://google.com/+SethMcBeanLinkedIn: http://www.linkedin.

com/SethMcBean

Email:[email protected]

[email protected]