19
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

Automated OS and Application deployment using Razor and Puppet

Embed Size (px)

DESCRIPTION

"Automated OS and Application deployment using Razor and Puppet" by Jonas Rosland at Puppet Camp Amsterdam 2013. Find a Puppet Camp near you: https://puppetlabs.com/community/puppet-camp/

Citation preview

Page 1: Automated OS and Application deployment using Razor and Puppet

1© Copyright 2012 EMC Corporation. All rights reserved.

Automated OS & App Deployment

Using Puppet and Razor

Click icon to add picture

Jonas RoslandSoftware-Defined Specialist@virtualswede

Page 2: Automated OS and Application deployment using Razor and Puppet

2© Copyright 2012 EMC Corporation. All rights reserved.

Image credit: @mpyeager, http://ow.ly/i/1P9YU

Page 3: Automated OS and Application deployment using Razor and Puppet

3© 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 4: Automated OS and Application deployment using Razor and Puppet

4© 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 5: Automated OS and Application deployment using Razor and Puppet

5© Copyright 2012 EMC Corporation. All rights reserved.

So how does it work?

Page 6: Automated OS and Application deployment using Razor and Puppet

6© 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 7: Automated OS and Application deployment using Razor and Puppet

7© 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 8: Automated OS and Application deployment using Razor and Puppet

8© 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 9: Automated OS and Application deployment using Razor and Puppet

9© 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 10: Automated OS and Application deployment using Razor and Puppet

10© Copyright 2012 EMC Corporation. All rights reserved.

Metal-to-Cloud Application Lifecycle Management

No need for siloed management tools!

Page 11: Automated OS and Application deployment using Razor and Puppet

11© Copyright 2012 EMC Corporation. All rights reserved.

Puppet + Razor = Good!

Page 12: Automated OS and Application deployment using Razor and Puppet

12© Copyright 2012 EMC Corporation. All rights reserved.

Razor installation using Puppet

node razor {

class { 'sudo':

config_file_replace => false,

}

include razor

}

Page 13: Automated OS and Application deployment using Razor and Puppet

13© Copyright 2012 EMC Corporation. All rights reserved.

Add a broker

rz_broker { 'puppet_broker':

ensure => present,

plugin => 'puppet',

metadata => {

broker_version => '2.7.18',

server => 'puppet.purevirtual.lab',

}

}

Page 14: Automated OS and Application deployment using Razor and Puppet

14© Copyright 2012 EMC Corporation. All rights reserved.

Add an image to deploy

rz_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 15: Automated OS and Application deployment using Razor and Puppet

15© Copyright 2012 EMC Corporation. All rights reserved.

Add a model for deployment

rz_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 16: Automated OS and Application deployment using Razor and Puppet

16© Copyright 2012 EMC Corporation. All rights reserved.

Finally, create a policy to tie it all together

rz_policy { 'ubuntu_precise_policy':

ensure => present,

broker => 'puppet_broker',

model => 'install_ubuntu_precise',

enabled => 'true',

tags => ['memsize_1GiB'],

template => 'linux_deploy',

maximum => 10,

}

Page 17: Automated OS and Application deployment using Razor and Puppet

17© Copyright 2012 EMC Corporation. All rights reserved.

DEMOTIME!

Page 18: Automated OS and Application deployment using Razor and Puppet

18© 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 19: Automated OS and Application deployment using Razor and Puppet