Node classifier

Hey there,

I'm very new to foreman however I am very comfy with puppet. Our
environment has grown large enough to warrant an external nodes
classifier and I decided to go with foreman over dashboard. I do plan
on using the build features of foreman at some point, however at the
moment I'm mainly concerned with using foreman as a node classifier.
Is there a way to define a new node without 'managing' the host (i.e.,
supplying partition table, MAC address, etc)? Any assistance would be
appreciated, thanks!

Try:

:unattended: false

… in your settings.yaml.

Josh

··· On Wed, May 18, 2011 at 8:56 AM, Luke Baker wrote: > Hey there, > > I'm very new to foreman however I am very comfy with puppet. Our > environment has grown large enough to warrant an external nodes > classifier and I decided to go with foreman over dashboard. I do plan > on using the build features of foreman at some point, however at the > moment I'm mainly concerned with using foreman as a node classifier. > Is there a way to define a new node without 'managing' the host (i.e., > supplying partition table, MAC address, etc)? Any assistance would be > appreciated, thanks! > > -- > 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.com. > For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en. > >

> Hey there,
>
> I'm very new to foreman however I am very comfy with puppet. Our
> environment has grown large enough to warrant an external nodes
> classifier and I decided to go with foreman over dashboard. I do plan
> on using the build features of foreman at some point, however at the
> moment I'm mainly concerned with using foreman as a node classifier.
> Is there a way to define a new node without 'managing' the host (i.e.,
> supplying partition table, MAC address, etc)? Any assistance would be
> appreciated, thanks!
>
>
Welcome!

http://theforeman.org/projects/foreman/wiki/FAQ#I-dont-want-to-use-Foreman-for-unattended-installations-can-I-disable-it

··· On Wed, May 18, 2011 at 4:56 PM, Luke Baker 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.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Thanks for the help!

I'm able to define nodes now, however it still seems like my nodes are
unable to find themselves on the puppet master

Here's the output I'm seeing from a puppet run,

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not find default node or by name with 'bakerlu-
sb.missouri.edu, bakerlu-sb.missouri, bakerlu-sb' on node bakerlu-
sb.missouri.edu
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping ru

In this example, 'bakerlu-sb.missouri.edu' is defined and I'm able to
grab its YAML from nodes.rb

/etc/puppet/node.rb bakerlu-sb.missouri.edu

··· --- parameters: puppetmaster: puppet-dev.iats.missouri.edu fragments: "web.erb, mysql.erb, dbas.erb" classes: - testing environment: production

I feel like I’m missing something pretty obvious : )

On May 18, 9:19 am, Ohad Levy ohadl...@gmail.com wrote:

On Wed, May 18, 2011 at 4:56 PM, Luke Baker akaba...@gmail.com wrote:

Hey there,

I’m very new to foreman however I am very comfy with puppet. Our
environment has grown large enough to warrant an external nodes
classifier and I decided to go with foreman over dashboard. I do plan
on using the build features of foreman at some point, however at the
moment I’m mainly concerned with using foreman as a node classifier.
Is there a way to define a new node without ‘managing’ the host (i.e.,
supplying partition table, MAC address, etc)? Any assistance would be
appreciated, thanks!

Welcome!

FAQ - Foreman


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.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

> Thanks for the help!
>
> I'm able to define nodes now, however it still seems like my nodes are
> unable to find themselves on the puppet master
>
> Here's the output I'm seeing from a puppet run,
>
> err: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Could not find default node or by name with 'bakerlu-
> sb.missouri.edu, bakerlu-sb.missouri, bakerlu-sb' on node bakerlu-
> sb.missouri.edu
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping ru
>
> In this example, 'bakerlu-sb.missouri.edu' is defined and I'm able to
> grab its YAML from nodes.rb
>
> /etc/puppet/node.rb bakerlu-sb.missouri.edu
> —
> parameters:
> puppetmaster: puppet-dev.iats.missouri.edu
> fragments: "web.erb, mysql.erb, dbas.erb"
> classes:
> - testing
> environment: production
>
>
> I feel like I'm missing something pretty obvious : )
>
> do you still have node statements for that host? maybe it would help if you
paste your puppet configurations…

Ohad

··· On Wed, May 18, 2011 at 6:53 PM, Luke Baker wrote:

On May 18, 9:19 am, Ohad Levy ohadl...@gmail.com wrote:

On Wed, May 18, 2011 at 4:56 PM, Luke Baker akaba...@gmail.com wrote:

Hey there,

I’m very new to foreman however I am very comfy with puppet. Our
environment has grown large enough to warrant an external nodes
classifier and I decided to go with foreman over dashboard. I do plan
on using the build features of foreman at some point, however at the
moment I’m mainly concerned with using foreman as a node classifier.
Is there a way to define a new node without ‘managing’ the host (i.e.,
supplying partition table, MAC address, etc)? Any assistance would be
appreciated, thanks!

