Ask Your Question
1

configuring passenger from hiera with puppetlabs-apache module

asked 2015-12-22 04:43:32 -0500

SimonH gravatar image

updated 2015-12-22 04:44:39 -0500

I'm looking to setup a Passenger app using the puppetlabs-module, configuring via hiera. If I use the following vhost definition it works fine:

web::vhosts:   
  node.com:
    docroot:                  /var/www/app
    serveraliases:            "%{fqdn}"
    passenger_app_env:        production
    passenger_pre_start:      "http://%{fqdn}/contact"
    passenger_min_instances:  3
    directories:
    - path:                   /var/www/app
      passenger_enabled:      "on"

but if I try to define the poolidletime for passenger with the following config

web::vhosts:   
  node.com:
    docroot:                  /var/www/app
    serveraliases:            "%{fqdn}"
    passenger_app_env:        production
    passenger_pre_start:      "http://%{fqdn}/contact"
    passenger_min_instances:  3
    passenger_pool_idle_time: 0
    directories:
    - path:                   /var/www/app
      passenger_enabled:      "on"

I get an error

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter passengerpoolidle_time on node abc.co.uk

but from looking at the templates/mod/passenger.conf.erb it looks as if that is an option that can be configured.

edit retag flag offensive close merge delete

Comments

in case anyone's interested, I'm working around this for the time being with a custom_fragment definition.

SimonH gravatar imageSimonH ( 2015-12-22 10:08:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-23 03:33:11 -0500

SimonH gravatar image

updated 2016-06-05 14:36:02 -0500

ramindk gravatar image

For anyone who might come across the same problem, it looks as if the passenger_pool_idle_time is in the server context and can not be associated with specific vhosts. This means the Hiera definition becomes:

apache::mod::passenger::pool_idle_time: 0

web::vhosts:   
  node.com:
    docroot:                  /var/www/app
    serveraliases:            "%{fqdn}"
    passenger_app_env:        production
    passenger_pre_start:      "http://%{fqdn}/contact"
    passenger_min_instances:  3
    directories:
     - path:                   /var/www/app
    passenger_enabled:      "on"
edit flag offensive delete link more

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: 2015-12-22 04:43:32 -0500

Seen: 164 times

Last updated: Jun 05 '16