Re: [Puppet Users] Re: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ruby::gemInstall at myFile.pp:82

2012-06-28 Thread Felix Frank
Hi,

I don't really know how this even compiles, but here's what I think
needs changin.

Before you go on with this - do you have pressing reasons for not using
package { gemname: provider = gem } ?

On 06/27/2012 10:14 PM, llow...@oreillyauto.com wrote:
  define ruby::gemInstall (
   r_gem = $name,
   $r_gem = $name,
   r_path = hiera('v_rubygem_path')
   $r_path = ...
   ){
 
   r_gemName = regsubst($r_gem, '([^-]+)-.*\.gem', '\1')
   $r_gemName = ...
 
   exec { gem_install_${r_gemName}:
 command = /usr/local/bin/gem install ${r_gemName},
 cwd = $r_path,
 unless  = gem list -i ${r_gemName},
 require = Package['rubygems'],
   }
 }

HTH,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] puppet node report

2012-06-28 Thread hai wu
Is there a way to download latest node report log from puppet dashboard?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] freebsd ports config, cache distfiles

2012-06-28 Thread Gregory Orange
Hi everyone, first post. I've got Puppet installed on a FreeBSD 8.3 
client  server from the guides, and deploying simple packages from the 
default node and a node which inherits it. I have /usr/ports mounted via 
NFS from the puppet server.


I have two queries now:

1. For more complicated packages, a config dialogue comes up (i.e. cd 
/usr/ports/category/port; make config). How do I automatically configure 
that, with settings to my choosing?
I suppose I could push out the relevant /var/db/ports/port/options file 
- is that recommended, or is there something better?


2. /usr/ports/distfiles/ doesn't always have the package files 
available, especially if the given package isn't installed on the 
server. This causes installation to fail. How should I go about 
instructing the puppet server to cache those files? To do it manually:

cd /usr/ports/category/port; make fetch
Of course I don't want to do it manually!

Cheers,
Greg.

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@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] Fwd: possible changes to puppet config file

2012-06-28 Thread David Schmitt

On 26.06.2012 10:04, Felix Frank wrote:

Hi,

On 06/26/2012 02:01 AM, Chris Price wrote:


Slightly longer term, we are thinking of simply removing support for
run-mode-specific configuration sections in the puppet.conf file.  We
would only allow three sections: main (possibly renamed to global or
similar), master, and ca.  (Obviously you could still specify
environments in there as well, though we probably should move those to a
separate config file in the future.)


sounds good to me. I'm generally supportive of things aimed at
simplification, and I fail to see any downsides to this one.

Best,
Felix


What Felix said.

If you're at it: It is ugly that an environment master will 
automatically pull in the puppetmaster settings too. Especially if the 
manifests are in git and every branch is an environment.




Best Regards, David

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@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: error after upgrading from 2.7.14-2puppetlabs1 to 2.7.17-1puppetlabs1

2012-06-28 Thread Erik Dalén
On 28 June 2012 02:00, Jeff McCune j...@puppetlabs.com wrote:
 On Wed, Jun 27, 2012 at 3:36 PM, llow...@oreillyauto.com
 I had originally thought that 3.X would be the change where it went from
 warning to error, but it looks like they pushed this out with 2.7.17 for
 whatever reason.

 It was never a deprecation warning as far as I can tell.  2.6.16
 errors out, as does 2.6.7 and 2.6.12.  2.7.0 and 2.7.1 did error out.
 2.7.3 didn't error out for whatever reason and this was the point we
 accidentally regressed to allowing hyphens in variable names.  This
 allowance remained all the way through 2.7.14.  In 2.7.16 we fixed
 it again to error out with hyphens in variable names.  This remained
 in 2.7.17.

 So, I think the story is...  Don't use hyphens in variable names (and
 class names).  We accidentally allowed them from 2.7.3 through 2.7.14
 but we've gone back to it being an error.


But it is only dashes in variables that produce errors in 2.7.16+, right?
I know they are deprecated in class names as well, but they have
worked in them for the most part since 0.24.x releases at least AFAIK.
Ofc if they aren't allowed in variable names you shouldn't be able to
refer to variables in classes with dashes, like $class-name::variable.

We unfortunately still have some classes with dashes in the names but
no variables, so I want to know if it is safe to upgrade to 2.7.17?

-- 
Erik Dalén

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: error after upgrading from 2.7.14-2puppetlabs1 to 2.7.17-1puppetlabs1

2012-06-28 Thread R.I.Pienaar


- Original Message -
 From: Erik Dalén erik.gustav.da...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, June 28, 2012 9:42:43 AM
 Subject: Re: [Puppet Users] Re: error after upgrading from 
 2.7.14-2puppetlabs1 to 2.7.17-1puppetlabs1
 
 On 28 June 2012 02:00, Jeff McCune j...@puppetlabs.com wrote:
  On Wed, Jun 27, 2012 at 3:36 PM, llow...@oreillyauto.com
  I had originally thought that 3.X would be the change where it
  went from
  warning to error, but it looks like they pushed this out with
  2.7.17 for
  whatever reason.
 
  It was never a deprecation warning as far as I can tell.  2.6.16
  errors out, as does 2.6.7 and 2.6.12.  2.7.0 and 2.7.1 did error
  out.
  2.7.3 didn't error out for whatever reason and this was the point
  we
  accidentally regressed to allowing hyphens in variable names.  This
  allowance remained all the way through 2.7.14.  In 2.7.16 we
  fixed
  it again to error out with hyphens in variable names.  This
  remained
  in 2.7.17.
 
  So, I think the story is...  Don't use hyphens in variable names
  (and
  class names).  We accidentally allowed them from 2.7.3 through
  2.7.14
  but we've gone back to it being an error.
 
 
 But it is only dashes in variables that produce errors in 2.7.16+,
 right? I know they are deprecated in class names as well, but they have
 worked in them for the most part since 0.24.x releases at least
 AFAIK. Ofc if they aren't allowed in variable names you shouldn't be able to
 refer to variables in classes with dashes, like
 $class-name::variable.
 
 We unfortunately still have some classes with dashes in the names but
 no variables, so I want to know if it is safe to upgrade to 2.7.17?

It does unfortunately still allow - in class names, I think the fix for
this was half baked as you couldn't access variables in those classes
from outside of the class

docs says:

Class names, module names, and the names of defined and custom resource
types should be restricted to lowercase alphanumeric characters and
underscores, and should begin with a lowercase letter; that is, they
should match the expression [a-z][a-z0-9_]*. Although some names that
violate these restrictions currently work, using them is not
recommended.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: error after upgrading from 2.7.14-2puppetlabs1 to 2.7.17-1puppetlabs1

2012-06-28 Thread Steph Gosling
Hi, 

On Thu, 28 Jun 2012 10:42:43 +0200
Erik Dalén erik.gustav.da...@gmail.com wrote:

 We unfortunately still have some classes with dashes in the names but
 no variables, so I want to know if it is safe to upgrade to 2.7.17?

For us at least classes like this still work with .17. I should say
though that these are all very simple classes (describing packages
typically), most aren't even parameterized.

Cheers,

Steph

-- 
Steph Gosling st...@chuci.org

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] Error 400 on SERVER: invalid value for Integer

2012-06-28 Thread Kmbu
Hi,

I'm almost 100% sure I saw this before I even implemented 
Apache/Passenger...so I would say quite confidently that it's not Passenger 
related. My database server is very very underutilized at the moment, so 
I'm also quite sure it's not a load issue on MySQL.

But if it were a server-side issue, why would the error code be 400 (bad 
request)?

Regards,

On Wednesday, 27 June 2012 10:33:45 UTC+2, Felix.Frank wrote:

 Hi, 

 On 06/25/2012 11:34 AM, Kmbu wrote: 
  To me 400 implies that the client is responsible for the error, not the 
  puppetmaster. 

 this sounds a little far-fetched, to be honest. 

 For example, the agent might be sending a broken request, making the 
 master believe a certain fact value is this long string instead of an 
 integer, true. But then, the master could get corrupted data from any 
 number of sources, few of them being the agent. 

 If you cannot really reproduce, this will be hard to debug. Essentially 
 what I like doing is 
 1. start a standalone puppet master with an alternative listen port with 
 no-daemonize and debug options 
 2. have agents run using this master port and watch debug output 

 Of course, in your case you'd have to keep trying until you trigger a 
 failure condition. If you consistently fail to do that, it may even be a 
 passenger related problem... 

 Cheers, 
 Felix 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Z8hkgL0pdSYJ.
To post to this group, send email to puppet-users@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] Error 400 on SERVER: invalid value for Integer

2012-06-28 Thread Felix Frank
Hi,

On 06/28/2012 12:12 PM, Kmbu wrote:
 But if it were a server-side issue, why would the error code be 400 (bad
 request)?

well, any HTTP server can issue 400 codes whenever it pleases, puppet is
not obliged to restrict the code to broken request headers.

That being said, you can of course start your debugging based on the
thesis that puppetlabs have been paying attention and adhering to the rule.

You could then e.g. just start wiresharking all your agent requests and
once you trigger the error, compare the request to an unbroken one.

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Is it possible to access type params in another type?

2012-06-28 Thread Yanis Guenane
John, thanks a lot for your answers.

I was doing it this way at first, but I thought that providing native type 
would be much simpler for end users.

The same way puppet is providing native types for Nagios I wanted to create 
native type for the application I need.

Anyway I'll get back to defined type and class ;)

Thanks again,

