Foreman and Puppet - What does what?

As a new user to both The Foreman and Puppet, I am having a hard time
understanding how they interact and compliment each other. I'd like to
understand what each product does on its own, so I can better understand
how they work together. I'd appreciate anyone who could answer any of
these questions.

  1. Most puppet tutorials talk about site.pp and node.pp and demonstrate
    adding nodes to these files. Nodes.pp doesn't exist and site.pp is empty
    on my system. I see if I click on a clients yaml button, it shows the
    classes that will be applied. Where on the puppet server or client is this
    information stored? Or does Foreman store it? How would I create this
    information on Puppet without Foreman?

  2. Most puppet tutorials show a few clients as an example and load all of
    those clients onto the node.pp or site.pp file. I see in Foreman you can
    create Hosts, and Config Groups. Are these a part of Puppet or unique to
    Foreman? If I use these features and remove Foreman, will my clients still
    work, or will they not know what classes to run? If I choose not to use
    Foreman for Puppet management, and have an environment with a 1000 servers,
    do they all have to be in the site.pp or node.pp file individually? Can
    someone provide an example of a large site.pp file or explain how it is
    typically done?

  3. Most puppet tutorials talk about applying modules, but The Foreman
    imports classes. I believe a module contains many classes, so it may not
    make a difference if you import the right class, but I found a module on
    puppetforge that had no classes so it didn't import. Is that a bad module
    or is there a case where a classless modules make sense?

  4. It appears a config group is a way to combine a bunch of classes
    together so they can be applied to a single machine or group of machines.
    When I first heard the term, I thought it was a way of configuring
    programs with different behaviors. In other words, I could have an
    application deploy with different settings based on their config group. If
    I want to deploy an application with different settings to different
    machines, how would I do this?

Thanks in advance for any answers.

> As a new user to both The Foreman and Puppet, I am having a hard time
> understanding how they interact and compliment each other. I'd like to
> understand what each product does on its own, so I can better understand
> how they work together. I'd appreciate anyone who could answer any of
> these questions.
>
>
> 1. Most puppet tutorials talk about site.pp and node.pp and demonstrate
> adding nodes to these files. Nodes.pp doesn't exist and site.pp is
> empty on my system. I see if I click on a clients yaml button, it shows
> the classes that will be applied. Where on the puppet server or client
> is this information stored? Or does Foreman store it? How would I
> create this information on Puppet without Foreman?

Foreman stores the class/host associations in its database, then renders
the YAML on the fly when the button is pressed or the Puppet master
requests it. Without Foreman or another ENC, you'd probably use site.pp.

> 2. Most puppet tutorials show a few clients as an example and load all
> of those clients onto the node.pp or site.pp file. I see in Foreman you
> can create Hosts, and Config Groups. Are these a part of Puppet or
> unique to Foreman? If I use these features and remove Foreman, will my
> clients still work, or will they not know what classes to run?

Those are Foreman features. If you remove Foreman from the equation,
you'll lose the data, so clients won't know which classes + data they
have and you'll need to reimplement it another way.

> If I
> choose not to use Foreman for Puppet management, and have an environment
> with a 1000 servers, do they all have to be in the site.pp or node.pp
> file individually? Can someone provide an example of a large site.pp
> file or explain how it is typically done?

Individually or using regexes, or you could use another ENC.

> 3. Most puppet tutorials talk about applying modules, but The Foreman
> imports classes. I believe a module contains many classes, so it may
> not make a difference if you import the right class, but I found a
> module on puppetforge that had no classes so it didn't import. Is that
> a bad module or is there a case where a classless modules make sense?

Classless modules make sense - they might provide lower level building
blocks, such as defined types or custom types which you can use in other
classes. Or they might provide custom facts or functions which you can
use in your manifests.

> 4. It appears a config group is a way to combine a bunch of classes
> together so they can be applied to a single machine or group of
> machines. When I first heard the term, I thought it was a way of
> configuring programs with different behaviors. In other words, I could
> have an application deploy with different settings based on their config
> group. If I want to deploy an application with different settings to
> different machines, how would I do this?

