Skip to content
Browse files

get rabbitmq from upstream maintainer for CentOS/RHEL/Scientific, COO…

…K-758
  • Loading branch information...
1 parent 16dd154 commit a04c4cae615ee6e368e91971c429cdc7385a045e @mattray mattray committed Sep 16, 2011
Showing with 27 additions and 16 deletions.
  1. +1 −1 rabbitmq/README.md
  2. +5 −3 rabbitmq/metadata.rb
  3. +21 −12 rabbitmq/recipes/default.rb
View
2 rabbitmq/README.md
@@ -6,7 +6,7 @@ Recipes
=======
default
-------
-Installs `rabbitmq-server` from RabbitMQ.com's APT repository. The distribution-provided version was quite old and newer features were needed.
+Installs `rabbitmq-server` from RabbitMQ.com's APT repository or the RPM directly (there is no yum repo). The distribution-provided versions were quite old and newer features were needed.
cluster
-------
View
8 rabbitmq/metadata.rb
@@ -2,12 +2,14 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures RabbitMQ server"
-version "1.2.1"
+version "1.3"
recipe "rabbitmq", "Install and configure RabbitMQ"
recipe "rabbitmq::cluster", "Set up RabbitMQ clustering."
-depends "apt", "> 1.1"
+depends "apt", ">= 1.1"
+depends "yum", ">= 0.5.0"
+depends "erlang", ">= 0.9"
-%w{ubuntu debian}.each do |os|
+%w{ubuntu debian redhat centos scientific}.each do |os|
supports os
end
View
33 rabbitmq/recipes/default.rb
@@ -18,16 +18,6 @@
# limitations under the License.
#
-# use the RabbitMQ repository instead of Ubuntu or Debian's
-# because there are very useful features in the newer versions
-apt_repository "rabbitmq" do
- uri "http://www.rabbitmq.com/debian/"
- distribution "testing"
- components ["main"]
- key "http://www.rabbitmq.com/rabbitmq-signing-key-public.asc"
- action :add
-end
-
# rabbitmq-server is not well-behaved as far as managed services goes
# we'll need to add a LWRP for calling rabbitmqctl stop
# while still using /etc/init.d/rabbitmq-server start
@@ -47,5 +37,24 @@
mode 0644
end
-package "rabbitmq-server"
-
+case node[:platform]
+when "debian", "ubuntu"
+ # use the RabbitMQ repository instead of Ubuntu or Debian's
+ # because there are very useful features in the newer versions
+ apt_repository "rabbitmq" do
+ uri "http://www.rabbitmq.com/debian/"
+ distribution "testing"
+ components ["main"]
+ key "http://www.rabbitmq.com/rabbitmq-signing-key-public.asc"
+ action :add
+ end
+ package "rabbitmq-server"
+when "redhat", "centos", "scientific"
+ remote_file "/tmp/rabbitmq-server-2.6.1-1.noarch.rpm" do
+ source "https://www.rabbitmq.com/releases/rabbitmq-server/v2.6.1/rabbitmq-server-2.6.1-1.noarch.rpm"
+ action :create_if_missing
+ end
+ rpm_package "/tmp/rabbitmq-server-2.6.1-1.noarch.rpm" do
+ action :install
+ end
+end

0 comments on commit a04c4ca

Please sign in to comment.
Something went wrong with that request. Please try again.