diff options
author | Micah Anderson <micah@riseup.net> | 2016-02-09 17:14:13 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2016-02-09 17:14:37 -0500 |
commit | efa6c89514cf5cc6ae5ea6cf3dce86ad9907ce78 (patch) | |
tree | 1d3827dcf14753b6de62a29a3fe99856a414038d /pages/docs/platform/services | |
parent | b46f68902a7f3ac1f1cb349bb4c9aec9f411f71c (diff) |
update bigcouch to couchdb transition
Diffstat (limited to 'pages/docs/platform/services')
-rw-r--r-- | pages/docs/platform/services/couchdb.md | 45 |
1 files changed, 28 insertions, 17 deletions
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 <nodename>` 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 |