From efa6c89514cf5cc6ae5ea6cf3dce86ad9907ce78 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 9 Feb 2016 17:14:13 -0500 Subject: update bigcouch to couchdb transition --- pages/docs/platform/services/couchdb.md | 45 ++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 17 deletions(-) (limited to 'pages/docs/platform/services') diff --git a/pages/docs/platform/services/couchdb.md b/pages/docs/platform/services/couchdb.md index faefe11..ec14bb1 100644 --- a/pages/docs/platform/services/couchdb.md +++ b/pages/docs/platform/services/couchdb.md @@ -69,46 +69,57 @@ If you add a node, or remove one node from the cluster, ### Migrating from bigcouch to plain couchdb -. make sure you have a backup of all DBs ! +At the end of this process, you will have just *one* couchdb server. If you had a bigcouch cluster before, you will be removing all but one of those machines to consolidate them into +one couchdb machine. -. put the webapp into [maintenance mode](https://leap.se/en/docs/platform/services/webapp#maintenance-mode) -. Stop all services that access the database: +* if you have multiple nodes with the couchdb service on them, pick one of them to be your couchdb server, and remove the service from the others. If these machines were only doing couchdb, you can remove the nodes completely with `leap node rm ` and then you can decommission the servers - * leap-mx - * postfix - * soledad-server - * nickserver +* put the webapp into [maintenance mode](https://leap.se/en/docs/platform/services/webapp#maintenance-mode) -. dump the dbs: +* connect to the machine you chose in step one and then disable access to the database and stop services that access the database, you may not have all these services on this +node, so if some of the following do not work, that isn't a problem: + leap ssh couchdbnode + /etc/init.d/stunnel4 stop + /etc/init.d/soledad-server stop + /etc/init.d/nickserver stop + /etc/init.d/postfix stop + +* then backup all of the databases, this can take some time and will place several hundred megabytes of data into /var/backups/couchdb. The size and time depends on how many users there are on your system. For example, 15k users took approximately 25 minutes and 308M of space: cd /srv/leap/couchdb/scripts time ./couchdb_dumpall.sh -. stop bigcouch +* stop bigcouch: /etc/init.d/bigcouch stop + pkill epmd -. remove bigcouch +* remove bigcouch: apt-get remove bigcouch -. configure couch node to use plain couchdb instead of bigcouch. See section "Use plain couchdb instead of bigcouch" below for details. -. deploy to all couch nodes +* configure your couch node to use plain couchdb instead of bigcouch. See section "Use plain couchdb instead of bigcouch" below for details. - leap deploy development +couchdb +* deploy to the couch node: -. restore the backup + leap deploy couchdb + +* restore the backup, this will take approximately the same amount of time as the backup took above: cd /srv/leap/couchdb/scripts time ./couchdb_restoreall.sh -. start services again that were stopped in the beginning +* start services again that were stopped in the beginning: + /etc/init.d/stunnel4 start + /etc/init.d/soledad-server start + /etc/init.d/nickserver start + /etc/init.d/postfix start -. check if everything is working, including running the test on your deployment machine: +* check if everything is working, including running the test on your deployment machine: leap test -. Remove old bigcouch data dir `/opt` after you double checked everything is in place +* Remove old bigcouch data dir `/opt` after you double checked everything is in place ### Re-enabling blocked account -- cgit v1.2.3