On Tuesday, June 26, 2012 1:07:41 PM UTC+2, Yanis Guenane wrote:

 Hey guys,

 I was wondering if it was possible to access type params within another 
 type.

 Here is an example of what I would like to do.

 Puppet::Type.newtype(:a) do

  newparam(:name) do
   isnamevar
  end

   newparam(:path) do
   end
 end


 Puppet::Type.newtype(:b) do

newparam(:name) do
 isnamevar
end 

newparam(:needs) do
   
/* I want to access path param from 'a' type here 

   something like resource[:needs].path */


end
 end


 And the manifest calling that would be 

  a {'test-a' :
 path = '/usr',
 }

  b {'test-b' :
 needs = a
 }
  



 Is it possible ? 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ouzxtGDl8EkJ.
To post to this group, send email to puppet-users@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] Execute a shell script residing in puppet master

2012-06-28 Thread kalaniS
I'm a newbie to puppet and have been trying to execute a shell script
residing in puppet master machine in a puppet agent, with no luck so
far. Would appreciate any ideas on how to do this.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] Trying link to home directory

2012-06-28 Thread eduardo
Dears all,

  I have been master and agent in the same machine, to did it I took
from http://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/,
so /var/lib/puppetmaster is the puppet working directory for both.
 I need to have a repository on my $HOME nowadays owned by me, so I
trying something like :

  root@casa:/# service puppetmaster stop
 * Stopping puppet
master[ OK ]

root@casa:/# ln -s /home/era/speedy_repo/puppet-eduardo/puppet/ /etc/
puppet

root@casa:/# ls -ld /etc/puppet  # LOOKS GOOD .
lrwxrwxrwx 1 root root 44 2012-06-27 18:12 /etc/puppet - /home/era/
speedy_repo/puppet-eduardo/puppet/


 But a new directory /etc/puppet is created whenever start
puppetmaster.


root@casa:/# service puppetmaster start
 * Starting puppet
master[ OK ]

root@casa:/# ls -ld /etc/puppet  # LOOKS VERY BAD.
drwxr-xr-x 3 root root 4096 2012-06-27 18:13 /etc/puppet
root@casa:/#


 Is there any way to do it ?.


  Thanks in advanced,
  eduardo.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] Trying link to home directory

2012-06-28 Thread Juan Sierra Pons
2012/6/28 eduardo erodr...@gmail.com:
 Dears all,

  I have been master and agent in the same machine, to did it I took
 from http://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/,
 so /var/lib/puppetmaster is the puppet working directory for both.
  I need to have a repository on my $HOME nowadays owned by me, so I
 trying something like :

  root@casa:/# service puppetmaster stop
  * Stopping puppet
 master                                                [ OK ]

 root@casa:/# ln -s /home/era/speedy_repo/puppet-eduardo/puppet/ /etc/
 puppet

 root@casa:/# ls -ld /etc/puppet  # LOOKS GOOD .
 lrwxrwxrwx 1 root root 44 2012-06-27 18:12 /etc/puppet - /home/era/
 speedy_repo/puppet-eduardo/puppet/


  But a new directory /etc/puppet is created whenever start
 puppetmaster.


 root@casa:/# service puppetmaster start
  * Starting puppet
 master                                                [ OK ]

 root@casa:/# ls -ld /etc/puppet  # LOOKS VERY BAD.
 drwxr-xr-x 3 root root 4096 2012-06-27 18:13 /etc/puppet
 root@casa:/#


  Is there any way to do it ?.


  Thanks in advanced,
  eduardo.

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@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.


Hi,

Way do you want to do this? Can you explain a little bit more the reason?

Maybe there is another way to achieve your goal but we need to know it

There are some parameters. eg:
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet

That can be included in the [main] and /or [agent] section of your
puppet.conf that can help in this case

Best regards

--
Juan Sierra Pons j...@elsotanillo.net
Linux User Registered: #257202   http://www.elsotanillo.net
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Trying link to home directory

2012-06-28 Thread eduardo
 Thanks you Juan for quick answer. You are right, i was not clear.

 I began showing my scenario and the way i found to have master and
agent in my pc.

 I need to have /etc/puppet tree in my home directory owned by me, we
are a group having git repositories to development colaboration.


 Thanks you,
  eduardo.


On 28 jun, 08:11, Juan Sierra Pons j...@elsotanillo.net wrote:
 2012/6/28 eduardo erodr...@gmail.com:









  Dears all,

   I have been master and agent in the same machine, to did it I took
  fromhttp://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/,
  so /var/lib/puppetmaster is the puppet working directory for both.
   I need to have a repository on my $HOME nowadays owned by me, so I
  trying something like :

   root@casa:/# service puppetmaster stop
   * Stopping puppet
  master                                                [ OK ]

  root@casa:/# ln -s /home/era/speedy_repo/puppet-eduardo/puppet/ /etc/
  puppet

  root@casa:/# ls -ld /etc/puppet  # LOOKS GOOD .
  lrwxrwxrwx 1 root root 44 2012-06-27 18:12 /etc/puppet - /home/era/
  speedy_repo/puppet-eduardo/puppet/

   But a new directory /etc/puppet is created whenever start
  puppetmaster.

  root@casa:/# service puppetmaster start
   * Starting puppet
  master                                                [ OK ]

  root@casa:/# ls -ld /etc/puppet  # LOOKS VERY BAD.
  drwxr-xr-x 3 root root 4096 2012-06-27 18:13 /etc/puppet
  root@casa:/#

   Is there any way to do it ?.

   Thanks in advanced,
   eduardo.

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

 Hi,

 Way do you want to do this? Can you explain a little bit more the reason?

 Maybe there is another way to achieve your goal but we need to know it

 There are some parameters. eg:
 vardir=/var/lib/puppet
 ssldir=/var/lib/puppet/ssl
 rundir=/var/run/puppet

 That can be included in the [main] and /or [agent] section of your
 puppet.conf that can help in this case

 Best regards

 --
 Juan Sierra Pons                                 j...@elsotanillo.net
 Linux User Registered: #257202      http://www.elsotanillo.net
 GPG key = 0xA110F4FE
 Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
 --

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] packaging puppet modules

2012-06-28 Thread Ken Dreyer
Hi Puppet folks,

I'm a Fedora packager, and I'm looking into packaging up some of the 
modules at http://forge.puppetlabs.com/users/puppetlabs

I'm thinking through the naming scheme for modules. It looks like the 
upstream modules include the creators' names as part of the package names, 
which strikes me as a little verbose from the perspective of Fedora 
packaging.

For example, the Puppetlabs' mysql module RPM  would (in theory) be called 
puppetmodule-puppetlabs-mysql. That's a mouthful. Any chance we could 
have the Puppet Labs' modules be considered canonical modules on the 
Forge, and then strip away the puppetlabs vendor name? Any other ideas 
welcome.

- Ken

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/x3A42LQ8ThgJ.
To post to this group, send email to puppet-users@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] system users class hogging whole cpu

2012-06-28 Thread jcbollinger


On Wednesday, June 27, 2012 8:14:21 AM UTC-5, Azfar Hashmi wrote:

 Thanks Jhon for the response but I am still in black-hole.


After doing what, exactly?  Did you actually try adding these users 
manually via adduser and/or useradd?
 

 Btw total no of users on the system are only below which are in the class.


Please forgive me if I am skeptical.  Does the command 'puppet resource 
user' agree about how many users there are?  (And / or does it exhibit 
similar behavior?)
 

 So I don't think puppet should take much time to find free UIDs. Regarding 
 other classess if I disable all classes and and use only this class the 
 behavior is same no matter how long I remain the process running puppet 
 just do nothing and consume 100% cpu then I have to kill the process 
 eventually. 


Define eventually.  How long have you let it run before killing the job?  
What changes has it succeeded in making before you kill it?

Also, is there a particular user or users in that class that trigger the 
behavior, or do they all do so individually?  And I don't see where you 
presented the code for your users::useraccount definition.  Perhaps there's 
a problem with that.  For instance, is it by any chance managing very large 
files or a large number of files?  Do you have the same problem with plain 
User resources that you have with Users::Useraccount?

You need to determine what is actually happening before you can fix it.  
Felix's suggestion to strace the puppet run is a good one, but before that 
I would look for clues in the agent's and master's logs.  Running one or 
both with --debug output turned on would make clues more likely to appear 
there.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/kmtBjDmWbBUJ.
To post to this group, send email to puppet-users@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: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ruby::gemInstall at myFile.pp:82

2012-06-28 Thread llow...@oreillyauto.com


On Thursday, June 28, 2012 2:24:08 AM UTC-5, Felix.Frank wrote:

 Hi, 

 I don't really know how this even compiles, but here's what I think 
 needs changin. 


That may have been an issue, but it still doesn't work. I get the same 
error.

 

 Before you go on with this - do you have pressing reasons for not using 
 package { gemname: provider = gem } ? 


That provider is not available on this system, I tried that first.

 




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/o-HCH5IyCRMJ.
To post to this group, send email to puppet-users@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] class invocation instead of 'include'

