Ask Your Question
0

do once vs do always: manifest definitions

asked 2013-07-25 10:04:57 -0500

ethrbunny gravatar image

I'm hoping to setup puppet to manage a slew (>1K) of debian machines that we're about to distribute across the country. Each comes with a basic OS install and needs quite a bit of updating to run our software. Puppet seems like a perfect fit.

What I'm wondering: how do I create my manifest(s) such that it's divided between the do once and do always tasks?

  • do once: setting the time zone, dist-upgrade
  • do always: (IE every time the agent runs) check that certain services are live and up to date, new config changes - standard ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-07-25 12:01:59 -0500

lavaman gravatar image

The point of puppet is to describe the desired state and to let puppet enforce that state.

For things like a dist-upgrade, I would keep that in your provisioning process and not in puppet.

The timezone is something you always want to ensure is set to the appropriate value, so having puppet check that every run is reasonable.

Don't try to characterize it as "do once" and "do always" think of it as "provisioning" and "configuration management". Even if it's appropriate to do something as part of the provisioning process, it may still be useful to have puppet ... (more)

edit flag offensive delete link more

Comments

Echoing lavaman's response, have a look at the concept of idempotency in Puppet: http://docs.puppetlabs.com/guides/introduction.html#idempotency. Always think about the final state that you ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-07-25 14:08:42 -0500 )edit

Got it. So the 'do *only* once' sorts of things should be outside of puppet?

ethrbunny gravatar imageethrbunny ( 2013-07-25 16:45:26 -0500 )edit

Not necessarily. It's fairly common in puppet to have resources that only get applied once using refreshonly, unless, onlyif, and creates. It depends on whether the things that effectively ...(more)

lavaman gravatar imagelavaman ( 2013-07-25 17:07:29 -0500 )edit

For instance, in our provisioning process, literally the only thing that happens (besides disks, etc.) is a dist-upgrade, installing puppetlabs repos, and installing puppet. We do *everything* else to configure ...(more)

lavaman gravatar imagelavaman ( 2013-07-25 17:11:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-07-25 10:04:57 -0500

Seen: 168 times

Last updated: Jul 25 '13