Transcript
Page 1: Puppet Camp Dallas 2014: How Puppet Ops Rolls

PuppetLabsHow Puppet Ops Rolls!10 June 2014

Joe Rodriguez (JRod)Ops Wrangler - Puppet Labs, Inc.

Page 2: Puppet Camp Dallas 2014: How Puppet Ops Rolls

$(whoami)

Page 3: Puppet Camp Dallas 2014: How Puppet Ops Rolls

So what are we talking about?

Page 4: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Q: How does Puppet Ops do Puppet?

Page 5: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Answer: Good Question! Believe it or Not, ourchallenges are not any different than yours.

Page 6: Puppet Camp Dallas 2014: How Puppet Ops Rolls

How are we not different?

Internal PaaS Infrastructure: Puppet Engineering & Delivery

Cloud Infrastructure: Various Web Properties

* Rackspace* Linode* GCE* AWS

Networking infrastructure

* Remote office infrastructure.* Colocation Redundancy.

Page 7: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Today's Goals:

Is To:

* Give you a high-level perspective of things Puppet Ops does in our Puppet Code.* Get you thinking about puppet things not not necessarily covered in in the docs.

Not To: Show you how to use Puppet.

Page 8: Puppet Camp Dallas 2014: How Puppet Ops Rolls

The High Points:

Engineer great modules or use known good modules!

Engineer your Puppet code with Roles/Profiles.

Data: What's in your Hiera?

R10k and Dynamic Environments.

Puppet SCM work-flows

Pro Tips: Around Facts and Functions.

Extras: Puppet Tools in the wild that are quite useful.

Page 9: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Modules

Page 10: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Module Design

Page 11: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Understand how a module looks, feels, and is used in yourenvironment.

Page 12: Puppet Camp Dallas 2014: How Puppet Ops Rolls

A few points on Modules:

The life-blood of a great puppet infrastructure are modules.

Strive not to reinvent the wheel - Forge.puppetlabs.com and Github

Be aware, not all modules are created equal.

A good rule of thumb: If your module code is a few yards beyond a simple PFSpattern then it time to BGTM.

Example: PGPool - https://github.com/jrodriguezjr/puppet-pgpool2

Page 13: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Roles and Profiles

Page 14: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Roles/Profiles In General:

Allows separation of Tech and Business logic in Puppet Code - Craig Dunn, HunterHaugen

Are meant to consume Modules in a logical way.

Allows for Code organization.

Architecture paradigm: For you Devs, its comparative to MVC programmingpatterns.

Page 15: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Role:

Page 16: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Profiles:

Page 17: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Hiera

Page 18: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Hiera: Let Data Drive Everything.

Allows you to drive puppet with data.

Allows you to group data according to groups or environments.

Page 19: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Our Hiera Structure:

Page 20: Puppet Camp Dallas 2014: How Puppet Ops Rolls

R10K, Dynamic Environments, & Puppet Work-flows

Adrien Thebo: Author of R10k

If you have more than one dev, look at R10k and Dynamic Environments.

IMHO: It IS the secret to staying agile and developing Puppetcode fast with a PuppetWorkflow.

Page 21: Puppet Camp Dallas 2014: How Puppet Ops Rolls

A look at the Puppetfile:

Page 22: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Extras: Useful Puppet Tools in the wild we've used:

Puppet Query - Eric D., Spotify

Puppet Dashboard - FOSS

Page 23: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Bonus Tip(s): Things you should use in case you are not already ;) :

Linting and Code Checking:

puppet-lint puppet parser validate <puppetcode.pp>

Smoke testing:

puppet apply --noop

Page 24: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Bonus Tips (cont.)

Unit-testing

rspec-puppet bundle exec rake spec

Acceptance testing

beaker-rspec

Page 25: Puppet Camp Dallas 2014: How Puppet Ops Rolls

On Puppet Infrastructure - Hardware (Avoid Puppet drag!)

Anyone running a decent sized puppet infrastructure knows that at times it can beslow.

Run Puppet on a decently sized box!

Preferably one with SSDs, a good amount of procs, and memory.

Page 26: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Summary: Keep your Puppet Operation Expenditure Low.

(Sysadmin/Dev Time) == $$$

Recap:

- Strive Engineer Great Modules - understand your Legos! (Joe K.)- Rock out with Roles/Profiles- Let Hiera Drive your data.- Fall in love with R10K & Dynamic Environments. Get your work-flow on!- Learn to love your facts and functions.

Page 27: Puppet Camp Dallas 2014: How Puppet Ops Rolls

That's all she wrote! Q & A

Page 28: Puppet Camp Dallas 2014: How Puppet Ops Rolls

References:

Building Great Modules. http://docs.puppetlabs.com/guides/module_guides/bgtm.html

Roles and Profiles: https://github.com/hunner/roles_and_profiles http://www.craigdunn.org/2012/05/239/

R10K and Dynamic Environments: http://hunnur.com/blog/2010/10/dynamic-git-branch-puppet-environments/ http://puppetlabs.com/blog/git-workflow-and-puppet-environments/

Great AIO (All-In-One) Series: http://garylarizza.com/

Other tools: https://github.com/sodabrew/puppet-dashboard

Page 29: Puppet Camp Dallas 2014: How Puppet Ops Rolls

Thank you

Joe Rodriguez (JRod)Ops Wrangler - Puppet Labs, [email protected] (mailto:[email protected])

@r0dr1gu3zjr (http://twitter.com/r0dr1gu3zjr)


Recommended