summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/docs/platform/common/bigcouch_migration_begin.md67
-rw-r--r--pages/docs/platform/common/bigcouch_migration_end.md26
-rw-r--r--pages/docs/platform/common/bigcouch_migration_finish.md10
-rw-r--r--pages/docs/platform/services/couchdb.md8
-rw-r--r--pages/docs/platform/upgrading/upgrade-0-8.md34
5 files changed, 122 insertions, 23 deletions
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 <nodename>` 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 <each soledad-node>
+ server# /etc/init.d/soledad-server stop
+
+ workstation$ leap ssh <mx-node>
+ server# /etc/init.d/postfix stop
+ server# /etc/init.d/leap-mx stop
+
+ workstation$ leap ssh <webapp-node>
+ 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 <couchdb-node>
+ 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/<couch-node>.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/services/couchdb.md b/pages/docs/platform/services/couchdb.md
index 4850a81..cc40dc3 100644
--- a/pages/docs/platform/services/couchdb.md
+++ b/pages/docs/platform/services/couchdb.md
@@ -150,4 +150,10 @@ If you add a node, or remove one node from the cluster,
### Migrating from BigCouch to plain CouchDB
-<%= render :partial => 'docs/platform/common/bigcouch_migration.md' %>
+<%= render :partial => 'docs/platform/common/bigcouch_migration_begin.md' %>
+
+
+<%= render :partial => 'docs/platform/common/bigcouch_migration_end.md' %>
+
+
+<%= render :partial => 'docs/platform/common/bigcouch_migration_finish.md' %>
diff --git a/pages/docs/platform/upgrading/upgrade-0-8.md b/pages/docs/platform/upgrading/upgrade-0-8.md
index 6f64ed5..f68feb4 100644
--- a/pages/docs/platform/upgrading/upgrade-0-8.md
+++ b/pages/docs/platform/upgrading/upgrade-0-8.md
@@ -16,9 +16,9 @@ Upgrading to Platform 0.8
workstation$ git pull
workstation$ git checkout 0.8.0
-### Step 2: Migrate BigCouch to CouchDB
+### Step 2: Prepare to migrate from BigCouch to CouchDB
-<%= render :partial => 'docs/platform/common/bigcouch_migration.md' %>
+<%= render :partial => 'docs/platform/common/bigcouch_migration_begin.md' %>
### Step 3: Upgrade from Debian Wheezy to Jessie
@@ -76,8 +76,8 @@ For each one of your nodes, login to it and do the following process:
reboot
-Issues
-------
+Potential Jessie Upgrade Issues
+-------------------------------
**W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max**
@@ -109,7 +109,9 @@ If you get this warning:
Just ignore it, it should be fixed on reboot/deploy.
-### Step 4: Import Data into CouchDB
+### Step 5: Deploy LEAP Platform 0.8 to the Couch node
+
+You will need to deploy the 0.8 version of LEAP Platform to the couch node before continuing.
1. deploy to the couch node:
@@ -123,29 +125,17 @@ Just ignore it, it should be fixed on reboot/deploy.
server# iptables -A INPUT -p tcp --dport 5984 --jump REJECT
```
-1. restore the backup, this will take approximately the same amount of time as the backup took above:
+### Step 6: Import Data into CouchDB
- ```
- workstation$ leap ssh <couchdb-node>
- server# cd /srv/leap/couchdb/scripts
- server# time ./couchdb_restoreall.sh
- ```
+<%= render :partial => 'docs/platform/common/bigcouch_migration_end.md' %>
### Step 5: Deploy everything
-When you have upgraded all nodes to Jessie, you are ready to deploy:
+Now that you've upgraded all nodes to Jessie, and migrated to CouchDB, you are ready to deploy LEAP Platform 0.8 to the rest of the nodes:
workstation$ cd <provider directory>
workstation$ leap deploy
-### Step 6: Test things are working
-
- workstation$ leap test
-
-### Step 7: Cleanup
-
-1. Remove old bigcouch data dirrectory on the couchdb node in `/opt`, after you double checked everything is in place
-
-### Step 8: Relax
+### Step 6: Test and cleanup
-1. Relax, enjoy a refreshing beverage.
+<%= render :partial => 'docs/platform/common/bigcouch_migration_finish.md' %>