[Puppet Users] Re: port 8139 not opening up

2010-01-12 Thread lovewadhwa
Hi all

If anyone please could help me out.I tried everything but amn't
getting where's the problem.

On Jan 11, 4:03 pm, lovewadhwa lovewad...@gmail.com wrote:
 I had following parameters set in my conf file.When i run puppetd, it
 isn't opening the desired port.I have specified listen=true in my
 conf file but still the port is n't opening.This is what my conf file
 contains:

 [main]
  server = puppet.resdex.com
   vardir = /var/lib/puppet
  logdir = /var/log/puppet
  rundir = /var/run/puppet
  ssldir = $vardir/ssl
 [puppetd]
  classfile = $vardir/classes.txt
  localconfig = $vardir/localconfig
  listen=true
  user = puppet
  bindaddress=10.X.X.X
  certname=10.X.X.X

 When i start the puppetd with the following command:

 puppetd --no-daemonize --debug --verbose

 it provides me this output

 debug: Failed to load library 'shadow' for feature 'libshadow'
 debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/
 dscl does not exist
 debug: Puppet::Type::User::ProviderPw: file pw does not exist
 debug: Puppet::Type::User::ProviderUser_role_add: file roledel does
 not exist
 debug: Failed to load library 'ldap' for feature 'ldap'
 debug: Puppet::Type::User::ProviderLdap: feature ldap is missing

 I don't see if port not opening has to do anything with above output.
 The command runs but the port is not opening.Please help.
-- 
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] Re: port 8139 not opening up

2010-01-12 Thread lovewadhwa
Yes in /etc/puppet, i have namespaceauth.conf which contains allownace
to all.The entry in namespaceauth.conf file is

[puppetrunner]
  allow *



On Jan 12, 5:43 pm, Ohad Levy ohadl...@gmail.com wrote:
 did you setup a namespaceauth file?

 Ohad

 On Tue, Jan 12, 2010 at 7:56 PM, lovewadhwa lovewad...@gmail.com wrote:
  Hi all

  If anyone please could help me out.I tried everything but amn't
  getting where's the problem.

  On Jan 11, 4:03 pm, lovewadhwa lovewad...@gmail.com wrote:
   I had following parameters set in my conf file.When i run puppetd, it
   isn't opening the desired port.I have specified listen=true in my
   conf file but still the port is n't opening.This is what my conf file
   contains:

   [main]
    server = puppet.resdex.com
     vardir = /var/lib/puppet
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl
   [puppetd]
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    listen=true
    user = puppet
    bindaddress=10.X.X.X
    certname=10.X.X.X

   When i start the puppetd with the following command:

   puppetd --no-daemonize --debug --verbose

   it provides me this output

   debug: Failed to load library 'shadow' for feature 'libshadow'
   debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/
   dscl does not exist
   debug: Puppet::Type::User::ProviderPw: file pw does not exist
   debug: Puppet::Type::User::ProviderUser_role_add: file roledel does
   not exist
   debug: Failed to load library 'ldap' for feature 'ldap'
   debug: Puppet::Type::User::ProviderLdap: feature ldap is missing

   I don't see if port not opening has to do anything with above output.
   The command runs but the port is not opening.Please help.

  --
  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.




Re: [Puppet Users] Recipes/modules for multiple instances of web server?

2010-01-12 Thread Dan Bode
On Tue, Jan 12, 2010 at 1:12 AM, Jesús Couto jesus.co...@gmail.com wrote:



 the start and stop params take a command, not a file. (just like status)
 You are executing the filename as a command, which will return 1.


 No, thats the idea, to execute them. Those last files are scripts to start
  stop the instances. I also thought the solution you mention, to create the
 init.d scripts so I use a service with, say, the debian provider. But I
 fixed the problem, now it executes the scripts and starts the services.
 Doesnt stop them but that seems to be something else :-(


can you share the contents of the init script? does it have a #!/bin/bash
statement? can you try executing with bash

start = 'bash /tmp/command.sh'




 You can specify the same resources on multiple nodes.

 Resources must be unique per compiled catalog. Only resources for a
 certain host will be compiled into its catalog.


 Hmmm... that clears it a lot, thanks!

 Best regards,

 --
 --

 Jesús Couto F.

 --
 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] Re: Virtual ressource in a define

