Nodes can't see global parameters

Hello Everyone,

I'm pretty new to puppet and foreman ( about 2 weeks ) but I find
them to be great tools.

This is my test environment:

Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes
cent0S and RHEL5.5. I set up ENC following the instructions on foreman
website.
Everything worked fine except my nodes can't node see the values of
global parameters.

When I click on (Foreman Interface)YAML link or execute (puppetmaster
command line)/etc/puppet/node.rb <nodename> I can see all values but
my configuration on the nodes are failing because they can't see the
values of my global parameters.

Does anyone know what I am missing ?

Any suggestions on the this would be greatly appreciated

Cheers,
Raquel.

Puppet.conf

[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 &#39;$vardir/run&#39;.
rundir = /var/run/puppet

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

[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 &#39;$confdir/localconfig&#39;.
localconfig = $vardir/localconfig

[master]
storeconfigs = true
dbadapter = mysql
dbuser = puppet
dbpassword = puppet
dbserver = localhost
dbsocket = /var/lib/mysql/mysql.sock
rrddir=/var/lib/puppet/rrd
rrdinterval=$runinterval
rrdgraph=true

# Enable reporting for Foreman

reports=log, foreman
autosing = true

Actitivate external node classifier

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

node.rb

#! /usr/bin/ruby

a simple script which fetches external nodes from Foreman

you can basically use anything that knows how to get http data, e.g.

wget/curl etc.

Foreman url

foreman_url="http://xx.xx.xx.xx:3000"

require 'yaml'
require 'uri'
require 'net/http'

foreman_url += "/node/#{ARGV[0]}?format=yml"
url = URI.parse(foreman_url)
$stdout.puts "%s:%s%s" % [ url.host, url.port, url.path]
req = Net::HTTP::Get.new(foreman_url)
res = Net::HTTP.start(url.host, url.port) {|http| http.request(req)}

case res
when Net::HTTPOK
puts res.body
else
$stderr.puts "Error retrieving node %s: %s" % [ARGV[0], res.class]
end

> Hello Everyone,
>
> I'm pretty new to puppet and foreman ( about 2 weeks ) but I find
> them to be great tools.
>
> This is my test environment:
>
> Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes
> cent0S and RHEL5.5. I set up ENC following the instructions on foreman
> website.
> Everything worked fine except my nodes can't node see the values of
> global parameters.
>
> When I click on (Foreman Interface)YAML link or execute (puppetmaster
> command line)/etc/puppet/node.rb <nodename> I can see all values but
> my configuration on the nodes are failing because they can't see the
> values of my global parameters.
>
> Does anyone know what I am missing ?
>
> Any suggestions on the this would be greatly appreciated

··· On Aug 30, 2011, at 2:56 AM, queca wrote: ---- where do these global parameters exist?

Craig

Added it using settings -> global parameters and then make reference
on the init.pp

Inside of /etc/puppet/modules/ciserver/manifest/init.pp

class ciserver {

$javaversion = "1.6.0_16"
$jdkrpmlocation = "http://${download_server}/com/sun/jdk/6u16/
jdk-6u16-i586.rpm"

include sunjdk

$jenkinsversion = "1.427-1.1"
$jenkinsrpmlocation = "http://${download_server}/com/jenkins/jenkins/
1.427-1.1/jenkins-1.427-1.1.rpm"

include jenkins

}

··· On Aug 30, 4:07 pm, Craig White wrote: > On Aug 30, 2011, at 2:56 AM, queca wrote: > > > > > > > > > > > Hello Everyone, > > > I'm pretty new to puppet and foreman ( about 2 weeks ) but I find > > them to be great tools. > > > This is my test environment: > > > Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes > > cent0S and RHEL5.5. I set up ENC following the instructions on foreman > > website. > > Everything worked fine except my nodes can't node see the values of > > global parameters. > > > When I click on (Foreman Interface)YAML link or execute (puppetmaster > > command line)/etc/puppet/node.rb I can see all values but > > my configuration on the nodes are failing because they can't see the > > values of my global parameters. > > > Does anyone know what I am missing ? > > > Any suggestions on the this would be greatly appreciated > > ---- > where do these global parameters exist? > > Craig

does class ciserver show up in foreman? Is it assigned to the nodes in question?

Craig

··· On Aug 30, 2011, at 8:38 AM, queca wrote:

Added it using settings -> global parameters and then make reference
on the init.pp

Inside of /etc/puppet/modules/ciserver/manifest/init.pp

class ciserver {

$javaversion = “1.6.0_16”
$jdkrpmlocation = “http://${download_server}/com/sun/jdk/6u16/
jdk-6u16-i586.rpm”

include sunjdk

$jenkinsversion = “1.427-1.1”
$jenkinsrpmlocation = “http://${download_server}/com/jenkins/jenkins/
1.427-1.1/jenkins-1.427-1.1.rpm”

include jenkins

}

On Aug 30, 4:07 pm, Craig White craig.wh...@ttiltd.com wrote:

On Aug 30, 2011, at 2:56 AM, queca wrote:

Hello Everyone,

I’m pretty new to puppet and foreman ( about 2 weeks ) but I find
them to be great tools.

This is my test environment:

Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes
cent0S and RHEL5.5. I set up ENC following the instructions on foreman
website.
Everything worked fine except my nodes can’t node see the values of
global parameters.

When I click on (Foreman Interface)YAML link or execute (puppetmaster
command line)/etc/puppet/node.rb I can see all values but
my configuration on the nodes are failing because they can’t see the
values of my global parameters.

Does anyone know what I am missing ?

Any suggestions on the this would be greatly appreciated


where do these global parameters exist?

Craig

Do you have something like this in your puppet.conf:
external_nodes=/etc/puppet/external_node.rb

Can you paste that script here ?

Cheers,
Marcello

··· -----Original Message----- From: foreman-users@googlegroups.com [mailto:foreman-users@googlegroups.com] On Behalf Of queca Sent: dinsdag 30 augustus 2011 17:38 To: Foreman users Subject: [foreman-users] Re: Nodes can't see global parameters

Added it using settings -> global parameters and then make reference
on the init.pp

Inside of /etc/puppet/modules/ciserver/manifest/init.pp

class ciserver {

$javaversion = “1.6.0_16”
$jdkrpmlocation = “http://${download_server}/com/sun/jdk/6u16/
jdk-6u16-i586.rpm”

include sunjdk

$jenkinsversion = “1.427-1.1”
$jenkinsrpmlocation = “http://${download_server}/com/jenkins/jenkins/
1.427-1.1/jenkins-1.427-1.1.rpm”

include jenkins

}

On Aug 30, 4:07 pm, Craig White craig.wh...@ttiltd.com wrote:

On Aug 30, 2011, at 2:56 AM, queca wrote:

Hello Everyone,

I’m pretty new to puppet and foreman ( about 2 weeks ) but I find
them to be great tools.

This is my test environment:

Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes
cent0S and RHEL5.5. I set up ENC following the instructions on foreman
website.
Everything worked fine except my nodes can’t node see the values of
global parameters.

When I click on (Foreman Interface)YAML link or execute (puppetmaster
command line)/etc/puppet/node.rb I can see all values but
my configuration on the nodes are failing because they can’t see the
values of my global parameters.

Does anyone know what I am missing ?

Any suggestions on the this would be greatly appreciated


where do these global parameters exist?

Craig


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 Marcelo,

I do have those line in my puppet.conf

Actitivate external node classifier

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

[node.rb]
node.rb
#! /usr/bin/ruby

a simple script which fetches external nodes from Foreman

you can basically use anything that knows how to get http data,

e.g.
wget/curl etc.

Foreman url

foreman_url="http://xx.xx.xx.xx:3000"
require 'yaml'
require 'uri'
require 'net/http'
foreman_url += "/node/#{ARGV[0]}?format=yml"
url = URI.parse(foreman_url)
$stdout.puts "%s:%s%s" % [ url.host, url.port, url.path]
req = Net::HTTP::Get.new(foreman_url)
res = Net::HTTP.start(url.host, url.port) {|http| http.request(req)}
case res
when Net::HTTPOK
puts res.body
else
$stderr.puts "Error retrieving node %s: %s" % [ARGV[0], res.class]
end

Thanks,
Raquel.

··· On Aug 30, 4:46 pm, "Marcello de Sousa" wrote: > Do you have something like this in your puppet.conf: > external_nodes=/etc/puppet/external_node.rb > > Can you paste that script here ? > > Cheers, > Marcello > > > > > > > > -----Original Message----- > From: foreman-users@googlegroups.com [mailto:foreman-users@googlegroups.com] > > On Behalf Of queca > Sent: dinsdag 30 augustus 2011 17:38 > To: Foreman users > Subject: [foreman-users] Re: Nodes can't see global parameters > > Added it using settings -> global parameters and then make reference > on the init.pp > > Inside of /etc/puppet/modules/ciserver/manifest/init.pp > > class ciserver { > > $javaversion = "1.6.0_16" > $jdkrpmlocation = "http://${download_server}/com/sun/jdk/6u16/ > jdk-6u16-i586.rpm" > > include sunjdk > > $jenkinsversion = "1.427-1.1" > $jenkinsrpmlocation = "http://${download_server}/com/jenkins/jenkins/ > 1.427-1.1/jenkins-1.427-1.1.rpm" > > include jenkins > > } > > On Aug 30, 4:07 pm, Craig White wrote: > > On Aug 30, 2011, at 2:56 AM, queca wrote: > > > > Hello Everyone, > > > > I'm pretty new to puppet and foreman ( about 2 weeks ) but I find > > > them to be great tools. > > > > This is my test environment: > > > > Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes > > > cent0S and RHEL5.5. I set up ENC following the instructions on foreman > > > website. > > > Everything worked fine except my nodes can't node see the values of > > > global parameters. > > > > When I click on (Foreman Interface)YAML link or execute (puppetmaster > > > command line)/etc/puppet/node.rb I can see all values but > > > my configuration on the nodes are failing because they can't see the > > > values of my global parameters. > > > > Does anyone know what I am missing ? > > > > Any suggestions on the this would be greatly appreciated > > > ---- > > where do these global parameters exist? > > > Craig > > -- > 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.

Yes, it does.

Here it is the yaml details for my node.

curl -k http://xxx.xxx.xx.xx:3000/node/node2.example.xx.xx?format=yml

··· --- parameters: puppetmaster: puppet download_server: test classes: - ciserver environment: production

On Aug 30, 5:01 pm, Craig White craig.wh...@ttiltd.com wrote:

does class ciserver show up in foreman? Is it assigned to the nodes in question?

Craig

On Aug 30, 2011, at 8:38 AM, queca wrote:

Added it using settings -> global parameters and then make reference
on the init.pp

Inside of /etc/puppet/modules/ciserver/manifest/init.pp

class ciserver {

$javaversion = “1.6.0_16”
$jdkrpmlocation = “http://${download_server}/com/sun/jdk/6u16/
jdk-6u16-i586.rpm”

include sunjdk

$jenkinsversion = “1.427-1.1”
$jenkinsrpmlocation = “http://${download_server}/com/jenkins/jenkins/
1.427-1.1/jenkins-1.427-1.1.rpm”

include jenkins

}

On Aug 30, 4:07 pm, Craig White craig.wh...@ttiltd.com wrote:

On Aug 30, 2011, at 2:56 AM, queca wrote:

Hello Everyone,

I’m pretty new to puppet and foreman ( about 2 weeks ) but I find
them to be great tools.

This is my test environment:

Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes
cent0S and RHEL5.5. I set up ENC following the instructions on foreman
website.
Everything worked fine except my nodes can’t node see the values of
global parameters.

When I click on (Foreman Interface)YAML link or execute (puppetmaster
command line)/etc/puppet/node.rb I can see all values but
my configuration on the nodes are failing because they can’t see the
values of my global parameters.

Does anyone know what I am missing ?

Any suggestions on the this would be greatly appreciated


where do these global parameters exist?

Craig

OK - sorry, perhaps I should have figured this out with your previous answer.

http://docs.puppetlabs.com/guides/parameterized_classes.html

Though I tend to handle things differently because I use foreman.

I have 'Host Group' and to that I add the parameters that I need and I tend to reference them with 'case' statements but I think you can reference them as $::PARAMETER

example
Name: javaversion Value: 1.6.0_16
Name: jdkrpmlocation Value: http://${download_server}/com/sun/jdk/6u16/jdk-6u16-i586.rpm

or you could actually put those parameters on individual nodes and not bother with 'Host Group' at all

Hope this helps

Craig

··· On Aug 30, 2011, at 9:05 AM, queca wrote:

Yes, it does.

Here it is the yaml details for my node.

curl -k http://xxx.xxx.xx.xx:3000/node/node2.example.xx.xx?format=yml

parameters:
puppetmaster: puppet
download_server: test
classes:

  • ciserver
    environment: production

On Aug 30, 5:01 pm, Craig White craig.wh...@ttiltd.com wrote:

does class ciserver show up in foreman? Is it assigned to the nodes in question?

Craig

On Aug 30, 2011, at 8:38 AM, queca wrote:

Added it using settings -> global parameters and then make reference
on the init.pp

Inside of /etc/puppet/modules/ciserver/manifest/init.pp

class ciserver {

$javaversion = “1.6.0_16”
$jdkrpmlocation = “http://${download_server}/com/sun/jdk/6u16/
jdk-6u16-i586.rpm”

include sunjdk

$jenkinsversion = “1.427-1.1”
$jenkinsrpmlocation = “http://${download_server}/com/jenkins/jenkins/
1.427-1.1/jenkins-1.427-1.1.rpm”

include jenkins

}

On Aug 30, 4:07 pm, Craig White craig.wh...@ttiltd.com wrote:

On Aug 30, 2011, at 2:56 AM, queca wrote:

Hello Everyone,

I’m pretty new to puppet and foreman ( about 2 weeks ) but I find
them to be great tools.

This is my test environment:

Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes
cent0S and RHEL5.5. I set up ENC following the instructions on foreman
website.
Everything worked fine except my nodes can’t node see the values of
global parameters.

When I click on (Foreman Interface)YAML link or execute (puppetmaster
command line)/etc/puppet/node.rb I can see all values but
my configuration on the nodes are failing because they can’t see the
values of my global parameters.

Does anyone know what I am missing ?

Any suggestions on the this would be greatly appreciated


where do these global parameters exist?

Craig


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.


Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

Thank you so much Craig,

After added the parameters directly to the node everything worked. :))