2012-06-28 Thread Russell Harrison
On Tuesday, June 26, 2012 6:14:32 AM UTC-4, Stephen Gran wrote:

 Hi, 



 On Tue, 2012-06-26 at 11:47 +0200, Felix Frank wrote: 
  Hi, 
  
  On 06/26/2012 10:56 AM, Stephen Gran wrote: 
   There is one difference that is most likely a bug.  try this manifest: 
   
   ./test.pp 
   class { 'wobble': } 
   class { 'wibble': } 
  
  I disagree on this being a bug. 
  
  This syntax is for parameterized classes. Such classes cannot be 
  declared more than once, because the declaration binds parameter values 
  that cannot be sanely changed at a later point of compilation. 
  
  So multiple usage of this syntax is not supported. 
  
  I'd suggest avoiding it if it's not needed pass actual class parameters. 

 I disagree that instantiating a class twice with identical (especially 
 default) parameters should result in an error.  A class is a singleton, 
 unlike a define, so should not be indexed solely on it's name.  It 
 should be an error to try to redefine the parameters that you 
 instantiate a class with, of course. 

 However, I see that this is probably not a trivial change, and I don't 
 think it's that big a deal, in practice.  It does mean jumping through 
 some hoops when you have something like multiple application classes 
 using a single parameterized configuration class, but it can be lived 
 with. 


I think I'm good with only allowing declaring a class once with parameters 
it makes since that puppet can't make a decision on which set of parameters 
to use what with not being able to read your mind and all. :-)

I would like to be able to include a class in multiple places even if I 
have declared the class with parameters somewhere else in the catalogue. As 
it works now I can do this as long as the first place the compile sees the 
class is the declaration with parameters.  If you include a class before 
the compiler gets to the parameterized declaration you get the error 
complaining about declaring a class more than once. I sort of view an 
include as saying I just need some stuff from that other class so I can 
reference it here and I don't really care what parameters are passed to 
it. Declaring a class with parameters is for the cases where I do need to 
be specific.

Russell

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/U5r6lEYraQAJ.
To post to this group, send email to puppet-users@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] Off Topic: Passenger / Ruby on Rails for the N00b

2012-06-28 Thread Dan White
I have successfully set up an Apache/Passenger/Puppet(Master)-2.7.x on a RHEL 5 
server and I now have some questions about what I have here.

In my work environment, I am part of a team of admins supporting a collection 
of web servers.  These servers have various stacks on them with assorted 
combinations of Apache, PHP, Tomcat, JBoss, Cold Fusion, MySQL, Oracle, 
MovableType, and Goodness Knows What That I Have Not Yet Tripped Over.

My starting query is: How does Ruby on Rails compare to stacks built with the 
pieces mentioned ?
As I am using Apache/Passenger, I think that Apache itself is a non-issue, but 
I wonder about the rest.

Also, in its first incarnation, my puppet master lived on the same server as a 
Cobbler server.
Are there any issues relating to Passenger/Rails/Rack that would complicate 
putting Cobbler onto this new PuppetMaster ?

Thanks for all the help I get from this list.
I try to assist whenever I can.

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin  Hobbes)

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ruby::gemInstall at myFile.pp:82

2012-06-28 Thread Felix Frank
On 06/28/2012 03:15 PM, llow...@oreillyauto.com wrote:
 
 
 On Thursday, June 28, 2012 2:24:08 AM UTC-5, Felix.Frank wrote:
 
 Hi,
 
 I don't really know how this even compiles, but here's what I think
 needs changin.
 
 
 That may have been an issue, but it still doesn't work. I get the same
 error.

Then I shall go on a limb an suggest you forego camel-case (*cringe*)
and rename to ruby::gem_install, see if that helps. Otherwise I'd be
grateful for yet another verbatim copy of your defined type, also the
information in which manifest file the type declaration resides.

 Before you go on with this - do you have pressing reasons for not using
 package { gemname: provider = gem } ?
 
 
 That provider is not available on this system, I tried that first.

I suppose the provider in and of itself is included in your puppet
distribution (anything else would be madness).
It makes sense that it won't work, seeing as your gem binary is
installed in /usr/local.
What does *not* compute is the fact that you are in fact installing a
rubygems package. Huh? Is this package installing binaries to
/usr/local? Are there other reasons for gem being installed there?

I would still try and go for a working gem provider, but be that as it
may, your defined type really Should Work.

Regards,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Trying link to home directory

2012-06-28 Thread Juan Sierra Pons
2012/6/28 eduardo erodr...@gmail.com:
  Thanks you Juan for quick answer. You are right, i was not clear.

  I began showing my scenario and the way i found to have master and
 agent in my pc.

  I need to have /etc/puppet tree in my home directory owned by me, we
 are a group having git repositories to development colaboration.


  Thanks you,
  eduardo.


 On 28 jun, 08:11, Juan Sierra Pons j...@elsotanillo.net wrote:
 2012/6/28 eduardo erodr...@gmail.com:









  Dears all,

   I have been master and agent in the same machine, to did it I took
  fromhttp://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/,
  so /var/lib/puppetmaster is the puppet working directory for both.
   I need to have a repository on my $HOME nowadays owned by me, so I
  trying something like :

   root@casa:/# service puppetmaster stop
   * Stopping puppet
  master                                                [ OK ]

  root@casa:/# ln -s /home/era/speedy_repo/puppet-eduardo/puppet/ /etc/
  puppet

  root@casa:/# ls -ld /etc/puppet  # LOOKS GOOD .
  lrwxrwxrwx 1 root root 44 2012-06-27 18:12 /etc/puppet - /home/era/
  speedy_repo/puppet-eduardo/puppet/

   But a new directory /etc/puppet is created whenever start
  puppetmaster.

  root@casa:/# service puppetmaster start
   * Starting puppet
  master                                                [ OK ]

  root@casa:/# ls -ld /etc/puppet  # LOOKS VERY BAD.
  drwxr-xr-x 3 root root 4096 2012-06-27 18:13 /etc/puppet
  root@casa:/#

   Is there any way to do it ?.

   Thanks in advanced,
   eduardo.

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

 Hi,

 Way do you want to do this? Can you explain a little bit more the reason?

 Maybe there is another way to achieve your goal but we need to know it

 There are some parameters. eg:
 vardir=/var/lib/puppet
 ssldir=/var/lib/puppet/ssl
 rundir=/var/run/puppet

 That can be included in the [main] and /or [agent] section of your
 puppet.conf that can help in this case

 Best regards

 --
 Juan Sierra Pons                                 j...@elsotanillo.net
 Linux User Registered: #257202      http://www.elsotanillo.net
 GPG key = 0xA110F4FE
 Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
 --

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@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.

Hi

