[Puppet Users] Best practices for different hosts with different configs

2010-12-13 Thread Josh
Greetings, I'm just getting started with setting up Puppet in an environment of about ~15 servers, a mixture of Mac OS X servers and Ubuntu servers - each with different roles and obviously different versions of configs. Before I get too carried away, I was hoping to get advice on the "rule of thu

Re: [Puppet Users] puppetlabs.com down?

2010-12-13 Thread James Turnbull
John Warburton wrote: > It seems it isn't me - http://downforeveryoneorjustme.com/www.puppetlabs.com > Looks like our hosting provider had a network hiccup briefly at one of their DCs. Seems to have been resolved in about 15 minutes. Regards James Turnbull -- Puppet Labs - http://www.puppetl

[Puppet Users] Re: Best passenger stack for 2.6

2010-12-13 Thread luke.bigum
Hi John, I've used the following stack from recommendations on this list, random blogs, etc and have had zero problems with it on CentOS. I use Ruby Enterprise though. I've heard of other people using later versions of Passenger but from my point of view if it isn't broken, don't fix it :) [r...@

Re: [Puppet Users] Best practices for different hosts with different configs

2010-12-13 Thread Daniel Piddock
On 13/12/10 04:00, Josh wrote: > Greetings, > I'm just getting started with setting up Puppet in an environment of > about ~15 servers, a mixture of Mac OS X servers and Ubuntu servers - > each with different roles and obviously different versions of configs. > > Before I get too carried away, I wa

Re: [Puppet Users] Best practices for different hosts with different configs

2010-12-13 Thread Avi Miller
Daniel Piddock wrote: You can use a variable in the source path definition. e.g. puppet:///files/$host/config.cfg. Though, using puppet:///module/files/config.cfg.$hostname as the source means it can sit inside the module, so all your configs can be in a single class in a single module. I fin

Re: [Puppet Users] Slides from my Bay Area Puppet user group meetup

2010-12-13 Thread Dan Bode
Hi Jordan, Thanks for forwarding these slides. They are for the most part self-explanatory. I would like to hear more about your motivations for not recommending the coupling together of modules with namespaced variables. (slides 8,9) thanks Dan On Sat, Dec 11, 2010 at 7:10 PM, Jordan Sissel w

Re: [Puppet Users] Best practices for different hosts with different configs

2010-12-13 Thread Patrick
On Dec 12, 2010, at 8:00 PM, Josh wrote: > Greetings, > I'm just getting started with setting up Puppet in an environment of > about ~15 servers, a mixture of Mac OS X servers and Ubuntu servers - > each with different roles and obviously different versions of configs. > > Before I get too carri

[Puppet Users] Re: Puppet updating from relative directories or chroot

2010-12-13 Thread Geoff
Bump! On Dec 3, 11:41 am, Geoff wrote: > Anyone had any experience getting puppet to update multiple OS's on a > single server? > For example, for a set of blades Network booting from a primary > server, the OS for each blade would be stored on the primary server. > For example: > /pxe/host1/ > /

[Puppet Users] Re: Create many similar files from an array in a module manifest

2010-12-13 Thread PowerPaul86
I use the following in a class: /etc/puppet/manifests/classes/impuls_test.pp: $line = 'test' $tomcatInstances = [ "tc6_a", "tc6_b", "tc6_c", "tc6_d", "tc6_e", "tc6_f", "tc6_g", "tc6_h", "tc6_i", "tc6_j" ] tc6conf { $tomcatInstances: } } and then the following definition: /etc/puppet/manifests/cl

[Puppet Users] Running puppet as non-root user

2010-12-13 Thread Jesús Couto
Hi. Lets say that for several administrative/burocratic/procedural reasons, you dont have the option of running puppet as root, in any way - not as a daemon on the managed node, nor as root on the command line with puppet apply. Say, you are the "middleware" application team and you dont have the

Re: [Puppet Users] Roadmap wrt the Ruby DSL

2010-12-13 Thread Jesús Couto
Stupid perennial newbie question but... anybody can paint me an scenario where the Ruby DSL really saves the day and lets you do whatever you need to do? A practical case that shows what are those cases where the Puppet DSL doesnt reach what you need to scratch? Best regards, -

[Puppet Users] Unknown protocol since migration to Passenger

2010-12-13 Thread PieterB
Puppet is working perfectly with WEBRick, but not with my passenger setup. The error I receive: Could not retrieve catalog from remote server: unknown protocol But the puppet client on the puppetmaster itself is working perfectly. So I guess this is a certificate issue? Versions: --

Re: [Puppet Users] Roadmap wrt the Ruby DSL

2010-12-13 Thread Dan Bode
On Mon, Dec 13, 2010 at 4:46 AM, Jesús Couto wrote: > Stupid perennial newbie question but... anybody can paint me an scenario > where the Ruby DSL really saves the day and lets you do whatever you need to > do? A practical case that shows what are those cases where the Puppet DSL > doesnt reach

Re: [Puppet Users] Create many similar files from an array in a module manifest

2010-12-13 Thread Felix Frank
On 12/13/2010 03:01 AM, Alex wrote: > Hi, > > I want to create a single configuration file with one or two > differences, many times. Therefore, i'd like to do the following in > pseudo-code: > > files = [(a,b), (c,d), (e,f)...] > foreach a,b in files: > create_file(a,b) > > Which can then use

Re: [Puppet Users] Best practices for different hosts with different configs

2010-12-13 Thread saurabh verma
The way we manage is by using multiple File paths right now , for example file { "/usr/local/bin/portstats.pl": ensure => present, owner => root, group => root, mode => 755, source => ["puppet:///cacti/$pr

Re: [Puppet Users] custom functions in standalone mode

2010-12-13 Thread Gergely Paljak
Hi, On 7 December 2010 15:43, Felix Frank wrote: > On 11/29/2010 02:23 PM, Gergely Paljak wrote: > > Hi, > > > > I am fairly new to puppet, and my question would be: > > > > - is it possible to write new function and use them in standalone mode? > > According to > > > http://projects.puppetlabs.c

Re: [Puppet Users] custom functions in standalone mode

2010-12-13 Thread Felix Frank
On 12/13/2010 03:39 PM, Gergely Paljak wrote: > Hi, > > On 7 December 2010 15:43, Felix Frank > wrote: > > On 11/29/2010 02:23 PM, Gergely Paljak wrote: > > Hi, > > > > I am fairly new to puppet, and my question would be: > > > > -

Re: [Puppet Users] Running puppet as non-root user

2010-12-13 Thread Martin Alfke
Hi. On Dec 13, 2010, at 1:30 PM, Jesús Couto wrote: > Hi. > > Lets say that for several administrative/burocratic/procedural reasons, you > dont have the option of running puppet as root, in any way - not as a daemon > on the managed node, nor as root on the command line with puppet apply. Say,

Re: [Puppet Users] Slides from my Bay Area Puppet user group meetup

2010-12-13 Thread Jeff McCune
+1 I'm really curious about the prior work and experience you mentioned in the presentation where this is considered an anti pattern in OOP and design. Thanks, -- Jeff McCune - (+1-503-208-4484) On Dec 13, 2010, at 2:42 AM, Dan Bode wrote: Hi Jordan, Thanks for forwarding these slides. They ar

[Puppet Users] Using one fact to make another fact

2010-12-13 Thread tecneeq
Hi there, i want to create a user. The name of the user is based on the hostname. If my hostname is ,,notebook12'', my user is ,,user12''. The idea is to replace ,,notebook'' with ,,user'' and create fact called ,,username''. But my fact doesn't work: Facter.add("username") do setcode do

[Puppet Users] Exec multiple conditions fail

2010-12-13 Thread Sandor Szuecs
Hi, I need to run an exec ressource if one of the conditions fail. It seems not to work from puppet versions 0.25.4 to 2.6.4. # 1. try onlyif: % puppet -e ' Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin" } exec { "run_rsn": command => "touch /bar", onlyif => [ "test -f /does_not_exist

Re: [Puppet Users] Exec multiple conditions fail

2010-12-13 Thread Felix Frank
On 12/13/2010 05:40 PM, Sandor Szuecs wrote: > Hi, > > I need to run an exec ressource if one of the conditions fail. > It seems not to work from puppet versions 0.25.4 to 2.6.4. > > # 1. try onlyif: > % puppet -e ' Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin" } > exec { "run_rsn": > comm

Re: [Puppet Users] Using one fact to make another fact

2010-12-13 Thread Nigel Kersten
On Mon, Dec 13, 2010 at 8:33 AM, tecneeq wrote: > Hi there, > > i want to create a user. The name of the user is based on the > hostname. If my hostname is ,,notebook12'', my user is ,,user12''. > > The idea is to replace ,,notebook'' with ,,user'' and create fact > called ,,username''. > > But my

Re: [Puppet Users] monitoring contents of a directory

2010-12-13 Thread Stefan Schulte
On Sun, Dec 12, 2010 at 06:47:23PM -0800, russell.fulton wrote: >file { > "/home/snort/Rules/raw/": > mode=> "640", >owner => snort, >group => snort, >source => 'puppet:///modules/snort/Rules/raw', > recurse => true, >

[Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Yushu Yao
Hi Experts, As far as I can see custom functions run on the server, right? Is there way to make them run on the Client? Thanks -Yushu -- 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...@googlegrou

Re: [Puppet Users] Exec multiple conditions fail

2010-12-13 Thread Sandor Szuecs
Felix, On Dec 13, 2010, at 5:52 PM, Felix Frank wrote: > > Am I right to assume that > test -f /does_not_exist *always* returns 1 and > test -d / *always* returns 0? Yes. I should be more clear, because I need an \not\exists operator. If one or more conditions fail I want to run the command. B

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Eric Sorenson
Functions are executed when parsing a manifest, which a client doesn't do -- a client applies a catalog. So it doesn't make sense to run a manifest parser on a client. What is the problem you are trying to solve? On Dec 13, 2010, at 10:37 AM, Yushu Yao wrote: > Hi Experts, > > As far as I can

Re: [Puppet Users] Unknown protocol since migration to Passenger

2010-12-13 Thread Patrick
On Dec 13, 2010, at 4:55 AM, PieterB wrote: > Puppet is working perfectly with WEBRick, > but not with my passenger setup. > > The error I receive: > Could not retrieve catalog from remote server: unknown protocol > > But the puppet client on the puppetmaster itself is working perfectly. > So I

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Yushu Yao
Thanks Eric, I am trying to implement some function tests. E.g. in my catalog for node B there is LDAP client, however, I would like to do a test to see if the LDAP server is already up and running. And decide if I want to apply the LDAP Client or not. (This is a test on remote resource, I might a

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Eric Sorenson
On Dec 13, 2010, at 10:59 AM, Yushu Yao wrote: > I am trying to implement some function tests. E.g. in my catalog for node B > there is LDAP client, however, I would like to do a test to see if the LDAP > server is already up and running. And decide if I want to apply the LDAP > Client or not.

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Yushu Yao
Thanks, Another question, when are the facts loaded? In the beginning of the puppetd run? -Yushu +-+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | Mailstop 50B-6222 | 1 Cyclotron Road | Berkeley CA 94720-8147 - USA +-

Re: [Puppet Users] Slides from my Bay Area Puppet user group meetup

2010-12-13 Thread Jordan Sissel
On Mon, Dec 13, 2010 at 8:01 AM, Jeff McCune wrote: > +1 I'm really curious about the prior work and experience you mentioned in > the presentation where this is considered an anti pattern in OOP and design. Tight coupling in general is considered an antipattern in OOP design. Most software engin

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Yushu Yao
Another though: Can I do something like if $(return value of an Exec resource)==0 { } else {} I.e. I want to run an shell command first, and do something depend on the output of the command? Thanks -Yushu +-+ | Yushu Yao | Ph:1-510-486-4690 | | L

Re: [Puppet Users] Puppet updating from relative directories or chroot

2010-12-13 Thread Daniel Pittman
On Fri, Dec 3, 2010 at 22:41, Geoff wrote: > Anyone had any experience getting puppet to update multiple OS's on a > single server? Not without a "container" style virtualization solution wrapped around it. [...] > Can puppet be run in a mode that would take into account relative > directories

Re: [Puppet Users] Running puppet as non-root user

2010-12-13 Thread Daniel Pittman
On Mon, Dec 13, 2010 at 23:30, Jesús Couto wrote: > Lets say that for several administrative/burocratic/procedural reasons, you > dont have the option of running puppet as root, in any way - not as a daemon > on the managed node, nor as root on the command line with puppet apply. Say, > you are t

Re: [Puppet Users] Puppet updating from relative directories or chroot

2010-12-13 Thread Patrick Mohr
On Mon, Dec 13, 2010 at 2:39 PM, Daniel Pittman wrote: > On Fri, Dec 3, 2010 at 22:41, Geoff wrote: > > > Anyone had any experience getting puppet to update multiple OS's on a > > single server? > > Not without a "container" style virtualization solution wrapped around it. > > [...] > > > Can pu

Re: [Puppet Users] Puppet updating from relative directories or chroot

2010-12-13 Thread Daniel Pittman
On Tue, Dec 14, 2010 at 10:15, Patrick Mohr wrote: > On Mon, Dec 13, 2010 at 2:39 PM, Daniel Pittman wrote: >> On Fri, Dec 3, 2010 at 22:41, Geoff wrote: >> I didn't respond earlier, as I imagine most people didn't, because we >> hoped someone would actually come along and have some experience

[Puppet Users] Re: Puppet updating from relative directories or chroot

2010-12-13 Thread jcbollinger
On Dec 13, 6:02 am, Geoff wrote: > On Dec 3, 11:41 am, Geoff wrote: > > Anyone had any experience getting puppet to update multiple OS's on a > > single server? Like Daniel said, I think the resounding silence that greeted your initial query should be interpreted as a group "No." > > For exampl

Re: [Puppet Users] Custom Functions that runs on the Client?

2010-12-13 Thread Nigel Kersten
On Mon, Dec 13, 2010 at 12:56 PM, Yushu Yao wrote: > Another though: > > Can I do something like > if $(return value of an Exec resource)==0 { > } else {} > > I.e. I want to run an shell command first, and do something depend on the > output of the command. > You probably want to make the shell

[Puppet Users] Re: service - explicit stats command

2010-12-13 Thread russell.fulton
I now have my service status command that does a kill -0 on all the pid and return 1 if all the processes are running. I have this class/ service definition: class snort($master) { service{ "snort.$master": start => "sudo -u snort /home/snort/bin/restart-snort $mast

[Puppet Users] Configure firewall with Puppet

2010-12-13 Thread Dmytro Bablinyuk
Hello Everybody, We need to open some ports on the target machine, let's say 694:udp and 3306:tcp I couldn't find any documentation how can I do this with Puppet. What the best way of doing this? Thank you Dmytro -- You received this message because you are subscribed to the Google Groups "Pu

Re: [Puppet Users] Configure firewall with Puppet

2010-12-13 Thread Yushu Yao
Which target system is it? +-+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | Mailstop 50B-6222 | 1 Cyclotron Road | Berkeley CA 94720-8147 - USA +-+ On Mon, Dec 13, 2010 at 6

[Puppet Users] Re: Configure firewall with Puppet

2010-12-13 Thread Dmytro Bablinyuk
Target systems vary from Solaris to Ubuntu. I was told that exists third party package as https://github.com/camptocamp/puppet-iptables I think it might work. On Dec 14, 4:09 pm, Yushu Yao wrote: > Which target system is it? > > +-+ > | Yushu Yao >

[Puppet Users] Hostname was not match with the server certificate

2010-12-13 Thread Dmytro Bablinyuk
Hi Everybody, I have 2 machines, one that running puppetmasterd and another one that running client. Both run Ubuntu. First I installed 2.25.4 (I think) version and then I have upgraded Puppet to 2.6.4 Server does not have any DNS entry, so I am trying to use IP address for the client to connect

Re: [Puppet Users] Hostname was not match with the server certificate

2010-12-13 Thread Nan Liu
On Mon, Dec 13, 2010 at 11:16 PM, Dmytro Bablinyuk wrote: > Hi Everybody, > > I have 2 machines, one that running puppetmasterd and another one that > running client. > Both run Ubuntu. > > First I installed 2.25.4 (I think) version and then I have upgraded > Puppet to 2.6.4 > > Server does not ha

Re: [Puppet Users] Unknown protocol since migration to Passenger

2010-12-13 Thread Pieter Baele
On Mon, Dec 13, 2010 at 19:56, Patrick wrote: > > On Dec 13, 2010, at 4:55 AM, PieterB wrote: > > Puppet is working perfectly with WEBRick, > but not with my passenger setup. > > The error I receive: > Could not retrieve catalog from remote server: unknown protocol > > But the puppet client on the