Re: [Puppet Users] Re: custom type in ruby - invalid resource type at .../site.pp

2012-09-28 Thread Axel Bock
plugincheck on client: check. 
commented out property: check. 

unfortunately same result :(

thanks, 
axel.


Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic:

 On 09/27/2012 05:21 PM, Axel Bock wrote: 
  p.s.: my type can be seen here: http://pastebin.com/20N8teKV 
  and the provider here: http://pastebin.com/SjqyWegu 

 Try commenting out whole sync_direction property section in your type 
 type definition file. You defined property but you don't have methods in 
 your provider... 

 Also make sure you are doing the pluginsync on the client. 




-- 
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/-/3AX5jkheeaAJ.
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] multiple puppet masters on multiple subnets

2012-09-28 Thread Peter Brown
On 27 September 2012 17:24, Alex Harvey alexharv...@gmail.com wrote:


 On Thursday, September 27, 2012 9:13:32 AM UTC+10, Pete wrote:

 Another option would be to put all your puppet code into a git repo
 and setup each master to pull from a central repo over ssh.
 That _Should_ be secure enough.

 I am also curious why you need this sort of setup.
 Is it for PCI compliance or something similar?


 Yeah, that's my plan B.

 As I mentioned I am working in a large organisation and the security people
 have a lot of power.  A Puppet Master can in principle do a lot of damage
 because you are effectively root everywhere at once.  So it's simply
 unlikely that our security people are going to let a single Puppet Master be
 in control of all these subnets, and the point where it is going to get
 rejected is if I ask for every host on subnet A to be allowed to talk to the
 Puppet Master that lives on subnet Z.  Whether this is a good or bad
 security policy could be debated but it's not up to me.

Yeah I can understand that. I guess being the only guy in the shop
means I get to approve all the security as well.
You could involve the security people in the approval process and
change management process for your modules.
Keeping them involved is the best way. That way they also have input
into the process and point out anything that doesn't fit within the
security policies for your organisation.

I am actually using puppet to apply the security policies so that may
be something you could consider (yeah I intent to publish my modules
when I am happy with them)

 An alternative is to have a central repo server as suggested here.  I could
 have independent Puppet Masters on all the subnets and that would probably
 satisfy the security requirement.  The trouble is I would then lose the
 ability to have a global view of everything.  Thus, if I wanted, say, a
 report of all hosts I manage with a special configuration of some service,
 I'll have to log into all the Puppet Masters individually to get this
 information - or write a script to somehow extract it from the git repo.  So
 I will have lost one of the key benefits of Puppet.

You could setup puppet to manage the git repo for your modules and manifests :)
You could use tags to version the modules and include that as part of
the change management process.


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

 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] Re: manifest setting in puppet.conf does not work

2012-09-28 Thread Axel Bock
Hi Peter, hi John, 

first: Thanks, putting the setting in [master] actually did something - and 
overriding the commandline setting from SuSE linux ;) . 
right now I am using ...path/$environment.pp as manifest file, which 
works beautifully.

and yes, it seems manifest only takes a single file as parameter. (makes 
sense if you think of it - if you define a host two times, which one is 
taken?)


thanks a lot  greetings, 
axel.




Am Freitag, 28. September 2012 03:12:42 UTC+2 schrieb Peter:

 Hi Axel,
 I had a similar issue checkout - 
 https://groups.google.com/d/topic/puppet-users/C5Pfg_r_Srs/discussion
  
 I am not positive however I believe your issue likely falls fowl of the 
 same problem I had, essentially the manifest directive only takes a single 
 file location.
  
 Peter.

 On Monday, September 24, 2012 9:48:56 PM UTC+10, Axel Bock wrote:

 Hello readers, 

 I am configuring my environment to have a separate manifest file, using 
 $environment to in the module and manifest path. 
 For the modules it works now. The site.pp file ... is another issue. I 
 was under the impression it did, but it wasnt. 

 Basically I did the following: 
 modulepath = 
 /etc/puppet/environments/$environment/modules:/etc/puppet/modules
 manifest = 
 /etc/puppet/environments/$environment/site.pp:/etc/puppet/manifests/site.pp

 now when I define a node within an environment _only_ and not within the 
 global site.pp file, It runs - but applies an empty catalog. When I move 
 the node definition to the global site.pp file in 
 /etc/puppet/manifests/site.pp, it works again. The very same defnition, 
 just copied from one file to another. It also does not work when I use 
 single-file/single-directory entries for modulepath and manifest.


 Any ideas here? I could use some :)
 Thanks  greetings!
 Axel.



-- 
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/-/1rMkcYHq5jcJ.
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] Glassfish custom provider and 'file does not exist'

2012-09-28 Thread fatmcgav
Stefan

Was running puppet agent using 'sudo'...

However just tried using root and no difference...

Asadmin definitely exists and has got the right permissions, as shown below:

# file /usr/local/glassfish-3.1.2/bin/asadmin
 /usr/local/glassfish-3.1.2/bin/asadmin: POSIX shell script text executable
 # ls -l /usr/local/glassfish-3.1.2/bin/asadmin
 -rwxr-xr-x. 1 nobody glassfish 2262 Sep 18 16:23
 /usr/local/glassfish-3.1.2/bin/asadmin


Thoughts?

Cheers
Gavin

On 28 September 2012 06:14, Stefan Schulte
stefan.schu...@taunusstein.netwrote:

 On Thu, Sep 27, 2012 at 12:57:01PM +0100, fatmcgav wrote:
  Hi there
 
  I thought that initially as well, so I modified the provider to use a
 full
  path rather than assume it was on the path.
 
  The log files below are prints of the variables which are being passed
  around...
 
  Cheers
  Gav
  On Sep 27, 2012 12:53 PM, Dick Davies rasput...@hellooperator.net
 wrote:
 
 [...]
notice: /Stage[main]/Glassfish::Domain/Notify[gfdomain]/message:
 defined
'message' as 'Creating Glassfish domain cms using portbase 9000.
 Asadmin file is: /usr/local/glassfish-3.1.2/bin/asadmin.'
# file /usr/local/glassfish-3.1.2/bin/asadmin
/usr/local/glassfish-3.1.2/bin/asadmin: POSIX shell script text
   executable
 [...]

 Has the file the executable bit set for the user that is running the
 script (probably root)?

 -Stefan

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



Re: [Puppet Users] deleting virtual users

2012-09-28 Thread Luke Bigum
This may not fit your requirements but a slightly safer alternative 
might be set your old users' shells to /bin/false and null out their 
password, rather than delete them. A small added bonus is if your UIDs 
are never reused then all your UIDs will resolve to user accounts, which 
can be helpful later down the track if you want to know who owned which 
file, rather than it just be an unresolved UID number.


On 27/09/12 20:52, erkan yanar wrote:

Hoi  John,

On Thu, Sep 27, 2012 at 06:09:28AM -0700, jcbollinger wrote:


On Wednesday, September 26, 2012 2:15:27 PM UTC-5, erkules wrote:

On Wed, Sep 26, 2012 at 12:00:10PM -0700, Jo Rhett wrote:

Realizing doesn't allow overrides. To remove the user:

@user ahab { ensure = absent }
realize User['ahab']

This may mean you need to use inheritence for the class the user is

defined in, creating a child class for the nodes you want to remove him on.
Oha,
that sounds like putting a lot of thinking building the configuration
system.



Indeed, yes.  It is a complex task, and thinking is required.

Note, by the way, that virtualization really doesn't have much to do with
this particular issue.  There are basically two ways to remove users with
Puppet:

1. The fairly safe way: manage the user, setting ensure = absent.  That
'ensure' parameters could be set on the actual resource declaration,
perhaps conditionally, or it could be overridden later, such as via a
collection.

ok,


2. The simple, but rather dangerous, way: use the 'resources'
metaresource to declare that all unmanaged, non-system user accounts should
be purged from the system.  This has the potential to bite you -- hard --
but it has the advantage that all you have to do is stop realizing a user
or else not declare him at all to have him removed.

I confess I like that idea.


Note that even approach (1) I designate only fairly safe.  It is that
because you explicitly specify all user removals, but nothing can change
the fact that removing users is inherently risky.


thx a lot
erkan




--
Luke Bigum
Senior Systems Engineer

Information Systems
Ph: +44 (0) 20 3192 2520
luke.bi...@lmax.com | http://www.lmax.com
LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN


FX and CFDs are leveraged products that can result in losses exceeding
your deposit.  They are not suitable for everyone so please ensure you
fully understand the risks involved.  The information in this email is not
directed at residents of the United States of America or any other
jurisdiction where trading in CFDs and/or FX is restricted or prohibited
by local laws or regulations.

The information in this email and any attachment is confidential and is
intended only for the named recipient(s). The email may not be disclosed
or used by any person other than the addressee, nor may it be copied in
any way. If you are not the intended recipient please notify the sender
immediately and delete any copies of this message. Any unauthorised
copying, disclosure or distribution of the material in this e-mail is
strictly forbidden.

LMAX operates a multilateral trading facility.  Authorised and regulated 
by the Financial Services Authority (firm registration number 509778) and
is registered in England and Wales (number 06505809). 
Our registered address is Yellow Building, 1A Nicholas Road, London, W11

4AN.

--
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] Massive Import/Include

2012-09-28 Thread pierre-emmanuel degand
Hi, I try to include or import a lot of configuration files in a node, but 
it doesn't work :/

I create a module to configure bind, but i have a lot of domains to 
configure in the node of my server, so i decided to create an other module 
just to register my configuration with 1 file per domain (i have around 200 
domains, so arount 200 files...). 

My tree (for the configuration module) : 
module/

conf_bind/

manifests/

init.pp

 bind/

domain1_conf.pp

...

domain200_conf.pp


Init.pp :
class conf_bind {
}

I tried  import 'bind/*.pp'  , but it worked only once on my VM... The 
only solution i have now it's to include my domain*_conf one by one, but 
i'll be very long...

If someone got an idea :) 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/-/U8UbkO-hf2IJ.
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] Glassfish custom provider and 'file does not exist'

2012-09-28 Thread fatmcgav
Ok, so I thought I'd take another look, and try and get some debug logging
out of the provider to make sure it's constructing things correctly...

I've applied the following patch to asadmin.rb, however I'm not seeing
anything on the client trace...

diff --git a/lib/puppet/provider/asadmin.rb b/lib/puppet/provider/asadmin.rb
 index f95d6ab..c8bd4a7 100644
 --- a/lib/puppet/provider/asadmin.rb
 +++ b/lib/puppet/provider/asadmin.rb
 @@ -8,6 +8,7 @@
  passed_args.each { |arg| args  arg }
  exec_args = args.join  
  command = #{@resource[:asadminpath]} #{exec_args}
 +Puppet.debug(Command = #{command})
  command = su - #{@resource[:user]} -c \#{command}\ if
 @resource[:user] and
not command.match /create-service/
  self.debug command


Any ideas how I can get the provider logging???

Cheers
Gavin

On 28 September 2012 08:58, fatmcgav fatmc...@gmail.com wrote:

 Stefan

 Was running puppet agent using 'sudo'...

 However just tried using root and no difference...

 Asadmin definitely exists and has got the right permissions, as shown
 below:

 # file /usr/local/glassfish-3.1.2/bin/asadmin
 /usr/local/glassfish-3.1.2/bin/asadmin: POSIX shell script text executable
 # ls -l /usr/local/glassfish-3.1.2/bin/asadmin
 -rwxr-xr-x. 1 nobody glassfish 2262 Sep 18 16:23
 /usr/local/glassfish-3.1.2/bin/asadmin


 Thoughts?

 Cheers
 Gavin

 On 28 September 2012 06:14, Stefan Schulte stefan.schu...@taunusstein.net
  wrote:

 On Thu, Sep 27, 2012 at 12:57:01PM +0100, fatmcgav wrote:
  Hi there
 
  I thought that initially as well, so I modified the provider to use a
 full
  path rather than assume it was on the path.
 
  The log files below are prints of the variables which are being passed
  around...
 
  Cheers
  Gav
  On Sep 27, 2012 12:53 PM, Dick Davies rasput...@hellooperator.net
 wrote:
 
 [...]
notice: /Stage[main]/Glassfish::Domain/Notify[gfdomain]/message:
 defined
'message' as 'Creating Glassfish domain cms using portbase 9000.
 Asadmin file is: /usr/local/glassfish-3.1.2/bin/asadmin.'
# file /usr/local/glassfish-3.1.2/bin/asadmin
/usr/local/glassfish-3.1.2/bin/asadmin: POSIX shell script text
   executable
 [...]

 Has the file the executable bit set for the user that is running the
 script (probably root)?

 -Stefan

 --
 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] Server Roles

