Permalink
Browse files

Import passenger_apache2 version 0.99.0

  • Loading branch information...
1 parent 2ac692e commit 4f2261bf66c0b7a70450e4cbaf412ba3e08cb6fe @schisamo schisamo committed Jun 1, 2011
@@ -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.
@@ -1,65 +0,0 @@
-= DESCRIPTION:
-
-Installs passenger for Rails / Rack / Merb hosting.
-
-= REQUIREMENTS:
-
-== Platform:
-
-Tested on Ubuntu 8.10. May work on other platforms, esp Ubuntu/Debian. May need work to function on CentOS/Fedora/RHEL.
-
-== Cookbooks:
-
-Opscode cookbooks, http://github.com/opscode/cookbooks/tree/master:
-
-* ruby
-* apache2 (web_app)
-* rails
-
-= ATTRIBUTES:
-
-* passenger[:version] - Specify the version of passenger to install.
-* passenger[:root_path] - The location of the passenger gem.
-* passenger[:module_path] - The location of the compiled passenger apache module.
-* passenger[:apache_load_path] - File to use for loading the passenger apache module.
-* passenger[:apache_conf_path] - Additional passenger module configuration.
-
-The last two are activated with 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, 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.
@@ -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"
@@ -1,97 +1,37 @@
{
- "providing": {
- },
- "attributes": {
- "passenger/module_path": {
- "required": "optional",
- "calculated": false,
- "choice": [
-
- ],
- "default": "passenger_root_path/ext/apache2/mod_passenger.so",
- "type": "string",
- "recipes": [
-
- ],
- "description": "Location of the compiled Apache module",
- "display_name": "Passenger Module Path"
- },
- "passenger/version": {
- "required": "optional",
- "calculated": false,
- "choice": [
-
- ],
- "default": "2.2.14",
- "type": "string",
- "recipes": [
-
- ],
- "description": "Version of Passenger to install",
- "display_name": "Passenger Version"
- },
- "passenger/root_path": {
- "required": "optional",
- "calculated": false,
- "choice": [
-
- ],
- "default": "gem_dir/gems/passenger-passenger_version",
- "type": "string",
- "recipes": [
-
- ],
- "description": "Location of passenger installed gem",
- "display_name": "Passenger Root Path"
- }
- },
- "replacing": {
- },
- "dependencies": {
- "rails": [
-
- ],
- "packages": [
-
- ],
- "apache2": [
-
- ],
- "ruby": [
-
- ]
- },
- "groupings": {
- },
- "recommendations": {
- },
- "platforms": {
- "debian": [
-
- ],
- "centos": [
-
- ],
- "ubuntu": [
-
- ],
- "redhat": [
-
- ]
- },
- "license": "Apache 2.0",
- "version": "0.16.3",
- "maintainer": "Opscode, Inc.",
- "suggestions": {
- },
- "recipes": {
- "passenger_apache2": "Installs Passenger as an Apache module",
- "passenger_apache2::mod_rails": "Enables Apache module configuration for passenger module"
- },
- "maintainer_email": "cookbooks@opscode.com",
- "name": "passenger_apache2",
- "conflicting": {
- },
- "description": "Installs passenger for Apache2",
- "long_description": "= DESCRIPTION:\n\nInstalls passenger for Rails / Rack / Merb hosting.\n\n= REQUIREMENTS:\n\n== Platform:\n\nTested on Ubuntu 8.10. May work on other platforms, esp Ubuntu/Debian. May need work to function on CentOS/Fedora/RHEL.\n\n== Cookbooks:\n\nOpscode cookbooks, http://github.com/opscode/cookbooks/tree/master:\n\n* ruby\n* apache2 (web_app)\n* rails\n\n= ATTRIBUTES: \n\n* passenger[:version] - Specify the version of passenger to install.\n* passenger[:root_path] - The location of the passenger gem.\n* passenger[:module_path] - The location of the compiled passenger apache module.\n* passenger[:apache_load_path] - File to use for loading the passenger apache module.\n* passenger[:apache_conf_path] - Additional passenger module configuration.\n\nThe last two are activated with apache_module.\n\n= USAGE:\n\nFor example, to run a Rails application on passenger:\n\n include_recipe \"rails\"\n include_recipe \"passenger\"\n \n web_app \"myproj\" do\n docroot \"/srv/myproj/public\"\n server_name \"myproj.#{node[:domain]}\"\n server_aliases [ \"myproj\", node[:hostname] ]\n rails_env \"production\"\n end\n\nA 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.\n\n= LICENSE and AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: Joshua Sierles (<joshua@37signals.com>)\nAuthor:: Michael Hale (<mikehale@gmail.com>)\n\nCopyright:: 2009, Opscode, Inc\nCopyright:: 2009, 37signals\nCoprighty:: 2009, Michael Hale\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
- }
+ "name": "passenger_apache2",
+ "description": "Installs passenger for Apache2",
+ "long_description": "Description\n====\n\nInstalls passenger for Apache 2.\n\nChanges\n====\n\n## v0.99.0:\n\n* Upgrade to passenger 3.0.7\n* Attributes are all \"default\"\n* Install curl development headers\n* Move PassengerMaxPoolSize to config of module instead of vhost.\n\nRequirements\n====\n\n## Platform\n\nTested on Ubuntu 10.04. Should work on any Ubuntu/Debian platforms.\n\n## Cookbooks\n\nOpscode cookbooks:\n\n* apache2\n* build-essential\n\nAttributes \n====\n\n* `passenger[:version]` - Specify the version of passenger to install.\n* `passenger[:max_pool_size]` - Sets PassengerMaxPoolSize in the Apache module config.\n* `passenger[:root_path]` - The location of the passenger gem.\n* `passenger[:module_path]` - The location of the compiled passenger apache module.\n\nUsage\n====\n\nFor example, to run a Rails application on passenger:\n\n include_recipe \"rails\"\n include_recipe \"passenger\"\n \n web_app \"myproj\" do\n docroot \"/srv/myproj/public\"\n server_name \"myproj.#{node[:domain]}\"\n server_aliases [ \"myproj\", node[:hostname] ]\n rails_env \"production\"\n end\n\nA 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.\n\nLicense and Author\n====\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: Joshua Sierles (<joshua@37signals.com>)\nAuthor:: Michael Hale (<mikehale@gmail.com>)\n\nCopyright:: 2009-2011, Opscode, Inc\nCopyright:: 2009, 37signals\nCoprighty:: 2009, Michael Hale\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+ "maintainer": "Opscode, Inc.",
+ "maintainer_email": "cookbooks@opscode.com",
+ "license": "Apache 2.0",
+ "platforms": {
+ "redhat": ">= 0.0.0",
+ "centos": ">= 0.0.0",
+ "ubuntu": ">= 0.0.0",
+ "debian": ">= 0.0.0"
+ },
+ "dependencies": {
+ "apache2": ">= 0.0.0",
+ "build-essential": ">= 0.0.0"
+ },
+ "recommendations": {
+ },
+ "suggestions": {
+ },
+ "conflicting": {
+ },
+ "providing": {
+ },
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "groupings": {
+ },
+ "recipes": {
+ "passenger_apache2": "Installs Passenger as an Apache module",
+ "passenger_apache2::mod_rails": "Enables Apache module configuration for passenger module"
+ },
+ "version": "0.99.0"
+}
@@ -2,31 +2,15 @@
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'))
-version "0.16.3"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.99.0"
recipe "passenger_apache2", "Installs Passenger as an Apache module"
recipe "passenger_apache2::mod_rails", "Enables Apache module configuration for passenger module"
-%w{ packages ruby apache2 rails }.each do |cb|
- depends cb
-end
+depends "apache2"
+depends "build-essential"
%w{ redhat centos ubuntu debian }.each do |os|
supports os
end
-
-attribute "passenger/version",
- :display_name => "Passenger Version",
- :description => "Version of Passenger to install",
- :default => "2.2.14"
-
-attribute "passenger/root_path",
- :display_name => "Passenger Root Path",
- :description => "Location of passenger installed gem",
- :default => "gem_dir/gems/passenger-passenger_version"
-
-attribute "passenger/module_path",
- :display_name => "Passenger Module Path",
- :description => "Location of the compiled Apache module",
- :default => "passenger_root_path/ext/apache2/mod_passenger.so"
@@ -22,20 +22,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-include_recipe "packages"
-include_recipe "ruby"
include_recipe "apache2"
+include_recipe "build-essential"
if platform?("centos","redhat")
- if dist_only?
- # just the gem, we'll install the apache module within apache2
- package "rubygem-passenger"
- return
- else
- package "httpd-devel"
- end
+ 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
@@ -24,23 +24,12 @@
include_recipe "passenger_apache2"
-if platform?("centos","redhat") and dist_only?
- package "mod_passenger" do
- notifies :run, resources(:execute => "generate-module-list"), :immediately
- end
-
- file "#{node[:apache][:dir]}/conf.d/mod_passenger.conf" do
- action :delete
- backup false
- end
-else
- template "#{node[:apache][:dir]}/mods-available/passenger.load" do
- cookbook "passenger_apache2"
- source "passenger.load.erb"
- owner "root"
- group "root"
- mode 0755
- end
+template "#{node[:apache][:dir]}/mods-available/passenger.load" do
+ cookbook "passenger_apache2"
+ source "passenger.load.erb"
+ owner "root"
+ group "root"
+ mode 0755
end
template "#{node[:apache][:dir]}/mods-available/passenger.conf" do
@@ -1,2 +1,3 @@
PassengerRoot <%= node[:passenger][:root_path] %>
PassengerRuby <%= node[:languages][:ruby][:ruby_bin] %>
+PassengerMaxPoolSize <%= node[:passenger][:max_pool_size] %>
@@ -6,8 +6,6 @@
RailsBaseURI /
RailsEnv <%= @params[:rails_env] %>
- PassengerMaxPoolSize <%= node[:rails][:max_pool_size] %>
-
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
AllowOverride None
@@ -31,4 +29,4 @@
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
-</VirtualHost>
+</VirtualHost>
Oops, something went wrong.

0 comments on commit 4f2261b

Please sign in to comment.