summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/manifests
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-06-28 13:16:47 -0400
committerMicah <micah@leap.se>2016-06-30 09:41:19 -0400
commitd0ff379fe2a43d7968b8828c8b31af5254f6f85b (patch)
tree35ffe6576ea383e9e6bfcd70d7908e5b58400089 /puppet/modules/site_couchdb/manifests
parent8e0fdbb46761505b9188c9ea2a6c0df0c55ac458 (diff)
Remove bigcouch (#8056)
Change-Id: I0c6e27298c63bd37de1410985d054799818c22a4
Diffstat (limited to 'puppet/modules/site_couchdb/manifests')
-rw-r--r--puppet/modules/site_couchdb/manifests/bigcouch.pp50
-rw-r--r--puppet/modules/site_couchdb/manifests/bigcouch/add_nodes.pp8
-rw-r--r--puppet/modules/site_couchdb/manifests/bigcouch/compaction.pp8
-rw-r--r--puppet/modules/site_couchdb/manifests/bigcouch/settle_cluster.pp11
-rw-r--r--puppet/modules/site_couchdb/manifests/init.pp9
-rw-r--r--puppet/modules/site_couchdb/manifests/logrotate.pp14
-rw-r--r--puppet/modules/site_couchdb/manifests/plain.pp2
-rw-r--r--puppet/modules/site_couchdb/manifests/setup.pp7
8 files changed, 1 insertions, 108 deletions
diff --git a/puppet/modules/site_couchdb/manifests/bigcouch.pp b/puppet/modules/site_couchdb/manifests/bigcouch.pp
deleted file mode 100644
index 2de3d4d0..00000000
--- a/puppet/modules/site_couchdb/manifests/bigcouch.pp
+++ /dev/null
@@ -1,50 +0,0 @@
-# sets up bigcouch on couchdb node
-class site_couchdb::bigcouch {
-
- $config = $::site_couchdb::couchdb_config['bigcouch']
- $cookie = $config['cookie']
- $ednp_port = $config['ednp_port']
-
- class { 'couchdb':
- admin_pw => $::site_couchdb::couchdb_admin_pw,
- admin_salt => $::site_couchdb::couchdb_admin_salt,
- bigcouch => true,
- bigcouch_cookie => $cookie,
- ednp_port => $ednp_port,
- chttpd_bind_address => '127.0.0.1'
- }
-
- #
- # stunnel must running correctly before bigcouch dbs can be set up.
- #
- Class['site_config::default']
- -> Class['site_config::resolvconf']
- -> Class['couchdb::bigcouch::package::cloudant']
- -> Service['shorewall']
- -> Exec['refresh_stunnel']
- -> Class['site_couchdb::setup']
- -> Class['site_couchdb::bigcouch::add_nodes']
- -> Class['site_couchdb::bigcouch::settle_cluster']
- -> Class['site_couchdb::create_dbs']
-
- include site_couchdb::bigcouch::add_nodes
- include site_couchdb::bigcouch::settle_cluster
- include site_couchdb::bigcouch::compaction
-
- file { '/var/log/bigcouch':
- ensure => directory
- }
-
- file { '/etc/sv/bigcouch/run':
- ensure => present,
- source => 'puppet:///modules/site_couchdb/runit_config',
- owner => root,
- group => root,
- mode => '0755',
- require => Package['couchdb'],
- notify => Service['couchdb']
- }
-
- include site_check_mk::agent::couchdb::bigcouch
-
-}
diff --git a/puppet/modules/site_couchdb/manifests/bigcouch/add_nodes.pp b/puppet/modules/site_couchdb/manifests/bigcouch/add_nodes.pp
deleted file mode 100644
index c8c43275..00000000
--- a/puppet/modules/site_couchdb/manifests/bigcouch/add_nodes.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-class site_couchdb::bigcouch::add_nodes {
- # loop through neighbors array and add nodes
- $nodes = $::site_couchdb::bigcouch::config['neighbors']
-
- couchdb::bigcouch::add_node { $nodes:
- require => Couchdb::Query::Setup['localhost']
- }
-}
diff --git a/puppet/modules/site_couchdb/manifests/bigcouch/compaction.pp b/puppet/modules/site_couchdb/manifests/bigcouch/compaction.pp
deleted file mode 100644
index 84aab4ef..00000000
--- a/puppet/modules/site_couchdb/manifests/bigcouch/compaction.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-class site_couchdb::bigcouch::compaction {
- cron {
- 'compact_all_shards':
- command => '/srv/leap/couchdb/scripts/bigcouch_compact_all_shards.sh >> /var/log/bigcouch/compaction.log',
- hour => 3,
- minute => 17;
- }
-}
diff --git a/puppet/modules/site_couchdb/manifests/bigcouch/settle_cluster.pp b/puppet/modules/site_couchdb/manifests/bigcouch/settle_cluster.pp
deleted file mode 100644
index 820b5be2..00000000
--- a/puppet/modules/site_couchdb/manifests/bigcouch/settle_cluster.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-class site_couchdb::bigcouch::settle_cluster {
-
- exec { 'wait_for_couch_nodes':
- command => '/srv/leap/bin/run_tests --test CouchDB/Are_configured_nodes_online? --retry 12 --wait 10'
- }
-
- exec { 'settle_cluster_membership':
- command => '/srv/leap/bin/run_tests --test CouchDB/Is_cluster_membership_ok? --retry 12 --wait 10',
- require => Exec['wait_for_couch_nodes']
- }
-}
diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp
index c4fe6277..554bf813 100644
--- a/puppet/modules/site_couchdb/manifests/init.pp
+++ b/puppet/modules/site_couchdb/manifests/init.pp
@@ -1,4 +1,4 @@
-# entry class for configuring couchdb/bigcouch node
+# entry class for configuring couchdb node
# couchdb node
class site_couchdb {
tag 'leap_service'
@@ -39,12 +39,6 @@ class site_couchdb {
$couchdb_backup = $couchdb_config['backup']
$couchdb_mode = $couchdb_config['mode']
- # ensure bigcouch has been purged from the system:
- # TODO: remove this check in 0.9 release
- if file('/opt/bigcouch/bin/bigcouch', '/dev/null') != '' {
- fail 'ERROR: BigCouch appears to be installed. Make sure you have migrated to CouchDB before proceeding. See https://leap.se/upgrade-0-8'
- }
-
include site_couchdb::plain
Class['site_config::default']
@@ -60,7 +54,6 @@ class site_couchdb {
include site_couchdb::create_dbs
include site_couchdb::add_users
include site_couchdb::designs
- include site_couchdb::logrotate
if $couchdb_backup { include site_couchdb::backup }
diff --git a/puppet/modules/site_couchdb/manifests/logrotate.pp b/puppet/modules/site_couchdb/manifests/logrotate.pp
deleted file mode 100644
index bb8843bb..00000000
--- a/puppet/modules/site_couchdb/manifests/logrotate.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-# configure couchdb logrotation
-class site_couchdb::logrotate {
-
- augeas {
- 'logrotate_bigcouch':
- context => '/files/etc/logrotate.d/bigcouch/rule',
- changes => [
- 'set file /opt/bigcouch/var/log/*.log', 'set rotate 7',
- 'set schedule daily', 'set compress compress',
- 'set missingok missingok', 'set ifempty notifempty',
- 'set copytruncate copytruncate' ]
- }
-
-}
diff --git a/puppet/modules/site_couchdb/manifests/plain.pp b/puppet/modules/site_couchdb/manifests/plain.pp
index b40fc100..710ff7ca 100644
--- a/puppet/modules/site_couchdb/manifests/plain.pp
+++ b/puppet/modules/site_couchdb/manifests/plain.pp
@@ -6,8 +6,6 @@ class site_couchdb::plain {
chttpd_bind_address => '127.0.0.1'
}
- include site_check_mk::agent::couchdb::plain
-
# remove bigcouch leftovers from previous installations
include ::site_config::remove::bigcouch
diff --git a/puppet/modules/site_couchdb/manifests/setup.pp b/puppet/modules/site_couchdb/manifests/setup.pp
index 710d3c1c..7477d24c 100644
--- a/puppet/modules/site_couchdb/manifests/setup.pp
+++ b/puppet/modules/site_couchdb/manifests/setup.pp
@@ -3,13 +3,6 @@
#
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
- }
-
$user = $site_couchdb::couchdb_admin_user
# setup /etc/couchdb/couchdb-admin.netrc for couchdb admin access