From 5f325609e00a874328c5510729f2f54a805b9a7e Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 3 May 2016 11:03:14 -0400 Subject: rename files to have underscore in front --- .../platform/common/_bigcouch_migration_begin.md | 67 ++++++++++++++++++++++ .../platform/common/_bigcouch_migration_end.md | 26 +++++++++ .../platform/common/_bigcouch_migration_finish.md | 10 ++++ .../platform/common/bigcouch_migration_begin.md | 67 ---------------------- .../docs/platform/common/bigcouch_migration_end.md | 26 --------- .../platform/common/bigcouch_migration_finish.md | 10 ---- 6 files changed, 103 insertions(+), 103 deletions(-) create mode 100644 pages/docs/platform/common/_bigcouch_migration_begin.md create mode 100644 pages/docs/platform/common/_bigcouch_migration_end.md create mode 100644 pages/docs/platform/common/_bigcouch_migration_finish.md delete mode 100644 pages/docs/platform/common/bigcouch_migration_begin.md delete mode 100644 pages/docs/platform/common/bigcouch_migration_end.md delete mode 100644 pages/docs/platform/common/bigcouch_migration_finish.md (limited to 'pages/docs') diff --git a/pages/docs/platform/common/_bigcouch_migration_begin.md b/pages/docs/platform/common/_bigcouch_migration_begin.md new file mode 100644 index 0000000..b72c3a4 --- /dev/null +++ b/pages/docs/platform/common/_bigcouch_migration_begin.md @@ -0,0 +1,67 @@ +@title = "Migrating from BigCouch to plain CouchDB" + +At the end of this process, you will have just *one* node with `services` property equal to `couchdb`. If you had a BigCouch cluster before, you will be removing all but one of those machines to consolidate them into one CouchDB machine. + +1. 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 BigCouch before, you can remove the nodes completely with `leap node rm ` and then you can decommission the servers + +1. put the webapp into [[maintenance mode => webapp#maintenance-mode]] + +1. turn off daemons that access the database. For example: + + ``` + workstation$ leap ssh + server# /etc/init.d/soledad-server stop + + workstation$ leap ssh + server# /etc/init.d/postfix stop + server# /etc/init.d/leap-mx stop + + workstation$ leap ssh + server# /etc/init.d/nickserver stop + ``` + + Alternately, you can create a temporary firewall rule to block access (run on couchdb server): + + ``` + server# iptables -A INPUT -p tcp --dport 5984 --jump REJECT + ``` + +1. remove orphaned databases and do a backup of all remaining, active 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: + + ``` + workstation$ leap ssh + server# cd /srv/leap/couchdb/scripts + server# ./cleanup-user-dbs + server# time ./couchdb_dumpall.sh + ``` + +1. stop bigcouch: + + ``` + server# /etc/init.d/bigcouch stop + server# pkill epmd + ``` + +1. remove bigcouch: + + ``` + server# apt-get remove bigcouch + ``` + +1. configure your couch node to use plain couchdb instead of bigcouch, you can do this by editing nodes/.json, look for this section: + + ``` + "couch": { + "mode": "plain" + } + ``` + + change it, so it looks like this instead: + + ``` + "couch": { + "mode": "plain", + "pwhash_alg": "pbkdf2" + } + ``` + diff --git a/pages/docs/platform/common/_bigcouch_migration_end.md b/pages/docs/platform/common/_bigcouch_migration_end.md new file mode 100644 index 0000000..a47d3c5 --- /dev/null +++ b/pages/docs/platform/common/_bigcouch_migration_end.md @@ -0,0 +1,26 @@ +1. restore the backup, this will take approximately the same amount of time as the backup took above: + + ``` + server# cd /srv/leap/couchdb/scripts + server# time ./couchdb_restoreall.sh + ``` + +1. start services again that were stopped in the beginning: + + ``` + workstation$ leap ssh soledad-nodes + server# /etc/init.d/soledad-server start + + workstation$ leap ssh mx-node + server# /etc/init.d/postfix start + server# /etc/init.d/leap-mx start + + workstation$ leap ssh webapp + server# /etc/init.d/nickserver start + ``` + + Or, alternately, if you set up the firewall rule instead, now remove it: + + ``` + server# iptables -D INPUT -p tcp --dport 5984 --jump REJECT + ``` diff --git a/pages/docs/platform/common/_bigcouch_migration_finish.md b/pages/docs/platform/common/_bigcouch_migration_finish.md new file mode 100644 index 0000000..5aae920 --- /dev/null +++ b/pages/docs/platform/common/_bigcouch_migration_finish.md @@ -0,0 +1,10 @@ + +1. check if everything is working, including running the test on your deployment machine: + + ``` + workstation$ leap test + ``` + +1. Remove old bigcouch data dir `/opt` after you double checked everything is in place + +1. Relax, enjoy a refreshing beverage. diff --git a/pages/docs/platform/common/bigcouch_migration_begin.md b/pages/docs/platform/common/bigcouch_migration_begin.md deleted file mode 100644 index b72c3a4..0000000 --- a/pages/docs/platform/common/bigcouch_migration_begin.md +++ /dev/null @@ -1,67 +0,0 @@ -@title = "Migrating from BigCouch to plain CouchDB" - -At the end of this process, you will have just *one* node with `services` property equal to `couchdb`. If you had a BigCouch cluster before, you will be removing all but one of those machines to consolidate them into one CouchDB machine. - -1. 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 BigCouch before, you can remove the nodes completely with `leap node rm ` and then you can decommission the servers - -1. put the webapp into [[maintenance mode => webapp#maintenance-mode]] - -1. turn off daemons that access the database. For example: - - ``` - workstation$ leap ssh - server# /etc/init.d/soledad-server stop - - workstation$ leap ssh - server# /etc/init.d/postfix stop - server# /etc/init.d/leap-mx stop - - workstation$ leap ssh - server# /etc/init.d/nickserver stop - ``` - - Alternately, you can create a temporary firewall rule to block access (run on couchdb server): - - ``` - server# iptables -A INPUT -p tcp --dport 5984 --jump REJECT - ``` - -1. remove orphaned databases and do a backup of all remaining, active 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: - - ``` - workstation$ leap ssh - server# cd /srv/leap/couchdb/scripts - server# ./cleanup-user-dbs - server# time ./couchdb_dumpall.sh - ``` - -1. stop bigcouch: - - ``` - server# /etc/init.d/bigcouch stop - server# pkill epmd - ``` - -1. remove bigcouch: - - ``` - server# apt-get remove bigcouch - ``` - -1. configure your couch node to use plain couchdb instead of bigcouch, you can do this by editing nodes/.json, look for this section: - - ``` - "couch": { - "mode": "plain" - } - ``` - - change it, so it looks like this instead: - - ``` - "couch": { - "mode": "plain", - "pwhash_alg": "pbkdf2" - } - ``` - diff --git a/pages/docs/platform/common/bigcouch_migration_end.md b/pages/docs/platform/common/bigcouch_migration_end.md deleted file mode 100644 index a47d3c5..0000000 --- a/pages/docs/platform/common/bigcouch_migration_end.md +++ /dev/null @@ -1,26 +0,0 @@ -1. restore the backup, this will take approximately the same amount of time as the backup took above: - - ``` - server# cd /srv/leap/couchdb/scripts - server# time ./couchdb_restoreall.sh - ``` - -1. start services again that were stopped in the beginning: - - ``` - workstation$ leap ssh soledad-nodes - server# /etc/init.d/soledad-server start - - workstation$ leap ssh mx-node - server# /etc/init.d/postfix start - server# /etc/init.d/leap-mx start - - workstation$ leap ssh webapp - server# /etc/init.d/nickserver start - ``` - - Or, alternately, if you set up the firewall rule instead, now remove it: - - ``` - server# iptables -D INPUT -p tcp --dport 5984 --jump REJECT - ``` diff --git a/pages/docs/platform/common/bigcouch_migration_finish.md b/pages/docs/platform/common/bigcouch_migration_finish.md deleted file mode 100644 index 5aae920..0000000 --- a/pages/docs/platform/common/bigcouch_migration_finish.md +++ /dev/null @@ -1,10 +0,0 @@ - -1. check if everything is working, including running the test on your deployment machine: - - ``` - workstation$ leap test - ``` - -1. Remove old bigcouch data dir `/opt` after you double checked everything is in place - -1. Relax, enjoy a refreshing beverage. -- cgit v1.2.3