Date post: | 10-May-2015 |
Category: |
Technology |
Upload: | puppet-labs |
View: | 2,198 times |
Download: | 0 times |
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
(We wrote this down.)http://docs.puppetlabs.com/pe/latest/orchestration_invoke_cli.html
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 actions/inputs:http://docs.puppetlabs.com/pe/latest/orchestration_actions.html
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