Ask Your Question
1

How to use puppetforge apache mod passenger?

asked 2013-11-29 12:06:39 -0500

anthonyclark gravatar image

I'm trying to get the puppetlabs::apache module to control my puppet+passenger config, but I'm running into trouble.

If I try to apply the code below I get the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Apache::Mod::Passenger] is already declared; cannot redeclare at /etc/puppet/modules/example/manifests/software/puppet_server.pp:7 on node dev-util01.example.com

I've tried removing the "include apache::mod::passenger" but I get the error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter ...
(more)
edit retag flag offensive close merge delete

Comments

Make sure that apache/manifests/mod/passenger.pp supports all the parameters you're using. Also try it without the global_queues which you shouldn't need as Passenger 3.x ...(more)

ramindk gravatar imageramindk ( 2013-11-29 23:58:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-11-29 23:56:59 -0500

golja gravatar image

updated 2013-12-02 09:10:11 -0500

The problem is that you are trying to include apache::mod::passenger twice. First with include and secondly via classdirective.

Remove include apache::mod::passenger and it should work.

Also make sure to use the puppetlabs-apache module directly from the git repository, because the one released on the forge does not support the $passenger_use_global_queue attribute yet, which you use in your example.

edit flag offensive delete link more

Comments

Unfortunately I tried that and got the second error I mentioned in my post.

anthonyclark gravatar imageanthonyclark ( 2013-11-30 06:13:19 -0500 )edit

I updated the answer, which should fix your problem.

golja gravatar imagegolja ( 2013-12-02 09:10:35 -0500 )edit
0

answered 2013-12-04 12:37:10 -0500

anthonyclark gravatar image

Here's what ended up working for me, after some clean installs and golja's recommendations above.

class example::software::puppet_server {

include apache
class { 'apache::mod::ssl': }
class { 'apache::mod::headers': }

class { 'apache::mod::passenger':
        passenger_high_performance     => 'On',
        passenger_pool_idle_time       => 600,
        passenger_max_requests         => 1000,
        passenger_root                 => $apache::params::passenger_root,
        passenger_ruby                 => $apache::params::passenger_ruby,
        passenger_max_pool_size        => 12,
}


apache::vhost { 'puppet_passenger':
        servername      => 'dev-util01.example.com',
        port            => '8140',
        docroot         => '/usr/share/puppet/rack/puppetmasterd/public',
        ssl             => true,
        ssl_cert        => '/var/lib/puppet/ssl/certs/dev-util01.example.com.pem',
        ssl_key         => '/var/lib/puppet/ssl/private_keys/dev-util01.example.com.pem',
        ssl_chain       => '/var/lib/puppet/ssl/ca/ca_crt.pem',
        ssl_ca          => '/var/lib ...
(more)
edit flag offensive delete link more

Comments

totally runrelated to your question but to save you from unwanted surprises in the future (e.g. you want to migrate your puppet master to a new server) it is ...(more)

Stefan gravatar imageStefan ( 2013-12-08 15:58:32 -0500 )edit

Thanks, I'll keep that in mind. You're right, there's probably no need for host specific info there, although I'm not sure how best to store CNAMEs for vhosts?

anthonyclark gravatar imageanthonyclark ( 2013-12-11 11:17:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-11-29 12:06:39 -0500

Seen: 713 times

Last updated: Dec 04 '13