How to apply puppet manifests toa remote host?

1,316 views
Skip to first unread message

Sirisha

unread,
Jun 13, 2013, 6:29:31 AM6/13/13
to puppet...@googlegroups.com
Hi All,

Am new to puppet and started writing simple  manifest files.

I have setup Server/Client mode for puppet and when I try to apply my manifest to local machine using "puppet agent" everything works well.

Is there any option to apply the manifests to a remote machine without ssh into the machine?

jcbollinger

unread,
Jun 14, 2013, 9:11:14 AM6/14/13
to puppet...@googlegroups.com


You cannot do anything to any machine without some kind of assistance from that machine.

The usual mode of operation for Puppet is to configure the agent to retrieve and apply configuration on some regular schedule, either by running it in daemon mode or by using an external scheduler such as cron.  Regularly scheduled runs are great for ensuring that your machines retain their intended target configurations, including tracking any changes to that target.

On the other hand, if you're asking for a way to trigger runs on demand without logging in to the target machine, then you can configure the agent to listen on the network for signals from the master, generated by running 'puppetrun' or 'puppet kick' there.  The agent will perform an ordinary run whenever it receives the correct signal.  The target node needs already to be paired with the master before this will work.


John

Charlie Brune

unread,
Jun 20, 2013, 4:27:03 PM6/20/13
to puppet...@googlegroups.com
I'm wondering if I have the same question.

I have a laptop that works well with my Puppet Master while I'm at home.  However, when I leave home, puppet no longer is able to apply the manifests (configs) assigned to it.

I was hoping that it would simply continue to apply whatever manifests it knew about while at home before I left.

Should I not be using the Master/Agent technique for using Puppet?

Thanks,
Charlie


On Thursday, June 13, 2013 5:29:31 AM UTC-5, Sirisha wrote:

Denmat

unread,
Jun 21, 2013, 6:29:38 AM6/21/13
to puppet...@googlegroups.com
Hi,

You're describing puppet 'masterless'. Depending on the complexity of your code (use of stored configs for example) you should be able to apply a manifest with 'puppet apply' on your laptop.

You may have to change your existing manifest to make it more useable without a master but there are many people that achieve a lot without a central master (and you can use both if you really want).

There's a bunch of google results that show how others have done it.

THT
Den
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jcbollinger

unread,
Jun 21, 2013, 9:31:45 AM6/21/13
to puppet...@googlegroups.com


On Thursday, June 20, 2013 3:27:03 PM UTC-5, Charlie Brune wrote:
I'm wondering if I have the same question.

I have a laptop that works well with my Puppet Master while I'm at home.  However, when I leave home, puppet no longer is able to apply the manifests (configs) assigned to it.

I was hoping that it would simply continue to apply whatever manifests it knew about while at home before I left.

Should I not be using the Master/Agent technique for using Puppet?


Normally, if the agent is running in daemon mode and fails to retrieve a fresh catalog from the master, it applies the last catalog it successfully did retrieve.  That sounds like what you want.  Make sure the agent is configured with usecacheonfailure = true, either in the config file or on the command line.

I guess it's possible that the agent only falls back to cached catalogs when the master reports a compilation failure, and not when it's unreachable.  That would be odd, and probably worth filing a ticket over.

Do note, however, that parts of a cached catalog that require contact with the master will fail of the master is unreachable.  The most significant such thing that I can think of is File resources with a 'source' parameter (as opposed to a 'content' parameter).


John

Reply all
Reply to author
Forward
0 new messages