You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/10/20 22:01:40 UTC

[GitHub] rabbah closed pull request #318: proper configuration of couchdb as a single node cluster

rabbah closed pull request #318: proper configuration of couchdb as a single node cluster
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/318
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services