Ask Your Question
2

initiate puppet run on agent from Puppet Master

asked 2013-06-20 10:47:47 -0500

updated 2013-06-21 02:49:17 -0500

ramindk gravatar image

I currently have a Puppet Master and two agents, on the Puppet Master I am updating a json file and using that (via hiera) to get a list of running sites and deploy them to one of the agents.

If a site appears or is removed from the json, it is added or removed from the sites on the agent and this all works nicely if I run Puppet on the agent.

I expect to provision 20 or so sites per day (these are demos of our product) and it seems wrong to be constantly doing a puppet run on ... (more)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2013-06-20 13:54:50 -0500

GregLarkin gravatar image

You could reduce the run interval on that agent from the default 30 minutes to whatever you like.

Note that a value of "0" means "run continuously". I haven't experimented with that to see if there are any problems doing that, but maybe others who have can post here with their comments.

Here's another option for triggering puppet agent remotely using pssh.

edit flag offensive delete link more

Comments

1

I'm a bit nervous about running Puppet continuously - although I may have no reason to be. Would be interested in other experiences. Triggering it using pssh would definitely be ...(more)

rachelandrew gravatar imagerachelandrew ( 2013-06-20 14:39:08 -0500 )edit
1

answered 2013-06-21 01:39:29 -0500

ramindk gravatar image

updated 2013-06-21 01:52:19 -0500

Assuming potential demo-ees are hitting a button and data is being published into json that ends up in your Puppet master a few ideas present themselves.

  • As Greg mentioned, pssh to trigger the runs kicked off after an appropriate time later to avoid the race condition.
  • Mcollective might be a possibility in the near future if the Redis backend goes mainstream. Currently it's a fair amount of work to get the middleware required for Mcollective up and running on Debian based distros in my experience.
  • Any sort of async job system. Resque, delayed_job, gearman, etc. All of them will ...
(more)
edit flag offensive delete link more
0

answered 2013-06-21 00:40:39 -0500

Ancillas gravatar image

Check out mCollective.

edit flag offensive delete link more

Comments

1

As explained in my post, I have done, it seems overkill however for this one call to a single machine.

rachelandrew gravatar imagerachelandrew ( 2013-06-21 00:58:04 -0500 )edit

My apologies. I read quickly on my phone and glanced over that piece of your original post.

Ancillas gravatar imageAncillas ( 2013-06-24 14:14:42 -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-06-20 10:47:47 -0500

Seen: 1,233 times

Last updated: Jun 21 '13