getting up and running with the windows module pack

25
Getting Up and Running with the Windows Module Pack Getting Up and Running with the Windows Module Pack

Upload: hallie-exall

Post on 16-Jan-2017

169 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack

Page 2: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 2

Presented by

Rob ReynoldsSr. Software Engineer, creator of

Chocolatey

Alanna BrownSr. Product Marketing Manager

Page 3: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 3

Agenda

How Puppet Enterprise Works

Overview of the Windows Module Pack

Demo

Puppet Windows Support

Resources

Page 4: Getting Up and Running with the Windows Module Pack

Our platform automates the delivery and operation of the software that powers everything around us.

Page 5: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 5

Puppet Deployment

Windows Server

Ubuntu Server

Cisco Switch

AzureCloud

Puppet Master

Page 6: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 6

How Puppet Enterprise Works

Page 7: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 7

Windows Module Pack

The best Windows modules available on the Puppet Forge, all in one download.

Download the Windows Module Pack here: https://forge.puppet.com/puppetlabs/windows

Install with one command:

puppet module install puppetlabs-windows

• puppetlabs/acl

• puppetlabs/dsc

• puppetlabs/powershell

• puppetlabs/reboot

• puppetlabs/registry

• puppetlabs/wsus_client

• badgerious/windows_env

• chocolatey/chocolatey

• puppet/download_file

• puppet/iis

• puppet/windowsfeature

Page 8: Getting Up and Running with the Windows Module Pack

8

acl {'c:/temp': permissions => [ { identity => 'Administrators', rights => ['full'] } ], purge => true, inherit_parent_permissions => false,}

ACLUse Puppet to manage Windows Access Control Lists.

Example: Lock down a directory or file to just admins.

Page 9: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 9

dsc_xFirewall {'inbound-2222': dsc_ensure => 'present', dsc_name => 'inbound2222', dsc_displayname => 'Inbound DSC 2222', dsc_displaygroup => 'A Puppet + DSC Test', dsc_action => 'Allow', dsc_enabled => 'false', dsc_direction => 'Inbound',}

DSCManage Windows PowerShell DSC resources.

Example: Disable a Firewall port

Page 10: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 10

PowerShellExecute PowerShell commands with Puppet.

Example: Manage services like backups, user profiles, IIS, etc.

# Normally you would use service resource to manage resourcesexec { 'BITS service on': command => 'Start-Service BITS', unless => "if (\$(Get-Service BITS).Status -eq 'Running') { exit 0 } else { exit 1 }", provider => powershell, logoutput => true,}

Page 11: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 11

RebootAutomates the manual task of rebooting Windows after

you install a package or when a reboot is pending.

reboot {'reboot_pending': when => pending, timeout => 15,}

Page 12: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 12

RegistryCreate and manage registry keys and values.

Example: Disable automatic logon on a machine.

registry_value {'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon': ensure => present, type => dword, data => 0,}

Page 13: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 13

WSUS ClientManage Windows updates with your own servers instead of

Microsoft’s Windows Update servers and schedule updates.

class {'wsus_client': server_url => 'https://internal_server:8530', auto_update_option => "Scheduled", scheduled_install_day => "Tuesday", scheduled_install_hour => 2,}

Page 14: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 14

ChocolateyThe package manager for Windows.

Install, configure and use Chocolatey as a package provider.

include chocolatey

package {'git': ensure => latest,}

Page 15: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 15

Download FileDownload a file over HTTP(S).

Example: Download .NET Framework from download.microsoft.com

download_file { '.NET Framework 4.0': url => 'https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe', destination_directory => 'c:\temp',}

Page 16: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 16

iis::manage_app_pool {'somepool': enable_32_bit => true, managed_runtime_version => 'v4.0',} ->

iis::manage_site {'TheServer': site_path => 'c:\sites\server', port => '8080', ip_address => '*', app_pool => 'somepool',}

IIS

Create sites, application pools and virtual appliances for IIS7 and above.

Page 17: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 17

Windows EnvironmentManage Windows environment variables.

Example: Ensure a value is included in PATH

windows_env {'ValueOnPath': ensure => present, variable => 'PATH', value => 'c:\tools\bin', mergemode => insert,}

Page 18: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 18

Windows FeatureTurn Windows features on or off for Windows Server 2008 and above.

Example: Ensure IIS and ASP.NET are installed (Windows Server 2012)

windowsfeature {'Web-WebServer': installmanagementtools => true,} ->windowsfeature {'Web-Asp-Net45':}

Page 19: Getting Up and Running with the Windows Module Pack

19

Demo Time

Page 20: Getting Up and Running with the Windows Module Pack

Getting Up and Running with the Windows Module Pack 20

Puppet Windows Support

Broad platform support (Windows

2008, 2012, 7, 8, 10) for 32- and 64-bit

platforms

Bare metal provisioning with

Razor

Supported and approved modules

Azure support

Page 21: Getting Up and Running with the Windows Module Pack

21

Puppet Supported Modules

SQL Server – Installs & manages MS SQL Server 2012 & 2014 on Windows systems

DSC – Manages PowerShell DSC resources

Azure – Provision and manage Azure VMs

ACL – manage permissions with Windows ACLs

Getting Up and Running with the Windows Module Pack

WSUS Client – Configure clients to point to update servers; schedule updates

Registry – manage Registry keys and values

PowerShell – execute PowerShell commands with Puppet

Reboot – Automatically reboot after install

Page 22: Getting Up and Running with the Windows Module Pack

22

Puppet Approved Modules

IIS – install and manage IIS

Chocolatey – package manager

windows_env – manage Windows environment variables

Windows Java – Install and manage Oracle Java on Windows

pget – PowerShell alternative to wget or curl

Getting Up and Running with the Windows Module Pack

Page 23: Getting Up and Running with the Windows Module Pack

23

Resources

Getting Up and Running with the Windows Module Pack

PuppetConf 2015 VideosChocolatey and Puppet - Rob ReynoldsAzure for the Non-Microsoft Person - Rob Reynolds & Scott Hanselman, MSFTBetter Together: Managing Windows with Puppet and DSC - Ethan Brown & Bruce Payette, MSFTBeyond the Registry - Matthew Stone, T-MobileThe Wild World of Windows: Developing for Puppet on Windows - Travis Fields, Nike

BlogChocolatey blog seriesPowerShell DSC blog series

DocsManaging Windows Configurations

EducationLearning VMPuppet Essentials for WindowsPuppet Fundamentals

Page 24: Getting Up and Running with the Windows Module Pack

24

Questions

Page 25: Getting Up and Running with the Windows Module Pack