How does foreman gets hosts environment

Hello there,

I'm pretty new to foreman (about one week) but I find it to be completely
awesome.

I've one question thou: How does foreman get each hosts environment ? Looks
like it get mixed up with environment fact. I've noticed most my hosts get
listed as "production", but a few ones get listed as "prod" (which is the
actual value of fact environment we use around here) and a few others list
as "dev" and "qa" (which are also valid values for environment fact).

Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:

Any hints on this would be greatly appreciated!

AFAIR, you need to have all your hosts under "Production" environment. I am
not sure if there have been changes or if this addresses your issue, but
just fyi.

··· On Thu, Oct 14, 2010 at 9:29 AM, Pablo Borges wrote:

Hello there,

I’m pretty new to foreman (about one week) but I find it to be completely
awesome.

I’ve one question thou: How does foreman get each hosts environment ? Looks
like it get mixed up with environment fact. I’ve noticed most my hosts get
listed as “production”, but a few ones get listed as “prod” (which is the
actual value of fact environment we use around here) and a few others list
as “dev” and “qa” (which are also valid values for environment fact).

Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:

Any hints on this would be greatly appreciated!


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

> Hello there,
>
> I'm pretty new to foreman (about one week) but I find it to be completely
> awesome.
>
> I've one question thou: How does foreman get each hosts environment ? Looks
> like it get mixed up with environment fact. I've noticed most my hosts get
> listed as "production", but a few ones get listed as "prod" (which is the
> actual value of fact environment we use around here) and a few others list
> as "dev" and "qa" (which are also valid values for environment fact).
>
> Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:
>
> Any hints on this would be greatly appreciated!
>
> –
>
Foreman defaults to production environment (as puppet) if none is defined,
so in other words, if your client report their environment, it uses that
(i.e. "prod") or defaults to production.

if you are using Foreman as external nodes classifier, then you need to
select the environment in foreman itself and remove it from the client
configs.

hope this helps.
Ohad

··· On Thu, Oct 14, 2010 at 5:59 AM, Pablo Borges wrote:

You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

> Hello there,
>
> I'm pretty new to foreman (about one week) but I find it to be completely
> awesome.
>
> I've one question thou: How does foreman get each hosts environment ? Looks
> like it get mixed up with environment fact. I've noticed most my hosts get
> listed as "production", but a few ones get listed as "prod" (which is the
> actual value of fact environment we use around here) and a few others list
> as "dev" and "qa" (which are also valid values for environment fact).
>
> Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:
>
> Any hints on this would be greatly appreciated!
>
> –
>
Foreman defaults to production environment (as puppet) if none is defined,
so in other words, if your client report their environment, it uses that
(i.e. "prod") or defaults to production.

if you are using Foreman as external nodes classifier, then you need to
select the environment in foreman itself and remove it from the client
configs.

hope this helps.
Ohad

··· On Thu, Oct 14, 2010 at 5:59 AM, Pablo Borges wrote:

You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

I'm just wondering how my fact environment got into foreman since I don't
use --environment=production or in puppet.conf. :smiley:

Something is mixed up here. :smiley:

··· On Thu, Oct 14, 2010 at 2:51 PM, Ohad Levy wrote:

On Thu, Oct 14, 2010 at 5:59 AM, Pablo Borges pablort@gmail.com wrote:

Hello there,

I’m pretty new to foreman (about one week) but I find it to be completely
awesome.

I’ve one question thou: How does foreman get each hosts environment ?
Looks like it get mixed up with environment fact. I’ve noticed most my hosts
get listed as “production”, but a few ones get listed as “prod” (which is
the actual value of fact environment we use around here) and a few others
list as “dev” and “qa” (which are also valid values for environment fact).

Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:

Any hints on this would be greatly appreciated!

Foreman defaults to production environment (as puppet) if none is defined,
so in other words, if your client report their environment, it uses that
(i.e. “prod”) or defaults to production.

if you are using Foreman as external nodes classifier, then you need to
select the environment in foreman itself and remove it from the client
configs.

hope this helps.
Ohad

You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

I mean, if that was the case, how come I got environments "dev" and "qa"
showing up in foreman ?

··· On Thu, Oct 14, 2010 at 4:33 PM, Pablo Borges wrote:

I’m just wondering how my fact environment got into foreman since I don’t
use --environment=production or in puppet.conf. :smiley:

Something is mixed up here. :smiley:

On Thu, Oct 14, 2010 at 2:51 PM, Ohad Levy ohadlevy@gmail.com wrote:

On Thu, Oct 14, 2010 at 5:59 AM, Pablo Borges pablort@gmail.com wrote:

Hello there,

I’m pretty new to foreman (about one week) but I find it to be completely
awesome.

I’ve one question thou: How does foreman get each hosts environment ?
Looks like it get mixed up with environment fact. I’ve noticed most my hosts
get listed as “production”, but a few ones get listed as “prod” (which is
the actual value of fact environment we use around here) and a few others
list as “dev” and “qa” (which are also valid values for environment fact).

Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:

