Import existing puppet nodes into foreman

> Hi,
> I am a bit confused by all the info I found when googling "foreman
> puppet import" , more specifically, in order to add an existing agent to
> Foreman, do I need to import classes from old puppet server ?
> Is "external node" the old puppet server or the puppet client/agent ??

If you have done a complete Foreman install with a puppetmaster (the
default Foreman installer setup), then yes, you will want to add the
modules from your old puppetmaster to the new one.

Once you've done that, you can import them from Foreman, which will then
show all of your puppet classes in the web interface.

This screencast shows the process from after you've installed Foreman,
downloading a module (copying in your case) and importing classes:

"External node" refers to a Puppet feature that allows an external
system (Foreman in this case) to instruct Puppet to include certain
classes on a host. When you add classes to a host in the Foreman UI,
this is what's used.

> Is there any way to import exiting puppet nodes into a brand new foreman ?
> This one is a bit
> confusing
> Any chance one of you nice guys can provide clear instructions …or a
> link to a tutorial

To take an existing host, you should change its puppet.conf file to
point at your new puppetmaster on the Foreman host. Either change or
add a "server =" line in puppet.conf.

You would need to delete the old certificates on the agent, and sign the
certificates on the new puppetmaster (puppet cert sign, or use the
Foreman UI, under More > Smart Proxies > Certificates).

> Here is a description/explanation - I hope it is clear enough
> I have deployed puppet on few Windows machines using "regular" puppetmaster
> This is the manifest:
> node '' {
> file { 'testfile.txt':
> ensure => present,
> path => 'c:/temp/testfile.txt',
> content => "I'm a test file.",
> }

Using Foreman as an external node classifier means it replaces these
node { } definitions. I'd suggest moving file resources like this into
a module and class, then adding that class to the host (or a hostgroup)
in Foreman so it's applied to that host again.

You can disable the external node mechanism in the puppetmaster's
puppet.conf, but then you lose the power of the Foreman UI to manage the
classes on your hosts.

··· On 25/04/13 21:14, Steven Vacaroaia wrote:

Dominic Cleal
Red Hat Engineering