Ask Your Question

Trigger puppet agent run on another node?

asked 2013-09-15 08:04:09 -0600

jpm290 gravatar image

Is it possible to trigger a puppet agent run on a 2nd node from the current node?

For example, say we have two nodes: The first node builds our software, and copies the resulting software to a shared location. The second node has an environment that runs our software.

When the first node completes a new build, is it possible to trigger the second node to start a puppet agent run?

The second node is written to first check the shared location for a new build, and if one exists, update the environment.

The goal would be to have the ... (more)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2013-09-15 14:04:31 -0600

One existing solution is this:

It uses mcollective to trigger the subsequent run based on tags in the report from the first node.

Puppet kick is deprecated in Puppet 3 - probably best not to build a solution round that.

edit flag offensive delete link more

answered 2013-09-15 10:24:44 -0600

Stefan gravatar image

There is no build in function to do this kind of stuff and your possibilities depend on how you run your agents. If you run the agents as a daemon process, you can use puppet kick to trigger a puppetrun on a remote machine. But I guess this does only work on your puppet master.

When you find out how you can trigger a puppet run in general in your environment, you might consider the following two options to automate the process:

  1. Define a postruncommand in the puppet.conf file on your buildserver. The command is run after each puppet ...
edit flag offensive delete link more

answered 2013-09-16 03:17:37 -0600

Ancillas gravatar image

It would be interesting to use PuppetDB and exported resources for this. You could export a fact file with a hash of the server hostname, and a status of true or false. Then, when a server runs, you'd collect all the facts, and manifest logic would decide what to do based on the state read from PuppetDB. I've never seen it done, but it would be a cool project.

That aside, I orchestrate puppet runs using scripts through either Fabric or Rundeck. Orchestration isn't Puppet's strong point.

edit flag offensive delete link more


Entirely possible with a report processor. The missing information is the knowledge of what _collects_ a resource so you know what to notify, but this could be faked by wrapping ...(more)

ken gravatar imageken ( 2013-09-16 03:38:02 -0600 )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



Asked: 2013-09-15 08:04:09 -0600

Seen: 968 times

Last updated: Sep 16 '13