vbrownbag 2013 june 4th - puppet and razor - jonas rosland

43
1 © Copyright 2012 EMC Corporation. All rights reserved. Automated OS & App Deployment Using Puppet and Razor Click icon to add picture Jonas Rosland Software-Defined Specialist @virtualswede

Post on 13-Sep-2014

601 views

Category:

Technology


1 download

DESCRIPTION

Great and fun session on the EMEA vBrownbag with a lot of really good questions, here are the slides for the presentation on Puppet and Razor.

TRANSCRIPT

Page 1: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

1© Copyright 2012 EMC Corporation. All rights reserved.

Automated OS & App DeploymentUsing Puppet and Razor

Click icon to add picture

Jonas RoslandSoftware-Defined Specialist@virtualswede

Page 2: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

2© Copyright 2012 EMC Corporation. All rights reserved.

Page 3: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

3© Copyright 2012 EMC Corporation. All rights reserved.

CoolApp 3000

NEW!

WIDGETS!

IMPROVED!

FEAT

URES!

Page 4: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

Project ManagerIs a person who thinks nine women

can deliver a baby in one month

Page 5: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

5© Copyright 2012 EMC Corporation. All rights reserved.

Page 6: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

6© Copyright 2012 EMC Corporation. All rights reserved.

Page 7: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

7© Copyright 2012 EMC Corporation. All rights reserved.

Page 8: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

MY

Page 9: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland
Page 10: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland
Page 11: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland
Page 12: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

12© Copyright 2012 EMC Corporation. All rights reserved.

Puppetize everything!

Page 13: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

13© Copyright 2012 EMC Corporation. All rights reserved.

What is Puppet? IT automation software Helps system administrators manage

infrastructure throughout its lifecycle Provisioning and configuration Patch management and compliance Highly scalable

Page 14: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

14© Copyright 2012 EMC Corporation. All rights reserved.

How scalable? Google manages more than 50000 systems Zynga scaled from 0 to 10000 servers in 2

months I am managing tens of machines!

Page 15: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

15© Copyright 2012 EMC Corporation. All rights reserved.

Why is Puppet cool? Centralized, Scalable configuration management for

server farms Abstracted from underlying OS (to a point) Configurations can be stored in a version control

system (like Git) for historical change tracking Automated configuration of individual machines

based on hardware/software configuration Auditing of configuration of individual machines

Page 16: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

16© Copyright 2012 EMC Corporation. All rights reserved.

Where Puppet helps Bridge the gap between sysadmins and app/dev

teams Using a common structure to create Dev, QA and

Production environments Standardizing applications and their configurations Result: Consistent platforms throughout with minimal

pain

Page 17: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

17© Copyright 2012 EMC Corporation. All rights reserved.

Puppet gives youSoftware-Defined Infrastructure

Page 18: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

18© Copyright 2012 EMC Corporation. All rights reserved.

Example of a Puppet manifestnode /blogserver/ { include ntp include wordpress firewall { '100 allow http': proto => 'tcp', dport => '80', action => 'accept', }}

Page 19: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

19© Copyright 2012 EMC Corporation. All rights reserved.

Puppet Architecture

Page 20: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

20© Copyright 2012 EMC Corporation. All rights reserved.

Page 21: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

21© Copyright 2012 EMC Corporation. All rights reserved.

Page 22: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

22© Copyright 2012 EMC Corporation. All rights reserved.

Page 23: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

EVERY

Page 24: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

24© Copyright 2012 EMC Corporation. All rights reserved.

Page 25: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

25© Copyright 2012 EMC Corporation. All rights reserved.

So what’s Razor? Cloud provisioning tool Operating Systems AND Hypervisors Physical AND virtual Event-driven instead of user-driven

Page 26: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

26© Copyright 2012 EMC Corporation. All rights reserved.

Why not just use templates? They get old fast Pre-packages bits are harder to maintain No easy upgrade to next distro version

