diff options
-rw-r--r-- | CHANGES.md | 23 | ||||
-rw-r--r-- | provider_base/services/_couchdb_multimaster.json | 2 | ||||
-rw-r--r-- | provider_base/services/_couchdb_plain.json | 8 | ||||
-rw-r--r-- | provider_base/services/couchdb.json | 2 | ||||
-rw-r--r-- | provider_base/services/couchdb.rb | 32 | ||||
-rw-r--r-- | puppet/modules/site_couchdb/manifests/init.pp | 9 |
6 files changed, 26 insertions, 50 deletions
@@ -1,19 +1,22 @@ Platform 0.8 -------------------------------------- -This release focused on the email service. Additionally, almost all the code -for leap_cli has been moved to leap_platform. +This release focused on the email service. Debian Jessie is now required, +which also means that you must migrate all data from BigCouch to CouchDB. + +UPGRADING: It is tricky to upgrade the OS and migrate the database. You can +follow the tutorial here: https://leap.se/en/upgrade-0-8 + +WARNING: failure to migrate data from BigCouch to CouchDB will cause all user +accounts to get destroyed. + +Other new features: * It is possible to require invite codes for new users signing up. * Tapicero has been removed. Now user storage databases are created as needed by soledad, and deleted eventually when no longer needed. -* Bigcouch is now officially deprecated. New nodes created with `leap node add - services:couchdb` will default to using plain CouchDB. - It is highly recommended that you run a single couchdb node. - - * Admins can now suspect/enable users and block/enable their ability to send and receive email. @@ -23,6 +26,7 @@ Compatibility: * Now, soledad and couchdb must be on the same node. * Requires Debian Jessie. Wheezy is no longer supported. +* Requires CouchDB, BigCouch is no longer supported. * Requires leap_cli version 1.8 * Requires bitmask client version >= 0.9 * Includes: @@ -33,11 +37,6 @@ Compatibility: Commits: https://leap.se/git/leap_platform.git/shortlog/refs/tags/0.8 Issues fixed: https://leap.se/code/versions/189 -Upgrading: - -* To migrate data to use plain couchdb, see - https://leap.se/en/docs/platform/services/couchdb#use-plain-couchdb-instead-of-bigcouch - This is still optional, but is a good idea. Platform 0.7.1 -------------------------------------- diff --git a/provider_base/services/_couchdb_multimaster.json b/provider_base/services/_couchdb_multimaster.json index 0f340e00..803a9416 100644 --- a/provider_base/services/_couchdb_multimaster.json +++ b/provider_base/services/_couchdb_multimaster.json @@ -1,6 +1,6 @@ // // Only applied to master couchdb nodes when there are multiple masters -// +// NOT CURRENTLY USED. { "stunnel": { "servers": { diff --git a/provider_base/services/_couchdb_plain.json b/provider_base/services/_couchdb_plain.json deleted file mode 100644 index 04380042..00000000 --- a/provider_base/services/_couchdb_plain.json +++ /dev/null @@ -1,8 +0,0 @@ -// -// Applied to couchdb node when there is a single plain couchdb -// -{ - "couch": { - "mode": "plain" - } -}
\ No newline at end of file diff --git a/provider_base/services/couchdb.json b/provider_base/services/couchdb.json index 167bbf7d..30cb53d1 100644 --- a/provider_base/services/couchdb.json +++ b/provider_base/services/couchdb.json @@ -9,7 +9,7 @@ }, "couch": { "port": 5984, - "mode": "multimaster", + "mode": "plain", "users": { "admin": { "username": "admin", diff --git a/provider_base/services/couchdb.rb b/provider_base/services/couchdb.rb index 8271b9c5..dcf7df59 100644 --- a/provider_base/services/couchdb.rb +++ b/provider_base/services/couchdb.rb @@ -2,37 +2,19 @@ # custom logic for couchdb json resolution # ============================================ # -# bigcouch is no longer maintained, so now the default behavior is -# to always use plain couchdb, unless there are more than one couchdb -# node or if "couch.mode" property is set to "multimaster". -# -# in the past, it used to work like this: -# -# * if couch.master was set to true on one node, then do plain couchdb. -# * if couch.master was not set anywhere, then do bigcouch. -# * if couch.master was set on more than one node, then do bigcouch. -# -# Some of this legacy logic is still supported so that upgrading does -# not unexpectedly turn bigcouch nodes into plain couchdb nodes. +# bigcouch is no longer maintained, so now couchdb is required... +# no matter what! # if self.couch['master'] - LeapCli::log :warning, "The node property 'couch.master' is deprecated.\n" + - " In the future, you must set 'couch.mode' to either 'plain' or 'multimaster'.\n" + - " (node '#{self.name}')" + LeapCli::log :warning, %("The node property {couch.master:true} is deprecated.\n) + + %( Only {couch.mode:plain} is supported. (node #{self.name})) end couchdb_nodes = nodes_like_me['services' => 'couchdb'] if couchdb_nodes.size > 1 - apply_partial 'services/_couchdb_multimaster.json' + LeapCli::log :error, "Having multiple nodes with {services:couchdb} is no longer supported (nodes #{couchdb_nodes.keys.join(', ')})." elsif self.couch.mode == "multimaster" - if self.couch['master'] - # The old deprecated way of specifying plain couch is still being used - apply_partial 'services/_couchdb_plain.json' - else - apply_partial 'services/_couchdb_multimaster.json' - end -else - apply_partial 'services/_couchdb_plain.json' -end + LeapCli::log :error, "Nodes with {couch.mode:multimaster} are no longer supported (node #{self.name})." +end
\ No newline at end of file diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp index b3d9fdf0..c4fe6277 100644 --- a/puppet/modules/site_couchdb/manifests/init.pp +++ b/puppet/modules/site_couchdb/manifests/init.pp @@ -39,10 +39,13 @@ class site_couchdb { $couchdb_backup = $couchdb_config['backup'] $couchdb_mode = $couchdb_config['mode'] - if $couchdb_mode == 'multimaster' { include site_couchdb::bigcouch } - if $couchdb_mode =~ /^(plain|master)$/ { include site_couchdb::plain } + # ensure bigcouch has been purged from the system: + # TODO: remove this check in 0.9 release + if file('/opt/bigcouch/bin/bigcouch', '/dev/null') != '' { + fail 'ERROR: BigCouch appears to be installed. Make sure you have migrated to CouchDB before proceeding. See https://leap.se/upgrade-0-8' + } - # if $couchdb_mode == 'mirror' { include site_couchdb::mirror } + include site_couchdb::plain Class['site_config::default'] -> Service['shorewall'] |