Permalink
Browse files

Merge branch 'COOK-1838'

  • Loading branch information...
jtimberman committed Dec 1, 2012
2 parents 592f9ba + 4bf3fd0 commit 73ea710e7cd4808b8d1700d0bef2e59ad631ca20
Showing with 12 additions and 8 deletions.
  1. +4 −3 metadata.rb
  2. +6 −3 recipes/default.rb
  3. +2 −2 recipes/source.rb
View
@@ -5,13 +5,14 @@
description "Installs CouchDB package and starts service"
long_description <<-EOH
Installs the CouchDB package if it is available from an package repository on
-the node. If the package repository is not available, CouchDB needs to be
-installed via some other method, either a backported package, or compiled
+the node. If the package repository is not available, CouchDB needs to be
+installed via some other method, either a backported package, or compiled
directly from source. CouchDB is available on Red Hat-based systems through
the EPEL Yum Repository.
EOH
version "1.0.5"
depends "erlang"
+depends "yum"
recipe "couchdb", "Installs and configures CouchDB package"
recipe "couchdb::source", "Installs and configures CouchDB from source"
@@ -20,6 +21,6 @@
supports "openbsd"
supports "freebsd"
-%w{ rhel centos fedora }.each do |os|
+%w{ rhel centos fedora scientific}.each do |os|
supports os # requires EPEL Yum Repository
end
View
@@ -21,8 +21,8 @@
include_recipe "erlang"
end
-case node['platform']
-when "redhat","centos","fedora","amazon"
+case node['platform_family']
+when "rhel","fedora"
group "couchdb" do
system true
end
@@ -34,8 +34,11 @@
home "/var/lib/couchdb"
system true
end
+
+ include_recipe "yum::epel"
end
+
package "couchdb" do
package_name value_for_platform(
"openbsd" => { "default" => "apache-couchdb" },
@@ -67,7 +70,7 @@
end
service "couchdb" do
- if platform?("centos","redhat","fedora")
+ if platform_family?("rhel","fedora")
start_command "/sbin/service couchdb start &> /dev/null"
stop_command "/sbin/service couchdb stop &> /dev/null"
end
View
@@ -30,8 +30,8 @@
compile_flags = String.new
dev_pkgs = Array.new
-case node['platform']
-when "debian", "ubuntu"
+case node['platform_family']
+when "debian"
dev_pkgs << "libicu-dev"
dev_pkgs << "libcurl4-openssl-dev"

0 comments on commit 73ea710

Please sign in to comment.