[Puppet Users] Re: Want to add AIX lpars as Puppet targets (clients)

2009-12-02 Thread Andrew Forgue
I compiled my own Ruby (1.8.7p72), Facter (1.5.7), and my own Puppet
in BFF format with GCC on AIX 5.3 TL 9 (won't work on earlier AIX).  I
can make these files available if you want, or I can supply you with
the templates used in mkinstallp.  Take a look at
http://reductivelabs.com/trac/puppet/wiki/Puppet%20AIX.

Out of the box, service management via SRC does not work, and package
management does not work.  Crontab doesn't work either (but is fixed
in the unreleased 0.25.2).  Check the puppet bug tracker or my github
(http://github.com/ajf/puppet.git) for package and service plugins you
can distribute with your recipes.

-Andrew

On Dec 1, 3:37 pm, JoeZ_aix joez...@hotmail.com wrote:
 Can anyone point out some AIX specific downloads for Puppet AIX -
 rpms, source, etc - also any docs???
 Thanks

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Array [int] accessors?

2009-12-02 Thread Silviu Paragina
Are there any such things? For example
$ip_list_arr=split(ip_list,,)
$ip_external=*$ip_list_arr[0]*


Or the only way to do it, is via custom functions?
I think I read something like this before, but can't remember where or 
if it was with a custom function or not.


Silviu

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-02 Thread Ohad Levy
On Wed, Dec 2, 2009 at 2:47 AM, Nigel Kersten nig...@google.com wrote:


 Ohad, I noticed you have /etc/puppet/manifests/site.pp hard-wired
 there. We actually serve our manifests out of a different location, so
 I had to do a minor tweak to get that working.

latest code allow you to tweak it via a command line argument.

cheers,
Ohad

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Array [int] accessors?

2009-12-02 Thread Thomas Bellman
Silviu Paragina wrote:

 Are there any such things? For example
 $ip_list_arr=split(ip_list,,)
 $ip_external=*$ip_list_arr[0]*
 
 Or the only way to do it, is via custom functions?
 I think I read something like this before, but can't remember where or 
 if it was with a custom function or not.

Not at the moment.  There is some work being done to add hashes to
the Puppet language, and then I think we will get array indexing at
the same time.

If you only need it once, you can abuse inline_template() to do it:

 $ip_list_arr = split($ip_list, ,)
 $ip_external = inline_template(%= ip_list_arr[0] %)

Or, for this specific case, where you start by splitting a string, you
can use regsubst():

 $ip_external = regsubst($ip_list, ^([^,]*).*, \\1)


/Bellman

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Array [int] accessors?

2009-12-02 Thread Silviu Paragina
On 02.12.2009 17:39, Thomas Bellman wrote:
 Silviu Paragina wrote:


 Are there any such things? For example
 $ip_list_arr=split(ip_list,,)
 $ip_external=*$ip_list_arr[0]*

 Or the only way to do it, is via custom functions?
 I think I read something like this before, but can't remember where or
 if it was with a custom function or not.
  
 Not at the moment.  There is some work being done to add hashes to
 the Puppet language, and then I think we will get array indexing at
 the same time.

 If you only need it once, you can abuse inline_template() to do it:

   $ip_list_arr = split($ip_list, ,)
   $ip_external = inline_template(%= ip_list_arr[0] %)

What do you mean by once? It's slow? Or some other reason?
I need to get the first item, then the second, and if the second is not 
there pass the first.
(ip_list is a custom fact that lists the machines ip addresses sorted, 
except 127.0.0.1)


:-?
I think it might be better for my case to define the custom facts as 
iplist_1, iplist_2. But I'm not sure what are the downsides of using 
inline_template, if there are next to none I think I'll use it.

Thank you for the quick reply and info. :)


 Or, for this specific case, where you start by splitting a string, you
 can use regsubst():

   $ip_external = regsubst($ip_list, ^([^,]*).*, \\1)


 /Bellman

 --

 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



Silviu

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Array [int] accessors?