I think the right (my) approach is having a have a central repository
(doesn't matter if it is you home directory) and deploy to the
puppetmaster on demand using the repository tools: git push/pull, etc.

I mean not allowing the developers to work directly in your
/home/user/etc/puppet

Here is a good example:
Spam
* Deploying changes with Rake [1] ( Sign In, Subscribe or Register For
a Free Trial needed)
/Spam

This way developers have a place to save their work and changes will
be pushed to de puppetmaster on demand.

[1] 
http://my.safaribooksonline.com/book/-/9781849515382/puppet-infrastructure/ch01lvl1sec03

I hope it helps

Best regards
--
Juan Sierra Pons j...@elsotanillo.net
Linux User Registered: #257202   http://www.elsotanillo.net
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Trying link to home directory

2012-06-28 Thread eduardo
 I think the right (my) approach is having a have a central repository
 (doesn't matter if it is you home directory) and deploy to the
 puppetmaster on demand using the repository tools: git push/pull, etc.

Of course, we have a central repository on beanstalk.


 Regards,
  eduardo

On 28 jun, 09:46, Juan Sierra Pons j...@elsotanillo.net wrote:
 2012/6/28 eduardo erodr...@gmail.com:







   Thanks you Juan for quick answer. You are right, i was not clear.

   I began showing my scenario and the way i found to have master and
  agent in my pc.

   I need to have /etc/puppet tree in my home directory owned by me, we
  are a group having git repositories to development colaboration.

   Thanks you,
   eduardo.

  On 28 jun, 08:11, Juan Sierra Pons j...@elsotanillo.net wrote:
  2012/6/28 eduardo erodr...@gmail.com:

   Dears all,

    I have been master and agent in the same machine, to did it I took
   fromhttp://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/,
   so /var/lib/puppetmaster is the puppet working directory for both.
    I need to have a repository on my $HOME nowadays owned by me, so I
   trying something like :

    root@casa:/# service puppetmaster stop
    * Stopping puppet
   master                                                [ OK ]

   root@casa:/# ln -s /home/era/speedy_repo/puppet-eduardo/puppet/ /etc/
   puppet

   root@casa:/# ls -ld /etc/puppet  # LOOKS GOOD .
   lrwxrwxrwx 1 root root 44 2012-06-27 18:12 /etc/puppet - /home/era/
   speedy_repo/puppet-eduardo/puppet/

    But a new directory /etc/puppet is created whenever start
   puppetmaster.

   root@casa:/# service puppetmaster start
    * Starting puppet
   master                                                [ OK ]

   root@casa:/# ls -ld /etc/puppet  # LOOKS VERY BAD.
   drwxr-xr-x 3 root root 4096 2012-06-27 18:13 /etc/puppet
   root@casa:/#

    Is there any way to do it ?.

    Thanks in advanced,
    eduardo.

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

  Hi,

  Way do you want to do this? Can you explain a little bit more the reason?

  Maybe there is another way to achieve your goal but we need to know it

  There are some parameters. eg:
  vardir=/var/lib/puppet
  ssldir=/var/lib/puppet/ssl
  rundir=/var/run/puppet

  That can be included in the [main] and /or [agent] section of your
  puppet.conf that can help in this case

  Best regards

  --
  Juan Sierra Pons                                 j...@elsotanillo.net
  Linux User Registered: #257202      http://www.elsotanillo.net
  GPG key = 0xA110F4FE
  Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
  --

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

 Hi

 I think the right (my) approach is having a have a central repository
 (doesn't matter if it is you home directory) and deploy to the
 puppetmaster on demand using the repository tools: git push/pull, etc.

 I mean not allowing the developers to work directly in your
 /home/user/etc/puppet

 Here is a good example:
 Spam
 * Deploying changes with Rake [1] ( Sign In, Subscribe or Register For
 a Free Trial needed)
 /Spam

 This way developers have a place to save their work and changes will
 be pushed to de puppetmaster on demand.

 [1]http://my.safaribooksonline.com/book/-/9781849515382/puppet-infrastru...

 I hope it helps

 Best regards
 --
 Juan Sierra Pons                                 j...@elsotanillo.net
 Linux User Registered: #257202      http://www.elsotanillo.net
 GPG key = 0xA110F4FE
 Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
 --

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ruby::gemInstall at myFile.pp:82

2012-06-28 Thread llow...@oreillyauto.com

On Thursday, June 28, 2012 8:29:25 AM UTC-5, Felix.Frank wrote:


 Then I shall go on a limb an suggest you forego camel-case (*cringe*) 
 and rename to ruby::gem_install, see if that helps. Otherwise I'd be 
 grateful for yet another verbatim copy of your defined type, also the 
 information in which manifest file the type declaration resides. 


define ruby::gem_install (
  $r_gem = $name,
  $r_path = hiera('v_rubygem_path')
  ){

  $r_gemName = regsubst($r_gem, '([^-]+)-.*\.gem', '\1')

  exec { gem_install_${r_gem}:
command = /usr/local/bin/gem install ${r_gem},
cwd = $r_path,
unless  = gem list -i ${r_gemName},
require = [ Package['rubygems'], File['gem_repo'] ],
  }
}


This works, but it appears to be executing for the whole list of gems I am 
passing it, even though those gems are already installed and the unless 
command should prevent it. But that's another matter that I should be able 
to figure out on my own.

I did some other testing, and I noticed something that took me off guard 
and ready to file a bug report, though after a little research seems to at 
least be somewhat documented as intended behavior.

I was trying to debug why it was still running the install command, so I 
changed my define slightly:

define ruby::gem_install (
  $r_gem = $name,
  $r_path = hiera('v_rubygem_path')
  ){

  $r_gemName = regsubst($r_gem, '([^-]+)-.*\.gem', '\1')
  $r_gemVer = regsubst($r_gem, '[^-]+-(.*)\.gem', '\1')
  notify{notify_1_${r_gem}:
message = r_path is: ${r_path} || r_gem is: ${r_gem} || r_gemName is: 
${r_gemName} || r_gemVer is: ${r_gemVer},
  }
}

This has all the expected values, and it lives in 
/etc/puppet/environments/test/modules/ruby/manifests/gem_install.pp.

I then copied the file, renamed it to 
/etc/puppet/environments/test/modules/ruby/manifests/gemInstall.pp.

I changed the first line, and ONLY the first line to:

define ruby::gemInstall (

In my node def I am working on, I have the following:

  ruby::gem_install { 'actionmailer':
r_gem  = 'actionmailer-3.1.3.gem',
r_path = hiera('v_rubygem_path'),
  }

  ruby::gemInstall { 'actionmailer':
r_gem  = 'actionmailer-3.1.3.gem',
r_path = hiera('v_rubygem_path'),
  }


And I get the following (same error as before):

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
resource type ruby::gemInstall at 
/etc/puppet/environments/test/manifests/nodes/MyTestNodeDef.pp:69 on node X


I could have sworn I saw something that said acceptable names for 
classes/defines/variables was [a-z][a-zA-Z0-9]*, but when I went looking 
what I found was instead:

Class names, module names, and the names of defined and custom resource 
types should be restricted to lowercase alphanumeric characters and 
underscores, and should begin with a lowercase letter; that is, they should 
match the expression [a-z][a-z0-9_]*. Although some names that violate 
these restrictions currently work, using them is not recommended.

But this was somewhat buried in the Language Guide 
(http://docs.puppetlabs.com/guides/language_guide.html), and I (later) 
found something along the same lines at 
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html.

The Style Guide (http://docs.puppetlabs.com/guides/style_guide) only says 
When defining variables you should only use letters, numbers and 
underscores. You should specifically not make use of dashes. and makes no 
mention of not using camelCase. This document also makes no mention of case 
restrictions on class and define names.

From the tutorial section on defines 
(http://docs.puppetlabs.com/learning/definedtypes.html) no mention of an 
all lowercase requirement is made at all, though all examples are in all 
lowercase. Then again, none of the examples would be cases where people are 
likely to have wanted to use mixed case.

On a second reading of the tutorial I did find a brief mention that class 
names have to be all lowercase, which I seem to have missed.

The other rather interesting thing is that when I had my define in the same 
file as a class definition, it worked as expected. It was only after I 
moved the defines to their own files (as per the style guide) that I 
started having this problem.

So... long story short, this is the second time in two weeks I am having to 
refactor all my code in order to prepare for a point release upgrade.

While the overall software is very nice, and the support I have received 
when I have needed it has been very helpful, I am less than happy with this 
software right now.

And while I do recognize that both rewrites could have been avoided with a 
more careful reading of the documentation, I and my team should not have to 
pick through the documentation line by line like it was some sort of 
contract I was getting ready to sign.

For what it is worth, I think the forcing of all lowercase 
variables/classes/defines/modules is 

Re: [Puppet Users] Re: Trying link to home directory

2012-06-28 Thread Juan Sierra Pons
2012/6/28 eduardo erodr...@gmail.com:
  In development environment the simplest way to work is having git
 repositories on /home directories, not in system directory like /etc/
 puppet. I have setting my home environment to development having
 username 'era'. I have in there git repositories to development and
 that's why I pretend a soft link /etc/puppet to target /home/era/
 speedy_repo/puppet-eduardo/puppet/ files owned by 'era' not by 'root',
 so I can edit then and git operations like 'era'.


 On 28 jun, 09:46, Juan Sierra Pons j...@elsotanillo.net wrote:
 2012/6/28 eduardo erodr...@gmail.com:







   Thanks you Juan for quick answer. You are right, i was not clear.

   I began showing my scenario and the way i found to have master and
  agent in my pc.

   I need to have /etc/puppet tree in my home directory owned by me, we
  are a group having git repositories to development colaboration.

   Thanks you,
   eduardo.

  On 28 jun, 08:11, Juan Sierra Pons j...@elsotanillo.net wrote:
  2012/6/28 eduardo erodr...@gmail.com:

   Dears all,

    I have been master and agent in the same machine, to did it I took
   fromhttp://madduck.net/blog/2010.03.11:splitting-puppetd-from-puppetmaster/,
   so /var/lib/puppetmaster is the puppet working directory for both.
    I need to have a repository on my $HOME nowadays owned by me, so I
   trying something like :

    root@casa:/# service puppetmaster stop
    * Stopping puppet
   master                                                [ OK ]

   root@casa:/# ln -s /home/era/speedy_repo/puppet-eduardo/puppet/ /etc/
   puppet

   root@casa:/# ls -ld /etc/puppet  # LOOKS GOOD .
   lrwxrwxrwx 1 root root 44 2012-06-27 18:12 /etc/puppet - /home/era/
   speedy_repo/puppet-eduardo/puppet/

    But a new directory /etc/puppet is created whenever start
   puppetmaster.

   root@casa:/# service puppetmaster start
    * Starting puppet
   master                                                [ OK ]

   root@casa:/# ls -ld /etc/puppet  # LOOKS VERY BAD.
   drwxr-xr-x 3 root root 4096 2012-06-27 18:13 /etc/puppet
   root@casa:/#

    Is there any way to do it ?.

    Thanks in advanced,
    eduardo.

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

  Hi,

  Way do you want to do this? Can you explain a little bit more the reason?

  Maybe there is another way to achieve your goal but we need to know it

  There are some parameters. eg:
  vardir=/var/lib/puppet
  ssldir=/var/lib/puppet/ssl
  rundir=/var/run/puppet

  That can be included in the [main] and /or [agent] section of your
  puppet.conf that can help in this case

  Best regards

  --
  Juan Sierra Pons                                 j...@elsotanillo.net
  Linux User Registered: #257202      http://www.elsotanillo.net
  GPG key = 0xA110F4FE
  Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
  --

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

 Hi

 I think the right (my) approach is having a have a central repository
 (doesn't matter if it is you home directory) and deploy to the
 puppetmaster on demand using the repository tools: git push/pull, etc.

 I mean not allowing the developers to work directly in your
 /home/user/etc/puppet

 Here is a good example:
 Spam
 * Deploying changes with Rake [1] ( Sign In, Subscribe or Register For
 a Free Trial needed)
 /Spam

 This way developers have a place to save their work and changes will
 be pushed to de puppetmaster on demand.

 [1]http://my.safaribooksonline.com/book/-/9781849515382/puppet-infrastru...

 I hope it helps

 Best regards
 --
 Juan Sierra Pons                                 j...@elsotanillo.net
 Linux User Registered: #257202      http://www.elsotanillo.net
 GPG key = 0xA110F4FE
 Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
 --

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 

Re: [Puppet Users] Augeas fails to set BONDING_OPTS with return code false

2012-06-28 Thread Dominic Cleal
Hi Trey,

On 23/06/12 23:37, treydock wrote:
 I'm attempting to manage my network interfaces through a homebrew module
 that takes input from hiera, and then uses augeas to define each ifcfg-*.
 
 Example:
...
   set BONDING_OPTS '\mode=${mode} miimon=${miimon}\',

This looks good to me.  The nested quotes in the middle are important,
as they're inside included in the value.

 When I try and set something like BONDING_OPTS=mode=0 miimon=100 I get
 the following in Puppet
 
...
 debug: Augeas[eth_bond_bond0](provider=augeas): sending command 'set'
 with params
 [/files/etc/sysconfig/network-scripts/ifcfg-bond0/BONDING_OPTS,
 mode=0 miimon=100]

The issue looks to be here, as it's missing the second set of quotes.
Are you sure the log output corresponds to the manifest?  The manifest
looks correct, while the log output looks broken.

Running your manifest myself in 2.7.x, I see:

debug: Augeas[eth_bond_bond0](provider=augeas): sending command 'set'
with params
[/files/etc/sysconfig/network-scripts/ifcfg-bond0/BONDING_OPTS,
\mode=1 miimon=100\]

Note the extra quotes.

 I also can't seem to get that value saved using augtool either, here's
 what I get
...
 augtool set
 /files/etc/sysconfig/network-scripts/ifcfg-bond0/BONDING_OPTS '\mode=0
 miimon=100\'
 augtool save
 error: Failed to execute command
 error: saving failed (run 'print /augeas//error' for details)

The issue here is a little different, remove the \ before .  The reason
you need this in Puppet is because you're quoting the entire string in
the Puppet DSL, so need to escape the inner quotes.

augtool set
/files/etc/sysconfig/network-scripts/ifcfg-bond0/BONDING_OPTS 'mode=0
miimon=100'
augtool save
Saved 1 file(s)

Cheers,

-- 
Dominic Cleal
Red Hat Consulting
m: +44 (0)7817 878113

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] Hiera Tutorials

2012-06-28 Thread Kelsey Hightower
I'm beginning the process of creating Hiera tutorials covering the 
following topics:

*Beginner*

   - Getting Started with Hiera 
(drafthttps://github.com/kelseyhightower/hiera/blob/maint/1.0rc/add_getting_started_tutorial/docs/tutorials/getting_started.md
   )
   - Understanding hierarchies, sources, and scope
   - Understanding answer resolution (array, priority, hash, resolution 
   order, etc)
   - Hiera and Puppet - Using the parser functions and data bindings for 
   parameterized classes

*Advanced*

   - Hiera backends -- Creating new backends
   - Hiera parser functions -- Creating new hiera parser functions


If you can think of anything else that should be covered let me know.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/LTMeZtgI5P8J.
To post to this group, send email to puppet-users@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: Hiera Tutorials

2012-06-28 Thread Kelsey Hightower
I need to add the following 'cookbook' style tutorials:

   - Hiera and custom Facter Facts
   - Using Hiera data in Puppet manifests - looping over hashes and arrays
   - Creating resources from Hiera data
   - Hiera CLI vs Parser Functions -- how do they match up
   - Hiera Ruby API


On Thursday, June 28, 2012 12:32:03 PM UTC-4, Kelsey Hightower wrote:

 I'm beginning the process of creating Hiera tutorials covering the 
 following topics:

 *Beginner*

- Getting Started with Hiera 
 (drafthttps://github.com/kelseyhightower/hiera/blob/maint/1.0rc/add_getting_started_tutorial/docs/tutorials/getting_started.md
)
- Understanding hierarchies, sources, and scope
- Understanding answer resolution (array, priority, hash, resolution 
order, etc)
- Hiera and Puppet - Using the parser functions and data bindings for 
parameterized classes

 *Advanced*

- Hiera backends -- Creating new backends
- Hiera parser functions -- Creating new hiera parser functions


 If you can think of anything else that should be covered let me know.

 Thanks.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/V8cLL0Fw_wsJ.
To post to this group, send email to puppet-users@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: Hiera Tutorials

2012-06-28 Thread windowsrefund
Brilliant initiative!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Hiera Tutorials

2012-06-28 Thread windowsrefund
Are you sure Hiera defaults to /etc/hiera.yaml and not /etc/puppet/
hiera.yaml?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Hiera Tutorials

2012-06-28 Thread Kelsey Hightower
On Thu, Jun 28, 2012 at 1:01 PM, windowsrefund windowsref...@gmail.comwrote:

 Are you sure Hiera defaults to /etc/hiera.yaml and not /etc/puppet/
 hiera.yaml?


Yep, the hiera parser functions default to /etc/puppet/hiera.yaml, but
Hiera defaults to /etc/hiera.yaml. Most people are not use to running Hiera
in stand-alone mode and is commonly the source of confusion.



 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@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.




-- 
Kelsey Hightower
Developer
Puppet Labs
(678) 4719501

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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 settings on Windows

2012-06-28 Thread Roger
I have tried installed 2.7.17 and 2.7.16 on Windows 2008 R2 several times. 
 I run the installer with elevated privileges.  The etc dir and puppet.conf 
are created in c:\ProgramData\PuppetLabs\Puppet.  Everything looks good but 
when running 'puppet config print all | find config  every config file 
location is set to c:\users\[my user id]\.puppet\.

The directory doesn't even exist in my home directory.

So any changes I make to c:\ProgramData\PuppetLabs\puppet\etc\puppet.conf 
 are ignored.

What is the proper way to install this -- or how to force puppet to use the 
c:\programdata directory?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/jT4d-9cMpp4J.
To post to this group, send email to puppet-users@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] package provider for FreeBSD

2012-06-28 Thread R. Tyler Croy

On Thu, 28 Jun 2012, Gregory Orange wrote:

 Hi again,
 From examples I have gleaned the following snippet for manifests/site.pp
 
 Package {provider = $operatingsystem ? {
 FreeBSD = freebsd,
 #FreeBSD = ports,
 debian  = aptitude,
 redhat  = up2date}}
 
 Are there providers documented somewhere? I'm not sure where to
 look, and I haven't come across it in my stumbling, googling,
 mailing list lurking or docs.puppetlabs.com.

The different package resource providers and their differences documented here:
http://docs.puppetlabs.com/references/latest/type.html#package


- R. Tyler Croy
--
Code: http://github.com/rtyler
 Chatter: http://twitter.com/agentdero
  rty...@jabber.org


pgpGrtz7lg0lQ.pgp
Description: PGP signature


Re: [Puppet Users] Fwd: possible changes to puppet config file

2012-06-28 Thread Chris Price
On Thursday, June 28, 2012 1:40:39 AM UTC-7, David Schmitt wrote:

 If you're at it: It is ugly that an environment master will 
 automatically pull in the puppetmaster settings too. Especially if the 
 manifests are in git and every branch is an environment. 


David,

Thanks for the feedback.  Could you explain your situation a bit further? 
 I'm trying to envision this, and it seems like it could only affect an 
agent running on the same node as the master--is that correct?  Because on 
the other agent nodes they won't have the same puppet.conf, and thus they 
won't read in those settings?  I would like to get a bug filed on this but 
just want to make sure that I understand the scenario first.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/dFAOXsRsjb0J.
To post to this group, send email to puppet-users@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] Vacancies at we7 (Based in London)

2012-06-28 Thread Stu Teasdale
Hi,

Hope it's ok posting this here, I'm sure I've seen vacancies on the list 
before.


We7 is recruiting at the moment, I've attached some company blurb and 
the sysadmin vacancy info below. Please send applications to 
stuart-...@we7.com. No recruiters thank you.

---8

We work in an exciting industry that a large appeal to most users of the 
web and are involved with and use cutting edge web technologies.
We're now growing and are looking for experienced, creative and 
enthusiastic individuals to join our team, maintaining, developing and 
improving our website, mobile and device applications.

WE7 has an open, lively culture where every team member can make a 
difference. We enjoy regular social events, lunchtime football matches 
and printing things on our 3D printer! 
Staff also run Geek meetings to improve their knowledge of a vast array 
of useful (and not so useful) technologies and topics. Job titles are 
important to us and the more ridiculous the better!

Locations: London UK, but would consider strong candidates based in 
Oxford for the reporting role.

Server Wrangler - Reporting to the Director of No
(System Administrator)

Overview:

As a part of the systems administration team, maintain and enhance the 
infrastructure of the we7 live site (Debian, Postgres, Tomcat ...). In 
addition the role includes helping to look after internal office systems 
(Ubuntu, Mac OS and Windows Desktops, Samba, NFS, LDAP). Live site 
management would require occasional trips to data centres in Docklands 
and Cambridge.

Skills
Solid Unix/Linux administration skills (3 years+)
Writing scripts in bash
Good knowledge of at least one of perl, python or ruby
Experience of running production websites, preferably using apache tomcat

Any experience of the following would be a bonus:
Source control with svn, git
Configuration management with puppet
Administering postgresql
Setting up and running Hadoop clusters
Debian/Ubuntu packaging
Windows Servers

Stu
-- 
From the prompt of Stu Teasdale

System restarting, wait...

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Is it possible to access type params in another type?

2012-06-28 Thread Steve Traylen
On Tuesday, 26 June 2012 13:07:41 UTC+2, Yanis Guenane wrote:

 Hey guys,

 I was wondering if it was possible to access type params within another 
 type.

 Here is an example of what I would like to do.

 Puppet::Type.newtype(:a) do

  newparam(:name) do
   isnamevar
  end

   newparam(:path) do
   end
 end


 Puppet::Type.newtype(:b) do

newparam(:name) do
 isnamevar
end 

newparam(:needs) do
   
/* I want to access path param from 'a' type here 

   something like resource[:needs].path */


end
 end


 And the manifest calling that would be 

  a {'test-a' :
 path = '/usr',
 }

  b {'test-b' :
 needs = a
 }
  



 Is it possible ? 


Hi Yanis,
 http://projects.puppetlabs.com/issues/10166 describes a unproven technique 
for catalog lookup from 
 a provider to access another type.
Steve,
 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/lc41eCS9zdkJ.
To post to this group, send email to puppet-users@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] hiera questions

2012-06-28 Thread llow...@oreillyauto.com
I'm starting to use hiera more, to try to clean up and better modularize 
some of our stuff.

I know you can use various facts (such as $::hostname) when defining the 
hierarchy and where to look.

We have a few variables that are set based on patterns of hostname, and 
currently we have a selector that matches the hostname against a regex.

Is there a clean way to move this to hiera? A straight %{hostname} in the 
hiera.yaml won't work, since then I'd have to create a .yaml per hostname 
and it'd be a hassle to 

Say I have the hostnames setup like: prefix-purpose-[A-Z]-[0-9]+ where 
prefix is a fixed value across all names, purpose describes whether it is a 
web server, app server etc.

I'd like to be able to specify things for a given prefix-purpose-[A-Z] 
range as well as on a prefix-purpose basis.

I do hope what I am asking is clear, if not I apologize.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/u3bhvLZBz2sJ.
To post to this group, send email to puppet-users@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: puppet server complains of time sync

2012-06-28 Thread Steve Traylen
On Saturday, 23 June 2012 22:17:24 UTC+2, bluethundr wrote:

 Hello list, 

  I am having an issue where a puppet agent on a client complains that 
 clocks are out of sync between it and it's master - 

 err: Could not send report: SSL_connect returned=1 errno=0 state=SSLv3 
 read server certificate B: certificate verify failed.  This is often 
 because the time is out of sync on the server or client 
 err: Could not remove PID file /var/lib/puppet/run/agent.pid 

 However without any doubt the clocks are in sync 

 - date from puppet client 
 Saturday, June 23, 2012 01:48:26 PM EDT 
 -date from puppet server 
 Sat Jun 23 13:48:26 EDT 2012 


Hi,

  Do you have a ruby version mismatch ?

  http://projects.puppetlabs.com/issues/9084

  can cause this in a mixed ruby 1.8 and 1.9 world.
 


 I ran the following command for the first time on the client, 

 puppet agent --server puppet01-ops.ops.example.com --waitforcert 60 
 --test --debug 

 and was able to generate and approve a cert request on the puppet 
 server. But it failed the first and all subsequent attempts with the 
 error message I show above. 

 The master and client do run different operating systems. The server 
 is a RHEL 5.5 and the client is solaris 10 

 -server 
 [puppet01-ops:~] root% cat /etc/redhat-release 
 Red Hat Enterprise Linux Server release 5.5 (Tikanga) 

 [puppet01-ops:~] root% uname -a 
 Linux puppet01-ops 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 
 x86_64 x86_64 x86_64 GNU/Linux 

 -client 
 [splunk-indx01:~] root% uname -a 
 SunOS splunk-indx01 5.10 Generic_147441-19 i86pc i386 i86pc 

  here is a verbose output of the puppet run on the client - 

 [splunk-indx01:~] root% puppet agent --server 
 puppet01-ops.ops.example.com --waitforcert 60 --test --debug 
 debug: Failed to load library 'shadow' for feature 'libshadow' 
 debug: Puppet::Type::User::ProviderLdap: true value when expecting false 
 debug: Puppet::Type::User::ProviderUseradd: file chage does not exist 
 debug: Puppet::Type::User::ProviderDirectoryservice: file 
 /usr/bin/dscl does not exist 
 debug: Puppet::Type::User::ProviderPw: file pw does not exist 
 debug: Failed to load library 'selinux' for feature 'selinux' 
 debug: Failed to load library 'ldap' for feature 'ldap' 
 debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring 
 File[/etc/puppet/ssl] 
 debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] 
 debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring 
 File[/etc/puppet/ssl] 
 debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
 File[/etc/puppet/ssl/certs] 
 debug: /File[/etc/puppet/ssl/private_keys/splunk-indx01.example.com.pem]: 
 Autorequiring File[/etc/puppet/ssl/private_keys] 
 debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/var/lib/puppet/state/graphs]: Autorequiring 
 File[/var/lib/puppet/state] 
 debug: /File[/var/lib/puppet/client_yaml]: Autorequiring 
 File[/var/lib/puppet] 
 debug: /File[/etc/puppet/ssl/public_keys/splunk-indx01.example.com.pem]: 
 Autorequiring File[/etc/puppet/ssl/public_keys] 
 debug: /File[/var/lib/puppet/client_data]: Autorequiring 
 File[/var/lib/puppet] 
 debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] 
 debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
 File[/etc/puppet/ssl] 
 debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/var/lib/puppet/run/agent.pid]: Autorequiring 
 File[/var/lib/puppet/run] 
 debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl] 
 debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: 
 Autorequiring File[/var/lib/puppet/state] 
 debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl] 
 debug: /File[/etc/puppet/ssl/certs/splunk-indx01.example.com.pem]: 
 Autorequiring File[/etc/puppet/ssl/certs] 
 debug: /File[/var/lib/puppet/clientbucket]: Autorequiring 
 File[/var/lib/puppet] 
 debug: Finishing transaction 73965420 
 debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring 
 File[/etc/puppet/ssl] 
 debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
 File[/etc/puppet/ssl] 
 debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] 
 debug: /File[/etc/puppet/ssl/certs/splunk-indx01.example.com.pem]: 
 Autorequiring File[/etc/puppet/ssl/certs] 
 debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl] 
 debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] 
 debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring 
 File[/etc/puppet/ssl] 
 debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] 
 debug: 

