summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/manifests/setup.pp
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-20 02:00:18 -0700
committerelijah <elijah@riseup.net>2014-06-25 18:17:22 -0700
commit2bd603b9532fac70a25add8661acc94acb8598f8 (patch)
tree4f4b2bfd14c543ea649d239d8eb10c78520abd86 /puppet/modules/site_couchdb/manifests/setup.pp
parent0fbb8b1c2ddcabc23c19229ea89a2070964fc7ab (diff)
site_couchdb: support auto-stunnel setup, split master, bigcouch, and mirror out into separate files.
Diffstat (limited to 'puppet/modules/site_couchdb/manifests/setup.pp')
-rw-r--r--puppet/modules/site_couchdb/manifests/setup.pp39
1 files changed, 39 insertions, 0 deletions
diff --git a/puppet/modules/site_couchdb/manifests/setup.pp b/puppet/modules/site_couchdb/manifests/setup.pp
new file mode 100644
index 00000000..e398356b
--- /dev/null
+++ b/puppet/modules/site_couchdb/manifests/setup.pp
@@ -0,0 +1,39 @@
+#
+# An initial setup class. All the other classes depend on this
+#
+class site_couchdb::setup {
+
+ # ensure that we don't have leftovers from previous installations
+ # where we installed the cloudant bigcouch package
+ # https://leap.se/code/issues/4971
+ class { 'couchdb::bigcouch::package::cloudant':
+ ensure => absent
+ }
+
+ # /etc/couchdb/couchdb.netrc is deployed by couchdb::query::setup
+ # we symlink this to /root/.netrc for couchdb_scripts (eg. backup)
+ # and makes life easier for the admin (i.e. using curl/wget without
+ # passing credentials)
+ file {
+ '/root/.netrc':
+ ensure => link,
+ target => '/etc/couchdb/couchdb.netrc';
+
+ '/srv/leap/couchdb':
+ ensure => directory
+ }
+
+ couchdb::query::setup { 'localhost':
+ user => $site_couchdb::couchdb_admin_user,
+ pw => $site_couchdb::couchdb_admin_pw,
+ }
+
+ vcsrepo { '/srv/leap/couchdb/scripts':
+ ensure => present,
+ provider => git,
+ source => 'https://leap.se/git/couchdb_scripts',
+ revision => 'origin/master',
+ require => File['/srv/leap/couchdb']
+ }
+
+}