My setup
Host/Client OS: CentOS 7.0
Foreman version 1.7.3
Puppet version 3.6.2
Here is my question. I have a Foreman/PuppetCA server on one machine,
Puppet master is on another.
On my new client machine, I run "puppet agent --test", I have self signing
turned on. So on my PuppetCA host, I see the entry automatically show up
and all is good.
Foreman, is running on the same host as the PuppetCA. However, it seems to
take 1-2 minutes for that new entry to show up in the web interface under
"all hosts"
I assume there is some type of polling interval from Foreman to the
PuppetCA. I'd like to shorten this time, if possible.
Here's why. I'm using cloud-init to automate building of a bunch of
machines, I want them to automatically register in puppet, set their
hostgroup, and the run puppet again to apply configuration.
Here's what I am doing
NOTE on step #2, I have a special application I wrote that uses the restful
interface into Foreman to set the host_group for the specific host I am
building.
- puppet agent --test #register with Puppet CA, autosign is turned on
- "a special command to set hostgroup in foreman, see NOTE above"
- puppet agent --test #apply that hostgroup's configuration.
So the issue is that if Step #1 goes too quickly. Step #2 fails, because
Foreman still doesn't know about the host.
So I can add a sleep between #1 and #2, but would like to know what the
update interval is between Foreman and the PuppetCA, if I can reduce it.
And hopefully, reduce the amount of time I really need to "sleep"
> My setup
>
> Host/Client OS: CentOS 7.0
> Foreman version 1.7.3
> Puppet version 3.6.2
>
> Here is my question. I have a Foreman/PuppetCA server on one machine,
> Puppet master is on another.
>
> On my new client machine, I run "puppet agent --test", I have self signing
> turned on. So on my PuppetCA host, I see the entry automatically show up
> and all is good.
> Foreman, is running on the same host as the PuppetCA. However, it seems to
> take 1-2 minutes for that new entry to show up in the web interface under
> "all hosts"
>
> I assume there is some type of polling interval from Foreman to the
> PuppetCA. I'd like to shorten this time, if possible.
>
since you didnt provision the host from within foreman, the first time the
entry is visible when puppet run actually starts (with facts and reports
data coming in).
if you would use foreman api to provision the instance (and set the
hostgroup and other attributes) in the first place, you would not need to
enable autosign yourself or to make additional api calls afterwards…
hope this helps,
Ohad
···
On Sun, Apr 26, 2015 at 10:51 PM, Grant Schoep wrote:
Here’s why. I’m using cloud-init to automate building of a bunch of
machines, I want them to automatically register in puppet, set their
hostgroup, and the run puppet again to apply configuration.
Here’s what I am doing
NOTE on step #2, I have a special application I wrote that uses the
restful interface into Foreman to set the host_group for the specific host
I am building.
- puppet agent --test #register with Puppet CA, autosign is turned on
- “a special command to set hostgroup in foreman, see NOTE above”
- puppet agent --test #apply that hostgroup’s configuration.
So the issue is that if Step #1 goes too quickly. Step #2 fails, because
Foreman still doesn’t know about the host.
So I can add a sleep between #1 and #2, but would like to know what the
update interval is between Foreman and the PuppetCA, if I can reduce it.
And hopefully, reduce the amount of time I really need to “sleep”
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.