2012-09-28 Thread Frank
Hi, 

I've seen some blog posts about adding server roles to Puppet.

Some of them with this fact snippet:

if File.exists?(/etc/roles.txt)
File.readlines(/etc/roles.txt).each do |line|
if line =~ /^(.+)=(.+)$/
fact  = $1
value = $2

Facter.add(fact) do
# confine :kernel = Linux
setcode {value}
end
end
end
end



Since I have both linux and windows boxes backed with Puppet, it is correct to 
add the confine :kernel = Linux next to Facter.add(fact) and replicate 
the whole block changing this confine :kernel to Windows and the path (to 
match window paths c:\foo)?

Is this the right approach?

thanks in advance.

Cheers,
-- 
Frank

-- 
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: custom type in ruby - invalid resource type at .../site.pp

2012-09-28 Thread Axel Bock
Okay, I am one step farther.

After seeing Invalid resource for about 100 times I symlinked the type 
and provider dirs to /var/.../puppet/ (the global, core putty installation 
files). 
I basically wanted to see if I have an invalid ruby file, or if puppet 
simply doesn't notice the downloaded plugins.

It turns out - the latter. in the global puppet dir I get no more Invalid 
type errors, and my debug print statement in the exists? method gets 
printed. 

Now - what do I have to do to make puppet realize that this stupid plugin 
is there? It _does_ even autoload it - if I change it I get a diff printed, 
the code gets executed (I see print statements I put in there) - but once 
the type shall be acutally used puppet chickens out. This is so extremely 
annoying. 

Pluginsync = true is activated in the [main] and [master] section of client 
and master.


Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES 11 
SP2 repo. 


thanks in advance  greetings!
Axel.



Am Freitag, 28. September 2012 08:15:14 UTC+2 schrieb Axel Bock:

 plugincheck on client: check. 
 commented out property: check. 

 unfortunately same result :(

 thanks, 
 axel.


 Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic:

 On 09/27/2012 05:21 PM, Axel Bock wrote: 
  p.s.: my type can be seen here: http://pastebin.com/20N8teKV 
  and the provider here: http://pastebin.com/SjqyWegu 

 Try commenting out whole sync_direction property section in your type 
 type definition file. You defined property but you don't have methods in 
 your provider... 

 Also make sure you are doing the pluginsync on the client. 




-- 
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/-/28aheY-ZZS8J.
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: custom type in ruby - invalid resource type at .../site.pp

2012-09-28 Thread Trevor Vaughan
I'm assuming that you did this, but did you restart your master after
finishing the plugin?

I've forgotten to do this on occasion which amounted in a few minutes
of frustration.

Good luck,

Trevor

On Fri, Sep 28, 2012 at 8:44 AM, Axel Bock axel.b...@arbeitsagentur.de wrote:
 Okay, I am one step farther.

 After seeing Invalid resource for about 100 times I symlinked the type and
 provider dirs to /var/.../puppet/ (the global, core putty installation
 files).
 I basically wanted to see if I have an invalid ruby file, or if puppet
 simply doesn't notice the downloaded plugins.

 It turns out - the latter. in the global puppet dir I get no more Invalid
 type errors, and my debug print statement in the exists? method gets
 printed.

 Now - what do I have to do to make puppet realize that this stupid plugin is
 there? It _does_ even autoload it - if I change it I get a diff printed, the
 code gets executed (I see print statements I put in there) - but once the
 type shall be acutally used puppet chickens out. This is so extremely
 annoying.

 Pluginsync = true is activated in the [main] and [master] section of client
 and master.


 Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES 11
 SP2 repo.


 thanks in advance  greetings!
 Axel.



 Am Freitag, 28. September 2012 08:15:14 UTC+2 schrieb Axel Bock:

 plugincheck on client: check.
 commented out property: check.

 unfortunately same result :(

 thanks,
 axel.


 Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic:

 On 09/27/2012 05:21 PM, Axel Bock wrote:
  p.s.: my type can be seen here: http://pastebin.com/20N8teKV
  and the provider here: http://pastebin.com/SjqyWegu

 Try commenting out whole sync_direction property section in your type
 type definition file. You defined property but you don't have methods in
 your provider...

 Also make sure you are doing the pluginsync on the client.


 --
 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/-/28aheY-ZZS8J.

 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.



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

-- 
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] require file/package not managed by puppet

2012-09-28 Thread jcbollinger


On Friday, September 28, 2012 12:05:03 AM UTC-5, Stefan Schulte wrote:

 But it general determining the desired state (that's what puppet tries 
 to enforce) by looking at the current state (is the package installed?) 
 may not be the best design here. So why not finding out when the package 
 needs to be installed (e.g. because application X needs mysql) and then 
 enforce that rule by puppet? 


I agree.  Where it can do so, it is usually better for Puppet to command 
than to inquire.

A situation such as the OP's, where Puppet has the power to command but you 
don't want to use it, often signals disorganized or conflicting 
administration of the affected system.  That is, if the person writing the 
Puppet manifests knows whether the package is supposed to be installed, 
then it is better all-around to just manage it.  If he does *not* know, 
then that's either because someone else is responsible (and doesn't / won't 
share -- an administration conflict), or because the information is just 
not recorded (i.e. disorganized administration).

In fairness, both situations are fairly common, and the second, especially, 
is a hallmark of sites that do not (yet) use an automated configuration 
management system.


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/-/dGJ5_cFPu8YJ.
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: Server Roles

2012-09-28 Thread jcbollinger


On Friday, September 28, 2012 6:05:54 AM UTC-5, ureal frank wrote:

  Hi, 

 I've seen some blog posts about adding server roles to Puppet.

 Some of them with this fact snippet:

 if File.exists?(/etc/roles.txt)
 File.readlines(/etc/roles.txt).each do |line|
 if line =~ /^(.+)=(.+)$/
 fact  = $1
 value = $2

 Facter.add(fact) do
 # confine :kernel = Linux
 setcode {value}
 end
 end
 end
 end


 Since I have both linux and windows boxes backed with Puppet, it is 
 correct to add the confine :kernel = Linux next to Facter.add(fact) 
 and replicate the whole block changing this confine :kernel to Windows 
 and the path (to match window paths c:\foo)?

 Is this the right approach?



No. The code you presented tests the Unix-style path well before it gets to 
the point where your confine enters the picture.  If the file was found at 
all then you do not need to 'confine' to Linux (unless you need to 
distinguish that case from other Unixes, such as OS X or Solaris).

You could duplicate the code and change the path (still not needing a 
'confine'), but if I were writing this I would probably test the kernel 
or os fact at the start to determine which path to look for in the first 
place, then use just one fact declaration (still with no need for a 
'confine').


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/-/q1jyUOogM0cJ.
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: Server Roles

2012-09-28 Thread Frank


-- 
Frank


On Friday, September 28, 2012 at 2:35 PM, jcbollinger wrote:

 
 
 On Friday, September 28, 2012 6:05:54 AM UTC-5, ureal frank wrote:
  Hi, 
  
  I've seen some blog posts about adding server roles to Puppet.
  
  Some of them with this fact snippet:
  
  if File.exists?(/etc/roles.txt)
  File.readlines(/etc/roles.txt).each do |line|
  if line =~ /^(.+)=(.+)$/
  fact  = $1
  value = $2
  
  Facter.add(fact) do
  # confine :kernel = Linux
  setcode {value}
  end
  end
  end
  end
  
  
  
  Since I have both linux and windows boxes backed with Puppet, it is correct 
  to add the confine :kernel = Linux next to Facter.add(fact) and 
  replicate the whole block changing this confine :kernel to Windows and 
  the path (to match window paths c:\foo)?
  
  Is this the right approach?
 
 
 No. The code you presented tests the Unix-style path well before it gets to 
 the point where your confine enters the picture.  If the file was found at 
 all then you do not need to 'confine' to Linux (unless you need to 
 distinguish that case from other Unixes, such as OS X or Solaris).
 
 You could duplicate the code and change the path (still not needing a 
 'confine'), but if I were writing this I would probably test the kernel or 
 os fact at the start to determine which path to look for in the first 
 place, then use just one fact declaration (still with no need for a 
 'confine'). 
 
Ok, it makes sense. Then for me to use $$::kernel variable on this fact 
definition, I must require 'facter' first or I just use it in a conditional 
clause like this?

if $::kernel = linux then
# linux fact code
else
# windows fact code
end 
 

Frank

 
 
 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/-/q1jyUOogM0cJ.
 To post to this group, send email to puppet-users@googlegroups.com 
 (mailto:puppet-users@googlegroups.com).
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com 
 (mailto: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] Re: Massive Import/Include

2012-09-28 Thread jcbollinger


On Friday, September 28, 2012 3:31:11 AM UTC-5, pierre-emmanuel degand 
wrote:

 Hi, I try to include or import a lot of configuration files in a node, but 
 it doesn't work :/

 I create a module to configure bind, but i have a lot of domains to 
 configure in the node of my server, so i decided to create an other module 
 just to register my configuration with 1 file per domain (i have around 200 
 domains, so arount 200 files...). 

 My tree (for the configuration module) : 
 module/

 conf_bind/

 manifests/

 init.pp

  bind/

 domain1_conf.pp

 ...

 domain200_conf.pp


 Init.pp :
 class conf_bind {
 }

 I tried  import 'bind/*.pp'  , but it worked only once on my VM... The 
 only solution i have now it's to include my domain*_conf one by one, but 
 i'll be very long...

 If someone got an idea :) thanks


The 'import' function is the wrong tool for this job (indeed there is only 
about one job for which it is appropriate).

You don't describe the contents of your bind/domainX_conf.pp manifests, but 
with the layout you describe, each should be of this form:

class conf_bind::bind::domainX_conf {
  # declarations for configuring domain X...
}

Then in the module's init.pp you would have:

class conf_bind {
  include 'conf_bind::bind::domain1_conf'
  include 'conf_bind::bind::domain2_conf'
  # ...
  include 'conf_bind::bind::domain200_conf'
}

Puppet DSL does not provide a way to use pattern matching to assign classes 
to nodes, and it does not provide for textual interpolation in the manner 
of the C preprocessor's #include directive.  In particular, Puppet's 
'include' function performs a fundamentally different job than does cpp's 
#include.


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/-/ueJrUZd_E84J.
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: Massive Import/Include

2012-09-28 Thread Stephen Gran
Hi,

On Fri, 2012-09-28 at 06:47 -0700, jcbollinger wrote:
 
 
 On Friday, September 28, 2012 3:31:11 AM UTC-5, pierre-emmanuel degand
 wrote:
 Hi, I try to include or import a lot of configuration files in
 a node, but it doesn't work :/
 
 
 I create a module to configure bind, but i have a lot of
 domains to configure in the node of my server, so i decided to
 create an other module just to register my configuration with
 1 file per domain (i have around 200 domains, so arount 200
 files...). 
 
 
 My tree (for the configuration module) : 
 module/
 conf_bind/
 manifests/
 init.pp
  bind/
 domain1_conf.pp
 ...
 domain200_conf.pp
 
 
 Init.pp :
 class conf_bind {
 }