Any hints on this would be greatly appreciated!

Foreman defaults to production environment (as puppet) if none is defined,
so in other words, if your client report their environment, it uses that
(i.e. “prod”) or defaults to production.

if you are using Foreman as external nodes classifier, then you need to
select the environment in foreman itself and remove it from the client
configs.

hope this helps.
Ohad

You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

did a host was associated with environment, or do you just see them in
Foreman?

When you import your puppet classes and modules, Foreman also learn about
the environments (and which class / module exists in which environment).

Ohad

··· On Thu, Oct 14, 2010 at 9:34 PM, Pablo Borges wrote:

I mean, if that was the case, how come I got environments “dev” and "qa"
showing up in foreman ?

On Thu, Oct 14, 2010 at 4:33 PM, Pablo Borges pablort@gmail.com wrote:

I’m just wondering how my fact environment got into foreman since I don’t
use --environment=production or in puppet.conf. :smiley:

Something is mixed up here. :smiley:

On Thu, Oct 14, 2010 at 2:51 PM, Ohad Levy ohadlevy@gmail.com wrote:

On Thu, Oct 14, 2010 at 5:59 AM, Pablo Borges pablort@gmail.com wrote:

Hello there,

I’m pretty new to foreman (about one week) but I find it to be
completely awesome.

I’ve one question thou: How does foreman get each hosts environment ?
Looks like it get mixed up with environment fact. I’ve noticed most my hosts
get listed as “production”, but a few ones get listed as “prod” (which is
the actual value of fact environment we use around here) and a few others
list as “dev” and “qa” (which are also valid values for environment fact).

Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:

Any hints on this would be greatly appreciated!

Foreman defaults to production environment (as puppet) if none is
defined, so in other words, if your client report their environment, it uses
that (i.e. “prod”) or defaults to production.

if you are using Foreman as external nodes classifier, then you need to
select the environment in foreman itself and remove it from the client
configs.

hope this helps.
Ohad

You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

My understanding is:

  • "environment" is a puppet concept described here:
    http://docs.puppetlabs.com/guides/environment.html
  • foreman only uses this for when you use it, foreman, to run puppet
    remotely, in which case foreman will specify the environment the
    client should claim to be part of when it runs it.
  • I don't know how foreman decides what environment a new host is in,
    if you did not select it manually in the GUI, but "production" is the
    default in puppet and apparently foreman as well.

In my case, using soredconfigs and mysql backend, I just added a new
host, outside of foreman GUI, and it instantly appeared in the GUI,
along with its reports and facts… but with the environment variable
empty, even though the new host had the environment fact set to
"testing"

Mohamed.

··· On Thu, Oct 14, 2010 at 4:08 PM, Pablo Borges wrote: > Could you help me out understading what an environment is ? Is it a default > fact from puppet (if that's the case, we must change our fact name to > something else).

Could you help me out understading what an environment is ? Is it a default
fact from puppet (if that's the case, we must change our fact name to
something else).

If I run facter environment on my hosts, the answers I get are: prod, dev
and qa. There's not a "production" anywhere, still, foreman sees the fact
environment as "production" on most hosts. Just a couple follow the actual
fact.

Im just wondering how foreman determines the environment.

··· On Thu, Oct 14, 2010 at 4:56 PM, Ohad Levy wrote:

did a host was associated with environment, or do you just see them in
Foreman?

When you import your puppet classes and modules, Foreman also learn about
the environments (and which class / module exists in which environment).

Ohad

On Thu, Oct 14, 2010 at 9:34 PM, Pablo Borges pablort@gmail.com wrote:

I mean, if that was the case, how come I got environments “dev” and "qa"
showing up in foreman ?

On Thu, Oct 14, 2010 at 4:33 PM, Pablo Borges pablort@gmail.com wrote:

I’m just wondering how my fact environment got into foreman since I don’t
use --environment=production or in puppet.conf. :smiley:

Something is mixed up here. :smiley:

On Thu, Oct 14, 2010 at 2:51 PM, Ohad Levy ohadlevy@gmail.com wrote:

On Thu, Oct 14, 2010 at 5:59 AM, Pablo Borges pablort@gmail.comwrote:

Hello there,

I’m pretty new to foreman (about one week) but I find it to be
completely awesome.

I’ve one question thou: How does foreman get each hosts environment ?
Looks like it get mixed up with environment fact. I’ve noticed most my hosts
get listed as “production”, but a few ones get listed as “prod” (which is
the actual value of fact environment we use around here) and a few others
list as “dev” and “qa” (which are also valid values for environment fact).

Puppet 0.25 on clients and 0.26 on server. Foreman 0.15. :smiley:

Any hints on this would be greatly appreciated!

Foreman defaults to production environment (as puppet) if none is
defined, so in other words, if your client report their environment, it uses
that (i.e. “prod”) or defaults to production.

if you are using Foreman as external nodes classifier, then you need to
select the environment in foreman itself and remove it from the client
configs.

hope this helps.
Ohad

You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.