]> git.openstreetmap.org Git - chef.git/commitdiff
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 050c462ae37c46bf17dda427fa95fc9151157161..01b6b8328c1d424afa21bbc90103b70b91c09583 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 e58c16d2ff1be80309a09d2c3bb09434b57c0dfe..c56843893029fcafd5c896a4a34fcd2c97cfe95a 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 69b6a45d24bded98f47930d13a7c88f7825a540b..7e67d19603eacb0d93fe2a28294f230a0694f28a 100644 (file)
@@ -14,6 +14,7 @@ default_attributes(
     "/store/rails" => { :host => "ironbelly", :path => "/store/rails" }
   },
   :passenger => {
+    :version => 4,
     :pool_idle_time => 0
   },
   :web => {