using orchestration in puppet enterprise 3 - puppetconf 2013

Post on 10-May-2015

2.205 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

"Using Orchestration in Puppet Enterprise 3" by Nick Fagerlund Technical Writer, Puppet Labs. Presentation Overview: The recently released Puppet Enterprise 3.0 introduced several powerful orchestration engine capabilities, including dynamic discovery and progressive deployment. This introductory-level talk will provide an overview of these and other orchestration engine features, the common use-cases they address, and how you use them. Speaker Bio: Nick Fagerlund was the very first dedicated technical writer at Puppet Labs. Like any responsible pet owner, Puppet Labs has since provided him with companions. Unlike a responsible pet owner, Puppet Labs has fed him after midnight and occasionally splashed water on him. Nick writes (and re-writes) at http://docs.puppetlabs.com, focusing on platform-level components like the Puppet language. He specializes in breaking things and then explaining how they broke. His business card says "weird bugs."

TRANSCRIPT

Using Orchestration in Puppet Enterprise 3Nick FagerlundTechnical Writer | Puppet Labs @nfagerlund

Friday, August 23, 13

puppetconf.com #puppetconf

HI.

Friday, August 23, 13

puppetconf.com #puppetconf

How’s it goin.

Friday, August 23, 13

puppetconf.com #puppetconf

Let’s talk about orchestration!

Raise your hand if you know what it is.

Friday, August 23, 13

puppetconf.com #puppetconf

Specifically,let’s talk about…

• What it is, why you use it, and when

• HOW???

• Cool new features in Puppet Enterprise 3

• Concrete use cases

Friday, August 23, 13

puppetconf.com #puppetconf

I already took notes for you.

Friday, August 23, 13

puppetconf.com #puppetconf

http://docs.puppetlabs.com/pe/latest

Friday, August 23, 13

puppetconf.com #puppetconf

OK, what’s orchestration.

Friday, August 23, 13

puppetconf.com #puppetconf

It’s not configuration management.

It’s a different kind of automation.

They’re complementary!

Friday, August 23, 13

puppetconf.com #puppetconf

Config management is:

• Modeling a desired state for systems…

• …enforcing that desired state…

• …and updating the model in order to update the state.

Friday, August 23, 13

puppetconf.com #puppetconf

Orchestration is about:

• Executing actions…

• …on demand…

• …on a flexible group of systems.

Friday, August 23, 13

puppetconf.com #puppetconf

???

Friday, August 23, 13

puppetconf.com #puppetconf

What’s an “action?”

• Pre-defined actions are distributed as plugins.

• Actions have structured inputs and outputs.

• Actions can do... like, whatever. (Several built-in, or write your own.)

Friday, August 23, 13

puppetconf.com #puppetconf

What’s “on demand?”

• Whenever you want—

• —either really quickly and in parallel—

• —or in a controlled series of batches.

Friday, August 23, 13

puppetconf.com #puppetconf

Flexible group of systems?

• Select nodes by fact values

• Select by Puppet classes

• Select with dynamic data discovery

Instead of using a list of hostnames, set criteria to match against.

Friday, August 23, 13

puppetconf.com #puppetconf

Why orchestrate?

Friday, August 23, 13

puppetconf.com #puppetconf

• Controlling config management

Friday, August 23, 13

puppetconf.com #puppetconf

• Controlling config management

• Gathering information

Friday, August 23, 13

puppetconf.com #puppetconf

• Controlling config management

• Gathering information

• Application deployment

Friday, August 23, 13

puppetconf.com #puppetconf

• Controlling config management

• Gathering information

• Application deployment

• Routine or emergency maintenance

Friday, August 23, 13

puppetconf.com #puppetconf

• Controlling config management

• Gathering information

• Application deployment

• Routine or emergency maintenance

• Any of your day-to-day work that must happen interactively

Friday, August 23, 13

puppetconf.com #puppetconf

Basically: What tasks do you want to Run Better on

Lots of Nodes?