Re: [Puppet Users] Re: packaging puppet modules

2012-06-28 Thread Brian Gupta
On Thu, Jun 28, 2012 at 2:46 PM, Steve Traylen steve.tray...@cern.ch wrote:
 On Thursday, 28 June 2012 14:57:08 UTC+2, Ken Dreyer wrote:

 Hi Puppet folks,

 I'm a Fedora packager, and I'm looking into packaging up some of the
 modules at http://forge.puppetlabs.com/users/puppetlabs

 I'm thinking through the naming scheme for modules. It looks like the
 upstream modules include the creators' names as part of the package names,
 which strikes me as a little verbose from the perspective of Fedora
 packaging.

 For example, the Puppetlabs' mysql module RPM  would (in theory) be called
 puppetmodule-puppetlabs-mysql. That's a mouthful. Any chance we could have
 the Puppet Labs' modules be considered canonical modules on the Forge, and
 then strip away the puppetlabs vendor name? Any other ideas welcome.


 Presumably it would end up on the filesystem as something like
 $modulepath/mysql/ so the puppetlabs bit is a bit redundant
 in some ways. Ignore packages for now, how does anyone cope with
 'puppetlabs-mysql' and 'whatever-mysql'... in the same environment.

We don't, because the pattern seems to be to dump the leading
identifiers in the repo name, and many modules assume their namespace
is just the service/package name they are managing, e.g. modules/mysql.
If you look in init.pp in the case of the puppetlabs' mysql module,
this is clear as the main class is just called mysql. The way we deal
with these typically is to standardize on a single module and install
it as a git submodule. I believe if you wanted more than one, you
would need to make changes to the code. (We don't use the mysql
module, but it is a good example.)

