Skip to content

Commit

Permalink
Download and install Zookeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Arcieri committed Oct 28, 2011
1 parent 7f42c76 commit f32c59e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
.bundle
Gemfile.lock
pkg/*
tmp/*
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -8,4 +8,10 @@ Prerequisites

DCell requires 0MQ. On OS X, this is available through Homebrew by running:

brew install zeromq
brew install zeromq

DCell also requires Zookeeper. For production, you will need to install and
maintain your own Zookeeper cluster. For development, you can run the
following to download and install Zookeeper:

rake zookeeper:install
24 changes: 24 additions & 0 deletions tasks/zookeeper.task
@@ -0,0 +1,24 @@
require 'rake/clean'

namespace :zookeeper do
VERSION = "3.3.3"
TARBALL = "zookeeper-#{VERSION}.tar.gz"

task :download => "tmp/#{TARBALL}"
directory 'tmp'

file "tmp/#{TARBALL}" => "tmp" do
puts "*** Downloading Zookeeper"
sh "curl http://www.carfab.com/apachesoftware/zookeeper/stable/#{TARBALL} -o tmp/#{TARBALL}"
end

task :install => :download do
puts "*** Unpacking Zookeeper"

rm_rf "zookeeper" if File.exists? "zookeeper"
sh "tar -zxvf tmp/#{TARBALL}"
mv "zookeeper-#{VERSION}", "zookeeper"
end
end

CLEAN.include "tmp", "zookeeper"

0 comments on commit f32c59e

Please sign in to comment.