Page 27: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

27© Copyright 2012 EMC Corporation. All rights reserved.

So how does it work?

Page 28: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

28© Copyright 2012 EMC Corporation. All rights reserved.

Auto-Discovered Real-Time Inventory Data Boots a Micro-Kernel Primarily using facter For every hardware node Eliminating inefficient, error-prone manual

processes Full insight into the latest, up-to-date status

of your hardware inventory

Page 29: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

29© Copyright 2012 EMC Corporation. All rights reserved.

Dynamic Image Selection Selects the correct operating system image Based on auto-discovered, real-time

inventory data No manual intervention needed

Page 30: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

30© Copyright 2012 EMC Corporation. All rights reserved.

Model-Based Provisioning Models the desired state of each hardware

node and its operating system Automatically tracks provisioning progress

toward this state Full control over a node’s boot sequence and

a complete log of its lifecycle

Page 31: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

31© Copyright 2012 EMC Corporation. All rights reserved.

Open APIs and Plug-in Architecture RESTful open APIs Full programmatic control of the rules and

models that govern operating system image selection and hardware provisioning

Enables the Puppet community to collaborate and share plug-ins to support any operating system and any boot sequence

Page 32: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

32© Copyright 2012 EMC Corporation. All rights reserved.

Metal-to-Cloud Application Lifecycle Management No need for siloed management tools!

Page 33: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

33© Copyright 2012 EMC Corporation. All rights reserved.

Puppet + Razor = Good!

Page 34: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

34© Copyright 2012 EMC Corporation. All rights reserved.

Razor installation using Puppetnode razor { class { 'sudo': config_file_replace => false, } include razor}

Page 35: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

35© Copyright 2012 EMC Corporation. All rights reserved.

Add a brokerrz_broker { 'puppet_broker': ensure => present, plugin => 'puppet', metadata => { broker_version => '2.7.18', server => 'puppet.purevirtual.lab', } }

Page 36: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

36© Copyright 2012 EMC Corporation. All rights reserved.

Add an image to deployrz_image { "ubuntu_precise_image": ensure => present, type => 'os', version => '12.04.1', source => "http://ftp.sunet.se/pub/os/Linux/distributions/ubuntu/ubuntu-cd/12.04.1/ubuntu-12.04.1-server-amd64.iso",}

Page 37: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

37© Copyright 2012 EMC Corporation. All rights reserved.

Add a model for deploymentrz_model { 'install_ubuntu_precise': ensure => present, description => 'Ubuntu Precise', image => 'ubuntu_precise_image', metadata => {'domainname' => 'purevirtual.lab', 'hostname_prefix' => 'ubuntu-', 'root_password' => 'password'}, template => 'ubuntu_precise',}

Page 38: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

38© Copyright 2012 EMC Corporation. All rights reserved.

Finally, create a policy to tie it all togetherrz_policy { 'ubuntu_precise_policy': ensure => present, broker => 'puppet_broker', model => 'install_ubuntu_precise', enabled => 'true', tags => ['memsize_1GiB'], template => 'linux_deploy', maximum => 10,}

Page 39: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

39© Copyright 2012 EMC Corporation. All rights reserved.

DEMOTIME!

Page 40: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

40© Copyright 2012 EMC Corporation. All rights reserved.

On the agenda VMworld 2013

– San Francisco– AND– Barcelona

PuppetConf maybe? Meet me online?

Page 41: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

41© Copyright 2012 EMC Corporation. All rights reserved.

Page 42: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland

42© Copyright 2012 EMC Corporation. All rights reserved.

Wanna get started?How to and best practices on my blog:http://purevirtual.eu/category/automation/puppet/http://purevirtual.eu/category/automation/razor/

Send me an email/tweet!

[email protected]@virtualswede

Page 43: vBrownbag 2013 June 4th - Puppet and Razor - Jonas Rosland