2010-01-12 Thread jcbollinger


On Jan 11, 3:41 pm, Sébastien Prud'homme
sebastien.prudho...@gmail.com wrote:
 Thanks for the responses. My example is just an example. My real
 define has some parameters so it's not possible to use a class.

Whether 'mydefine1' has parameters is irrelevant to whether you can
achieve your configuration goal by putting the package declaration
into a class.

Are you trying to say that the parameters to 'mydefine1' are used to
set properties of the Package resource?  That cannot work if
'mydefine1' is called more than once with different parameters.
Resources describe the desired state of the system, so it doesn't even
make sense to declare the same resource differently in different parts
of the same catalog.  It is impossible to accommodate multiple
different specifications, because a resource can have only one state
at a time.

On the other hand, if the parameters for the package will be the same
every time 'mydefine1' is called within each given node's catalog,
then you definitely can put the package declaration (virtual or not)
into a class.  You don't have to convert 'mydefine1' into a class, as
our examples show: you can put the package into an existing class if
there's a suitable one, or you can create a new class for it, as in
the example.  It is still quite possible to customize the package's
parameters for each node.

You may need to rearrange your manifests more than you hoped before
they work, but there is no avoiding the prohibition against multiple
declarations of the same resource.  We may be able to provide better
help if you are more specific about what you're trying to do.
-- 
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] Recipes/modules for multiple instances of web server?

2010-01-12 Thread Jesús Couto
BTW, what is the necessary output for the status command on a base service
provider to make puppet realize the service is up or not? Cause right now it
ALWAYS find that the service is not running, with a small script like this:

#!/bin/bash

. /etc/webinstances/uno/envvars
if [ -f $APACHE_PID_FILE ]; then
echo Running:(`cat $APACHE_PID_FILE`)
else
echo Not Running
fi


Best regards,
--

Jesús Couto F.
-- 

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] Mac 10.5 vs 10.6 with 0.25.2

2010-01-12 Thread Roy Nielsen

Hello,

I have an issue - My code works fine on a Mac OS X 10.5.8 box, but not 
10.6.2:


52: if ( (($lanl_sav_version !~ /10.2/)   and 
($macosx_productversion =~ /10.4/)) or
53:  (($lanl_sav_version != 10.2.3) and 
($macosx_productversion =~ /10.5/)) or
54:  (($lanl_sav_version != 10.2.3) and 
($macosx_productversion =~ /10.6/)) ) {


On 10.6, I am getting the following error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Cannot reassign variable 0 at
/var/puppet/environments/development/modules/lanl-baseline/manifests/classes/sav.pp:52 
on node h09353by20h.lanl.gov


I'm guessing it has something to do with the !~ ?

Anyone have any ideas?

Thanks,
-Roy

-- 
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] Mac 10.5 vs 10.6 with 0.25.2

2010-01-12 Thread Roy Nielsen

Sorry, the version of puppet we're running is 0.25.1..

Also, we changed the code to:

52:if ( (($lanl_sav_version !~ /10.2/)   and 
($macosx_productversion_major == 10.4)) or
53:  (($lanl_sav_version != 10.2.3) and 
($macosx_productversion_major == 10.5)) or
54:  (($lanl_sav_version != 10.2.3) and 
($macosx_productversion_major == 10.6)) ) {


and it worked... Is there a problem with regex's in 0.25.1?

Regards,
-Roy

Roy Nielsen wrote:

Hello,

I have an issue - My code works fine on a Mac OS X 10.5.8 box, but not 
10.6.2:


52: if ( (($lanl_sav_version !~ /10.2/)   and 
($macosx_productversion =~ /10.4/)) or
53:  (($lanl_sav_version != 10.2.3) and 
($macosx_productversion =~ /10.5/)) or
54:  (($lanl_sav_version != 10.2.3) and 
($macosx_productversion =~ /10.6/)) ) {


On 10.6, I am getting the following error:

err: Could not retrieve catalog from remote server: Error 400 on 
SERVER: Cannot reassign variable 0 at
/var/puppet/environments/development/modules/lanl-baseline/manifests/classes/sav.pp:52 
on node h09353by20h.lanl.gov


I'm guessing it has something to do with the !~ ?

Anyone have any ideas?

Thanks,
-Roy



-- 
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] Recipes/modules for multiple instances of web server?

2010-01-12 Thread Scott Smith

On 1/12/10 7:24 AM, Jesús Couto wrote:

BTW, what is the necessary output for the status command on a base
service provider to make puppet realize the service is up or not? Cause
right now it ALWAYS find that the service is not running, with a small
script like this:



Looking at other init scripts, I would make a guess at the return code of the script. You can always 
browse the Puppet source for the init provider and see for yourself, though. You learn more that way :)


