summaryrefslogtreecommitdiff
path: root/manifests/bigcouch.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-03-10 18:33:55 +0100
committervarac <varacanero@zeromail.org>2013-03-10 18:33:55 +0100
commit659e3604a310029000c9db8774c7caba70a3e291 (patch)
tree9e21cf4d4e69e4b7b104ec8afbd908161429b930 /manifests/bigcouch.pp
parent7793c80224dbe0f1baf33075bf7396b11aeb229d (diff)
mostly finished bigcouch support
Diffstat (limited to 'manifests/bigcouch.pp')
-rw-r--r--manifests/bigcouch.pp52
1 files changed, 52 insertions, 0 deletions
diff --git a/manifests/bigcouch.pp b/manifests/bigcouch.pp
new file mode 100644
index 0000000..67d8691
--- /dev/null
+++ b/manifests/bigcouch.pp
@@ -0,0 +1,52 @@
+class couchdb::bigcouch inherits couchdb::base {
+
+ case $::operatingsystem {
+ Debian: {
+ case $::lsbdistcodename {
+ /squeeze|wheezy/: { #include couchdb::bigcouch::debian
+ }
+ default: { fail "bigcouch not available for ${::operatingsystem}/${::lsbdistcodename}" }
+ }
+ }
+ default: { fail "bigcouch not available for ${::operatingsystem}/${::lsbdistcodename}" }
+ }
+
+ apt::sources_list {'bigcouch-cloudant.list':
+ content => "deb http://packages.cloudant.com/debian $::lsbdistcodename main"
+ }
+
+ # currently, there's no other way with puppet to install unauthenticated
+ # pacakges: http://projects.puppetlabs.com/issues/556
+ # so we need to globally allow apt to install unauthenticated
+ # packages.
+
+ apt::apt_conf { 'allow_unauthenticated':
+ content => 'APT::Get::AllowUnauthenticated yes;',
+ }
+
+ file {'/etc/couchdb':
+ ensure => link,
+ target => '/opt/bigcouch/etc'
+ }
+
+ Package ['couchdb'] {
+ name => 'bigcouch',
+ require => [ Apt::Sources_list ['bigcouch-cloudant.list'],
+ Apt::Apt_conf ['allow_unauthenticated'], File['/etc/couchdb'],
+ Exec[refresh_apt] ]
+ }
+
+ file { '/opt/bigcouch/etc/vm.args':
+ content => template('couchdb/bigcouch/vm.args'),
+ mode => '0640',
+ owner => 'bigcouch',
+ group => 'bigcouch',
+ require => Package['couchdb']
+ }
+
+ Service ['couchdb'] {
+ provider => 'runit',
+ name => 'bigcouch'
+ }
+
+}