2009-12-02 Thread Thomas Bellman
Silviu Paragina wrote:

 On 02.12.2009 17:39, Thomas Bellman wrote:

 If you only need it once, you can abuse inline_template() to do it:

   $ip_list_arr = split($ip_list, ,)
   $ip_external = inline_template(%= ip_list_arr[0] %)

 What do you mean by once? It's slow? Or some other reason?

The reason is that it's an ugly hack.  Each place in your manifests
that you use something like the above construct, will cause some pain
in those who read the manifests when they see the ugliness.  So, how
many times do you want to inflict that pain on your fellow sysadmins? :-)


/Bellman

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Array [int] accessors?

2009-12-02 Thread Peter Meier
 What do you mean by once? It's slow? Or some other reason?
 I need to get the first item, then the second, and if the second is not
 there pass the first.
 (ip_list is a custom fact that lists the machines ip addresses sorted,
 except 127.0.0.1)

if you already have custom facts, why not do the decision in another  
custom fact, which is based on the output on the ip_list fact and  
which does this logic for you?

cheers pete

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] puppetmaster SQL failing

2009-12-02 Thread Eric Gerlach
I already thanked Ohad on IRC, but wanted to let the annals of history know
that he was right.

Cheers,

Eric

On Wed, Dec 02, 2009 at 09:23:09AM +0800, Ohad Levy wrote:
 Which version of rails are you using? I kind of remember an issue with 2.1
 and multiple connections
 
 Ohad
 
 On Wed, Dec 2, 2009 at 5:25 AM, Eric Gerlach 
 egerl...@feds.uwaterloo.cawrote:
 
  Hi all,
 
  Just upgraded from 0.24.8 to 0.25.1.  I've run into the following problem.
  After a while, my puppetmaster fails with this type of error:
 
  info: Expiring the node cache of gold.fs.uwaterloo.ca
  info: Not using expired node for gold.fs.uwaterloo.ca from cache; expired
  at Tue Dec 01 16:07:47 -0500 2009
  debug: Using cached facts for gold.fs.uwaterloo.ca
  info: Caching node for gold.fs.uwaterloo.ca
  info: Expiring the node cache of monitor.fs.uwaterloo.ca
  debug: Scope(Class[network]): Retrieving template network/interfaces.erb
  debug: template[/srv/puppet/modules/network/templates/interfaces.erb]:
  Bound template variables for
  /srv/puppet/modules/network/templates/interfaces.erb in 0.00 seconds
  debug: template[/srv/puppet/modules/network/templates/interfaces.erb]:
  Interpolated template /srv/puppet/modules/network/templates/interfaces.erb
  in 0.00 seconds
  debug: Scope(Class[postfix]): Retrieving template postfix/main.cf.erb
  debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]: Bound
  template variables for /srv/puppet/modules/postfix/templates/main.cf.erb in
  0.00 seconds
  debug: template[/srv/puppet/modules/postfix/templates/main.cf.erb]:
  Interpolated template /srv/puppet/modules/postfix/templates/main.cf.erb in
  0.00 seconds
  err: Puppet::Parser::Compiler failed with error
  ActiveRecord::MissingAttributeError: missing attribute: restype on node
  gold.fs.uwaterloo.ca
  err: Mysql::Error: Lost connection to MySQL server during query: SELECT *
  FROM `fact_names` WHERE (`fact_names`.`name` = 'kernelrelease')  LIMIT 1
  err: Puppet::Parser::Compiler failed with error
  ActiveRecord::MissingAttributeError: missing attribute: restype on node
  gold.fs.uwaterloo.ca
 
  And then never sends out a catalog again.  Any ideas?
 
  Cheers,
 
  --
  Eric Gerlach, Network Administrator
  Federation of Students
  University of Waterloo
  p: (519) 888-4567 x36329
  e: egerl...@feds.uwaterloo.ca
 
  --
 
  You received this message because you are subscribed to the Google Groups
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 
 
 
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 
 

-- 
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: egerl...@feds.uwaterloo.ca

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Service Type Question

2009-12-02 Thread Christopher Johnston
When the service type runs, is it possible to have it forceful shutdown a
service if the process name does not match the pattern?

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Managing parameters with External Nodes