-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] Recipes/modules for multiple instances of web server?

2010-01-12 Thread Peter Meier
Looking at other init scripts, I would make a guess at the return  
code of the script. You can always browse the Puppet source for the  
init provider and see for yourself, though. You learn more that way :)


it is the exit code.

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] Recipes/modules for multiple instances of web server?

2010-01-12 Thread Silviu Paragina

Jesús Couto wrote:
Hi. I'm trying to do a test/proof of concept of Puppet as a tool to 
manage our systems.

Hello, wow long mail. :)


In our enviroment we have several different instances of apache 
running on each webserver machine, and several instances of tomcat 
running in our appservers machines


I'm trying to duplicate that structure using Puppet on a Ubuntu 
machine I'm using for testing, to no avail yet.


Isnt any well know recipe to do this? Or at least an idea about how to 
go to achieve it?


So far what I've done is this:

- Define a class webserver that ensures the apache package is 
installed and NOT running, and creates a directory for the instances 
info to be stored


class webserver {
case $operatingsystem {
ubuntu: { $web_packages = apache2 }
}

package { $web_packages: ensure = installed }

service { httpd:
name = $operatingsystem ? {
ubuntu = apache2,
},
ensure = stopped,
enable = false,
}
file {/etc/webinstances/:
ensure = directory,
owner = root,
group = root,
mode = 755,
}
}

- Include that class into a definition of webinstance that tries to 
populate the directory of that instance from the puppet fileserver, 
and start/stop a base service provider with a script generated from 
a template:


define webinstance(owner,group,ensure = running) {
include webserver
file { /etc/webinstances/$name/:
owner = $owner,
group = $group,
mode = 600,
ensure = directory,
recurse = true,
source = puppet:///webinstances/$name/,
}

Sidenote: the above resource will not purge old files.

file { /usr/sbin/start_$name.sh:
owner = root,
group = root,
mode = 700,
content = template(start_instance.erb),

}
file { /usr/sbin/stop_$name.sh:
owner = root,
group = root,
mode = 700,
content = template(stop_instance.erb),
}
service { $name:
ensure = $ensure,
provider = base,
start = /usr/sbin/start_$name.sh,
stop = /usr/sbin/stop_$name.sh,
status = /usr/sbin/apache2 -f 
/etc/webinstances/$name/apache2.conf -k sta

rt,
require = [ 
File[/etc/webinstances/$name],File[/usr/sbin/start_$name.sh

],File[/usr/sbin/stop_$name.sh] ],
}
}
This sounds sane, with the possible addition of the 
/etc/webinstances/$name/apache2.conf as a notify resource to restart the 
service




- every node that needs to have an instance will define it

node staberinde {
webinstance { uno:
owner = root,
group = root,
ensure = running,
}
webinstance { dos:
owner = root,
group = root,
ensure = running,
}
}

... but appart from not getting the scripts to start  stop the 
instances (it says the scripts return 1 although I can run them from 
the prompt without problem:


err: //Node[staberinde]/Webinstance[uno]/Service[uno]/ensure: change 
from stopped to running failed: Could not start Service[uno]: 
Execution of '/usr/sbin/start_uno.sh' returned 1:  at 
/etc/puppet/manifests/webinstance-definition.pp:31
The return value of the scripts should be 0. (check for exit statements 
in the script)
Unfortunately the scripts are the fault here and they should return 0 
for success and anything else for failure, this is the way puppet 
figures out if everything went ok or not.

To check the return value of the scripts run them and then echo $? EX:
/usr/sbin/start_uno.sh
echo $?
Also make sure that the status is correct. (try running puppet wile the 
services are running, and wile not, but I guess they are not since this 
should install them, right?)


... the other thing that is making me think this is convoluted and 
wrong is... what if I want the same instance in 2 nodes, as we do? can 
I use the definition on both nodes with the same parameters and not 
get an error cause I'm defining the same resource twice?
The only problem is using the same resource twice on the same node. You 
can apply the same resource for each node you have if you wish.



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] 0.25.2 available via git?

