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

Post on 13-Sep-2014

601 views 1 download

Tags:

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 of 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

2© Copyright 2012 EMC Corporation. All rights reserved.

3© Copyright 2012 EMC Corporation. All rights reserved.

CoolApp 3000

NEW!

WIDGETS!

IMPROVED!

FEAT

URES!

Project ManagerIs a person who thinks nine women

can deliver a baby in one month

5© Copyright 2012 EMC Corporation. All rights reserved.

6© Copyright 2012 EMC Corporation. All rights reserved.

7© Copyright 2012 EMC Corporation. All rights reserved.

MY

12© Copyright 2012 EMC Corporation. All rights reserved.

Puppetize everything!

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

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!

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

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

17© Copyright 2012 EMC Corporation. All rights reserved.

Puppet gives youSoftware-Defined Infrastructure

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', }}

19© Copyright 2012 EMC Corporation. All rights reserved.

Puppet Architecture

20© Copyright 2012 EMC Corporation. All rights reserved.

21© Copyright 2012 EMC Corporation. All rights reserved.

22© Copyright 2012 EMC Corporation. All rights reserved.

EVERY

24© Copyright 2012 EMC Corporation. All rights reserved.

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

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

27© Copyright 2012 EMC Corporation. All rights reserved.

So how does it work?

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

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

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

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

32© Copyright 2012 EMC Corporation. All rights reserved.

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

33© Copyright 2012 EMC Corporation. All rights reserved.

Puppet + Razor = Good!

34© Copyright 2012 EMC Corporation. All rights reserved.

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

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', } }

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",}

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',}

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,}

39© Copyright 2012 EMC Corporation. All rights reserved.

DEMOTIME!

40© Copyright 2012 EMC Corporation. All rights reserved.

On the agenda VMworld 2013

– San Francisco– AND– Barcelona

PuppetConf maybe? Meet me online?

41© Copyright 2012 EMC Corporation. All rights reserved.

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!

jonas.rosland@emc.com@virtualswede