Skip to content
Browse files

support package installation on debian dist

  • Loading branch information...
1 parent 37a8214 commit 66415361c3c942af2de28432f43f03a6361c67f7 @ronniedada ronniedada committed Dec 20, 2012
Showing with 19 additions and 3 deletions.
  1. +19 −3 cookbooks/couchbase/recipes/setup-2.0.0.rb
View
22 cookbooks/couchbase/recipes/setup-2.0.0.rb
@@ -9,7 +9,15 @@
couchbase_edition = node[:db_couchbase][:edition]
couchbase_version = "2.0.0"
-couchbase_package = "couchbase-server-#{couchbase_edition}_x86_64_#{couchbase_version}.rpm"
+
+couchbase_package = value_for_platform(
+ ["centos", "redhat", "suse", "fedora" ] => {
+ "default" => "couchbase-server-#{couchbase_edition}_x86_64_#{couchbase_version}.rpm"
+ },
+ ["ubuntu", "debian"] => {
+ "default" => "couchbase-server-#{couchbase_edition}_x86_64_#{couchbase_version}.deb"
+ }
+)
log "downloading #{couchbase_package}"
@@ -24,8 +32,16 @@
package "couchbase-server" do
source "/tmp/#{couchbase_package}"
- provider Chef::Provider::Package::Rpm
- action :install
+ if platform?("redhat", "centos", "suse", "fedora")
+ provider Chef::Provider::Package::Rpm
+ action :install
+ elsif platform?("ubuntu", "debian")
+ provider Chef::Provider:Package:Deb
+ action :install
+ else
+ log "unsupported source package #{couchbase_package}"
+ abort "unsupported source package #{couchbase_package}"
+ end
end
log "configuring #{couchbase_package}"

0 comments on commit 6641536

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