2010-01-12 Thread Silviu Paragina
When you apt-get source the package you get a few files. A tar.gz (bz2 
not sure), a diff, and few more (not interesting for this problem). The 
tar one is the original source code, the diff is the difference from the 
debian package (including the debian dir). So all you need to do is 
apply that patch. If the gap between 0.25.1 0.25.2 isn't that big it 
should work. ;)




Silviu

Steve Wray wrote:

James Turnbull wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/01/10 6:57 AM, Steve Wray wrote:

Hi there

I'd like to build packages of 0.25.2 for Debian but I'm finding that 
the git repositories are still on 0.25.1


I am not sure how that's happening because they aren't. :)


I'm not sure of how I should get 0.25.2 from git.

At the moment I'm using the commandline:

git clone git://github.com/reductivelabs/puppet


$ git clone git://github.com/reductivelabs/puppet.git
$ cd puppet
$ git branch --track 0.25.x origin/0.25.x
$ git checkout 0.25.x

$ cat lib/puppet.rb | grep 'PUPPET'
PUPPETVERSION = '0.25.2'

Regards


Thanks, and yes I actually figured that part out myself :)

The problem is that I want to be able to use git-buildpackage, and the 
reductive labs version doesn't have the debian subdirectory.


Its ok though, I understand that this is moving along and will 
probably be all fine later this week.







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/

iQEVAwUBS0uZ9iFa/lDkFHAyAQL+0wgAxwPKiE5rV73VRONgY6dexx5cab7s4CWX
cDVHWEyfoAYl1ndyLTbYtu9ng+W2k9VqviUJHH2/5Jc2sVMmYrO7YweuTCvAdIMy
MwCNf8uO6FF8WqNG0qw69Sz+N129noUqsOmc8k+V0y8CZy6QjVLWoJnUOL2SB/rC
Mhtto8d9yixtiPL0lYLfbx5M16jyUJ3VS8od6aeCHbxbzmvTGIkfLJBXyorTZZdI
Ixr6AtBl3CCOWBHVq6CN+rytY8Ee3CSgeaTIawD/B8jKNth5bgqlj23klPogB5J8
6wxC3qvsR7TfJqJVQjZoHwkfbMipoQSPL9CtJtNx9tqQ/xdNUAzvXQ==
=Dhix
-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.




[Puppet Users] Config variables in templates

2010-01-12 Thread JL
Is it possible to use configuration variables in templates?  For
example, I want a template to reference ssldir from /etc/puppet/
puppet.conf.  I tried %= ssldir %, but that did not work.
-- 
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] Re: Config variables in templates

2010-01-12 Thread JL
Never mind, that's what I was looking for Trevor, thanks.

On Jan 12, 12:56 pm, JL jlym...@gmail.com wrote:
 I was hoping there was a way to do it with ruby, but I am just
 learning the language.  I know that puppetd --genconfig returns the
 value, so I was thinking there must be a way to do it with a simple
 ruby code snippet embedded within the template.
-- 
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] Re: Config variables in templates

2010-01-12 Thread JL
How about qualified variables?  For example:

myclass.pp:
class myclass {
$test = content
}

otherclass/template.erb:
%=  myclass::test %


On Jan 12, 12:45 pm, Trevor Vaughan tvaug...@onyxpoint.com wrote:
 %= Puppet[:ssldir] %
-- 
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] content questions

2010-01-12 Thread Derek Yarnell
So using the content = attribute on files is obviously very helpful.  We
are using it and templating to really do some powerful things.  However, I
have run into a few cases where I want to have for example have a file and
then prepend or append onto it another file(s).  Now I know I can redefine
the content attribute however if I had say more than one file to append my
logic becomes very hard to deal with.

Something like this is what I wanted to do but get a error about using a
private method 'split'.

class foo {

$array = ['module/foo.erb']

file { foobarbaz:
content = template($array)
}
}

class bar inherits foo {
   $array += ['module/bar.erb']
}

Anyone been trying to do something similar?

-- 
---
Derek T. Yarnell
-- 

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] 0.25.2 available via git?