Rgds,
Raquel.

··· On Aug 30, 8:33 pm, Craig White wrote: > OK - sorry, perhaps I should have figured this out with your previous answer. > > http://docs.puppetlabs.com/guides/parameterized_classes.html > > Though I tend to handle things differently because I use foreman. > > I have 'Host Group' and to that I add the parameters that I need and I tend to reference them with 'case' statements but I think you can reference them as $::PARAMETER > > example > Name: javaversion Value: 1.6.0_16 > Name: jdkrpmlocation Value: http://${download_server}/com/sun/jdk/6u16/jdk-6u16-i586.rpm > > or you could actually put those parameters on individual nodes and not bother with 'Host Group' at all > > Hope this helps > > Craig > > On Aug 30, 2011, at 9:05 AM, queca wrote: > > > > > > > > > > > Yes, it does. > > > Here it is the yaml details for my node. > > > curl -khttp://xxx.xxx.xx.xx:3000/node/node2.example.xx.xx?format=yml > > --- > > parameters: > > puppetmaster: puppet > > download_server: test > > classes: > > - ciserver > > environment: production > > > On Aug 30, 5:01 pm, Craig White wrote: > >> does class ciserver show up in foreman? Is it assigned to the nodes in question? > > >> Craig > > >> On Aug 30, 2011, at 8:38 AM, queca wrote: > > >>> Added it using settings -> global parameters and then make reference > >>> on the init.pp > > >>> Inside of /etc/puppet/modules/ciserver/manifest/init.pp > > >>> class ciserver { > > >>> $javaversion = "1.6.0_16" > >>> $jdkrpmlocation = "http://${download_server}/com/sun/jdk/6u16/ > >>> jdk-6u16-i586.rpm" > > >>> include sunjdk > > >>> $jenkinsversion = "1.427-1.1" > >>> $jenkinsrpmlocation = "http://${download_server}/com/jenkins/jenkins/ > >>> 1.427-1.1/jenkins-1.427-1.1.rpm" > > >>> include jenkins > > >>> } > > >>> On Aug 30, 4:07 pm, Craig White wrote: > >>>> On Aug 30, 2011, at 2:56 AM, queca wrote: > > >>>>> Hello Everyone, > > >>>>> I'm pretty new to puppet and foreman ( about 2 weeks ) but I find > >>>>> them to be great tools. > > >>>>> This is my test environment: > > >>>>> Puppetmaster (2.69) running on CentOS with foreman 0.3-1 and 2 nodes > >>>>> cent0S and RHEL5.5. I set up ENC following the instructions on foreman > >>>>> website. > >>>>> Everything worked fine except my nodes can't node see the values of > >>>>> global parameters. > > >>>>> When I click on (Foreman Interface)YAML link or execute (puppetmaster > >>>>> command line)/etc/puppet/node.rb I can see all values but > >>>>> my configuration on the nodes are failing because they can't see the > >>>>> values of my global parameters. > > >>>>> Does anyone know what I am missing ? > > >>>>> Any suggestions on the this would be greatly appreciated > > >>>> ---- > >>>> where do these global parameters exist? > > >>>> Craig > > > -- > > 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. > > -- > Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.wh...@ttiltd.com1.800.869.6908begin_of_the_skype_highlighting 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~www.ttiassessments.com > > Need help communicating between generations at work to achieve your desired success? Let us help!