Ouch, that looks like a painful way to do it.

 You don't describe the contents of your bind/domainX_conf.pp
 manifests, but with the layout you describe, each should be of this
 form:
 
 class conf_bind::bind::domainX_conf {
   # declarations for configuring domain X...
 }
 
 Then in the module's init.pp you would have:
 
 class conf_bind {
   include 'conf_bind::bind::domain1_conf'
   include 'conf_bind::bind::domain2_conf'
   # ...
   include 'conf_bind::bind::domain200_conf'
 }
 
 Puppet DSL does not provide a way to use pattern matching to assign
 classes to nodes, and it does not provide for textual interpolation in
 the manner of the C preprocessor's #include directive.  In
 particular, Puppet's 'include' function performs a fundamentally
 different job than does cpp's #include.

So, John answered the question you actually asked, and I'm going to try
to answer the question you probably should have asked, which is, what
is the smart way to achieve this?

I think you probably want a custom type with enough parameters to
satisfy your particular needs.  Eg, if the master is always the same and
the slaves are always the same, all you really need is the domain name.
If you need more parameterization per domain, you could make zones be a
hash with the additional information keyed carried in it.

I'd set it up something like:

class bind::params {
$domains = [
domain1,
...,
domain200,
]
}

class bind {
package { 'bind': }
service { 'bind': }
}

define bind::master_zone {
include bind

file { /etc/bind9/zones/masters/${name}.conf:
content = template('bind/master_zone.conf.erb'),
notify  = Service['bind']
}
}

define bind::slave_zone {
include bind

file { /etc/bind9/zones/slaves/${name}.conf:
content = template('bind/slave_zone.conf.erb'),
notify  = Service['bind']
}
}


class bind::master {
include bind
include bind::params

$zones = $bind::params::zones
bind::master_zone { $zones }
}

class bind::slave {
include bind
include bind::params

$zones = $bind::params::zones
bind::slave_zone { $zones }
}

This is off the top of my head, and leaves out an awful lot of
boilerplate.  Hopefully you see what I'm trying to say and it gets you
to somewhere more manageable.

Cheers,
-- 
Stephen Gran
Senior Systems Integrator - guardian.co.uk

Please consider the environment before printing this email.
--
Visit guardian.co.uk - newspaper of the year

www.guardian.co.ukwww.observer.co.uk www.guardiannews.com 

On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone and iPad edition www.guardian.co.uk/iPad 
 
Save up to 37% by subscribing to the Guardian and Observer - choose the papers 
you want and get full digital access. 
Visit guardian.co.uk/subscribe 

-
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News  Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News  Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

-- 
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] Re: Massive Import/Include

2012-09-28 Thread jcbollinger


On Friday, September 28, 2012 8:47:03 AM UTC-5, jcbollinger wrote:



 On Friday, September 28, 2012 3:31:11 AM UTC-5, pierre-emmanuel degand 
 wrote:

 Hi, I try to include or import a lot of configuration files in a node, 
 but it doesn't work :/

 I create a module to configure bind, but i have a lot of domains to 
 configure in the node of my server, so i decided to create an other module 
 just to register my configuration with 1 file per domain (i have around 200 
 domains, so arount 200 files...). 

 My tree (for the configuration module) : 
 module/

 conf_bind/

 manifests/

 init.pp

  bind/

 domain1_conf.pp

 ...

 domain200_conf.pp


 Init.pp :
 class conf_bind {
 }

 I tried  import 'bind/*.pp'  , but it worked only once on my VM... The 
 only solution i have now it's to include my domain*_conf one by one, but 
 i'll be very long...

 If someone got an idea :) thanks


 The 'import' function is the wrong tool for this job (indeed there is only 
 about one job for which it is appropriate).

 You don't describe the contents of your bind/domainX_conf.pp manifests, 
 but with the layout you describe, each should be of this form:

 class conf_bind::bind::domainX_conf {
   # declarations for configuring domain X...
 }

 Then in the module's init.pp you would have:

 class conf_bind {
   include 'conf_bind::bind::domain1_conf'
   include 'conf_bind::bind::domain2_conf'
   # ...
   include 'conf_bind::bind::domain200_conf'
 }

 Puppet DSL does not provide a way to use pattern matching to assign 
 classes to nodes, and it does not provide for textual interpolation in the 
 manner of the C preprocessor's #include directive.  In particular, 
 Puppet's 'include' function performs a fundamentally different job than 
 does cpp's #include.


On the other hand, there is probably an all-around better way to do this.  
I'm guessing that the manifests for your domains are all pretty much the 
same form, but with different data.  In that case, you might be better off 
separating the data from the manifests.

Puppet's primary general-purpose data access API is hiera, which is an 
add-on to Puppet 2 but a built-in in Puppet 3.  If you organize your data 
suitably then you can use hiera to serve it up to your module as a hash of 
hashes something like this:

{
  domain1 = {
propertyA = 'valueA1',
propertyB = 'valueB1',
...
  },
  ...
  domain200 = {
propertyA = 'valueA200',
propertyB = 'valueB200',
...
  }
}

Combine that with a suitable Puppet defined type and the create_resources() 
function, and your module can hook it all together something like this:

class conf_bind {
  create_resources('conf_bind::domain', hiera('bind_domains'))
}

where 'conf_bind::domain' is the name of the defined type that wraps the 
per-domain declarations, and 'bind_domains' is the key with which hiera 
will look up your data.


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/-/qwb4qQdG4D0J.
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: Massive Import/Include

2012-09-28 Thread pierre-emmanuel degand
my module bind : 
- init.pp :
class bind {
include bind::install
include bind::service
}

-install.pp :
class bind::install (
$packages = $bind::params::server_packages
) inherits bind::params {
 package { $packages : 
ensure = present,
}

file { /etc/bind/zones:
ensure  = directory,
owner   = root,
group   = root,
mode= 0755,
}

file { /etc/bind/named.conf.local:
owner = root,
group = root,
mode = 0644,
source = puppet:///modules/bind/named.conf.local,
}

}

service.pp :
class bind::service (
$service = $bind::params::server_services
) inherits bind::params {
 service { $service :
enable = true,
ensure   = running,
hasrestart = true,
hasstatus  = true,
}
}

params.pp :
class bind::params {
 $server_packages = [bind9]
$server_services = bind9
}

config.pp (the one i use to configure each domain) :
define bind::config ($dns_server = $fqdn,
$domain,
$type_ip = A,
$ip_serv = '',
$type_ip2 = $type_ip,
$ip_serv2 = $ip_serv,
$sub_domain='',
$mx=false,
$ip_mx1 = xxx.xxx.xxx.xxx,
$domain_mx1 = $domain,
$type_mx1 = A,
$ip_mx2 = xxx.xxx.xxx.xxx,
$domain_mx2 = $domain_mx1,
$type_mx2 = A,
$ip_ns1 = xxx.xxx.xxx.xxx,
$type_ns1 = A,
$ip_ns2 = xxx.xxx.xxx.xxx,
$type_ns2 = A,
$ip_ns3 = xxx.xxx.xxx.xxx,
$type_ns3 = A,
$www = true
){

include bind
 file { /etc/bind/zones/${domain}.db:
content = template(bind/zone.db.erb),
owner = root,
group = root,
mode = 0644,
} 
}


And for each domainX_conf.pp :
class conf_bind::bind_domain_fr {
 bind::config { domain.fr:
   domain = domain.fr,
   ip_serv = xxx.xxx.xxx.xxx,
   sub_domain = [domain.fr. IN MX 20 mx2.ovh.net.,
domain.fr. IN MX 10 mx1.ovh.net.,
domain.fr. IN MX 100 mxb.ovh.net.,
domain.fr. IN TXT \v=spf1 
ip4:xxx.xxx.xxx.xxx ip4:xxx.xxx.xxx.xxx -all\,
subdomain1 IN A xxx.xxx.xxx.xxx,
subdomain2 IN A xxx.xxx.xxx.xxx,
pop3 IN CNAME ns0.ovh.net.,
],
   }
}

At the beginning, all the configuration was in the node.pp, but i had too 
much ligns so i split all the configuration like that...

Then in the module's init.pp you would have:

class conf_bind {
  include 'conf_bind::bind::domain1_conf'
  include 'conf_bind::bind::domain2_conf'
  # ...
  include 'conf_bind::bind::domain200_conf'
} == it's what i want to avoid :s

-- 
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/-/kOvfDx8vZBYJ.
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: Server Roles

2012-09-28 Thread Frank
I'm going this way:

roles_file = 

if Facter.kernel = 'linux'
roles_file = /etc/roles_facts.txt
elsif Facter.kernel = 'windows'
roles_file = C:\\roles_facts.txt
end

if File.exists?(roles_files)
File.readlines(roles_file).each do |line|
if line =~ /^(.+)=(.+)$/
fact  = $1
value = $2

Facter.add(fact) do
setcode {value}
end
end
end
end


:) 

-- 
Frank


On Friday, September 28, 2012 at 2:44 PM, Frank wrote:

 
 
 -- 
 Frank
 
 
 On Friday, September 28, 2012 at 2:35 PM, jcbollinger wrote:
 
  
  
  On Friday, September 28, 2012 6:05:54 AM UTC-5, ureal frank wrote:
   Hi, 
   
   I've seen some blog posts about adding server roles to Puppet.
   
   Some of them with this fact snippet:
   
   if File.exists?(/etc/roles.txt)
   File.readlines(/etc/roles.txt).each do |line|
   if line =~ /^(.+)=(.+)$/
   fact  = $1
   value = $2
   
   Facter.add(fact) do
   # confine :kernel = Linux
   setcode {value}
   end
   end
   end
   end
   
   
   
   Since I have both linux and windows boxes backed with Puppet, it is 
   correct to add the confine :kernel = Linux next to Facter.add(fact) 
   and replicate the whole block changing this confine :kernel to Windows 
   and the path (to match window paths c:\foo)?
   
   Is this the right approach?
  
  
  No. The code you presented tests the Unix-style path well before it gets to 
  the point where your confine enters the picture.  If the file was found at 
  all then you do not need to 'confine' to Linux (unless you need to 
  distinguish that case from other Unixes, such as OS X or Solaris).
  
  You could duplicate the code and change the path (still not needing a 
  'confine'), but if I were writing this I would probably test the kernel 
  or os fact at the start to determine which path to look for in the first 
  place, then use just one fact declaration (still with no need for a 
  'confine'). 
  
 Ok, it makes sense. Then for me to use $$::kernel variable on this fact 
 definition, I must require 'facter' first or I just use it in a conditional 
 clause like this?
 
 if $::kernel = linux then
 # linux fact code
 else
 # windows fact code
 end 
  
 
 Frank
 
  
  
  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/-/q1jyUOogM0cJ.
  To post to this group, send email to puppet-users@googlegroups.com 
  (mailto:puppet-users@googlegroups.com).
  To unsubscribe from this group, send email to 
  puppet-users+unsubscr...@googlegroups.com 
  (mailto: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] How to create a directory if that path does not yet exist?

2012-09-28 Thread Marc Haber
Hi,

I have the following resource defined:

file { /var/lib/foo:
ensure = directory,
owner = root,
group = root,
mode = 0755,
}

On some systems, but not on all, I have /var/lib/foo symlinked to
another partition with more space. Those symlinks (/var/lib/foo =
/space/foo) are replaced during the puppet run with a local directory.

Neither the force nor the replace parameter to the File resource seems
to stop this behavior.

Is there anyway to obtain this behavior short of using an exec?

Greetings
Marc

-- 
-
Marc Haber | I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things.Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062

-- 
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 module dependencies

2012-09-28 Thread DRivard
Hi,

I am having difficulties understanding how to get 2 modules to install one 
after the other.
I have in total 3 modules:

common  # contains everything common to the master and slave 
configuration
slave   # contains what is specific to the slaves config
master  # contains what is specific to the masters config

node  'myslave1'
{
  class {  
  common:
  database = 192.168.1.10,
  before = Class[slave];
  }

  class {
  slave:
  }
}