2010-01-12 Thread Steve Wray

Nigel Kersten wrote:

And I just noticed that 0.25.3 is out, so you should be using that if possible.


Thanks for the help, its been great.

I'm trying to figure out what I should do if I have followed the 
instructions enclosed for 0.25.2 and then wanted to continue with 0.25.3.


As it stands, when I used the command:

git checkout -b upstream 0.25.3

it told me that there was already an 'upstream' branch.

What I actually did was I just deleted the puppet directory and worked 
through it from scratch with 0.25.3 instead of 0.25.2, just to get things 
moving.


This is really a git question so, understandably, not sending it to the list :)







On Tue, Jan 12, 2010 at 9:34 AM, Nigel Kersten nig...@google.com wrote:

On Mon, Jan 11, 2010 at 2:29 PM, Silviu Paragina sil...@paragina.ro wrote:

When you apt-get source the package you get a few files. A tar.gz (bz2 not
sure), a diff, and few more (not interesting for this problem). The tar one
is the original source code, the diff is the difference from the debian
package (including the debian dir). So all you need to do is apply that
patch. If the gap between 0.25.1 0.25.2 isn't that big it should work. ;)

It should be simpler to use git-buildpackage.

# apt-get install git-buildpackage
$ git clone git://git.debian.org/git/pkg-puppet/puppet.git
$ cd puppet
$ git remote add reductive git://github.com/reductivelabs/puppet.git
$ git remote update
$ git checkout -b upstream 0.25.2
$ git checkout master
$ dch -i
add something like:

--
puppet (0.25.2-1) unstable; urgency=low

 * 0.25.2 internal release

 -- Nigel Kersten nig...@google.com  Tue, 12 Jan 2010 09:29:49 -0800
--
(at least bump the version to 0.25.2, you should probably suffix it
with an internal ~mycorp or something to distinguish it from real
upstream builds or whatever your internal processes are)

$ git add debian/changelog
$ git commit -m 0.25.2 changelog update
$ git-buildpackage

That should result in a 0.25.2 deb in the parent directory.

The advantage of doing it this way is that you can pull in *any*
puppet git branch as upstream. If you're more familiar with
git-buildpackage, you can point it at any git branch as upstream, but
this seemed a simpler path to follow.





Silviu

Steve Wray wrote:

James Turnbull wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/01/10 6:57 AM, Steve Wray wrote:

Hi there

I'd like to build packages of 0.25.2 for Debian but I'm finding that the
git repositories are still on 0.25.1

I am not sure how that's happening because they aren't. :)


I'm not sure of how I should get 0.25.2 from git.

At the moment I'm using the commandline:

git clone git://github.com/reductivelabs/puppet

$ git clone git://github.com/reductivelabs/puppet.git
$ cd puppet
$ git branch --track 0.25.x origin/0.25.x
$ git checkout 0.25.x

$ cat lib/puppet.rb | grep 'PUPPET'
PUPPETVERSION = '0.25.2'

Regards

Thanks, and yes I actually figured that part out myself :)

The problem is that I want to be able to use git-buildpackage, and the
reductive labs version doesn't have the debian subdirectory.

Its ok though, I understand that this is moving along and will probably be
all fine later this week.





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/

iQEVAwUBS0uZ9iFa/lDkFHAyAQL+0wgAxwPKiE5rV73VRONgY6dexx5cab7s4CWX
cDVHWEyfoAYl1ndyLTbYtu9ng+W2k9VqviUJHH2/5Jc2sVMmYrO7YweuTCvAdIMy
MwCNf8uO6FF8WqNG0qw69Sz+N129noUqsOmc8k+V0y8CZy6QjVLWoJnUOL2SB/rC
Mhtto8d9yixtiPL0lYLfbx5M16jyUJ3VS8od6aeCHbxbzmvTGIkfLJBXyorTZZdI
Ixr6AtBl3CCOWBHVq6CN+rytY8Ee3CSgeaTIawD/B8jKNth5bgqlj23klPogB5J8
6wxC3qvsR7TfJqJVQjZoHwkfbMipoQSPL9CtJtNx9tqQ/xdNUAzvXQ==
=Dhix
-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.







--
nigel








--
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.


If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.
-- 
You received this 

[Puppet Users] creating directories

