Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Commit

Permalink
passenger v0.99.0
Browse files Browse the repository at this point in the history
* Upgrade to passenger 3.0.7
* Attributes are all "default"
* Install curl development headers
* Move PassengerMaxPoolSize to config of module instead of vhost.
  • Loading branch information
jtimberman committed May 22, 2011
1 parent b553f78 commit 4e60b8b
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 75 deletions.
76 changes: 76 additions & 0 deletions passenger_apache2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Description
====

Installs passenger for Apache 2.

Changes
====

## v0.99.0:

* Upgrade to passenger 3.0.7
* Attributes are all "default"
* Install curl development headers
* Move PassengerMaxPoolSize to config of module instead of vhost.

Requirements
====

## Platform

Tested on Ubuntu 10.04. Should work on any Ubuntu/Debian platforms.

## Cookbooks

Opscode cookbooks:

* apache2
* build-essential

Attributes
====

* `passenger[:version]` - Specify the version of passenger to install.
* `passenger[:max_pool_size]` - Sets PassengerMaxPoolSize in the Apache module config.
* `passenger[:root_path]` - The location of the passenger gem.
* `passenger[:module_path]` - The location of the compiled passenger apache module.

Usage
====

For example, to run a Rails application on passenger:

include_recipe "rails"
include_recipe "passenger"

web_app "myproj" do
docroot "/srv/myproj/public"
server_name "myproj.#{node[:domain]}"
server_aliases [ "myproj", node[:hostname] ]
rails_env "production"
end

A sample config template is provided, `web_app.conf.erb`. If this is suitable for your application, add 'cookbook "passenger"' to the define above to use that template. Otherwise, copy the template to the cookbook where you're using `web_app`, and modify as needed. The cookbook parameter is optional, if omitted it will search the cookbook where the define is used.

License and Author
====

Author:: Joshua Timberman (<joshua@opscode.com>)
Author:: Joshua Sierles (<joshua@37signals.com>)
Author:: Michael Hale (<mikehale@gmail.com>)

Copyright:: 2009-2011, Opscode, Inc
Copyright:: 2009, 37signals
Coprighty:: 2009, Michael Hale

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
65 changes: 0 additions & 65 deletions passenger_apache2/README.rdoc

This file was deleted.

7 changes: 4 additions & 3 deletions passenger_apache2/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
default[:passenger][:version] = "2.2.15"
set[:passenger][:root_path] = "#{languages[:ruby][:gems_dir]}/gems/passenger-#{passenger[:version]}"
set[:passenger][:module_path] = "#{passenger[:root_path]}/ext/apache2/mod_passenger.so"
default[:passenger][:version] = "3.0.7"
default[:passenger][:max_pool_size] = "6"
default[:passenger][:root_path] = "#{languages[:ruby][:gems_dir]}/gems/passenger-#{passenger[:version]}"
default[:passenger][:module_path] = "#{passenger[:root_path]}/ext/apache2/mod_passenger.so"
2 changes: 1 addition & 1 deletion passenger_apache2/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs passenger for Apache2"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.99.0"

recipe "passenger_apache2", "Installs Passenger as an Apache module"
Expand Down
4 changes: 3 additions & 1 deletion passenger_apache2/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
# limitations under the License.

include_recipe "apache2"
include_recipe "build-essential"

if platform?("centos","redhat")
package "httpd-devel"
package "curl-devel"
else
%w{ apache2-prefork-dev libapr1-dev }.each do |pkg|
%w{ apache2-prefork-dev libapr1-dev libcurl4-gnutls-dev }.each do |pkg|
package pkg do
action :upgrade
end
Expand Down
1 change: 1 addition & 0 deletions passenger_apache2/templates/default/passenger.conf.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
PassengerRoot <%= node[:passenger][:root_path] %>
PassengerRuby <%= node[:languages][:ruby][:ruby_bin] %>
PassengerMaxPoolSize <%= node[:passenger][:max_pool_size] %>
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
RailsBaseURI /
RailsEnv <%= @params[:rails_env] %>

PassengerMaxPoolSize <%= node[:rails][:max_pool_size] %>

<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
AllowOverride None
Expand All @@ -31,4 +29,4 @@
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]

</VirtualHost>
</VirtualHost>
3 changes: 1 addition & 2 deletions passenger_apache2/templates/default/web_app.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
RailsBaseURI /
RailsEnv <%= @params[:rails_env] %>
RailsAllowModRewrite on
PassengerMaxPoolSize <%= node[:rails][:max_pool_size] %>

<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
Expand All @@ -31,4 +30,4 @@
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]

</VirtualHost>
</VirtualHost>

0 comments on commit 4e60b8b

Please sign in to comment.