2009-12-02 Thread jw2dot...@gmail.com
There's been off-and-on discussion on this list about external nodes,
and it's provided a lot if insight as to how others are using this
feature.  We're trying to move toward it, but struggling with how to
manage all the parameters that we use in our node manifests today.

All of our modules and manifests are in git with separate puppet
environments (development, testing and production).  However, this
also includes all of our node definitions, which is the root of the
problem.  What we're trying to avoid is having to commmit changes in
git just to add a new server.  Adding a new server should not require
touching the puppetmaster (other than a new cert).

Below is snippit of a node definition for one of our J2EE application
servers.  We use modules for just about everything, but each module
typically has a lot of parameters passed to it...

node app1.example.com {

   network::interface { bond0:
 address = 192.168.28.71,
 gateway = 192.168.28.1,
 onboot  = yes,
 master  = yes,
 slave   = [eth0, eth1],
 vlan= no,
 netmask = 255.255.255.0,
   }
   network::interface { bond0:1:
 address = 192.168.28.72,
 netmask = 255.255.255.0,
 require = Network::Interface[bond0],
   }
   network::route { eth0:
  gateway = [192.168.12.1,   192.168.12.1,  192.168.12.1],
  netmask = [255.255.255.0,  255.255.255.0, 255.255.255.0],
  address = [192.168.16.21,  192.168.16.22,
192.168.16.177],
   }
   mount { mymount:
  ensure= mounted,
  device= 'nfshost:/path/to/something',
  fstype= nfs,
  name  = '/nfs',
  dump  = 1,
  pass  = 2,
  options   =
'rw,rsize=32768,wsize=32768,hard,tcp,intr,nfsvers=3',
   }
   tomcat::instance { my-tomcat-instance:
address  = 192.168.28.106,
ensure   = present,
version  = 5.,
ssl  = false,
dmz  = false,
shared   = true,
vhosts   =
[localhost,vhost1.example.com,vhost2.example.com],
cluster  = true,
mport= [45574, 45575, 45576],
lport= [4018,4019,4020],
   }
   jboss::instance { my-jboss-instance:
 ensure= present,
 ip= 192.168.18.56,
 opts  = -server -Xms192M -Xmx1024M -
Dapache.axis.admin.host.allow=\$SERVER_IP,
 mclose= 8186,
 tomcatver = 50,
 jbossver  = 3,
 lvmname   = myjb,
   }
}

Leaning toward using Cobbler to hold this data, since we use it
anyway.  Adding puppet classes to a Cobbler system is easy, but adding
all these parameters just seems like a daunting task.  LDAP or Foreman
are possibilities as well.

Jason

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread Andrew Schulman
It takes a really long time for
http://reductivelabs.com/trac/puppet/wiki/TypeReference to render.  I've
noticed it for a while, but today for the first time it actually timed out
on me.

Any idea what's making this page take so long?  Is it just too much
restructured text?  It is a very long page.

If that is the case, then I have a suggestion to alleviate the problem:
move the nagios_* types onto a separate page.  For those of us who don't
use Nagios, those types are a giant lump in the middle of a very long page.

Thanks,
Andrew.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread Luke Kanies
On Dec 2, 2009, at 11:12 AM, Andrew Schulman wrote:

 It takes a really long time for
 http://reductivelabs.com/trac/puppet/wiki/TypeReference to render.   
 I've
 noticed it for a while, but today for the first time it actually  
 timed out
 on me.

 Any idea what's making this page take so long?  Is it just too much
 restructured text?  It is a very long page.

 If that is the case, then I have a suggestion to alleviate the  
 problem:
 move the nagios_* types onto a separate page.  For those of us who  
 don't
 use Nagios, those types are a giant lump in the middle of a very  
 long page.


We're in the process of moving these pages to a static, external  
format, based on RailsGuides.  I don't have a specific time on getting  
it done, but this is one of Bruce's main focuses at the moment, so I  
expect he'll get it working quickly.

The problem, at this point, with moving the Nagios docs elsewhere is  
that the page is all autogenerated.  It's a good point, though, that  
we could pretty easily manually do so.

If someone wants to edit those docs for now to do exactly that, that  
might be a good interim step, while we're waiting for Bruce's work to  
come through.