Friday, August 23, 13

puppetconf.com #puppetconf

How do you use orchestration?

Friday, August 23, 13

puppetconf.com #puppetconf

Two ways to invoke actions

• In the PE console

• On the command line

Friday, August 23, 13

puppetconf.com #puppetconf

Two ways to invoke actions

• In the PE console

• On the command line (focusing here for today!)

Friday, August 23, 13

puppetconf.com #puppetconf

1. Go to the command line

• SSH to puppet master server

• Switch user to “peadmin”

Friday, August 23, 13

puppetconf.com #puppetconf

2. Decide on three things

• What action?

• What inputs/arguments?

• On which kinds of nodes?

Friday, August 23, 13

puppetconf.com #puppetconf

3. Run your command

• mco <SUBCOMMAND> <ARGUMENTS> <OPTIONS> <FILTER>

Friday, August 23, 13

puppetconf.com #puppetconf

Finding filter informationhttp://docs.puppetlabs.com/pe/latest/orchestration_invoke_cli.html#filtering-actions

Friday, August 23, 13

puppetconf.com #puppetconf

Demo time!

Friday, August 23, 13

puppetconf.com #puppetconf

What did we just see?

Friday, August 23, 13

puppetconf.com #puppetconf

The mco command

• The mco command controls the orchestration engine.

• It has a bunch of subcommands, whose syntax can vary.

Friday, August 23, 13

puppetconf.com #puppetconf

The subcommands

• mco rpc is the generic subcommand. It can do basically anything.

• All the other subcommands are simpler ways to do things you could probably do with mco rpc.

Friday, August 23, 13

puppetconf.com #puppetconf

Specialized subcommands

• mco ping is exactly what it sounds like.

• mco find is a fast way to test filters.

• mco service mimics the familiar service command.

• mco package mimics apt and yum commands.

Friday, August 23, 13

puppetconf.com #puppetconf

Specialized subcommands

• And mco puppet is for controlling Puppet.

Friday, August 23, 13

puppetconf.com #puppetconf

How about those new features?

Friday, August 23, 13

puppetconf.com #puppetconf

Batching / progressive deployment

• --batch <SIZE>

• --batch-sleep <SECONDS>

Friday, August 23, 13

puppetconf.com #puppetconf

Batching / progressive deployment

• Good for rolling out new Puppet modules!

Friday, August 23, 13

puppetconf.com #puppetconf

(demo)

Friday, August 23, 13

puppetconf.com #puppetconf

Data plugins / dynamic discovery

• $ mco rpc puppet status -S "puppet().enabled=false"

Friday, August 23, 13

puppetconf.com #puppetconf

Data plugins / dynamic discovery

• Advanced filtering

• Ad-hoc monitoring and reporting

Friday, August 23, 13

puppetconf.com #puppetconf

(demo)

Friday, August 23, 13

puppetconf.com #puppetconf

Sampling/limiting

• --1

• --limit <COUNT>

Friday, August 23, 13

puppetconf.com #puppetconf

What next?

Friday, August 23, 13

puppetconf.com #puppetconf

The built-in actions are useful, but orchestration

really shines when you roll your own.

Friday, August 23, 13

puppetconf.com #puppetconf

For example:

Friday, August 23, 13

puppetconf.com #puppetconf

(That’s it, that’s all the code.)

Friday, August 23, 13

puppetconf.com #puppetconf

Info about writing actionshttp://docs.puppetlabs.com/pe/latest/orchestration_adding_actions.html#writing-mcollective-agent-plugins

Friday, August 23, 13

puppetconf.com #puppetconf

Say hi later, and I can show you more!

Friday, August 23, 13

Thank YouNick FagerlundTechnical Writer | Puppet Labs @nfagerlund

Collaborate. Automate. Ship.

Friday, August 23, 13

Follow us on Twitter @puppetlabs

youtube.com/puppetlabsinc

slideshare.net/puppetlabs

Collaborate. Automate. Ship.

Friday, August 23, 13

top related