So:
cd $puppetgitworkingdir
git submodule git://github.com/puppetlabs/puppetlabs-mysql.git modules/mysql
git submodule init
git submodule update

Cheers,
Brian


 - Ken

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/HZDPZSyjbSEJ.

 To post to this group, send email to puppet-users@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-users@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] packaging puppet modules

2012-06-28 Thread Paul Belanger

On 12-06-28 08:57 AM, Ken Dreyer wrote:

Hi Puppet folks,

I'm a Fedora packager, and I'm looking into packaging up some of the
modules at http://forge.puppetlabs.com/users/puppetlabs

I'm thinking through the naming scheme for modules. It looks like the
upstream modules include the creators' names as part of the package names,
which strikes me as a little verbose from the perspective of Fedora
packaging.

For example, the Puppetlabs' mysql module RPM  would (in theory) be called
puppetmodule-puppetlabs-mysql. That's a mouthful. Any chance we could
have the Puppet Labs' modules be considered canonical modules on the
Forge, and then strip away the puppetlabs vendor name? Any other ideas
welcome.

I'm considering doing the same for Debian.  I haven't researched a 
naming scheme yes however I would expect something like 
puppetmodule-puppetlabs-mysql or puppet-module-puppetlabs-mysql would apply.


I'd be reluctant to call it puppet-module-mysql unless it was actually 
bundled within puppet.


--
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: 
https://twitter.com/pabelanger


--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@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] packaging puppet modules