-- 
I don't want the world, I just want your half.
-
Luke Kanies | http://reductivelabs.com | http://madstop.com

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread R.I.Pienaar
hello,

- Luke Kanies l...@madstop.com wrote:

 On Dec 2, 2009, at 11:12 AM, Andrew Schulman wrote:
 
  It takes a really long time for
  http://reductivelabs.com/trac/puppet/wiki/TypeReference to render.  
 
  I've
  noticed it for a while, but today for the first time it actually  
  timed out
  on me.
 
  Any idea what's making this page take so long?  Is it just too much
  restructured text?  It is a very long page.
 
  If that is the case, then I have a suggestion to alleviate the  
  problem:
  move the nagios_* types onto a separate page.  For those of us who 
 
  don't
  use Nagios, those types are a giant lump in the middle of a very  
  long page.
 
 
 We're in the process of moving these pages to a static, external  
 format, based on RailsGuides.  I don't have a specific time on getting
 it done, but this is one of Bruce's main focuses at the moment, so I 
 expect he'll get it working quickly.

I have a archive of various versions of type/function references here:

http://nephilim.ml.org/~rip/puppet/historical/

You can also use 'puppetdoc' that should be in the tarball make your own, or 
see the docs using the pi executable by just doing:

$ pi nagios_service

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread Andrew Schulman
  It takes a really long time for
  http://reductivelabs.com/trac/puppet/wiki/TypeReference to render.   
  I've
  noticed it for a while, but today for the first time it actually  
  timed out
  on me.
 
 We're in the process of moving these pages to a static, external  
 format, based on RailsGuides.  I don't have a specific time on getting  
 it done, but this is one of Bruce's main focuses at the moment, so I  
 expect he'll get it working quickly.

OK, thanks.  I don't know RailsGuides, but just looking around, it seems
that it uses Textile.  So will all of the wiki docs be converting to
Textile?

I don't relish converting the module docs that I've already built, but I
can't say I'd be sorry to say goodbye to restructured text.  If Bruce is
developing an automated conversion tool for restructured - Textile, it
would be great if he'd make it available.

 The problem, at this point, with moving the Nagios docs elsewhere is  
 that the page is all autogenerated.  It's a good point, though, that  
 we could pretty easily manually do so.
 
 If someone wants to edit those docs for now to do exactly that, that  
 might be a good interim step, while we're waiting for Bruce's work to  
 come through.

OK.  If there's no objection I'll do it.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew Schulman wrote:
 It takes a really long time for
 http://reductivelabs.com/trac/puppet/wiki/TypeReference to render.   
 I've
 noticed it for a while, but today for the first time it actually  
 timed out
 on me.
 We're in the process of moving these pages to a static, external  
 format, based on RailsGuides.  I don't have a specific time on getting  
 it done, but this is one of Bruce's main focuses at the moment, so I  
 expect he'll get it working quickly.
 
 OK, thanks.  I don't know RailsGuides, but just looking around, it seems
 that it uses Textile.  So will all of the wiki docs be converting to
 Textile?

Probably the docs - though the internal documentation will remain
RST.  You can already generate the internal docs with HTML,
Markdown, RST, etc. It'd be easy to add Textile to that.

 If someone wants to edit those docs for now to do exactly that, that  
 might be a good interim step, while we're waiting for Bruce's work to  
 come through.
 
 OK.  If there's no objection I'll do it.

I've done it:

http://reductivelabs.com/trac/puppet/wiki/TypeReference
http://reductivelabs.com/trac/puppet/wiki/NagiosReference

Thanks

James Turnbull