I am trying to tell the slave module to run after the common module is 
totally applied, but it doesn't work like I am expecting. In the common 
module
I set some repository and execute an update on the newly added repository.
But what happen is that, some slave package tries to get installed before
the common module complete the configuration of the repositories.

How can I achieve my goal?

Best,
Dominick

-- 
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/-/S6WCLMbN_l8J.
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: Could use another set of eyes to assist

2012-09-28 Thread jcbollinger


On Thursday, September 27, 2012 11:56:28 AM UTC-5, Jeremy wrote:

 I've got a puppet module I've written to support deploying a custom PHP 
 web application that a client has developed. The actual application and the 
 fact that it's deployed within AWS is not the problem or important to the 
 issue. I'm looking to see if I someone else can think of a better way to 
 implement what I have done that is more efficient and improve the catalog 
 rendering time.

 I've placed the module into a GitHub repository at (
 https://github.com/jbouse/puppet-app1). The app is deployed based on the 
 contents of a YAML file that is retrieved by the class. Initially deploying 
 the sites defined was not an issue and was actually very fast. The problems 
 got introduced in handling the dependent components as defined in the YAML 
 file. I wrote several parser functions in an effort to identify only the 
 unique components and versions needed and generate titles that would not 
 conflict. I fully admit and consider what I've done a hack and I'm really 
 open to hearing some suggestions on how to make it less of one.



I have been looking over your module, and so far I don't see any smoking 
gun that would clearly explain why catalog compilation takes so long, but I 
do have a guess (see below).  The code seems generally clean, 
well-organized, and nicely documented, but perhaps I have a few comments 
that perhaps you will find helpful.  In no particular order:

   - You use a lot of constructs of this form: $somedir = inline_template(%= 
   File.join('${parent}', 'foo') %).  That's a lot uglier and heavier 
   than $somedir = ${parent}/foo, and it gains you nothing: the template is 
   always going to be evaluated on the master, which cannot run on Windows, so 
   the file separator is always going to be '/'.
   - It is harmless, but unnecessary, for a File to explicitly 'require' 
   other File resources representing its parent or other ancestor directory.  
   Puppet will generate these relationships automatically if you do not 
   specify them explicitly.
   - You evidently have a separate module common containing a definition 
   named common::archive::tar-gz.  Names in your Puppet manifests should 
   not contain the hyphen (-) -- it works in some places, in some versions, 
   but not in others.  You would be wise to avoid it altogether, perhaps by 
   replacing it with an underscore (_).
   - If there is one thing to be most suspicious of, it would be your 
   app1_deployment function's use of YAML.load(open(args[0])).  Some of 
   the other code in your module leads me to suspect that the file it's 
   opening may not be local.  (And if it were local, then you would probably 
   just put the data in the hiera store you are using for other data.)  If you 
   are indeed retrieving that file over the network then the time to do so 
   could easily dominate your compilation times, and network slowness or 
   outage could make your compilations timeout or simply fail.
   

Good luck,

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/-/qNcvib6HNMUJ.
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: Could use another set of eyes to assist

2012-09-28 Thread Jeremy T. Bouse
On Fri, Sep 28, 2012 at 11:38 AM, jcbollinger john.bollin...@stjude.orgwrote:



 On Thursday, September 27, 2012 11:56:28 AM UTC-5, Jeremy wrote:

 I've got a puppet module I've written to support deploying a custom PHP
 web application that a client has developed. The actual application and the
 fact that it's deployed within AWS is not the problem or important to the
 issue. I'm looking to see if I someone else can think of a better way to
 implement what I have done that is more efficient and improve the catalog
 rendering time.

 I've placed the module into a GitHub repository at (
 https://github.com/jbouse/**puppet-app1https://github.com/jbouse/puppet-app1).
 The app is deployed based on the contents of a YAML file that is retrieved
 by the class. Initially deploying the sites defined was not an issue and
 was actually very fast. The problems got introduced in handling the
 dependent components as defined in the YAML file. I wrote several parser
 functions in an effort to identify only the unique components and versions
 needed and generate titles that would not conflict. I fully admit and
 consider what I've done a hack and I'm really open to hearing some
 suggestions on how to make it less of one.



 I have been looking over your module, and so far I don't see any smoking
 gun that would clearly explain why catalog compilation takes so long, but I
 do have a guess (see below).  The code seems generally clean,
 well-organized, and nicely documented, but perhaps I have a few comments
 that perhaps you will find helpful.  In no particular order:

- You use a lot of constructs of this form: $somedir = inline_template
(%= File.join('${parent}', 'foo') %).  That's a lot uglier and
heavier than $somedir = ${parent}/foo, and it gains you nothing: the
template is always going to be evaluated on the master, which cannot run on
Windows, so the file separator is always going to be '/'.
- It is harmless, but unnecessary, for a File to explicitly 'require'
other File resources representing its parent or other ancestor directory.
Puppet will generate these relationships automatically if you do not
specify them explicitly.
- You evidently have a separate module common containing a
definition named common::archive::tar-gz.  Names in your Puppet
manifests should not contain the hyphen (-) -- it works in some places, in
some versions, but not in others.  You would be wise to avoid it
altogether, perhaps by replacing it with an underscore (_).
- If there is one thing to be most suspicious of, it would be your
app1_deployment function's use of YAML.load(open(args[0])).  Some of
the other code in your module leads me to suspect that the file it's
opening may not be local.  (And if it were local, then you would probably
just put the data in the hiera store you are using for other data.)  If you
are indeed retrieving that file over the network then the time to do so
could easily dominate your compilation times, and network slowness or
outage could make your compilations timeout or simply fail.


 Good luck,

 John


John,

Your observations were pretty much on target. The common module does have
the define that handles retrieving and extracting the tarballs to a target
directory and has worked perfectly for quite some time. I was re-designing
the module that deploys the web app from their old single tarball to a
multi-tarball deployment model so now it just gets called more. I hadn't
heard of the issue with the hyphen but I'll take it under advisement and
adjust.

The use of the YAML.load(open(args[0])) call was in fact to support both
local and network files. In this case I'm actually giving an authenticated
S3 bucket URL to retrieve the file as the engineers releasing the code also
upload the deployment YAML file to the S3 bucket. The tarballs that are
deployed are also in the S3 bucket and also pass authenticated URLs in the
catalog with an expiration equal to the catalog expiration time. I'd like
to eventually modify it to include retrieving the deployment file and
storing it locally only when it's been modified but want to keep it in S3
as it allows my Puppet master to operate as a blackbox that engineers have
no access to. If I control the deployment file locally they claim I'm the
bottleneck slowing them down so as long as I give them the means to update
it and the process flow is error free and only problems encountered are
when they screw up the deployment file contents accountability is
maintainable.

My thought on the smoking gun is in having to make the parser function
calls to try and determine the unique components and unique versions in the
case of a component with multiple versions needing to be deployed. This was
the quickest way I could find to get the deployment file format converted
and ensure that I only defined a resource once avoiding the duplicate
resource definition errors. As a result I'm calling the 2 

[Puppet Users] Reminder - Last day of PuppetConf + free streaming