2010-01-12 Thread Christopher Johnston
What is the best way to have puppet create (mkdir) directories?  I am
currently using exec types, but is it possible to use a file type for this?

-Chris
-- 

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] creating directories

2010-01-12 Thread Andres Olarte
Yes,

Just use the file type, and set ensure to directory:

file { /etc/myapp:
ensure = directory
}


On Tue, Jan 12, 2010 at 4:34 PM, Christopher Johnston
chjoh...@gmail.com wrote:
 What is the best way to have puppet create (mkdir) directories?  I am
 currently using exec types, but is it possible to use a file type for this?
 -Chris
 --
 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.





-- 
Andres Olarte
dotCMS
Main: 305.858.1422
Direct: 786.594.5285
Fax: 305.397.1719
www.dotCMS.org

Packt Publishing's 2009 Best Non PHP Open Source CMS Finalist
-- 
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] creating directories

2010-01-12 Thread Scott Smith

Christopher Johnston wrote:
What is the best way to have puppet create (mkdir) directories?  I am 
currently using exec types, but is it possible to use a file type for this?




http://reductivelabs.com/trac/puppet/wiki/TypeReference#file

Look for ensure

-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] creating directories

2010-01-12 Thread Christopher Johnston
Ahh, ok cool I am using that for symlinks as well I will try that.  Thx!

-Chris

On Tue, Jan 12, 2010 at 4:37 PM, Andres Olarte andres.ola...@dotcms.orgwrote:

 Yes,

 Just use the file type, and set ensure to directory:

 file { /etc/myapp:
ensure = directory
 }


 On Tue, Jan 12, 2010 at 4:34 PM, Christopher Johnston
 chjoh...@gmail.com wrote:
  What is the best way to have puppet create (mkdir) directories?  I am
  currently using exec types, but is it possible to use a file type for
 this?
  -Chris
  --
  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.
 
 



 --
 Andres Olarte
 dotCMS
 Main: 305.858.1422
 Direct: 786.594.5285
 Fax: 305.397.1719
 www.dotCMS.org

 Packt Publishing's 2009 Best Non PHP Open Source CMS Finalist

 --
 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] New User Manifest Tips

2010-01-12 Thread jcbollinger
I'm considering writing some new-user tips -- something brief,
focusing on writing manifests.  Ideally, I will put it on the wiki
when it's in reasonably good shape.

I'm interested in your comments about whether this would overlap too
much with the existing tutorial material, and I welcome any tips you
might want to contribute.  I also welcome any commentary about the
tips I've already got:

1. Start small.  Begin with a manifest that controls just one thing,
via one of the built-in resource types.  Host, File, and Service are
good choices for your first managed resource.

2. All resource declarations and variables should go inside classes.
No exceptions.

3. All classes should go inside modules.  No exceptions.

4. Avoid virtual and exported resources (@resource {...} or @@resource
{...}) until you have a good grasp of the rest of the Puppet
language.  These frequently confuse people who don't understand the
tao of Puppet.

5. Avoid defined types (introduced via the 'define' keyword) until you
have a good grasp of the rest of the Puppet language.  These are
syntactic sugar, with a gotcha or two mixed in.  New users can better
avoid the gotchas if they first acquire a good grasp other parts of
the language.

6. Follow the style guide.  At worst, write your own style guide and
follow that.

7. With Puppet, you influence the order in which resources are applied
via the require and before metaparameters.  Use them where
necessary (and only where necessary).

8. Use an SCM system such as Subversion or git to track and manage
your manifests.
-- 
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] New User Manifest Tips

2010-01-12 Thread Scott Smith

jcbollinger wrote:

2. All resource declarations and variables should go inside classes.


Unless you're using external nodes, I don't see a problem with using 
resources directly in a node.


-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] Re: Virtual ressource in a define

2010-01-12 Thread Sébastien Prud'homme
Hi,

The example is just there to show the duplicate problem that i don't
understand as i use a virtual ressource.

Here is another one:

define mydefine1 {
 @file{ /$name: ensure = directory }
}

define mydefine2($dir) {
 mydefine1 { $dir: }

 realize File[/$dir]

 file{ /$dir/$name: ensure = directory }
}

mydefine2 { test1: dir = test}
mydefine2 { test2: dir = test}