- --
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSxbLzSFa/lDkFHAyAQLTGQgAiLxd99fBIEIlwVuMeY3rgJmGflM0r7K4
NVa1uyd2eARzIfi5X636ecQAPRpHxvzmbJGi4YfuN7Lswsf8AJG1Nx8vgw5L0W3m
dC/MqSZGfjn9Sk7ByKDKIHfT/zo/u0Z85irPPErimw4u8ck8W2G6gttg7ptnkBg8
fLEtrbAS2eJQbKnVLwlTwjuOOFvKcysc71+W/fFOoLNETDZybqOxss3mGeQkHD9Z
26gb9qsLVBI0EzysSPl4GidDX+ChEjsA6fzdJ9qGXB1X9oIdw3Plt//b38MF8UV7
vXMxJJ2v/rEJh2DcA5Bt86O9nhTBPyybiO0E937mZ7WisdAxxSjehg==
=OP+h
-END PGP SIGNATURE-

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread Andrew Schulman
  If someone wants to edit those docs for now to do exactly that, that  
  might be a good interim step, while we're waiting for Bruce's work to  
  come through.
  
  OK.  If there's no objection I'll do it.
 
 I've done it:
 
 http://reductivelabs.com/trac/puppet/wiki/TypeReference
 http://reductivelabs.com/trac/puppet/wiki/NagiosReference

Thanks.  The TypeReference page is loading much faster now.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-02 Thread Scott Smith
Ohad Levy wrote:
 Hi Scott,
 
 I don't see how this can help us, see explanation from previous email :)
 Ohad
 

Yeah :) I guess I was just alluding to the idea of using a chrooted jail 
that emulated another arch. :)

-scott

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] problems with async storeconfigs

2009-12-02 Thread Matthew Delves
I've managed to get async storeconfigs going on the puppet server, though am 
finding that it isn't updating the nagios configuration that I also have 
configured. Is this an expected behavior of async storeconfigs?

Thanks,
Matt Delves

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-02 Thread Paul Nasrat
2009/12/2 Scott Smith sc...@ohlol.net:
 Ohad Levy wrote:
 Hi Scott,

 I don't see how this can help us, see explanation from previous email :)
 Ohad


 Yeah :) I guess I was just alluding to the idea of using a chrooted jail
 that emulated another arch. :)

Mock can pretty much only do setarch so that it can only represent the
same family and lower in terms of architecture. It doesn't allow you
to do say ppc on i386 but does allow you to do say a i386 chroot on
x86_64. It may be possible with chroots and qemu to do some arch
translation stuff but really I'd say if you have a complex multi-arch
setup you should ensure you have development and test systems for
your systems people to work on and that can integrate with manifest
testing tools.

Paul

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] unwanted flattening of arrays

2009-12-02 Thread Kjetil Torgrim Homme
if you do

  $var = [[1,2,3], [4,5,6]]

$var will be set to [1,2,3,4,5,6].  you can observe this with a template
like

  % var.each do |el| -%
  array element: %= el %
  % end -%

on the other hand,

  $a = [1,2,3]
  $b = [4,5,6]
  $var = [$a, $b]

will preserve the arrays within the array, which means you can do a
nested loop in your template:

  % var.each do |arr| -%
  array {
  %   arr.each do |el| -%
%= el %
  % end -%
  }
  % end -%

defining lots of dummy variables will just make the config less easy
to read, so the current best workaround is to use a string and split it
on some character which hopefully won't be used in any of the values.
ugly.

question: does anyone really depend on this flattening of arrays which
are specified as immediate values, or could this behaviour change?

this issue is related to http://projects.reductivelabs.com/issues/2226


I tried to work around the problem by defining a function which would do
this for me, e.g.,

  $var = concat([1,2,3], [4,5,6])

unfortunately, even though the function works for simple values, with
these immediate array values the parser barfs:

  Syntax error at '['; expected ']'


I'm using 0.24.8, please let me know if this behaviour has changed in
0.25.x.
-- 
Kjetil T. Homme
Redpill Linpro AS - Changing the game

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] /wiki/TypeReference is slow/timing out

2009-12-02 Thread Luke Kanies
On Dec 2, 2009, at 11:51 AM, Andrew Schulman wrote:

 It takes a really long time for
 http://reductivelabs.com/trac/puppet/wiki/TypeReference to render.
 I've
 noticed it for a while, but today for the first time it actually
 timed out
 on me.

 We're in the process of moving these pages to a static, external
 format, based on RailsGuides.  I don't have a specific time on  
 getting
 it done, but this is one of Bruce's main focuses at the moment, so I
 expect he'll get it working quickly.

 OK, thanks.  I don't know RailsGuides, but just looking around, it  
 seems
 that it uses Textile.  So will all of the wiki docs be converting to
 Textile?