2012-06-28 Thread Brian Gupta
On Thu, Jun 28, 2012 at 4:38 PM, Paul Belanger
paul.belan...@polybeacon.com wrote:
 On 12-06-28 08:57 AM, Ken Dreyer wrote:

 Hi Puppet folks,

 I'm a Fedora packager, and I'm looking into packaging up some of the
 modules at http://forge.puppetlabs.com/users/puppetlabs

 I'm thinking through the naming scheme for modules. It looks like the
 upstream modules include the creators' names as part of the package names,
 which strikes me as a little verbose from the perspective of Fedora
 packaging.

 For example, the Puppetlabs' mysql module RPM  would (in theory) be called
 puppetmodule-puppetlabs-mysql. That's a mouthful. Any chance we could
 have the Puppet Labs' modules be considered canonical modules on the
 Forge, and then strip away the puppetlabs vendor name? Any other ideas
 welcome.

 I'm considering doing the same for Debian.  I haven't researched a naming
 scheme yes however I would expect something like
 puppetmodule-puppetlabs-mysql or puppet-module-puppetlabs-mysql would apply.

 I'd be reluctant to call it puppet-module-mysql unless it was actually
 bundled within puppet.

In the Debian world I'd consider a metapackage (hope this is the right
term) callet puppet-module-mysql, that can be install package
alternatives, and have puppet-module-puppetlabs-mysql (or something
like that) be one of possibly many alternatives.

I think the bigger question is whether Puppetlabs (via puppet forge)
considers best practice to have multiple modules supporting the same
service to be either/or alternatives, or wants people to make modules
that can be coexist in parallel. In my limited experience working with
people's third party modules, there seems to be an assumption that a
given module will be the only module on a given
puppetmaster/modulepath that is capable of managing a given
service/package, but I don't know if this is a published standard or
just people not thinking folks might want to have two modules managing
the same resource installed at the same time.


 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger


 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@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-users@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] Puppet windows newbie: command runs but ends with failure

2012-06-28 Thread Anoop Gopalakrishnan
Hi , 
  I am new to Puppet and I just started testing it out in my windows 
machine to do a set of tasks which I do manually currently and once I get 
the hang of it would like to use it for provisioning later. My current task 
is pretty simple:
1. Run an svn update command on a folder
2. Run maven install command
3. ... a whole bunch of other tasks related to setting up a custom server 
on a users machine.

However , when I run an exec like the below, I can see that the maven runs 
successfully  but the task fails at the end as shown below:

/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Compiling 59 source 
files to 
C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console\target\classes
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 

/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] BUILD SUCCESSFUL
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 

/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Total time: 6 seconds
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Finished at: Thu Jun 
28 14:14:37 PDT 2012
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Final Memory: 
48M/229M
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 

/Stage[main]/Cmserver/Exec[mvninstall]/returns: 'cmd' is not recognized as 
an internal or external command,
/Stage[main]/Cmserver/Exec[mvninstall]/returns: operable program or batch 
file.
Error: C:\Windows\SysWow64\cmd.exe /c mvn.bat compile returned 1 instead of 
one of [0]
Error: /Stage[main]/Cmserver/Exec[mvninstall]/returns: change from notrun 
to 0 failed: C:\Windows\System32\cmd.exe /c mvn.bat compile returned 1 
instead of one
of [0]
/Stage[main]/Cmserver/File[testfile]: Dependency Exec[mvninstall] has 
failures:true
Warning: /Stage[main]/Cmserver/File[testfile]: Skipping because of failed 
dependencies
Finished catalog run in 9.25 seconds

The task is as below:
exec { 'mvninstall':
cwd = 
'C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console',
path = 'C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;%PATH%',
command = 'C:\Windows\System32\cmd.exe /c mvn.bat compile',
   provider = windows,
 logoutput = true,
timeout = 1000,
}

Any help is greatly appeciated.

Regards,
Anoop

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/E9MOpAK6U5MJ.
To post to this group, send email to puppet-users@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] hiera questions

2012-06-28 Thread llow...@oreillyauto.com


On Thursday, June 28, 2012 2:04:09 PM UTC-5, R.I. Pienaar wrote:



 - Original Message - 

 I would make facts on the nodes for these.  Let say $role and $subrole 
 and then just use those in your hierarchy with %{role} and %{subrole} 
 thus allowing you to set variable for all those machines there. 


That's simple enough, and the docs [1] for creating a custom fact are 
mostly straightforward.

The one thing I am unclear on, in the plugins in modules [2] document, it 
says that if you are going to put your custom stuff in a module (such as in 
their example, named 'custom') it says to follow the standard layout, and 
that you have to have a manifests/init.pp.

If all that is actually in the thing is lib/facter/myfact.rb, what do I put 
in the manifests/init.pp ? Is it enough for it to exist but be empty?

The document was somewhat unclear on this, or I missed it when reading. 

[1] http://docs.puppetlabs.com/guides/custom_facts.html
[2] http://docs.puppetlabs.com/guides/plugins_in_modules.html

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NKCt1qaRwiEJ.
To post to this group, send email to puppet-users@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] class invocation instead of 'include'

2012-06-28 Thread Nick Fagerlund


On Tuesday, June 26, 2012 6:13:21 AM UTC-7, jcbollinger wrote:

 I sympathize and agree in principle with the view that it should be 
 possible to re-declare the same parameterized class provided the parameters 
 are all the same.  Nevertheless, that has never been possible with Puppet 
 2.x's parameterized class declaration syntax.  At the time that syntax and 
 its rules were designed, the prevailing view at Puppetlabs was apparently 
 that the resulting constraints were acceptable.  It's one of the reasons I 
 find parameterized classes *un*acceptable, but I can't call it a bug per 
 se.

 I have been told that this will be better in Puppet 3, but I have not 
 checked whether that's so. 


It's better! It turns out the solution to class parameter conflicts is to 
get the parameter values from somewhere outside the manifests. That way, 
the decisions about what the values should be are already finished by the 
time the catalog is being compiled, and you can just use include on 
parameterized classes as many times as you want.

Our implementation is to get class parameters from Hiera. If a class has 
parameters, using include on it it will automatically trigger a standard 
Hiera lookup of those parameters. It'll be roughly equivalent to doing:

class {'myclass':
  param1 = hiera('myclass::param1'),
  param2 = hiera('myclass::param2'),
}

You can still use the class {'my_class':} style if you want to (with all 
the same limitations as today), but since include will work now and Hiera 
isn't very complicated, we figure most people can forget about it. 

Anyway, as you can see, that changes the mental model a bit -- the hiera 
yaml files become sort of a cascading configuration file for all of your 
Puppet classes, and class parameters are like settings. 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/jWiIO6onwhkJ.
To post to this group, send email to puppet-users@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] Puppet windows newbie: command runs but ends with failure

2012-06-28 Thread Josh Cooper
Hi Anoop,

On Thu, Jun 28, 2012 at 2:26 PM, Anoop Gopalakrishnan
anoop2...@gmail.com wrote:

 Hi ,
   I am new to Puppet and I just started testing it out in my windows machine 
 to do a set of tasks which I do manually currently and once I get the hang of 
 it would like to use it for provisioning later. My current task is pretty 
 simple:
 1. Run an svn update command on a folder
 2. Run maven install command
 3. ... a whole bunch of other tasks related to setting up a custom server on 
 a users machine.

 However , when I run an exec like the below, I can see that the maven runs 
 successfully  but the task fails at the end as shown below:

 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Compiling 59 source 
 files to 
 C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console\target\classes
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] BUILD SUCCESSFUL
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Total time: 6 seconds
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Finished at: Thu Jun 
 28 14:14:37 PDT 2012
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Final Memory: 48M/229M
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: 'cmd' is not recognized as an 
 internal or external command,

Your mvn.bat script is trying to invoke cmd, but failing because the
PATH environment is not correct, see more below.

 /Stage[main]/Cmserver/Exec[mvninstall]/returns: operable program or batch 
 file.
 Error: C:\Windows\SysWow64\cmd.exe /c mvn.bat compile returned 1 instead of 
 one of [0]

Just a side note, since ruby is a 32-bit executable, file system
redirection takes effect, causing puppet to launch the 32-bit cmd.exe.
This may or may not be an issue for you depending on what you are
trying to do. There's more info here[1]

 Error: /Stage[main]/Cmserver/Exec[mvninstall]/returns: change from notrun to 
 0 failed: C:\Windows\System32\cmd.exe /c mvn.bat compile returned 1 instead 
 of one
 of [0]
 /Stage[main]/Cmserver/File[testfile]: Dependency Exec[mvninstall] has 
 failures:true
 Warning: /Stage[main]/Cmserver/File[testfile]: Skipping because of failed 
 dependencies
 Finished catalog run in 9.25 seconds

 The task is as below:
 exec { 'mvninstall':
 cwd = 
 'C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console',
 path = 'C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;%PATH%',
 command = 'C:\Windows\System32\cmd.exe /c mvn.bat compile',
       provider = windows,
         logoutput = true,
 timeout = 1000,
 }

Puppet doesn't expand environment variables the way you are thinking.
Change that to:

  path = C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;${path},

When compiling the catalog, the `path` parameter (for the exec
resource) will be interpolated using the `path` fact as reported by
the agent. More about using variables here[2]

 Any help is greatly appeciated.

 Regards,
 Anoop

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/E9MOpAK6U5MJ.
 To post to this group, send email to puppet-users@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.

Josh

[1] https://projects.puppetlabs.com/issues/12980
[2] http://docs.puppetlabs.com/learning/variables.html
--
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] hiera questions

2012-06-28 Thread Denmat
You need your custom fact script in:
module/lib/facter/script


