Use passenger 4 on production servers
authorTom Hughes <tom@compton.nu>
Tue, 10 Mar 2015 15:48:12 +0000 (15:48 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 10 Mar 2015 15:48:12 +0000 (15:48 +0000)
cookbooks/apt/recipes/default.rb
cookbooks/passenger/attributes/default.rb
roles/web.rb

index 050c462..01b6b83 100644 (file)
@@ -91,3 +91,8 @@ apt_source "passenger" do
   url "https://oss-binaries.phusionpassenger.com/apt/passenger"
   key "AC40B2F7"
 end
+
+apt_source "passenger4" do
+  url "https://oss-binaries.phusionpassenger.com/apt/passenger/4"
+  key "AC40B2F7"
+end
index e58c16d..c568438 100644 (file)
@@ -1,5 +1,10 @@
-default[:apt][:sources] = node[:apt][:sources] |  ["brightbox-ruby-ng", "passenger"]
-
+default[:passenger][:version] = 5
 default[:passenger][:ruby_version] = "1.9.1"
 default[:passenger][:max_pool_size] = 6
 default[:passenger][:pool_idle_time] = 300
+
+if node[:passenger][:version] == 4
+  default[:apt][:sources] = node[:apt][:sources] |  ["brightbox-ruby-ng", "passenger4"]
+else
+  default[:apt][:sources] = node[:apt][:sources] |  ["brightbox-ruby-ng", "passenger"]
+end
index 69b6a45..7e67d19 100644 (file)
@@ -14,6 +14,7 @@ default_attributes(
     "/store/rails" => { :host => "ironbelly", :path => "/store/rails" }
   },
   :passenger => {
+    :version => 4,
     :pool_idle_time => 0
   },
   :web => {