Skip to content

Commit

Permalink
get rabbitmq from upstream maintainer for CentOS/RHEL/Scientific, COO…
Browse files Browse the repository at this point in the history
…K-758
  • Loading branch information
mattray committed Sep 17, 2011
1 parent 16dd154 commit a04c4ca
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion rabbitmq/README.md
Expand Up @@ -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
-------
Expand Down
8 changes: 5 additions & 3 deletions rabbitmq/metadata.rb
Expand Up @@ -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

Expand Down
33 changes: 21 additions & 12 deletions rabbitmq/recipes/default.rb
Expand Up @@ -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
Expand All @@ -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.