This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git


The following commit(s) were added to refs/heads/master by this push:
     new d69eacc  proper configuration of couchdb as a single node cluster 
(#318)
d69eacc is described below

commit d69eacc26d14e41975dba0a5d22807988f0af1c8
Author: David Grove <dgrove-...@users.noreply.github.com>
AuthorDate: Sat Oct 20 18:01:39 2018 -0400

    proper configuration of couchdb as a single node cluster (#318)
---
 helm/openwhisk/configMapFiles/initCouchDB/initdb.sh | 13 ++++---------
 helm/openwhisk/values.yaml                          |  2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh 
b/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh
index 76157f8..694b6a4 100755
--- a/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh
+++ b/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh
@@ -27,19 +27,14 @@ until $( curl --output /dev/null --silent 
$DB_PROTOCOL://$DB_HOST:$DB_PORT/_util
     sleep 2
 done
 
+# Enable single node mode (this also creates the system databases)
+echo "Enabling single node cluster"
+curl --silent -X POST -H "Content-Type: application/json" 
$DB_PROTOCOL://$COUCHDB_USER:$COUCHDB_PASSWORD@$DB_HOST:$DB_PORT/_cluster_setup 
-d '{"action": "enable_single_node"}'
+
 # disable reduce limits on views
 echo "Disabling reduce limits on views"
 curl --silent -X PUT 
$DB_PROTOCOL://$COUCHDB_USER:$COUCHDB_PASSWORD@$DB_HOST:$DB_PORT/_node/couchdb@$NODENAME/_config/query_server_config/reduce_limit
 -d '"false"'
 
-# create the couchdb system databases
-echo "Creating _global_changes database"
-curl --silent -X PUT 
$DB_PROTOCOL://$COUCHDB_USER:$COUCHDB_PASSWORD@$DB_HOST:$DB_PORT/_global_changes
-echo "Creating _metadata database"
-curl --silent -X PUT 
$DB_PROTOCOL://$COUCHDB_USER:$COUCHDB_PASSWORD@$DB_HOST:$DB_PORT/_metadata
-echo "Creating _replicator database"
-curl --silent -X PUT 
$DB_PROTOCOL://$COUCHDB_USER:$COUCHDB_PASSWORD@$DB_HOST:$DB_PORT/_replicator
-echo "Creating _users database"
-curl --silent -X PUT 
$DB_PROTOCOL://$COUCHDB_USER:$COUCHDB_PASSWORD@$DB_HOST:$DB_PORT/_users
 
 # initialize the DB tables for OpenWhisk
 pushd /openwhisk/ansible
diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml
index fe2bfbf..7b2b575 100644
--- a/helm/openwhisk/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -104,7 +104,7 @@ db:
   wipeAndInit: true
   name: "couchdb"
   image: "apache/couchdb:2.1"
-  # NOTE: setting replicaCount > 1 will not work.
+  # NOTE: must be 1 (because initdb.sh enables single node mode)
   replicaCount: 1
   imagePullPolicy: "IfNotPresent"
   restartPolicy: "Always"

Reply via email to