I've got a lot of mydefine2 to declare. Sure a workaround would be to
add all the mydefine1 declarations in one single class and remove it
from mydefine2 but i find it's not an elegant solution.

2010/1/12 jcbollinger john.bollin...@stjude.org:


 On Jan 11, 3:41 pm, Sébastien Prud'homme
 sebastien.prudho...@gmail.com wrote:
 Thanks for the responses. My example is just an example. My real
 define has some parameters so it's not possible to use a class.

 Whether 'mydefine1' has parameters is irrelevant to whether you can
 achieve your configuration goal by putting the package declaration
 into a class.

 Are you trying to say that the parameters to 'mydefine1' are used to
 set properties of the Package resource?  That cannot work if
 'mydefine1' is called more than once with different parameters.
 Resources describe the desired state of the system, so it doesn't even
 make sense to declare the same resource differently in different parts
 of the same catalog.  It is impossible to accommodate multiple
 different specifications, because a resource can have only one state
 at a time.

 On the other hand, if the parameters for the package will be the same
 every time 'mydefine1' is called within each given node's catalog,
 then you definitely can put the package declaration (virtual or not)
 into a class.  You don't have to convert 'mydefine1' into a class, as
 our examples show: you can put the package into an existing class if
 there's a suitable one, or you can create a new class for it, as in
 the example.  It is still quite possible to customize the package's
 parameters for each node.

 You may need to rearrange your manifests more than you hoped before
 they work, but there is no avoiding the prohibition against multiple
 declarations of the same resource.  We may be able to provide better
 help if you are more specific about what you're trying to do.

 --
 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.




Re: [Puppet Users] content questions

2010-01-12 Thread Silviu Paragina
Check out this thread 
http://groups.google.com/group/puppet-users/browse_thread/thread/8f9f0a090c9ac235


especially the git repository mentioned in the thread.


Silviu


Derek Yarnell wrote:
So using the content = attribute on files is obviously very helpful. 
 We are using it and templating to really do some powerful things. 
 However, I have run into a few cases where I want to have for example 
have a file and then prepend or append onto it another file(s).  Now I 
know I can redefine the content attribute however if I had say more 
than one file to append my logic becomes very hard to deal with. 

Something like this is what I wanted to do but get a error about using 
a private method 'split'.


class foo {

$array = ['module/foo.erb']

file { foobarbaz:
content = template($array)
}
}

class bar inherits foo {
   $array += ['module/bar.erb']
}

Anyone been trying to do something similar?

--
---
Derek T. Yarnell



--
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.




Re: [Puppet Users] 0.25.2 available via git?

2010-01-12 Thread Silviu Paragina

Steve Wray wrote:


Thanks for the help, its been great.

I'm trying to figure out what I should do if I have followed the 
instructions enclosed for 0.25.2 and then wanted to continue with 0.25.3.


As it stands, when I used the command:

git checkout -b upstream 0.25.3

it told me that there was already an 'upstream' branch.

What I actually did was I just deleted the puppet directory and worked 
through it from scratch with 0.25.3 instead of 0.25.2, just to get 
things moving.


This is really a git question so, understandably, not sending it to 
the list :)

None the less, since this is a bit of a common question for this howto it's
git branch -D upstream

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] New User Manifest Tips

2010-01-12 Thread R.I.Pienaar
'lo,

- Scott Smith sc...@ohlol.net wrote:

 jcbollinger wrote:
  2. All resource declarations and variables should go inside
 classes.
 
 Unless you're using external nodes, I don't see a problem with using 
 resources directly in a node.

beginners wont know, it's a helpful tip since most eventually will want to use 
tools like dashboard/foreman and they'll regret not knowing it then :)

here's some more:

Easily changable exec's:
When creating an exec resource do not put the command in the resource name, 
imagine this hypothetical example:

exec{do_complex_stuff:
command = /some/command --with --lots --of --arguents
}

file{/etc/foo:
before = Exec[do_complex_stuff]
}

The temptation is to do the simple thing and just put the command as the name 
of the exec,
the effect of this is if you ever need to change the command you also have to 
go find
all places that has relation ships based on the full command, using a short 
descriptive name
makes everything more readable and managable

Don't leave out important properties on file{}:
If you do not specify owner, group and mode on a file it will default to
whatever is on the souce, this is often not what u want and will cause
confusion.

