Permalink
Browse files

Merge pull request #1 from phlipper/master

fixed crash, added readme
  • Loading branch information...
fnichol committed Aug 16, 2011
2 parents e808161 + 664243e commit f8debc256950e24282ca61b8af8a90342e117581
Showing with 81 additions and 7 deletions.
  1. +62 −1 README.md
  2. +1 −1 attributes/default.rb
  3. +1 −1 metadata.rb
  4. +2 −0 recipes/default.rb
  5. +15 −4 recipes/nginx.rb
View
@@ -1,8 +1,69 @@
# DESCRIPTION:
+Installs passenger gem via RVM and configures Apache or Nginx.
+
+
# REQUIREMENTS:
+The following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error:
+
+* Ubuntu
+
+
+# RECIPES
+
+## default
+
+Installs dependencies and contains helpers for other recipes.
+
+## apache2
+
+Installs passenger as an apache2 module. Requires the `apache2` recipe.
+
+## nginx
+
+Installs passenger as an nginx module. Requires the `nginx::source` recipe.
+
+
# ATTRIBUTES:
-# USAGE:
+## version
+
+The version of passenger to deploy. This will be in a format used by the gem command.
+
+Default is `3.0.7`.
+
+## rvm_ruby
+
+The RVM ruby (and optional gemset) under which to install the passenger gem. This will be in a format used by the rvm command.
+
+Default is `ree-1.8.7-2011.03@passenger`.
+
+## root_path
+
+Optionally override the full path to the root of the installed passenger gem.
+
+## module_path
+
+Optionallly override the full path to the Apache2 module.
+
+
+# LICENSE and AUTHOR
+
+Author:: Fletcher Nichol (<fnichol@nichol.ca>)
+
+Contributors:: Phil Cohen (http://phlippers.net/)
+
+Copyright:: 2010, 2011, Fletcher Nichol
+
+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.
View
@@ -26,5 +26,5 @@
# limitations under the License.
#
-default[:rvm_passenger][:version] = "3.0.5"
+default[:rvm_passenger][:version] = "3.0.7"
default[:rvm_passenger][:rvm_ruby] = "ree-1.8.7-2011.03@passenger"
View
@@ -20,7 +20,7 @@
attribute "rvm_passenger/version",
:display_name => "Version of passenger",
:description => "The version of passenger to deploy. This will be in a format used by the gem command.",
- :default => "3.0.3"
+ :default => "3.0.7"
attribute "rvm_passenger/rvm_ruby",
:display_name => "RVM ruby to use",
View
@@ -32,6 +32,8 @@
package "libcurl4-openssl-dev"
end
+rvm_environment node[:rvm_passenger][:rvm_ruby]
+
# install passenger gem
rvm_gem "passenger" do
ruby_string node[:rvm_passenger][:rvm_ruby]
View
@@ -28,10 +28,21 @@
include_recipe "rvm_passenger"
configure_flags = node[:nginx][:configure_flags].join(" ")
-nginx_install = node[:nginx][:install_path]
-nginx_version = node[:nginx][:version]
-nginx_dir = node[:nginx][:dir]
-archive_cache = node[:nginx][:archive_cache]
+nginx_install = node[:nginx][:install_path]
+nginx_version = node[:nginx][:version]
+nginx_dir = node[:nginx][:dir]
+archive_cache = node[:nginx][:archive_cache] || Chef::Config[:file_cache_path]
+
+remote_file "#{archive_cache}/nginx-#{nginx_version}.tar.gz" do
+ source "http://sysoev.ru/nginx/nginx-#{nginx_version}.tar.gz"
+ action :create_if_missing
+end
+
+bash "extract_nginx_source" do
+ cwd archive_cache
+ code "tar zxf nginx-#{nginx_version}.tar.gz"
+ not_if "test -d #{archive_cache}/nginx-#{nginx_version}"
+end
rvm_shell "build passenger_nginx_module" do
ruby_string node[:rvm_passenger][:rvm_ruby]

0 comments on commit f8debc2

Please sign in to comment.