summaryrefslogtreecommitdiff
path: root/pages/docs/platform/services
diff options
context:
space:
mode:
Diffstat (limited to 'pages/docs/platform/services')
-rw-r--r--pages/docs/platform/services/couchdb.md83
-rw-r--r--pages/docs/platform/services/webapp.md11
2 files changed, 91 insertions, 3 deletions
diff --git a/pages/docs/platform/services/couchdb.md b/pages/docs/platform/services/couchdb.md
index 7bf4e7c..faefe11 100644
--- a/pages/docs/platform/services/couchdb.md
+++ b/pages/docs/platform/services/couchdb.md
@@ -26,8 +26,18 @@ If you add a node, or remove one node from the cluster,
. make sure you have a backup of all DBs !
- /srv/leap/couchdb/scripts/couchdb_dumpall.sh
+. put the webapp into [maintenance mode](https://leap.se/en/docs/platform/services/webapp#maintenance-mode)
+. Stop all services that access the database:
+ * leap-mx
+ * postfix
+ * soledad-server
+ * nickserver
+
+. dump the dbs:
+
+ cd /srv/leap/couchdb/scripts
+ time ./couchdb_dumpall.sh
. delete all dbs
. shut down old node
@@ -53,7 +63,52 @@ If you add a node, or remove one node from the cluster,
. restore the backup
- /srv/leap/couchdb/scripts/couchdb_restoreall.sh
+ cd /srv/leap/couchdb/scripts
+ time ./couchdb_restoreall.sh
+
+
+### Migrating from bigcouch to plain couchdb
+
+. make sure you have a backup of all DBs !
+
+. put the webapp into [maintenance mode](https://leap.se/en/docs/platform/services/webapp#maintenance-mode)
+. Stop all services that access the database:
+
+ * leap-mx
+ * postfix
+ * soledad-server
+ * nickserver
+
+. dump the dbs:
+
+ cd /srv/leap/couchdb/scripts
+ time ./couchdb_dumpall.sh
+
+. stop bigcouch
+
+ /etc/init.d/bigcouch stop
+
+. 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
+
+ leap deploy development +couchdb
+
+. restore the backup
+
+ cd /srv/leap/couchdb/scripts
+ time ./couchdb_restoreall.sh
+
+. start services again that were stopped in the beginning
+
+. 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
### Re-enabling blocked account
@@ -86,3 +141,27 @@ Beware that this returns the uncompacted disk size (see http://wiki.apache.org/c
echo "`curl --netrc -s -X GET 'http://127.0.0.1:5984/user-dcd6492d74b90967b6b874100b7dbfcf'|json_pp|grep disk_size|cut -d: -f 2`/1024"|bc
+## Use plain couchdb instead of bigcouch
+
+Be aware that latest stable couchdb 1.6 cannot be clustered like bigcouch, so you can use this only if you have a single couchdb node.
+
+Use this in your couchdb node config:
+
+ "couch": {
+ "master": true,
+ "pwhash_alg": "pbkdf2"
+ }
+
+Local couch data dumps
+======================
+
+You can let one or more nodes do a nightly couchdb data dump adding this to your node config:
+
+ "couch": {
+ "backup": true
+ }
+
+Data will get dumped to `/var/backups/couchdb`.
+
+Be aware that this will gather all data possibly shared over multiple nodes on one node.
+
diff --git a/pages/docs/platform/services/webapp.md b/pages/docs/platform/services/webapp.md
index 35cce41..18ee9a9 100644
--- a/pages/docs/platform/services/webapp.md
+++ b/pages/docs/platform/services/webapp.md
@@ -65,7 +65,10 @@ Run `leap deploy` to enable the option.
You can then generate invite codes by running the following rake task from the webapp directory:
- `sudo -u leap-webapp RAILS_ENV=production bundle exec rake generate_invites[x,y]`
+```
+cd /srv/leap/webapp/
+sudo -u leap-webapp RAILS_ENV=production bundle exec rake generate_invites[x,y]
+```
The *x* specifies the amount of codes to generate. The *y* parameter is optional: By default, all new invite codes can be used once and will then become invalid. If you provide another value for *y*, you can set a different amount of maximum uses for the codes you generate.
@@ -264,6 +267,12 @@ To target only particular environment, modify instead `common.ENV.json`, where E
See https://github.com/leapcode/leap_web/blob/develop/doc/DEVELOP.md for notes on getting started hacking on leap_web.
+Maintenance mode
+------------------
+
+You can put the webapp into maintainance mode by simply dropping a html file to `/srv/leap/webapp/public/system/maintainance.html`.
+
+
Known problems
---------------------------