On 29/06/2012, at 7:37, llow...@oreillyauto.com llow...@oreillyauto.com 
wrote:

 
 
 On Thursday, June 28, 2012 2:04:09 PM UTC-5, R.I. Pienaar wrote:
 
 
 - Original Message - 
 
 I would make facts on the nodes for these.  Let say $role and $subrole 
 and then just use those in your hierarchy with %{role} and %{subrole} 
 thus allowing you to set variable for all those machines there. 
 
 That's simple enough, and the docs [1] for creating a custom fact are mostly 
 straightforward.
 
 The one thing I am unclear on, in the plugins in modules [2] document, it 
 says that if you are going to put your custom stuff in a module (such as in 
 their example, named 'custom') it says to follow the standard layout, and 
 that you have to have a manifests/init.pp.
 
You need your custom fact script in:
module/lib/facter/script
 If all that is actually in the thing is lib/facter/myfact.rb, what do I put 
 in the manifests/init.pp ? Is it enough for it to exist but be empty?
 
You would normally put your module definitions in init.pp but you should have 
the following as a minimum:
class module name {
}

 The document was somewhat unclear on this, or I missed it when reading. 
 
 [1] http://docs.puppetlabs.com/guides/custom_facts.html
 [2] http://docs.puppetlabs.com/guides/plugins_in_modules.html
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/NKCt1qaRwiEJ.
 To post to this group, send email to puppet-users@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-users@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] Off Topic: Passenger / Ruby on Rails for the N00b

2012-06-28 Thread Denmat
Hi,

Comments inline.

On 28/06/2012, at 23:22, Dan White y...@comcast.net wrote:

 I have successfully set up an Apache/Passenger/Puppet(Master)-2.7.x on a RHEL 
 5 server and I now have some questions about what I have here.
 
 In my work environment, I am part of a team of admins supporting a collection 
 of web servers.  These servers have various stacks on them with assorted 
 combinations of Apache, PHP, Tomcat, JBoss, Cold Fusion, MySQL, Oracle, 
 MovableType, and Goodness Knows What That I Have Not Yet Tripped Over.
 
 My starting query is: How does Ruby on Rails compare to stacks built with the 
 pieces mentioned ?
RoR is a application framework, more like JBoss I imagine.

 As I am using Apache/Passenger, I think that Apache itself is a non-issue, 
 but I wonder about the rest.
 
Apache/passenger is like mod_php - it helps apache serve ruby code like php 
helps apache serve php.
 Also, in its first incarnation, my puppet master lived on the same server as 
 a Cobbler server.
 Are there any issues relating to Passenger/Rails/Rack that would complicate 
 putting Cobbler onto this new PuppetMaster ?
 
None that I'm aware, that's how we have it set up. It's just apache underneath. 
We also serve docs and yum repos from our master.

 Thanks for all the help I get from this list.
 I try to assist whenever I can.
 
 “Sometimes I think the surest sign that intelligent life exists elsewhere in 
 the universe is that none of it has tried to contact us.”
 Bill Waterson (Calvin  Hobbes)
 
 -- 
Den

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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: Puppet windows newbie: command runs but ends with failure

2012-06-28 Thread Anoop Gopalakrishnan
Hey Josh, 
   Thanks for the quick response! Will try out the changes. Appreciate the 
good work too.

Regards,
Anoop

On Thursday, June 28, 2012 2:26:38 PM UTC-7, Anoop Gopalakrishnan wrote:

 Hi , 
   I am new to Puppet and I just started testing it out in my windows 
 machine to do a set of tasks which I do manually currently and once I get 
 the hang of it would like to use it for provisioning later. My current task 
 is pretty simple:
 1. Run an svn update command on a folder
 2. Run maven install command
 3. ... a whole bunch of other tasks related to setting up a custom server 
 on a users machine.

 However , when I run an exec like the below, I can see that the maven runs 
 successfully  but the task fails at the end as shown below:

 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Compiling 59 source 
 files to 
 C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console\target\classes
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] BUILD SUCCESSFUL
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Total time: 6 
 seconds
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Finished at: Thu 
 Jun 28 14:14:37 PDT 2012
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Final Memory: 
 48M/229M
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: 'cmd' is not recognized as 
 an internal or external command,
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: operable program or batch 
 file.
 Error: C:\Windows\SysWow64\cmd.exe /c mvn.bat compile returned 1 instead 
 of one of [0]
 Error: /Stage[main]/Cmserver/Exec[mvninstall]/returns: change from notrun 
 to 0 failed: C:\Windows\System32\cmd.exe /c mvn.bat compile returned 1 
 instead of one
 of [0]
 /Stage[main]/Cmserver/File[testfile]: Dependency Exec[mvninstall] has 
 failures:true
 Warning: /Stage[main]/Cmserver/File[testfile]: Skipping because of failed 
 dependencies
 Finished catalog run in 9.25 seconds

 The task is as below:
 exec { 'mvninstall':
 cwd = 
 'C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console',
 path = 'C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;%PATH%',
 command = 'C:\Windows\System32\cmd.exe /c mvn.bat compile',
provider = windows,
  logoutput = true,
 timeout = 1000,
 }

 Any help is greatly appeciated.

 Regards,
 Anoop


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Z_PMG8FghuYJ.
To post to this group, send email to puppet-users@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] Execute a shell script residing in puppet master

2012-06-28 Thread Denmat


On 28/06/2012, at 21:24, kalaniS ksamarawickr...@gmail.com wrote:

 I'm a newbie to puppet and have been trying to execute a shell script
 residing in puppet master machine in a puppet agent, with no luck so
 far. Would appreciate any ideas on how to do this.
 
It does depend on what you mean, can you clarify further?

If you have a script on your master, say /tmp/coolscript.sh and during a puppet 
run you want the client to call out to the master and execute coolscript.sh 
then no. Puppet won't do that.
Maybe here is a good place to start:
http://docs.puppetlabs.com/learning/agent_master_basic.html

You can set up file and exec resources to first pull the script to the client 
and then run it. Something like:
file {'/tmp/coolscript.sh':
  source = 'puppet:///path
}
exec {'exec_coolness':
  command = '/tmp/coolscript.sh',
  require = File[''/tmp/coolscript.sh']
}

You can also perform different commands on the master during compile time for 
the client manifest. I'll leave you to your own investigations on that.
http://docs.puppetlabs.com/references/stable/function.html#generate

Cheers,
Den

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] Fwd: possible changes to puppet config file

2012-06-28 Thread Nigel Kersten
On Thu, Jun 28, 2012 at 1:40 AM, David Schmitt da...@dasz.at wrote:

 If you're at it: It is ugly that an environment master will automatically
 pull in the puppetmaster settings too. Especially if the manifests are in
 git and every branch is an environment.

Are you saying that you're defining an environment with the name
master David ?

Are you doing this in a block like: [master] or by using
$environment in the modulepath/manifest directives ?


-- 
Nigel Kersten | http://puppetlabs.com | @nigelkersten
Schedule Meetings at: http://tungle.me/nigelkersten

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] UX/UI of puppet help when face actions have unmet dependencies

2012-06-28 Thread Jeff McCune
Hello,

We're trying to come up with a nice way to indicate when a Puppet
module like cloud provisioner breaks a Puppet subcommand because of
missing dependencies.

When this happens in the current 3.0rc branch, all help for all
subcommands is unavailable.  This isn't very helpful.

We're planning to simply mark the subcommands that have incomplete
actions as unavailable.  Here's a mock up of what we're thinking:

https://gist.github.com/3014923

Do you think the message, check STDERR in each of the node,
node_aws, and node_vmware subcommands is adequate?

The autoloader will catch and log the loading errors to STDERRO before
the help page is actually finished formatting, so the actual reason
the face failed to load will be presented before the formatted help
output.

Any feedback you have on making puppet help more helpful would be
greatly appreciated.

Thanks,
-Jeff

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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] UX/UI of puppet help when face actions have unmet dependencies

2012-06-28 Thread Daniel Pittman
On Thu, Jun 28, 2012 at 5:37 PM, Jeff McCune j...@puppetlabs.com wrote:

 We're trying to come up with a nice way to indicate when a Puppet
 module like cloud provisioner breaks a Puppet subcommand because of
 missing dependencies.

 When this happens in the current 3.0rc branch, all help for all
 subcommands is unavailable.  This isn't very helpful.

Indeed, no.

 We're planning to simply mark the subcommands that have incomplete
 actions as unavailable.  Here's a mock up of what we're thinking:

It seems like you could also mark some as partially available, if
some-but-not-all actions could be loaded.

 https://gist.github.com/3014923

 Do you think the message, check STDERR in each of the node,
 node_aws, and node_vmware subcommands is adequate?

No, mentioning STDERR is terrible UX, even if I know what it means. :)

I think a better approach would be to capture the error and report it
meaningfully.

 The autoloader will catch and log the loading errors to STDERRO before
 the help page is actually finished formatting, so the actual reason
 the face failed to load will be presented before the formatted help
 output.

As an interim measure, just reporting that the face (or action) failed
to load seems like a tolerable compromise - the root cause is clearly
indicated already, and mentioning STDERR doesn't add much value.

Fixing the autoloader so that we can report meaningful errors rather
than having them hidden or just printed seems like a better long term
strategy, but is obviously more work. :)

 Any feedback you have on making puppet help more helpful would be
 greatly appreciated.

You should separate unavailable subcommands from available
subcommands entirely - display them in a distinct section of the help
output.

That obviates the need to add visual decoration, allows more space for
error display, and generally makes it clearer what is going on.

You should consider colour in this, as recent changes to UX include
colour highlights through the text - see the module tool for examples.

I think you should treat faces with some actions that failed
separately.  Perhaps call them out in this display, perhaps not, but
certainly treat them in the `puppet help node` style output as
available actions vs unavailable actions.

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@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.