Welcome!

FAQ - Foreman


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.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.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Classic rookie mistake (I made the same one).

  1. Remove everything from node.pp or just comment everything out and let foreman determine which classes belong to which host.
  2. Its mandatory that you switch to using modules. If you have classes defined in /etc/puppet/manifests you will need to convert them to modules.
    a. Easiest way is to create a one module with all your classes in that module
    b. mkdir -p /etc/puppet/modules/bighonkinmodule/manifests, then move your classes inside the /etc/puppet/modules/bighonkinmodule/manifests directory
    1. create an init.pp file in the manifests directory as well and define class with the same name as the module name.
    c. or use puppet-module generate function to create all the module directories for you.
    1. gem install puppet-module
    2. puppet-module generate myname-modulename (must be in this format)
    3. Now throw in all your classes from /etc/puppet/manifests

I would suggest you read up on modules since this is the how foreman and puppet work (as well as dashboard). You can also find a lot of 3rd party modules on github. I usually follow these steps when downloading a module:

  1. Wow, look at this cool module I found at blah blah blah.com or github.com/blahblah
  2. cd /etc/puppet/modules
  3. git clone git://github.com/blahblah.git
  4. Always inspect the module after download to make sure it wont' clobber your environment

As far as defining a default node: I think the node.rb file has to be hand edited but I am not exactly sure. When using foreman you loose the default node ability so the only way to get it back is to hand edit the node classifier. (Somebody please chime in and correct me and show an example).

You also lose the ability to inherit nodes like you did with node.pp. However, you can pretty much do the same thing by creating a module that includes other modules and classes.

Corey

··· On May 18, 2011, at 10:05 AM, Ohad Levy wrote:

On Wed, May 18, 2011 at 6:53 PM, Luke Baker akabaker@gmail.com wrote:
Thanks for the help!

I’m able to define nodes now, however it still seems like my nodes are
unable to find themselves on the puppet master

Here’s the output I’m seeing from a puppet run,

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not find default node or by name with ‘bakerlu-
sb.missouri.edu, bakerlu-sb.missouri, bakerlu-sb’ on node bakerlu-
sb.missouri.edu
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping ru

In this example, ‘bakerlu-sb.missouri.edu’ is defined and I’m able to
grab its YAML from nodes.rb

/etc/puppet/node.rb bakerlu-sb.missouri.edu

parameters:
puppetmaster: puppet-dev.iats.missouri.edu
fragments: "web.erb, mysql.erb, dbas.erb"
classes:

  • testing
    environment: production

I feel like I’m missing something pretty obvious : )

do you still have node statements for that host? maybe it would help if you paste your puppet configurations…

Ohad
On May 18, 9:19 am, Ohad Levy ohadl...@gmail.com wrote:

On Wed, May 18, 2011 at 4:56 PM, Luke Baker akaba...@gmail.com wrote:

Hey there,

I’m very new to foreman however I am very comfy with puppet. Our
environment has grown large enough to warrant an external nodes
classifier and I decided to go with foreman over dashboard. I do plan
on using the build features of foreman at some point, however at the
moment I’m mainly concerned with using foreman as a node classifier.
Is there a way to define a new node without ‘managing’ the host (i.e.,
supplying partition table, MAC address, etc)? Any assistance would be
appreciated, thanks!

Welcome!

FAQ - Foreman


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.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.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.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.