Use a host group for that, as you can override parameters on your
classes using a host groups. Config groups are useful when you have
lots of classes that you want to add in one click, so you might use them
together - host groups to represent different behaviours (maybe
geographical or organisational), and config groups to represent an
individual profile (like an application stack).

Edit the Puppet class from the Foreman UI, and under the parameters tab
there is an "override" tickbox for each parameter
(http://youtu.be/2dwyzPpFJYQ?t=6m59s). When you check this, you enter a
default value and then when you add that class to a host group
(optionally inside a config group) you can override the default value
under the host group's parameters tab.

··· On 05/09/14 15:06, aarb000@gmail.com wrote:


Dominic Cleal
Red Hat Engineering

Thank you Dominic. Every answer makes perfect sense and I performed a test
with MySql and it all works perfect.

··· On Monday, September 8, 2014 3:40:53 AM UTC-5, Dominic Cleal wrote: > > On 05/09/14 15:06, aar...@gmail.com wrote: > > As a new user to both The Foreman and Puppet, I am having a hard time > > understanding how they interact and compliment each other. I'd like to > > understand what each product does on its own, so I can better understand > > how they work together. I'd appreciate anyone who could answer any of > > these questions. > > > > > > 1. Most puppet tutorials talk about site.pp and node.pp and demonstrate > > adding nodes to these files. Nodes.pp doesn't exist and site.pp is > > empty on my system. I see if I click on a clients yaml button, it shows > > the classes that will be applied. Where on the puppet server or client > > is this information stored? Or does Foreman store it? How would I > > create this information on Puppet without Foreman? > > Foreman stores the class/host associations in its database, then renders > the YAML on the fly when the button is pressed or the Puppet master > requests it. Without Foreman or another ENC, you'd probably use site.pp. > > > 2. Most puppet tutorials show a few clients as an example and load all > > of those clients onto the node.pp or site.pp file. I see in Foreman you > > can create Hosts, and Config Groups. Are these a part of Puppet or > > unique to Foreman? If I use these features and remove Foreman, will my > > clients still work, or will they not know what classes to run? > > Those are Foreman features. If you remove Foreman from the equation, > you'll lose the data, so clients won't know which classes + data they > have and you'll need to reimplement it another way. > > > If I > > choose not to use Foreman for Puppet management, and have an environment > > with a 1000 servers, do they all have to be in the site.pp or node.pp > > file individually? Can someone provide an example of a large site.pp > > file or explain how it is typically done? > > Individually or using regexes, or you could use another ENC. > > > 3. Most puppet tutorials talk about applying modules, but The Foreman > > imports classes. I believe a module contains many classes, so it may > > not make a difference if you import the right class, but I found a > > module on puppetforge that had no classes so it didn't import. Is that > > a bad module or is there a case where a classless modules make sense? > > Classless modules make sense - they might provide lower level building > blocks, such as defined types or custom types which you can use in other > classes. Or they might provide custom facts or functions which you can > use in your manifests. > > > 4. It appears a config group is a way to combine a bunch of classes > > together so they can be applied to a single machine or group of > > machines. When I first heard the term, I thought it was a way of > > configuring programs with different behaviors. In other words, I could > > have an application deploy with different settings based on their config > > group. If I want to deploy an application with different settings to > > different machines, how would I do this? > > Use a host group for that, as you can override parameters on your > classes using a host groups. Config groups are useful when you have > lots of classes that you want to add in one click, so you might use them > together - host groups to represent different behaviours (maybe > geographical or organisational), and config groups to represent an > individual profile (like an application stack). > > Edit the Puppet class from the Foreman UI, and under the parameters tab > there is an "override" tickbox for each parameter > (http://youtu.be/2dwyzPpFJYQ?t=6m59s). When you check this, you enter a > default value and then when you add that class to a host group > (optionally inside a config group) you can override the default value > under the host group's parameters tab. > > -- > Dominic Cleal > Red Hat Engineering >