2012-09-28 Thread Michelle Carroll
Apologies for blasting the lists, but the live streaming for day 2 starts
in ~5 minutes. We're kicking off with Dan Hushon from EMC, followed by two
great science talks (Tim Bell from CERN and Jok Thuau from SpaceX.

Sign up for the live stream and see the full schedule of streaming talks:
http://puppetlabs.com/blog/watch-the-puppetconf-live-video-stream/

and there's some great conversation in the #puppetconf IRC channel and on
the #puppetconf hashtag on Twitter.

Thanks!
Michelle


-- 
Michelle Carroll
miche...@puppetlabs.com

Join us for PuppetConf 2012 in San Francisco: http://bit.ly/pcsig12

-- 
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/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-09-28 Thread Lunixer
Greetings,

I have a tested, working setup of Puppet and Webrick. I can add nodes, 
classes, etc.
Then I switched to Puppet/Passenger and get the error  below.
Puppet, Apache and Passenger are all up.

I have installed using *YUM *repos and *GEMs*. So, I have the most updated 
packages they have.

Puppet version: 2.7.19
Ruby version: 1.8.7 (2011-06-30 patchlevel 352 i386)
Apache: 2.2.15

The error is below.
I have found little references on the web. Has anyone come across such 
problem recently?

[root@puppetm01 ~]# puppet agent --test
err: Could not retrieve catalog from remote server: Error 403 on SERVER: 
*Forbidden 
request*: puppetm01.example.com(xxx.xxx.xxx.xxx) access to 
/catalog/puppetm01.example.com [find] at line 53
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: Error 403 on SERVER: *Forbidden request*: 
puppetm01.example.com(xxx.xxx.xxx.xxx) access to 
/report/puppetm01.example.com [save] at line 53

Below is the path to the catalog file to which I believe the error points.

[root@puppetm01 ]# find /var/lib/puppet | grep catalog
./client_yaml/catalog
./client_yaml/catalog/puppetm01.example.com.yaml

Thanks in advance for any pointers.


-- 
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/-/xms_wXhyV2EJ.
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: Puppetdashboard :: cannot add class

2012-09-28 Thread Lunixer
I figured this out.

On the dashboard:
- Click Add classs
- type in exactly the class name as it exist in the puppet modules 
directory and click create
- Edit a node or group and the auto search will find the class (a.k.a. 
module)



On Thursday, September 27, 2012 3:38:42 PM UTC-7, Lunixer wrote:

 Wanted to add that I used the CLI with no success.

  rake nodeclass:add name=sudo 


 -

 On Thursday, September 27, 2012 3:35:02 PM UTC-7, Lunixer wrote:

 I have puppet running on WEBrick.
 Dashboard works. I can see the hosts currently in puppet.
 In Dashboard I can add hosts and create groups, but cannot add classes. 
 The auto-search returns nothing when I click on a group or server and start 
 typing in the Classes textbox.

 Is this a common occurrence with Dashboard?
 I have looked on the web and found no answer.

 Appreciate any pointers.

 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/-/lYElsksxngwJ.
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 module dependencies

2012-09-28 Thread Tim Mooney

In regard to: [Puppet Users] Puppet module dependencies, DRivard said (at...:


I am having difficulties understanding how to get 2 modules to install one
after the other.
I have in total 3 modules:

   common  # contains everything common to the master and slave
configuration
   slave   # contains what is specific to the slaves config
   master  # contains what is specific to the masters config

   node  'myslave1'
   {
 class {
 common:
 database = 192.168.1.10,
 before = Class[slave];
 }

 class {
 slave:
 }
   }

I am trying to tell the slave module to run after the common module is
totally applied, but it doesn't work like I am expecting. In the common
module
I set some repository and execute an update on the newly added repository.
But what happen is that, some slave package tries to get installed before
the common module complete the configuration of the repositories.

How can I achieve my goal?


I'm going to guess that the issue is this

http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern

Pay particular attention to the paragraph between the first two code
blocks.  That spells out why the 'before = Class[slave]' that you're
using isn't doing what you want.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-09-28 Thread Jo Rhett
Check the owner of config.ru. The owner of this file is who passenger will run 
the puppetmaster daemon as. I'm guessing that it's not owned by puppet.

On Sep 28, 2012, at 9:36 AM, Lunixer wrote:
 Greetings,
 
 I have a tested, working setup of Puppet and Webrick. I can add nodes, 
 classes, etc.
 Then I switched to Puppet/Passenger and get the error  below.
 Puppet, Apache and Passenger are all up.
 
 I have installed using YUM repos and GEMs. So, I have the most updated 
 packages they have.
 
 Puppet version: 2.7.19
 Ruby version: 1.8.7 (2011-06-30 patchlevel 352 i386)
 Apache: 2.2.15
 
 The error is below.
 I have found little references on the web. Has anyone come across such 
 problem recently?
 
 [root@puppetm01 ~]# puppet agent --test
 err: Could not retrieve catalog from remote server: Error 403 on SERVER: 
 Forbidden request: puppetm01.example.com(xxx.xxx.xxx.xxx) access to 
 /catalog/puppetm01.example.com [find] at line 53
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run
 err: Could not send report: Error 403 on SERVER: Forbidden request: 
 puppetm01.example.com(xxx.xxx.xxx.xxx) access to 
 /report/puppetm01.example.com [save] at line 53
 
 Below is the path to the catalog file to which I believe the error points.
 
 [root@puppetm01 ]# find /var/lib/puppet | grep catalog
 ./client_yaml/catalog
 ./client_yaml/catalog/puppetm01.example.com.yaml
 
 Thanks in advance for any pointers.
 
 
 -- 
 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/-/xms_wXhyV2EJ.
 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.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



-- 
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] Custom ruby gem continuously updates

2012-09-28 Thread jmadtech
Hey all,

I'm not sure if there's a real issue or if I'm doing something incorrectly.

I have a custom compiled gem that I'm installing via:

package { sapnwrfc-0.24:
ensure = 'installed',
provider = 'gem',
source = /export/admin_scripts/sapnwrfc-0.24,
}

On first run, it installs correctly.  A 'gem list' shows it as:

sapnwrfc (0.24 x86_64-linux)

However, every subsequent checkin with the master results in:

Thu Sep 27 20:07:34 -0700 2012 Puppet (notice): Starting Puppet client 
version 2.7.19
Thu Sep 27 20:07:49 -0700 2012 
/Stage[main]/my_app/Package[sapnwrfc-0.24]/ensure (notice): created
Thu Sep 27 20:07:53 -0700 2012 Puppet (notice): Finished catalog run in 
12.90 seconds

I've tried changing the ensure from 'installed' to '0.24', '0.24 
x86_64-linux', etc. to no avail... it keeps registering a change.

what am I doing wrong?

Thanks in advance!

-- 
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/-/I_o9G1NySfUJ.
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 instllation error

2012-09-28 Thread skrishna12
Hi 

I downloaded puppet master   puppet-enterprise-2.6.0-el-5-x86_64 on centos 
5.2 server. When I tried to install , I got the following error messages.

!* ERROR: Could not connect to the mysql server using the root credentials 
provided. Please verify your credentials and try again.*

Can you any   one suggest what could be the solution to resove the issue? I 
am struck here.

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/-/IT3b-Fc54bIJ.
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: Debugging external node scripts

2012-09-28 Thread Virgil
Hi Curt, I realize this is 3 year s later, but do you have any idea how one 
debugs such an issue in 2012?

Cheers,
Virgil

On Friday, July 3, 2009 2:13:14 PM UTC-7, Curt Micol wrote:

 On Fri, Jul 3, 2009 at 12:05 PM, Martin 
 Wheldonmwhe...@googlemail.comjavascript: 
 wrote:
 
  Hi Curt,
 
  Did you manage to resolve this issue? If not I think it may be the
  format of your yaml output.
 
 ---
 classes:
 - custom
 - monitoring::base
 
  Should be this
 
  ---
  classes:
- custom
- monitoring::base
 
  Note the indentation. Having said that I have been unable to persuade
  the python yaml module to produce this
  as yet.
 
  Hope this helps

 Hey Martin,

 Thanks for the response. I did indeed get this working, it turns out
 it wasn't Puppet at all. The path for finding Python was incorrect, so
 while I was pointing it at /usr/local/bin/python it wasn't finding it
 and using /usr/bin/python which for some reason this script can't use
 (version issues). How and why this is, I don't know, but that's about
 as close to the reason as I was able to get.

 I think YAML is white space agnostic due to the '-' and ':' syntax. I
 could be wrong though.

 I hope to get some time and send in a patch to update the output on
 errors for executing external nodes, 4 days trying to figure out this
 issue was quite annoying and the error did little to help remedy the
 issue.

 Thanks again for the reponse,

 -- 
 # Curt Micol



-- 
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/-/aTahLqqWzIwJ.
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 instllation error

2012-09-28 Thread Matthaus Owens
That error indicates that the root password you provided for mysql is
not correct. If mysql is already installed on the machine the
installer needs that information to create databases and database
users for the console.

One solution would be to find and provide the correct mysql root password.

Another solution, if mysql isn't in use on the server and you don't
need the data, would be to remove the mysql packages and
/var/lib/mysql and let the PE installer handle installing the mysql
package for you.

I've also CCed the pe-users list, as this is a Puppet Enterprise
specific question.

On Fri, Sep 28, 2012 at 11:26 AM, skrishna12 shivays...@gmail.com wrote:
 Hi

 I downloaded puppet master   puppet-enterprise-2.6.0-el-5-x86_64 on centos
 5.2 server. When I tried to install , I got the following error messages.

 ! ERROR: Could not connect to the mysql server using the root credentials
 provided. Please verify your credentials and try again.

 Can you any   one suggest what could be the solution to resove the issue? I
 am struck here.

 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/-/IT3b-Fc54bIJ.
 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.



-- 
Matthaus Owens
Release Manager, 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.



[Puppet Users] nested modules and autoloading

2012-09-28 Thread Tim Mooney


All-

I'm using puppet 2.7.14.  I've reviewed

  http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html

but it doesn't seem to cover what I'm attempting.

Consider a module layout like this:

$ tree mymodule
mymodule
|-- Modulefile
|-- README
|-- manifests
|   |-- init.pp
|   |-- special_type
|   |   `-- prereqs.pp
|   `-- special_type.pp
|-- spec
|   `-- spec_helper.rb
`-- tests
`-- init.pp

4 directories, 7 files


$ egrep -v '^#|^$' mymodule/manifests/init.pp 
class mymodule($type = hiera('mymodule_type', 'client')) {

  case $type {
'client' : {  }
'custom' : {  }
'special_type'   : { include mymodule::special_type }
default  : { fail(Unknown mymodule_type=${mymodule_type}\n) }
  }
}


The problem is the include mymodule::special_type.  I've tried both
having

mymodule/manifests/special_type/init.pp

as well as just

mymodule/manifests/special_type.pp

In both cases, doing this in a node definition:

  class { 'mymodule':
type = 'special_type',
  }

results in

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could 
not find class mymodule::special_type for host.ndsu.edu at 
/etc/puppet/modules/mymodule/manifests/init.pp:41 on node host.ndsu.edu

Is it even possible to do what I'm attempting?  I know that

  http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html

discusses nested implementation modules, but there's only examples of
loading specific implementations, e.g.

include my_module::implementation::foo

rather than

include my_module::implementation


I know from plenty of first-hand experience that another reason why I
might see a could not find class whatever is if I have a typo in the
class name within the .pp file, but I've reviewed the classes involved
here and don't see any problems.

Any thoughts on whether it's possible to load the top level of a nested
class?

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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] Puppet/Passenger :: Could not retrieve catalog from remote server:Error 403 on server

2012-09-28 Thread Lunixer
Thanks for the reply.

I have checked permissions per the master puppet.conf excerpt below
.
My understanding is that Passenger does not really install anything or 
copies files around. 
You only create a directory and copy the config.ru into it and change 
permissions to puppet.
The only thing that passenger does is to install a Apache module, then you 
configure your vhost with that info.

I don't know whether I could blame the problem on any of the other packages 
(I.e. ruby), because things work perfectly fine with WEBrick.

Below I added more information. Please let me know If anyone spots 
something out of place.

*[root@puppetm01 puppet]# cat puppet.conf*
[main]
user = puppet
group = puppet


*[root@puppetm01 ]# ls -l /var/lib/puppetmaster/*
-rw-r--r-- 1 puppet puppet  431 Sep 27 21:51 config.ru
drwxr-xr-x 2 puppet puppet 4096 Sep 27 21:31 public
drwxr-xr-x 2 puppet puppet 4096 Sep 27 21:31 tmp

*[root@puppetm01 ~]# ps -ef | grep puppet*
avahi 1989 1  0 09:34 ?   00:00:00 avahi-daemon: running 
[puppetm01.local]
root  2666 1  0 09:34 ?   00:00:01 /usr/bin/ruby /usr/sbin/puppetd
puppet9734  9541  2 12:35 ?   00:00:00 
master  
  

puppet9769 1  0 12:35 ?   00:00:00 Rack: /var/lib/puppetmaster  

 


*
[root@puppetm01 ]# grep puppet /etc/passwd*
puppet:x:52:52:Puppet:/var/lib/puppet:/sbin/nologin
puppetdb:x:494:488:PuppetDB daemon:/usr/share/puppetdb:/sbin/nologin
puppet-dashboard:x:492:489:Puppet 
Dashboard:/usr/share/puppet-dashboard:/sbin/nologin

*[root@puppetm01 ]# id -a puppet*
uid=52(puppet) gid=52(puppet) groups=52(puppet)
*
[root@puppetm01 ~]# passenger-memory-stats *

 Apache processes -
PID   PPID  VMSize   Private  Name
---
9534  1 26.8 MB  0.3 MB   /usr/sbin/httpd
9551  9534  26.7 MB  0.2 MB   /usr/sbin/httpd
9552  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
9553  9534  27.0 MB  0.5 MB   /usr/sbin/httpd
9554  9534  27.0 MB  0.5 MB   /usr/sbin/httpd
9555  9534  26.8 MB  0.3 MB   /usr/sbin/httpd
9556  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
9557  9534  26.9 MB  0.3 MB   /usr/sbin/httpd
9558  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
9559  9534  26.8 MB  0.2 MB   /usr/sbin/httpd
### Processes: 10
### Total private dirty RSS: 3.00 MB


 Nginx processes 

### Processes: 0
### Total private dirty RSS: 0.00 MB


 Passenger processes 
PID   VMSize   Private  Name
-
9536  6.7 MB   0.2 MB   PassengerWatchdog
9539  17.8 MB  0.4 MB   PassengerHelperAgent
9541  18.7 MB  4.9 MB   Passenger spawn server
9544  13.2 MB  0.4 MB   PassengerLoggingAgent
9769  51.8 MB  26.0 MB  Rack: /var/lib/puppetmaster
9802  60.6 MB  36.6 MB  Passenger ApplicationSpawner: 
/usr/share/puppet-dashboard
9808  61.1 MB  37.2 MB  Rails: /usr/share/puppet-dashboard
### Processes: 7
### Total private dirty RSS: 105.69 MB

*
[root@puppetm01 ~]# passenger-status --verbose*
--- General information ---
max  = 12
count= 2
active   = 0
inactive = 2
Waiting on global queue: 0

--- Application groups ---
/usr/share/puppet-dashboard:
  App root: /usr/share/puppet-dashboard
  * PID: 9808Sessions: 0Processed: 2   Uptime: 58s
  URL : http://127.0.0.1:50447
  Password: xx

/var/lib/puppetmaster:
  App root: /var/lib/puppetmaster
  * PID: 9769Sessions: 0Processed: 2   Uptime: 1m 56s
  URL : http://127.0.0.1:55087
  Password: xx

*[root@puppetm01 ~]# tail -f /var/log/httpd/access_log
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:20 -0700] POST 
/production/catalog/puppetm01.example.com HTTP/1.1 403 138 - -
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:20 -0700] PUT 
/production/report/puppetm01.example.com HTTP/1.1 500 635 - -
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:30 -0700] POST 
/production/catalog/puppetm01.example.com HTTP/1.1 403 138 - -
xxx.xxx.xxx.xxx - - [28/Sep/2012:12:39:33 -0700] PUT 
/production/report/puppetm01.example.com HTTP/1.1 403 137 - -


[root@puppetm01 ~]# find /var/lib/puppet | grep catalog | xargs ls -l
-rw-r-. 1 root root 13150 Sep 27 21:00 
/var/lib/puppet/client_yaml/catalog/puppetm01.example.com.yaml

/var/lib/puppet/client_yaml/catalog:
total 16
-rw-r-. 1 root root 13150 Sep 27 21:00 puppetm01.example.com.yaml*



Thanks,
LL
-


On Friday, September 28, 2012 10:53:35 AM UTC-7, Jo wrote:

 Check the owner of config.ru. The owner of this file is who passenger 
 will run the puppetmaster daemon as. I'm guessing that it's not owned by 
 puppet.

 On Sep 28, 2012, at 9:36 AM, Lunixer wrote:

 Greetings,

 I have a tested, working setup of Puppet and Webrick. I can add nodes, 
 classes, etc.
 Then I switched to 

[Puppet Users] Re: Puppet Labs devel package repos for yum and apt

2012-09-28 Thread Jeff McCune
In case anyone finds this information via search, the 
puppetlabs-release-devel package is no longer necessary and should not be 
used.

Instead, the puppetlabs-release package contains the devel repository, but 
in a disabled state.

Up to date information is located at:
http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html

Hope this helps,
-Jeff

On Tuesday, May 15, 2012 1:54:48 PM UTC-7, Moses Mendoza wrote:

 All,

 There are now development package repos located at yum.puppetlabs.com and 
 apt.puppetlabs.com.

 Moving forward, these repos will contain Release Candidate packages of 
 Puppet, Facter, Puppet Dashboard,
 MCollective and Hiera, including the soon to be released RCs of Puppet 3.0 
 and its dependencies, Facter 2.0
 and Hiera 1.0.

 Packages are available to easily add these repos to yum and apt 
 configurations. To add the devel repos:

 EL5:
   sudo rpm -ivh 
 http://yum.puppetlabs.com/el/5/devel/i386/puppetlabs-release-devel-5-1.noarch.rpm

 EL6:
   sudo rpm -ivh 
 http://yum.puppetlabs.com/el/6/devel/i386/puppetlabs-release-devel-6-1.noarch.rpm

 Fedora 15:
   sudo rpm -ivh 
 http://yum.puppetlabs.com/fedora/f15/devel/i386/puppetlabs-release-devel-15-1.noarch.rpm

 Fedora 16:
   sudo rpm -ivh 
 http://yum.puppetlabs.com/fedora/f16/devel/i386/puppetlabs-release-devel-16-1.noarch.rpm

 Debian-based distros:
   wget http://apt.puppetlabs.com/puppetlabs-release-devel_1.0-2_all.deb
   sudo dpkg -i puppetlabs-release-devel_1.0-2_all.deb

 Cheers,
 Moses Mendoza
 Puppet Labs


-- 
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/-/LNg4q3Ihhe4J.
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] nested modules and autoloading

2012-09-28 Thread Martin Alfke
Hi Tim,

please check your class and file names.

The following is working:

modules/http/manifests/init.pp
class  'http' {
include http::config_file
}

modules/http/manifests/config_file.pp
class http::config_file {
file { '/tmp/http':
content = 'http',
}
}

modules/http/tests/init.pp
include http

puppet apply -v modules/http/tests/init.pp
will create /tmp/http file resource.

http://docs.puppetlabs.com/puppet/2.7/reference/lang_reserved.html

- Martin


On 28.09.2012, at 12:53, Tim Mooney wrote:

 
 All-
 
 I'm using puppet 2.7.14.  I've reviewed
 
  http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
 
 but it doesn't seem to cover what I'm attempting.
 
 Consider a module layout like this:
 
 $ tree mymodule
 mymodule
 |-- Modulefile
 |-- README
 |-- manifests
 |   |-- init.pp
 |   |-- special_type
 |   |   `-- prereqs.pp
 |   `-- special_type.pp
 |-- spec
 |   `-- spec_helper.rb
 `-- tests
`-- init.pp
 
 4 directories, 7 files
 
 
 $ egrep -v '^#|^$' mymodule/manifests/init.pp class mymodule($type = 
 hiera('mymodule_type', 'client')) {
  case $type {
'client' : {  }
'custom' : {  }
'special_type'   : { include mymodule::special_type }
default  : { fail(Unknown mymodule_type=${mymodule_type}\n) }
  }
 }
 
 
 The problem is the include mymodule::special_type.  I've tried both
 having
 
 mymodule/manifests/special_type/init.pp
 
 as well as just
 
 mymodule/manifests/special_type.pp
 
 In both cases, doing this in a node definition:
 
  class { 'mymodule':
type = 'special_type',
  }
 
 results in
 
 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not find class mymodule::special_type for host.ndsu.edu at 
 /etc/puppet/modules/mymodule/manifests/init.pp:41 on node host.ndsu.edu
 
 Is it even possible to do what I'm attempting?  I know that
 
  http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
 
 discusses nested implementation modules, but there's only examples of
 loading specific implementations, e.g.
 
   include my_module::implementation::foo
 
 rather than
 
   include my_module::implementation
 
 
 I know from plenty of first-hand experience that another reason why I
 might see a could not find class whatever is if I have a typo in the
 class name within the .pp file, but I've reviewed the classes involved
 here and don't see any problems.
 
 Any thoughts on whether it's possible to load the top level of a nested
 class?
 
 Tim
 -- 
 Tim Mooney tim.moo...@ndsu.edu
 Enterprise Computing  Infrastructure  701-231-1076 (Voice)
 Room 242-J6, IACC Building 701-231-8541 (Fax)
 North Dakota State University, Fargo, ND 58105-5164
 
 -- 
 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.



Re: [Puppet Users] nested modules and autoloading

2012-09-28 Thread Tim Mooney

In regard to: Re: [Puppet Users] nested modules and autoloading, Martin...:


Hi Tim,

please check your class and file names.

The following is working:

modules/http/manifests/init.pp
class  'http' {
include http::config_file
}

modules/http/manifests/config_file.pp
class http::config_file {
file { '/tmp/http':
content = 'http',
}
}


Martin-

I found the problem, and it was something simple.

I was originally confused because I had expected that

include mymodule::special_type

should work if I had

modules/mymodule/manifests/special_type/init.pp

but it does not.  When I tried

modules/mymodule/manifests/special_type.pp

and that didn't work, I thought there was a general problem with
nested classes that I wasn't understanding.

The actual problem was that I hadn't committed
modules/mymodule/manifests/special_type.pp to our VCS.  :-|  Oops.

Thanks,

Tim


On 28.09.2012, at 12:53, Tim Mooney wrote:



All-

I'm using puppet 2.7.14.  I've reviewed

 http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html

but it doesn't seem to cover what I'm attempting.

Consider a module layout like this:

$ tree mymodule
mymodule
|-- Modulefile
|-- README
|-- manifests
|   |-- init.pp
|   |-- special_type
|   |   `-- prereqs.pp
|   `-- special_type.pp
|-- spec
|   `-- spec_helper.rb
`-- tests
   `-- init.pp

4 directories, 7 files


$ egrep -v '^#|^$' mymodule/manifests/init.pp class mymodule($type = 
hiera('mymodule_type', 'client')) {
 case $type {
   'client' : {  }
   'custom' : {  }
   'special_type'   : { include mymodule::special_type }
   default  : { fail(Unknown mymodule_type=${mymodule_type}\n) }
 }
}


The problem is the include mymodule::special_type.  I've tried both
having

mymodule/manifests/special_type/init.pp

as well as just

mymodule/manifests/special_type.pp

In both cases, doing this in a node definition:

 class { 'mymodule':
   type = 'special_type',
 }

results in

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could 
not find class mymodule::special_type for host.ndsu.edu at 
/etc/puppet/modules/mymodule/manifests/init.pp:41 on node host.ndsu.edu

Is it even possible to do what I'm attempting?  I know that

 http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html

discusses nested implementation modules, but there's only examples of
loading specific implementations, e.g.

include my_module::implementation::foo

rather than

include my_module::implementation


I know from plenty of first-hand experience that another reason why I
might see a could not find class whatever is if I have a typo in the
class name within the .pp file, but I've reviewed the classes involved
here and don't see any problems.

Any thoughts on whether it's possible to load the top level of a nested
class?

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

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






--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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] Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Forrie

Just upgraded my puppet master to 3.0.0.  We have a very simple setup. 
 However, when restarting, I see this error:

Starting puppetmaster: 
/usr/local/lib/ruby/gems/1.8/gems/puppet-3.0.0/lib/puppet/application.rb:273:in 
`run_mode': undefined method `settings' for Puppet:Module (NoMethodError)
from 
/usr/local/lib/ruby/gems/1.8/gems/puppet-3.0.0/lib/puppet/application/master.rb:5
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in 
`gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in 
`require'
from /usr/local/lib/ruby/gems/1.8/gems/puppet-2.7.19/bin/puppetmasterd:3
from /usr/local/bin/puppetmasterd:23:in `load'
from /usr/local/bin/puppetmasterd:23


The code that is triggering this:

# Sets or gets the run_mode name. Sets the run_mode name if a mode_name 
 is

 # passed. Otherwise, gets the run_mode or a default run_mode

 #

 def run_mode( mode_name = nil)

   if mode_name

 *Puppet.settings.preferred_run_mode = mode_name*

   end


   return @run_mode if @run_mode and not mode_name


   require 'puppet/util/run_mode'

   @run_mode = Puppet::Util::RunMode[ mode_name || 
 Puppet.settings.preferred_run_mode ]

 end



Anyone else run into this problem?

 

-- 
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/-/ugWYcqNvHgEJ.
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] Puppetconf Feedback

2012-09-28 Thread Douglas Garstang
Anyone know if there's a feedback mechanism for Puppetconf?

Doug

-- 
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] Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Jeff McCune
On Fri, Sep 28, 2012 at 1:38 PM, Forrie for...@gmail.com wrote:

 Just upgraded my puppet master to 3.0.0.  We have a very simple setup.
 However, when restarting, I see this error:

Do you happen to be at PuppetConf?  If so, I'm up on the second level
and would love to work with you on this issue.

 Starting puppetmaster:
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.0.0/lib/puppet/application.rb:273:in
 `run_mode': undefined method `settings' for Puppet:Module (NoMethodError)
 from
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.0.0/lib/puppet/application/master.rb:5
 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in
 `gem_original_require'
 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in
 `require'
 from /usr/local/lib/ruby/gems/1.8/gems/puppet-2.7.19/bin/puppetmasterd:3
 from /usr/local/bin/puppetmasterd:23:in `load'
 from /usr/local/bin/puppetmasterd:23

How are you starting the puppet master?  I'd like to try and reproduce
this issue as soon as possible.  I'm trying to find out if this is
going to be a really common issue or if this is an isolated incident.

In particular, could you provide the exact command line invocation
you're using and any related environment variables?

Also, what platform are you running on, and what ruby version?

It looks like you're somehow getting 2.7.19 _and_ 3.0.0 in your backtraces.

-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] Puppetconf Feedback

2012-09-28 Thread Ryan Coleman
On Fri, Sep 28, 2012 at 1:57 PM, Douglas Garstang
doug.garst...@gmail.com wrote:
 Anyone know if there's a feedback mechanism for Puppetconf?

I'm told there will be a survey sent out (not sure of link or direct
email) at the conclusion of the conference. You're also welcome to
email me off-list (r...@puppetlabs.com) and I'll forward on to the
right people.

-- 
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 instllation error

2012-09-28 Thread skrishna12
Thanks!!
I removed all  mysql pkg and reinstall PE . I got the following messages. I 
can see admin console but not sure about the username and passwd. This time 
when i installed . the installer didnot ask any console username and 
password. Pls  help me this out


 
Puppet Enterprise has been installed to /opt/puppet, and its 
configuration files are located in /etc/puppetlabs.
## Answers from this session saved to 
'./answers.lastrun.puppet-master.etouch.net'
## In addition, auto-generated database users and passwords, including the 
ROOT MySQL password, have been saved to 
/etc/puppetlabs/installer/database_info.install
   !!! WARNING: Do not discard these files! All auto-generated database 
users and passwords, including the ROOT Mysql password, have been saved in 
them.
=

The console can be reached at the following URI:
 *  https://puppet-master.etouch.net:3000

   If you have a firewall running, please ensure the following TCP ports 
are open: 8140, 61613, 3000
   NOTICE: This system has 1.96 GB of memory, which is below the 4 GB we 
recommend for the puppet master role. Although this node will be a fully
   functional puppet master, you may experience poor performance with large 
numbers of nodes. You can improve the puppet master's performance by
   increasing its memory.
Thanks


On Friday, September 28, 2012 11:26:26 AM UTC-7, skrishna12 wrote:

 Hi 

 I downloaded puppet master   puppet-enterprise-2.6.0-el-5-x86_64 on centos 
 5.2 server. When I tried to install , I got the following error messages.

 !* ERROR: Could not connect to the mysql server using the root 
 credentials provided. Please verify your credentials and try again.*

 Can you any   one suggest what could be the solution to resove the issue? 
 I am struck here.

 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/-/yr0Zria7HlwJ.
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 instllation error

2012-09-28 Thread skrishna12
The  auto generated user name password is here

# cat  etc/puppetlabs/installer/database_info.install

q_puppet_enterpriseconsole_auth_database_name=console_auth
q_puppet_enterpriseconsole_auth_database_password=c8ZwU6TVlgcdvTA5ysv6
q_puppet_enterpriseconsole_auth_database_user=console_auth
q_puppet_enterpriseconsole_database_install=n
q_puppet_enterpriseconsole_database_name=console
q_puppet_enterpriseconsole_database_password=2kjrLEVGna95KXQPHac3
q_puppet_enterpriseconsole_database_remote=n
q_puppet_enterpriseconsole_database_root_password=eTouch6789
q_puppet_enterpriseconsole_database_user=console

thanks

On Friday, September 28, 2012 2:13:32 PM UTC-7, skrishna12 wrote:

 Thanks!!
 I removed all  mysql pkg and reinstall PE . I got the following messages. 
 I can see admin console but not sure about the username and passwd. This 
 time when i installed . the installer didnot ask any console username and 
 password. Pls  help me this out


  
 Puppet Enterprise has been installed to /opt/puppet, and its 
 configuration files are located in /etc/puppetlabs.
 ## Answers from this session saved to './
 answers.lastrun.puppet-master.etouch.net'
 ## In addition, auto-generated database users and passwords, including the 
 ROOT MySQL password, have been saved to 
 /etc/puppetlabs/installer/database_info.install
!!! WARNING: Do not discard these files! All auto-generated database 
 users and passwords, including the ROOT Mysql password, have been saved in 
 them.

 =

 The console can be reached at the following URI:
  *  https://puppet-master.etouch.net:3000

If you have a firewall running, please ensure the following TCP ports 
 are open: 8140, 61613, 3000
NOTICE: This system has 1.96 GB of memory, which is below the 4 GB we 
 recommend for the puppet master role. Although this node will be a fully
functional puppet master, you may experience poor performance with 
 large numbers of nodes. You can improve the puppet master's performance by
increasing its memory.
 Thanks


 On Friday, September 28, 2012 11:26:26 AM UTC-7, skrishna12 wrote:

 Hi 

 I downloaded puppet master   puppet-enterprise-2.6.0-el-5-x86_64 on 
 centos 5.2 server. When I tried to install , I got the following error 
 messages.

 !* ERROR: Could not connect to the mysql server using the root 
 credentials provided. Please verify your credentials and try again.*

 Can you any   one suggest what could be the solution to resove the issue? 
 I am struck here.

 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/-/EAJdw4q6xg8J.
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] Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Forrie
I'm not at PuppetConf, unfortunately.  In this case, all I did was a simple 
CentOS service puppetmaster restart as I have in the past.

But, I wonder if the fact there are older versions still present might 
contribute to this -- though it shouldn't be reading code from those 
locations.

I down-rev'd back to 2.7 and it's working fine.  This just seemed like an 
installation bug to me.




On Friday, September 28, 2012 5:03:18 PM UTC-4, Jeff McCune wrote:

 On Fri, Sep 28, 2012 at 1:38 PM, Forrie for...@gmail.com javascript: 
 wrote: 
  
  Just upgraded my puppet master to 3.0.0.  We have a very simple setup. 
  However, when restarting, I see this error: 

 Do you happen to be at PuppetConf?  If so, I'm up on the second level 
 and would love to work with you on this issue. 

  Starting puppetmaster: 
  
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.0.0/lib/puppet/application.rb:273:in
  

  `run_mode': undefined method `settings' for Puppet:Module 
 (NoMethodError) 
  from 
  
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.0.0/lib/puppet/application/master.rb:5
  

  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in 
  `gem_original_require' 
  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in 
  `require' 
  from /usr/local/lib/ruby/gems/1.8/gems/puppet-2.7.19/bin/puppetmasterd:3 
  from /usr/local/bin/puppetmasterd:23:in `load' 
  from /usr/local/bin/puppetmasterd:23 

 How are you starting the puppet master?  I'd like to try and reproduce 
 this issue as soon as possible.  I'm trying to find out if this is 
 going to be a really common issue or if this is an isolated incident. 

 In particular, could you provide the exact command line invocation 
 you're using and any related environment variables? 

 Also, what platform are you running on, and what ruby version? 

 It looks like you're somehow getting 2.7.19 _and_ 3.0.0 in your 
 backtraces. 

 -Jeff 


-- 
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/-/0vd8L0gnL98J.
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: puppet instllation error

2012-09-28 Thread Matthaus Owens
Glad that helped you get through the installation. The installer
should have asked you those questions during the interview, and they
are saved in the answers file as well.

The console admin user and password will be in the
puppet-enterprise-2.6.0-el5-x86_64 directory (wherever you have the
installer located) in a file named answers.lastrun.fqdn of machine
(which for you will be 'answers.lastrun.puppet-master.etouch.net')

The answers you need to look for in that file are:

q_puppet_enterpriseconsole_auth_password=
q_puppet_enterpriseconsole_auth_user_email=

HTH

On Fri, Sep 28, 2012 at 2:16 PM, skrishna12 shivays...@gmail.com wrote:
 The  auto generated user name password is here

 # cat  etc/puppetlabs/installer/database_info.install

 q_puppet_enterpriseconsole_auth_database_name=console_auth
 q_puppet_enterpriseconsole_auth_database_password=c8ZwU6TVlgcdvTA5ysv6
 q_puppet_enterpriseconsole_auth_database_user=console_auth
 q_puppet_enterpriseconsole_database_install=n
 q_puppet_enterpriseconsole_database_name=console
 q_puppet_enterpriseconsole_database_password=2kjrLEVGna95KXQPHac3
 q_puppet_enterpriseconsole_database_remote=n
 q_puppet_enterpriseconsole_database_root_password=eTouch6789
 q_puppet_enterpriseconsole_database_user=console

 thanks

 On Friday, September 28, 2012 2:13:32 PM UTC-7, skrishna12 wrote:

 Thanks!!
 I removed all  mysql pkg and reinstall PE . I got the following messages.
 I can see admin console but not sure about the username and passwd. This
 time when i installed . the installer didnot ask any console username and
 password. Pls  help me this out



 Puppet Enterprise has been installed to /opt/puppet, and its
 configuration files are located in /etc/puppetlabs.
 ## Answers from this session saved to
 './answers.lastrun.puppet-master.etouch.net'
 ## In addition, auto-generated database users and passwords, including the
 ROOT MySQL password, have been saved to
 /etc/puppetlabs/installer/database_info.install
!!! WARNING: Do not discard these files! All auto-generated database
 users and passwords, including the ROOT Mysql password, have been saved in
 them.

 =

 The console can be reached at the following URI:
  *  https://puppet-master.etouch.net:3000

If you have a firewall running, please ensure the following TCP ports
 are open: 8140, 61613, 3000
NOTICE: This system has 1.96 GB of memory, which is below the 4 GB we
 recommend for the puppet master role. Although this node will be a fully
functional puppet master, you may experience poor performance with
 large numbers of nodes. You can improve the puppet master's performance by
increasing its memory.
 Thanks


 On Friday, September 28, 2012 11:26:26 AM UTC-7, skrishna12 wrote:

 Hi

 I downloaded puppet master   puppet-enterprise-2.6.0-el-5-x86_64 on
 centos 5.2 server. When I tried to install , I got the following error
 messages.

 ! ERROR: Could not connect to the mysql server using the root credentials
 provided. Please verify your credentials and try again.

 Can you any   one suggest what could be the solution to resove the issue?
 I am struck here.

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

 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.



-- 
Matthaus Owens
Release Manager, 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] Re: Could use another set of eyes to assist

2012-09-28 Thread jcbollinger


On Friday, September 28, 2012 10:53:45 AM UTC-5, Jeremy wrote:


 The use of the YAML.load(open(args[0])) call was in fact to support both 
 local and network files. In this case I'm actually giving an authenticated 
 S3 bucket URL to retrieve the file as the engineers releasing the code also 
 upload the deployment YAML file to the S3 bucket. The tarballs that are 
 deployed are also in the S3 bucket and also pass authenticated URLs in the 
 catalog with an expiration equal to the catalog expiration time. I'd like 
 to eventually modify it to include retrieving the deployment file and 
 storing it locally only when it's been modified but want to keep it in S3 
 as it allows my Puppet master to operate as a blackbox that engineers have 
 no access to. If I control the deployment file locally they claim I'm the 
 bottleneck slowing them down so as long as I give them the means to update 
 it and the process flow is error free and only problems encountered are 
 when they screw up the deployment file contents accountability is 
 maintainable.



Given your target environment I can imagine why S3 may be attractive, but 
if you yave not already done so then you should investigate whether it 
provides the performance guarantees (and real-life performance) necessary 
for the use to which you're putting it.

Have you considered pulling over the deployment file to the master on a 
periodic basis (such as via cron) so that it can always be local for your 
module?
 


 My thought on the smoking gun is in having to make the parser function 
 calls to try and determine the unique components and unique versions in the 
 case of a component with multiple versions needing to be deployed. This was 
 the quickest way I could find to get the deployment file format converted 
 and ensure that I only defined a resource once avoiding the duplicate 
 resource definition errors. As a result I'm calling the 2 functions which 
 have to iterate through the entire YAML content merging then sorting for 
 unique values separately. 
  


How big are the real deployment files?  I wouldn't think that parsing and 
processing even moderately large YAML files would be prohibitively 
expensive in itself, especially when compared to the work the master must 
perform to compile all the DSL code.  In any case, you should be able to 
test that against real data by wrapping a test harness around the innards 
of your function.

Cheers,

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/-/AHoMhpuyhGkJ.
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] Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Patrick Carlisle
On Fri, Sep 28, 2012 at 2:29 PM, Forrie for...@gmail.com wrote:

 I'm not at PuppetConf, unfortunately.  In this case, all I did was a
 simple CentOS service puppetmaster restart as I have in the past.

 But, I wonder if the fact there are older versions still present might
 contribute to this -- though it shouldn't be reading code from those
 locations.


Definitely. Your stack trace shows puppetmasterd running out of 2.7 but the
main puppet code loaded out of 3.0. This is probably because 3.0 no longer
ships a puppetmasterd command (it was deprecated in 2.7 in favor of 'puppet
master').

Rubygems allows you to have multiple versions installed at the same time,
so probably all you need to do is make sure only 3.0 is installed and then
make sure your init script calls puppet master instead of puppetmasterd.

-Patrick

-- 
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] Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Jeff McCune
On Fri, Sep 28, 2012 at 2:29 PM, Forrie for...@gmail.com wrote:
 I'm not at PuppetConf, unfortunately.  In this case, all I did was a simple
 CentOS service puppetmaster restart as I have in the past.

 But, I wonder if the fact there are older versions still present might
 contribute to this -- though it shouldn't be reading code from those
 locations.

 I down-rev'd back to 2.7 and it's working fine.  This just seemed like an
 installation bug to me.

Yes, I was able to reproduce a very similar issue.  Here's the
situation I think you found yourself in:

Rubygems supports multiple installations of the same gem at different
versions.  If you have puppet 2.7.19 installed as a gem, and then run
gem install puppet, then you'll have _both_ 2.7.19 and 3.0.0.

In 3.0.0 we've removed the puppetmasterd executable.  The
puppetmasterd executable shim generated by rubygems still exists in
your PATH though, which is a problem.

The exception was caused because the shim doesn't specify the version
of the puppet codebase it should load, it just specifies version = =
0 which causes the 2.7.19 puppetmasterd executable to cross-load the
3.0.0 puppet ruby library.

This doesn't work.

The work-around I suggest is to switch to using the command puppet
master instead of puppetmasterd  This should work with by 2.7.19
and 3.0.0 and will load the correct library:

$ gem list puppet

*** LOCAL GEMS ***

puppet (3.0.0, 2.7.19)

$ which puppet
/Users/jeff/.rbenv/versions/1.8.7-p358/gemsets/development/bin/puppet

$ puppet --version
3.0.0

Hope this helps,
-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] Puppetconf Feedback

2012-09-28 Thread Jose Palafox
Survey forthcoming. Feel free to message me directly with any immediate 
feedback.

Cheers,

Jose

-- 
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/-/yBVvzHWj6XEJ.
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: Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Forrie
This is probably also the result and problem with the /etc/init.d script I 
have -- I think I grabbed them from the source code at some point.   I'll 
have to see if it is a simple search-and-replace issue for that.

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/-/GVs7epdDfhsJ.
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: Announce: Puppet 3.0.0 Live

2012-09-28 Thread Martijn
Very nice! Congratulations.
I see a lot of things that will make my life easier. I can't wait to try it.

Regards, Martijn Heemels

Op vrijdag 28 september 2012 23:49:21 UTC+2 schreef Michael Stanhke het 
volgende:

 Puppet 3.0.0 is a feature release for the 3.x series of Puppet. 



-- 
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/-/gqn3E9i76ykJ.
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: puppet instllation error

2012-09-28 Thread skrishna12
I tried the credential (mail id and password) stored in answer.lastun.xxx 
 and got the following error. Even after clearing the cookies and caches .. 
no luck with  the mail id and password 


This webpage has a redirect loop
The webpage at *
https://puppet-master.etouch.net:3000/?ticket=ST-1348829403r7DD1A83EF03491318C
* has resulted in too many redirects. Clearing your cookies for this site 
or allowing third-party cookies may fix the problem. If not, it is possibly 
a server configuration issue and not a problem with your computer.
Here are some suggestions:
   
   - 
Reloadhttps://puppet-master.etouch.net:3000/?ticket=ST-1348829403r7DD1A83EF03491318C
 this 
   webpage later.
   - Learn 
morehttps://www.google.com/support/chrome/bin/answer.py?answer=95626hl=en-US 
about 
   this problem.

Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

On Friday, September 28, 2012 2:37:39 PM UTC-7, Matthaus Litteken wrote:

 Glad that helped you get through the installation. The installer 
 should have asked you those questions during the interview, and they 
 are saved in the answers file as well. 

 The console admin user and password will be in the 
 puppet-enterprise-2.6.0-el5-x86_64 directory (wherever you have the 
 installer located) in a file named answers.lastrun.fqdn of machine 
 (which for you will be 'answers.lastrun.puppet-master.etouch.net') 

 The answers you need to look for in that file are: 

 q_puppet_enterpriseconsole_auth_password= 
 q_puppet_enterpriseconsole_auth_user_email= 

 HTH 

 On Fri, Sep 28, 2012 at 2:16 PM, skrishna12 shiva...@gmail.comjavascript: 
 wrote: 
  The  auto generated user name password is here 
  
  # cat  etc/puppetlabs/installer/database_info.install 
  
  q_puppet_enterpriseconsole_auth_database_name=console_auth 
  q_puppet_enterpriseconsole_auth_database_password=c8ZwU6TVlgcdvTA5ysv6 
  q_puppet_enterpriseconsole_auth_database_user=console_auth 
  q_puppet_enterpriseconsole_database_install=n 
  q_puppet_enterpriseconsole_database_name=console 
  q_puppet_enterpriseconsole_database_password=2kjrLEVGna95KXQPHac3 
  q_puppet_enterpriseconsole_database_remote=n 
  q_puppet_enterpriseconsole_database_root_password=eTouch6789 
  q_puppet_enterpriseconsole_database_user=console 
  
  thanks 
  
  On Friday, September 28, 2012 2:13:32 PM UTC-7, skrishna12 wrote: 
  
  Thanks!! 
  I removed all  mysql pkg and reinstall PE . I got the following 
 messages. 
  I can see admin console but not sure about the username and passwd. 
 This 
  time when i installed . the installer didnot ask any console username 
 and 
  password. Pls  help me this out 
  
  
  
  Puppet Enterprise has been installed to /opt/puppet, and its 
  configuration files are located in /etc/puppetlabs. 
  ## Answers from this session saved to 
  './answers.lastrun.puppet-master.etouch.net' 
  ## In addition, auto-generated database users and passwords, including 
 the 
  ROOT MySQL password, have been saved to 
  /etc/puppetlabs/installer/database_info.install 
 !!! WARNING: Do not discard these files! All auto-generated database 
  users and passwords, including the ROOT Mysql password, have been saved 
 in 
  them. 
  
  
 =
  

  
  The console can be reached at the following URI: 
   *  https://puppet-master.etouch.net:3000 
  
 If you have a firewall running, please ensure the following TCP 
 ports 
  are open: 8140, 61613, 3000 
 NOTICE: This system has 1.96 GB of memory, which is below the 4 GB 
 we 
  recommend for the puppet master role. Although this node will be a 
 fully 
 functional puppet master, you may experience poor performance with 
  large numbers of nodes. You can improve the puppet master's performance 
 by 
 increasing its memory. 
  Thanks 
  
  
  On Friday, September 28, 2012 11:26:26 AM UTC-7, skrishna12 wrote: 
  
  Hi 
  
  I downloaded puppet master   puppet-enterprise-2.6.0-el-5-x86_64 on 
  centos 5.2 server. When I tried to install , I got the following error 
  messages. 
  
  ! ERROR: Could not connect to the mysql server using the root 
 credentials 
  provided. Please verify your credentials and try again. 
  
  Can you any   one suggest what could be the solution to resove the 
 issue? 
  I am struck here. 
  
  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/-/EAJdw4q6xg8J. 
  
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  puppet-users...@googlegroups.com javascript:. 
  For more options, visit this group at 
  http://groups.google.com/group/puppet-users?hl=en. 



 -- 
 Matthaus Owens 
 Release Manager, Puppet Labs 


-- 
You 

[Puppet Users] Re: Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Forrie
On a tangental note, Puppet 3.0 doesn't ship with init scripts in 
examples/etc/init.d -- I saw a ticket out there mentioning a need for this. 
  I'm going to guess some others will be caught with the puppet master 
change.At least, the latest checkout of the GIT repo doesn't have 
anything in the directory but sleeper which isn't very useful.

-- 
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/-/AILE88ZfehoJ.
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: Upgrade from 2.7 to 3.0, problem with run_mode in application.rb

2012-09-28 Thread Matthaus Owens
Forrie,

For redhat, look in ext/redhat for the init scripts.
ext/redhat/server.init is what you should replace your puppetmaster
init script with.
(https://github.com/puppetlabs/puppet/blob/3.x/ext/redhat/server.init)

HTH

On Fri, Sep 28, 2012 at 4:34 PM, Forrie for...@gmail.com wrote:
 On a tangental note, Puppet 3.0 doesn't ship with init scripts in
 examples/etc/init.d -- I saw a ticket out there mentioning a need for this.
 I'm going to guess some others will be caught with the puppet master
 change.At least, the latest checkout of the GIT repo doesn't have
 anything in the directory but sleeper which isn't very useful.

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

 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.



-- 
Matthaus Owens
Release Manager, 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] Glassfish custom provider and 'file does not exist'

2012-09-28 Thread Stefan Schulte
On Fri, Sep 28, 2012 at 10:39:11AM +0100, fatmcgav wrote:
 Ok, so I thought I'd take another look, and try and get some debug logging
 out of the provider to make sure it's constructing things correctly...
 
 I've applied the following patch to asadmin.rb, however I'm not seeing
 anything on the client trace...
 
 diff --git a/lib/puppet/provider/asadmin.rb b/lib/puppet/provider/asadmin.rb
  index f95d6ab..c8bd4a7 100644
  --- a/lib/puppet/provider/asadmin.rb
  +++ b/lib/puppet/provider/asadmin.rb
  @@ -8,6 +8,7 @@
   passed_args.each { |arg| args  arg }
   exec_args = args.join  
   command = #{@resource[:asadminpath]} #{exec_args}
  +Puppet.debug(Command = #{command})
   command = su - #{@resource[:user]} -c \#{command}\ if
  @resource[:user] and
 not command.match /create-service/
   self.debug command
 
 
 Any ideas how I can get the provider logging???
 
 Cheers
 Gavin
 

do you have the code somewhere? If you dropped the debug call in the
create method or something it will never be executed if puppet thinks
the provider is not valid at all.

So having the actual provider code may make is more obvious why it is
failing for you.

-Stefan

-- 
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: Could use another set of eyes to assist

2012-09-28 Thread Jeremy T. Bouse
On Fri, Sep 28, 2012 at 5:37 PM, jcbollinger john.bollin...@stjude.orgwrote:



 On Friday, September 28, 2012 10:53:45 AM UTC-5, Jeremy wrote:


 The use of the YAML.load(open(args[0])) call was in fact to support
 both local and network files. In this case I'm actually giving an
 authenticated S3 bucket URL to retrieve the file as the engineers releasing
 the code also upload the deployment YAML file to the S3 bucket. The
 tarballs that are deployed are also in the S3 bucket and also pass
 authenticated URLs in the catalog with an expiration equal to the catalog
 expiration time. I'd like to eventually modify it to include retrieving the
 deployment file and storing it locally only when it's been modified but
 want to keep it in S3 as it allows my Puppet master to operate as a
 blackbox that engineers have no access to. If I control the deployment file
 locally they claim I'm the bottleneck slowing them down so as long as I
 give them the means to update it and the process flow is error free and
 only problems encountered are when they screw up the deployment file
 contents accountability is maintainable.



 Given your target environment I can imagine why S3 may be attractive, but
 if you yave not already done so then you should investigate whether it
 provides the performance guarantees (and real-life performance) necessary
 for the use to which you're putting it.

 Have you considered pulling over the deployment file to the master on a
 periodic basis (such as via cron) so that it can always be local for your
 module?


As the puppet master is also a client I've thought about setting it up as a
file to retrieve and store locally. Though I could probably write a script
to check for updates and have it ran from cron more frequently to ensure
that the web app server isn't dependent on the master having run it's
update. Don't want to give engineers even more reason to say the process
takes too long.




 My thought on the smoking gun is in having to make the parser function
 calls to try and determine the unique components and unique versions in the
 case of a component with multiple versions needing to be deployed. This was
 the quickest way I could find to get the deployment file format converted
 and ensure that I only defined a resource once avoiding the duplicate
 resource definition errors. As a result I'm calling the 2 functions which
 have to iterate through the entire YAML content merging then sorting for
 unique values separately.



 How big are the real deployment files?  I wouldn't think that parsing and
 processing even moderately large YAML files would be prohibitively
 expensive in itself, especially when compared to the work the master must
 perform to compile all the DSL code.  In any case, you should be able to
 test that against real data by wrapping a test harness around the innards
 of your function.


Looking at the report metrics I can see that successful runs show config
retrieval taking up to 130 seconds but most common is around 110 seconds so
not much difference. When it fails it usually fails with a Could not
retrieve catalog from remote server: execution expired and a Could not
retrieve catalog; skipping run error messages and then proceeds with the
cached catalog. Currently the catalog has 370-390 resources defined with a
change usually involving 170-180 resources.

Cheers,

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

 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.