Looks like Bruce will be modifying RailsGuides to use Markdown, and  
we'll use that.

 I don't relish converting the module docs that I've already built,  
 but I
 can't say I'd be sorry to say goodbye to restructured text.  If  
 Bruce is
 developing an automated conversion tool for restructured - Textile,  
 it
 would be great if he'd make it available.

One of the reasons for using Markdown, in addition to it generally  
being a better format, is that we can't seem to find rst2textile  
converters, but it's easyish to do rst2markdown.

[...]

-- 
The intelligent man finds almost everything ridiculous, the sensible
man hardly anything. -- Johann Wolfgang von Goethe
-
Luke Kanies | http://reductivelabs.com | http://madstop.com

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Managing parameters with External Nodes

2009-12-02 Thread Ohad Levy
+1 for foreman ;)

generally, external nodes parameters can be complex data structures (e.g.
arrays and hashs) but you should know what you are doing ;)

one solution would be to define variables in difference levels, e.g. put
your dns settings in the domain/subnet level, put your ipaddress in the
host.

foreman supports this kind of parameter merge (based on all kind of criteria
- see
http://theforeman.org/wiki/foreman/External_Nodes#Define-classes-and-variables-per-host

cheers,
Ohad


On Thu, Dec 3, 2009 at 2:01 AM, jw2dot...@gmail.com jw2dot...@gmail.comwrote:

 There's been off-and-on discussion on this list about external nodes,
 and it's provided a lot if insight as to how others are using this
 feature.  We're trying to move toward it, but struggling with how to
 manage all the parameters that we use in our node manifests today.

 All of our modules and manifests are in git with separate puppet
 environments (development, testing and production).  However, this
 also includes all of our node definitions, which is the root of the
 problem.  What we're trying to avoid is having to commmit changes in
 git just to add a new server.  Adding a new server should not require
 touching the puppetmaster (other than a new cert).

 Below is snippit of a node definition for one of our J2EE application
 servers.  We use modules for just about everything, but each module
 typically has a lot of parameters passed to it...

 node app1.example.com {

   network::interface { bond0:
 address = 192.168.28.71,
 gateway = 192.168.28.1,
 onboot  = yes,
 master  = yes,
 slave   = [eth0, eth1],
 vlan= no,
 netmask = 255.255.255.0,
   }
   network::interface { bond0:1:
 address = 192.168.28.72,
 netmask = 255.255.255.0,
 require = Network::Interface[bond0],
   }
   network::route { eth0:
  gateway = [192.168.12.1,   192.168.12.1,  192.168.12.1],
  netmask = [255.255.255.0,  255.255.255.0, 255.255.255.0],
  address = [192.168.16.21,  192.168.16.22,
 192.168.16.177],
   }
   mount { mymount:
  ensure= mounted,
  device= 'nfshost:/path/to/something',
  fstype= nfs,
  name  = '/nfs',
  dump  = 1,
  pass  = 2,
  options   =
 'rw,rsize=32768,wsize=32768,hard,tcp,intr,nfsvers=3',
   }
   tomcat::instance { my-tomcat-instance:
address  = 192.168.28.106,
ensure   = present,
version  = 5.,
ssl  = false,
dmz  = false,
shared   = true,
vhosts   =
 [localhost,vhost1.example.com,vhost2.example.com],
cluster  = true,
mport= [45574, 45575, 45576],
lport= [4018,4019,4020],
   }
   jboss::instance { my-jboss-instance:
 ensure= present,
 ip= 192.168.18.56,
 opts  = -server -Xms192M -Xmx1024M -
 Dapache.axis.admin.host.allow=\$SERVER_IP,
 mclose= 8186,
 tomcatver = 50,
 jbossver  = 3,
 lvmname   = myjb,
   }
 }

 Leaning toward using Cobbler to hold this data, since we use it
 anyway.  Adding puppet classes to a Cobbler system is easy, but adding
 all these parameters just seems like a daunting task.  LDAP or Foreman
 are possibilities as well.

 Jason

 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.




--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Could not retrieve catalog

2009-12-02 Thread Luv Linux
Hello all,
I'm running puppet for the first ime.  I've finished the install but
I'm stuck at the certificate part.
The puppet master (0.24.4-3) is running on Ubuntu Lenny and the puppet
client (0.24.8-4.el5) is running on CentOS 5.3.

After the install, from the client side, I've run:
puppetd --server puppetmaster.domain.com --waitforcert 60 --test

On the client, I've run:
puppetca --list
puppetca --sign puppetclient.domain.com

Something isn't working and I'm not sure what.  The port 8140 is open
on both sides.

When I checked the log on the puppetclient, I see the following error
after starting the puppet.
puppetd[3819]: Could not retrieve catalog: Could not find default node
or by name with 'puppetclient.domain.com, puppetclient' on node
puppetclient.domain.com


Puppet Server's puppet.conf file:
 [main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
pluginsync=false
server=puppetmaster.domain.com
[puppetmasterd]
templatedir=/var/lib/puppet/templates
certname=puppetmaster.domain.com


Puppet Server's site.pp file:
# Create /tmp/testfile if it doesn't exist.
class test_class {
file { /tmp/testfile:
   ensure = present,
   mode   = 644,
   owner  = root,
   group  = root
}
}

# tell puppet on which client to run the class
node pclient {
include test_class
}



Client's puppet.conf file:
[main]
# Where Puppet stores dynamic and growing data.
# The default value is '/var/puppet'.
vardir = /var/lib/puppet

pluginsync=false

# 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

[puppetd]
# 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
certname = puppetclient.domain.com
server = puppetmaster.domain.com

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

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Could not retrieve catalog

2009-12-02 Thread James Turnbull
Luv Linux wrote:
 I'm running puppet for the first ime.  I've finished the install but
 I'm stuck at the certificate part.
 The puppet master (0.24.4-3) is running on Ubuntu Lenny and the puppet
 client (0.24.8-4.el5) is running on CentOS 5.3.

Not a good idea to have clients with a later version than the master -
the preferred option is to have same version on master and client and if
that is not feasible higher version on master than client.

 # tell puppet on which client to run the class
 node pclient {
 include test_class
 }

Your node should be:

node puppetclient.domain.com {
...
}

Try my book as a good starter: http://tinyurl.com/pupbook

Regards

James Turnbull

-- 
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] manitest - a simple tool to help your puppet development and testing

2009-12-02 Thread Scott Smith
Paul Nasrat wrote:
 translation stuff but really I'd say if you have a complex multi-arch
 setup you should ensure you have development and test systems for
 your systems people to work on and that can integrate with manifest
 testing tools.
 
Good point. What about easily spinning up instances for testing, though? 
I have multiple QA environments so it's not much of an issue here, but I 
could see some value in being able to do it without dealing with an 
actual VM. Maybe it's not that big of a deal. Most of my experience is 
with VMware, s.

-scott

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Array [int] accessors?

2009-12-02 Thread Silviu Paragina
On 02.12.2009 18:27, Peter Meier wrote:
 What do you mean by once? It's slow? Or some other reason?
 I need to get the first item, then the second, and if the second is not
 there pass the first.
 (ip_list is a custom fact that lists the machines ip addresses sorted,
 except 127.0.0.1)
  
 if you already have custom facts, why not do the decision in another
 custom fact, which is based on the output on the ip_list fact and
 which does this logic for you?

 cheers pete


I wanted the facts to be general. IE reuse this if I need a setup with 3 
ips.
The current requirement is for a website deployed on 2 ips on the 
production machine. Because the development machine has only one ip, I 
wanted the vhosts deployed only on that one ip. Before this 
testing/development meant I had to modify the files to work on the 
testing machine, make the actual changes, test, then copy only the 
required changes to puppet. But this is error prone...

Thanks for the support, I think that if I would of done this alone, 
without asking, I would of implemented a function to access the members 
of the array, which seems a bit too complicated just for this.

Cheers and thanks again for the support, :)
Silviu

 --

 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.




--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.