Skip to content

Commit

Permalink
update to couchdb 1.0.2 and minor doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed May 31, 2011
1 parent a35c44c commit 75e7ef9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions couchdb/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
DESCRIPTION
===========

Installs and configures CouchDB. Optionally can install CouchDB from sources.

REQUIREMENTS
============

Requires a platform that can install Erlang from distribution packages.

Platform
--------
## Platform

Works on Debian 5+, Ubuntu 8.10+, OpenBSD and FreeBSD.
Tested on Debian 5+, Ubuntu 8.10+, OpenBSD and FreeBSD.

Also works on Red Hat, CentOS and Fedora, requires the EPEL yum repository.

Cookbooks
---------
## Cookbooks

Requires the erlang cookbook so erlang can be installed.
* erlang

ATTRIBUTES
==========

Cookbook attributes are named under the `couch_db` keyspace. The attributes specified in the cookbook are used in the `couchdb::source` recipe only.

* `node[:couch_db][:src_checksum]` - sha256sum of the default version of couchdb to download
* `node[:couch_db][:src_version]` - default version of couchdb to download, used in the full URL to download.
* `node[:couch_db][:src_mirror]` - full URL to download.
* `node['couch_db']['src_checksum']` - sha256sum of the default version of couchdb to download
* `node['couch_db']['src_version']` - default version of couchdb to download, used in the full URL to download.
* `node['couch_db']['src_mirror']` - full URL to download.

RECIPES
=======
Expand All @@ -45,7 +45,7 @@ LICENSE AND AUTHOR

Author:: Joshua Timberman (<[email protected]>)

Copyright 2009, Opscode, Inc.
Copyright 2009-2011, Opscode, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions couchdb/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set[:couch_db][:src_checksum] = "b74a5bfe13e3457798107509cb533d0e7df276adad526ccd5a381c1271108b1f"
set[:couch_db][:src_version] = "1.0.1"
set[:couch_db][:src_mirror] = "http://archive.apache.org/dist/couchdb/#{couch_db.src_version}/apache-couchdb-#{couch_db.src_version}.tar.gz"
set['couch_db']['src_checksum'] = "6ef82a7ba0f132d55af7cc78b30658d5b3a4f7be3f449308c8d7fa2ad473677c"
set['couch_db']['src_version'] = "1.0.2"
set['couch_db']['src_mirror'] = "http://archive.apache.org/dist/couchdb/#{node['couch_db']['src_version']}/apache-couchdb-#{node['couch_db']['src_version']}.tar.gz"
18 changes: 9 additions & 9 deletions couchdb/recipes/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

if node[:platform] == "ubuntu" && node[:platform_version].to_f == 8.04
log "Ubuntu 8.04 does not supply sufficient development libraries via APT to install CouchDB #{node[:couch_db][:src_version]} from source."
if node['platform'] == "ubuntu" && node['platform_version'].to_f == 8.04
log "Ubuntu 8.04 does not supply sufficient development libraries via APT to install CouchDB #{node['couch_db']['src_version']} from source."
return
end

include_recipe "erlang"

couchdb_tar_gz = File.join(Chef::Config[:file_cache_path], "/", "apache-couchdb-#{node[:couch_db][:src_version]}.tar.gz")
couchdb_tar_gz = File.join(Chef::Config[:file_cache_path], "/", "apache-couchdb-#{node['couch_db']['src_version']}.tar.gz")
compile_flags = String.new
dev_pkgs = Array.new

case node[:platform]
case node['platform']
when "debian", "ubuntu"

dev_pkgs << "libicu-dev"
Expand All @@ -46,21 +46,21 @@
package pkg
end

if node[:platform_version].to_f >= 10.04
if node['platform_version'].to_f >= 10.04
compile_flags = "--with-js-lib=/usr/lib/xulrunner-devel-1.9.2.8/lib --with-js-include=/usr/lib/xulrunner-devel-1.9.2.8/include"
end
end

remote_file couchdb_tar_gz do
checksum node[:couch_db][:src_checksum]
source node[:couch_db][:src_mirror]
checksum node['couch_db']['src_checksum']
source node['couch_db']['src_mirror']
end

bash "install couchdb #{node[:couch_db][:src_version]}" do
bash "install couchdb #{node['couch_db']['src_version']}" do
cwd Chef::Config[:file_cache_path]
code <<-EOH
tar -zxf #{couchdb_tar_gz}
cd apache-couchdb-#{node[:couch_db][:src_version]} && ./configure #{compile_flags} && make && make install
cd apache-couchdb-#{node['couch_db']['src_version']} && ./configure #{compile_flags} && make && make install
EOH
not_if { ::FileTest.exists?("/usr/local/bin/couchdb") }
end
Expand Down

0 comments on commit 75e7ef9

Please sign in to comment.