-- 
R.I.Pienaar
-- 
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] New User Manifest Tips

2010-01-12 Thread Scott Smith

R.I.Pienaar wrote:

beginners wont know, it's a helpful tip since most eventually will want to use 
tools like dashboard/foreman and they'll regret not knowing it then :)



Sure, but unless the exception is noted, some people may never find out.

-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] Re: port 8139 not opening up

2010-01-12 Thread lovewadhwa
Hi all

Please help concerning the problem.Is there any other thing besides 
listen=true directive which refrains from the port being opened?
please help.

On Jan 12, 6:00 pm, Ohad Levy ohadl...@gmail.com wrote:
 i think that you need the host fqdn in there, but thats another story :)

 On Tue, Jan 12, 2010 at 8:58 PM, lovewadhwa lovewad...@gmail.com wrote:
  Yes in /etc/puppet, i have namespaceauth.conf which contains allownace
  to all.The entry in namespaceauth.conf file is

  [puppetrunner]
   allow *

  On Jan 12, 5:43 pm, Ohad Levy ohadl...@gmail.com wrote:
   did you setup a namespaceauth file?

   Ohad

   On Tue, Jan 12, 2010 at 7:56 PM, lovewadhwa lovewad...@gmail.com
  wrote:
Hi all

If anyone please could help me out.I tried everything but amn't
getting where's the problem.

On Jan 11, 4:03 pm, lovewadhwa lovewad...@gmail.com wrote:
 I had following parameters set in my conf file.When i run puppetd, it
 isn't opening the desired port.I have specified listen=true in my
 conf file but still the port is n't opening.This is what my conf file
 contains:

 [main]
  server = puppet.resdex.com
   vardir = /var/lib/puppet
  logdir = /var/log/puppet
  rundir = /var/run/puppet
  ssldir = $vardir/ssl
 [puppetd]
  classfile = $vardir/classes.txt
  localconfig = $vardir/localconfig
  listen=true
  user = puppet
  bindaddress=10.X.X.X
  certname=10.X.X.X

 When i start the puppetd with the following command:

 puppetd --no-daemonize --debug --verbose

 it provides me this output

 debug: Failed to load library 'shadow' for feature 'libshadow'
 debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/
 dscl does not exist
 debug: Puppet::Type::User::ProviderPw: file pw does not exist
 debug: Puppet::Type::User::ProviderUser_role_add: file roledel does
 not exist
 debug: Failed to load library 'ldap' for feature 'ldap'
 debug: Puppet::Type::User::ProviderLdap: feature ldap is missing

 I don't see if port not opening has to do anything with above output.
 The command runs but the port is not opening.Please help.

--
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
  puppet-users%2bunsubscr...@googlegroups.compuppet-users%252bunsubscr...@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.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.




Re: [Puppet Users] Re: Puppet for app deployment

2010-01-12 Thread Silviu Paragina

Probably a brainfart, but:
This scenario is typical and would suggest the requirement of database 
resource. And this would be just enough.


Hypothetical example:
On the db machine you will have a resource like:
database
{ mydb:
   ensure = 34,
   versionscript = puppet:///modules/myapp/db_getversion.sql,
   installscript = puppet://...,
   updatescript = puppet:///
   server = db-serv.example.com,
   username = ,
   .
}

Now the ensure would be the required installed version of the db, or 
simply true. Version script should return the current version of the db 
when run. Install script creates the db, optional update updates the db 
from a version to another.


The cool thing about this is that it can be added on the web app node 
too as a check/dependency solver.


This or similar cases should be solvable with a similar solution.

What are your ideas about this?


Silviu


Jesús Couto wrote:
I'm finding this discussion interesting and... depressing, as I'm 
trying to model an enviroment where our #1 task is to deploy Java web 
apps on tomcat servers.


Is there any already existant documentation/resource discussing this? 
The 2 objections listed are interesting, even if my enviroment usually 
does not have the second, the first mean that I will have a difficult 
time deploying on one leg and then on the other leg using Puppet, 
right? As in, I'm not going to know if it is being deployed on both at 
the same time, causing an outage, unless I do some kind of hack 
(change the resource in one node, then in the other...)


I'm correct? Are those arguments explained in detail somewhere?

--

Jesús Couto F.



--
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.