[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

node_terminus = exec
external_nodes = /etc/puppet/node.rb

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate puppet executable using the --loadclasses
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig

# Allows for the sync of custom facts
pluginsync = true

# Send reports to the puppet master
report = true

[master]
reports = foreman
storeconfigs = true
#fact_terminus = inventory_active_record
dbadapter = mysql
dbuser = <dbuser>
dbname = <dbname>
dbpassword = <pass>
dbserver = <dbhost>

··· On May 18, 12:05 pm, Ohad Levy wrote: > On Wed, May 18, 2011 at 6:53 PM, Luke Baker wrote: > > Thanks for the help! > > > I'm able to define nodes now, however it still seems like my nodes are > > unable to find themselves on the puppet master > > > Here's the output I'm seeing from a puppet run, > > > err: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Could not find default node or by name with 'bakerlu- > > sb.missouri.edu, bakerlu-sb.missouri, bakerlu-sb' on node bakerlu- > > sb.missouri.edu > > warning: Not using cache on failed catalog > > err: Could not retrieve catalog; skipping ru > > > In this example, 'bakerlu-sb.missouri.edu' is defined and I'm able to > > grab its YAML from nodes.rb > > > /etc/puppet/node.rb bakerlu-sb.missouri.edu > > --- > > parameters: > > puppetmaster: puppet-dev.iats.missouri.edu > > fragments: "web.erb, mysql.erb, dbas.erb" > > classes: > > - testing > > environment: production > > > I feel like I'm missing something pretty obvious : ) > > > do you still have node statements for that host? maybe it would help if you > > paste your puppet configurations.. > > Ohad > > > > > > > > > On May 18, 9:19 am, Ohad Levy wrote: > > > On Wed, May 18, 2011 at 4:56 PM, Luke Baker wrote: > > > > Hey there, > > > > > I'm very new to foreman however I am very comfy with puppet. Our > > > > environment has grown large enough to warrant an external nodes > > > > classifier and I decided to go with foreman over dashboard. I do plan > > > > on using the build features of foreman at some point, however at the > > > > moment I'm mainly concerned with using foreman as a node classifier. > > > > Is there a way to define a new node without 'managing' the host (i.e., > > > > supplying partition table, MAC address, etc)? Any assistance would be > > > > appreciated, thanks! > > > > Welcome! > > > >http://theforeman.org/projects/foreman/wiki/FAQ#I-dont-want-to-use-Fo... > > > > > -- > > > > 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.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.com. > > For more options, visit this group at > >http://groups.google.com/group/foreman-users?hl=en.

I think I have it figured out. I had some import statements in my
site.pp (i.e., import classes/, definitions/). Thanks again for the
assistance, you guys respond very quickly!

··· On May 18, 1:07 pm, Corey Osman wrote: > Classic rookie mistake (I made the same one). > > 1. Remove everything from node.pp or just comment everything out and let foreman determine which classes belong to which host. > 2. Its mandatory that you switch to using modules. If you have classes defined in /etc/puppet/manifests you will need to convert them to modules. > a. Easiest way is to create a one module with all your classes in that module > b. mkdir -p /etc/puppet/modules/bighonkinmodule/manifests, then move your classes inside the /etc/puppet/modules/bighonkinmodule/manifests directory > 1. create an init.pp file in the manifests directory as well and define class with the same name as the module name. > c. or use puppet-module generate function to create all the module directories for you. > 1. gem install puppet-module > 2. puppet-module generate myname-modulename (must be in this format) > 3. Now throw in all your classes from /etc/puppet/manifests > > I would suggest you read up on modules since this is the how foreman and puppet work (as well as dashboard). You can also find a lot of 3rd party modules on github. I usually follow these steps when downloading a module: > > 1. Wow, look at this cool module I found at blah blah blah.com or github.com/blahblah > 2. cd /etc/puppet/modules > 3. git clone git://github.com/blahblah.git > 4. Always inspect the module after download to make sure it wont' clobber your environment > > As far as defining a default node: I think the node.rb file has to be hand edited but I am not exactly sure. When using foreman you loose the default node ability so the only way to get it back is to hand edit the node classifier. (Somebody please chime in and correct me and show an example). > > You also lose the ability to inherit nodes like you did with node.pp. However, you can pretty much do the same thing by creating a module that includes other modules and classes. > > Corey > > On May 18, 2011, at 10:05 AM, Ohad Levy wrote: > > > > > > > > > > > On Wed, May 18, 2011 at 6:53 PM, Luke Baker wrote: > > Thanks for the help! > > > I'm able to define nodes now, however it still seems like my nodes are > > unable to find themselves on the puppet master > > > Here's the output I'm seeing from a puppet run, > > > err: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Could not find default node or by name with 'bakerlu- > > sb.missouri.edu, bakerlu-sb.missouri, bakerlu-sb' on node bakerlu- > > sb.missouri.edu > > warning: Not using cache on failed catalog > > err: Could not retrieve catalog; skipping ru > > > In this example, 'bakerlu-sb.missouri.edu' is defined and I'm able to > > grab its YAML from nodes.rb > > > /etc/puppet/node.rb bakerlu-sb.missouri.edu > > --- > > parameters: > > puppetmaster: puppet-dev.iats.missouri.edu > > fragments: "web.erb, mysql.erb, dbas.erb" > > classes: > > - testing > > environment: production > > > I feel like I'm missing something pretty obvious : ) > > > do you still have node statements for that host? maybe it would help if you paste your puppet configurations.. > > > Ohad > > On May 18, 9:19 am, Ohad Levy wrote: > > > On Wed, May 18, 2011 at 4:56 PM, Luke Baker wrote: > > > > Hey there, > > > > > I'm very new to foreman however I am very comfy with puppet. Our > > > > environment has grown large enough to warrant an external nodes > > > > classifier and I decided to go with foreman over dashboard. I do plan > > > > on using the build features of foreman at some point, however at the > > > > moment I'm mainly concerned with using foreman as a node classifier. > > > > Is there a way to define a new node without 'managing' the host (i.e., > > > > supplying partition table, MAC address, etc)? Any assistance would be > > > > appreciated, thanks! > > > > Welcome! > > > >http://theforeman.org/projects/foreman/wiki/FAQ#I-dont-want-to-use-Fo... > > > > > -- > > > > 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.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.com. > > For more options, visit this group athttp://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.com. > > For more options, visit this group athttp://groups.google.com/group/foreman-users?hl=en.