Re: [Puppet Users] how to export path in bashrc via puppet script

2015-07-18 Thread Omen Wild
Quoting Felix Frank felix.fr...@alumni.tu-berlin.de on Fri, Jul 17 22:13:

 https://github.com/puppetlabs/puppetlabs-stdlib#file_line
 
 As soon as you install the stdlib module, the type becomes available to
 your manifests.

I have had great luck with the file_line, expecially when used with the
'match =' parameter which keeps there from being multiple lines if you
update the contents of 'line =' at some point.

 file_line { 'sbin_for_root':
   path  = '/root/.profile',
   line  = 'export PATH=$PATH:/usr/local/sbin,
   match = '^export PATH=',
 }

-- 
Omen Wild
Systems Administrator
Metro Cluster

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20150718173915.GA16660%40descolada.ucdavis.edu.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: S/MIME cryptographic signature


Re: [Puppet Users] Net::ReadTimeout errors

2015-07-18 Thread Tim Dunphy

 OK, so you manage that via puppetlabs-apache. Guess you will have to
 ultimately fix this in your manifest/data then.
 The default template for the passenger vhost includes settings
 PassengerHighPerformance on
 and
 PassengerPoolSize X
 Make sure that both are present in your Apache config, and that the latter
 is set to a sufficiently high value. Allow Apache to fork off enough Ruby
 workers to handle your load. I suppose your hardware can run a few dozen
 processes.


Awesome Felix! Thanks for the info. I'll give it a go and follow up once I
have some results.

Thanks!
Tim

On Fri, Jul 17, 2015 at 9:58 PM, Felix Frank 
felix.fr...@alumni.tu-berlin.de wrote:

  On 07/18/2015 03:20 AM, Tim Dunphy wrote:

 Hey Felix,

  thanks, but those aren't the important ones I'm afraid. There should be
 a vhost to bind port 8140. If there is not, please check carefully which
 process is actually listening on that port. (If it's Ruby, I have bad
 news and good news :-)


  Whoops! OK I get you now. Here's the vhost that binds to 8140:


 Yep, that's the one.

 OK, so you manage that via puppetlabs-apache. Guess you will have to
 ultimately fix this in your manifest/data then.

 The default template for the passenger vhost includes settings

 PassengerHighPerformance on
 and
 PassengerPoolSize X

 Make sure that both are present in your Apache config, and that the latter
 is set to a sufficiently high value. Allow Apache to fork off enough Ruby
 workers to handle your load. I suppose your hardware can run a few dozen
 processes.

 HTH,
 Felix

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/55A9B2DC.7070102%40Alumni.TU-Berlin.de
 https://groups.google.com/d/msgid/puppet-users/55A9B2DC.7070102%40Alumni.TU-Berlin.de?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAOZy0e%3Duo1B2P2bHaFO0O%2Bzkx7A-oRf8BoU92ggPtDfdkobvdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Dictating class evaluation order

2015-07-18 Thread Andrew Langhorn
 

Hi,


I have a Puppet manifest which makes use of the tomcat::instance defined 
type from the camptocamp/tomcat module on the Puppet Forge as follows:


class apps::reservations {


include tomcat


tomcat::instance { ‘reservations’:

ensure = present,

http_port = 8080,

}


}

  
However, when I run Puppet against a Vagrant VM, it tells me that the 
tomcat class hasn’t been evaluated, so it can’t use tomcat::instance 
(because of underlying failures when using the Tomcat module):


== app: Warning: Scope(Tomcat::Instance[reservations]): Could not look up 
qualified variable 'tomcat::instance_basedir'; class tomcat has not been 
evaluated


This makes some sense to me, since I’m not defining an order in which 
Puppet should run these resources. If the Tomcat module is not evaluated in 
to the catalogue before I use the tomcat::instance resource, then failures 
will occur.


How can I get Puppet to instantiate the Tomcat module first before then 
looking to work with tomcat::instance? Adding the require metaparameter to 
the tomcat::instance resource doesn't appear to do what I want it to do 
(i.e. evaluate the include before using the resource).


I’ve seen a related problem before, and fixed that after a while, but this 
one’s got me a bit stumped. It doesn't help either that I can't remember 
how I fixed the last issue, even after looking through Git commits. Sad 
times.


Thanks!


Andrew

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bc3ce85e-cb13-4433-a328-bed561793d21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Running the Puppet 4 master from the AIO package (especially passenger/rack)

2015-07-18 Thread Felix Frank
Hi Michael,

I can't find more details to help me track that down, but I'm getting
convinced that the problem is that my Passenger is installed onto OS
Ruby instead of Puppet's Ruby. I could not use your apache config
verbatim, see reason below. Apache starts after some modifications (e.g.
loading the passenger module from the debian package instead of from the
gem) but yields errors that look similar to those I get from nginx.

From your own instructions:

On 07/18/2015 04:53 AM, Michael Stahnke wrote:
 export PATH=/opt/puppetlabs/puppet/bin:$PATH
 # install passenger
 gem install --no-rdoc --no-ri passenger

This consistently fails for me (puppet-agent 1.2.1):

# /opt/puppetlabs/puppet/bin/gem install passenger
Building native extensions.  This could take a while...
ERROR:  Error installing passenger:
ERROR: Failed to build gem native extension.

/opt/puppetlabs/puppet/bin/ruby extconf.rb
Attempting to download
https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.14/rubyext-ruby-2.1.6-x86_64-linux.tar.gz
into
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/passenger-5.0.14/download_cache
*** Could not download
https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.14/rubyext-ruby-2.1.6-x86_64-linux.tar.gz:
2015-07-19 01:42:30 ERROR 404: Not Found.
...


This kind of makes sense, for if you look into the directory listing on
that phusion server, there are only files for Ruby 2.1.3, no other 2.1.x
releases. I can only assume that when you built that test setup, that
the bundled Ruby was just that version.

As yet another aside, I cannot seem to find a changelog for the AIO
package. The Debian package has the default changelog.Debian.gz, but
this contains no information. I was wondering if the Ruby version has at
all changed since the 1.0 release.

Thanks for the feedback so far. I believe that as long as we retain Rack
support, we should make sure that it works out of the box, no?

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/55AAE8ED.3050605%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Dictating class evaluation order

2015-07-18 Thread Felix Frank
On 07/19/2015 01:19 AM, Andrew Langhorn wrote:

 class apps::reservations {


 include tomcat


 tomcat::instance { ‘reservations’:

 ensure = present,

 http_port = 8080,

 }


 }


 However, when I run Puppet against a Vagrant VM, it tells me that the
 tomcat class hasn’t been evaluated, so it can’t use tomcat::instance
 (because of underlying failures when using the Tomcat module):


 == app: Warning: Scope(Tomcat::Instance[reservations]): Could not
 look up qualified variable 'tomcat::instance_basedir'; class
 tomcat has not been evaluated


Hmm, if the resource declaration is lexically preceded by an 'include
tomcat' then this should not happen.

In this case, the order in your manifest is really important. Is your
snippet truly representative of your actual code?

Regards,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/55AAE9F5.5060503%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.