Created
September 2, 2009 05:40
-
-
Save powdahound/179579 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case node[:platform] | |
when "debian", "ubuntu" | |
%w{build-essential erlang libicu-dev libmozjs-dev libcurl4-openssl-dev}.each {|pkg| package(pkg) } | |
end | |
execute "download_couchdb" do | |
user "root" | |
cwd "/tmp" | |
command "wget http://mirror.uoregon.edu/apache/couchdb/0.9.1/apache-couchdb-0.9.1.tar.gz" | |
creates "/tmp/apache-couchdb-0.9.1.tar.gz" | |
end | |
group "couchdb" do | |
end | |
user "couchdb" do | |
gid "couchdb" | |
home "/home/couchdb" | |
supports :manage_home => false | |
shell "/bin/bash" | |
end | |
# http://github.com/jamescarr/cookbooks/ | |
# http://www.isolani.co.uk/blog/web/InstallingCouchdbOnJeos804 | |
script "install_couchdb" do | |
interpreter "bash" | |
user "root" | |
cwd "/tmp" | |
code <<-EOH | |
tar zxvf apache-couchdb-0.9.1.tar.gz | |
cd apache-couchdb-0.9.1 | |
./configure | |
make | |
make install | |
EOH | |
not_if do | |
File.exists? "/usr/local/bin/couchdb" | |
end | |
end | |
%w{/usr/local/var/lib/couchdb /usr/local/var/log/couchdb /usr/local/var/run}.each do |dir| | |
directory dir do | |
owner "couchdb" | |
end | |
end | |
remote_file "/etc/init.d/couchdb" do | |
source "couchdb.init.d" | |
mode "0755" | |
end | |
service "couchdb" do | |
supports [ :restart, :status ] | |
action [ :enable, :start ] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment