Comments (9)
Just a quick note that I've been working on this and got all the tests in DataStoreTests.scala
to pass in my branch psuter/openwhisk@d75f187. The plan is now to unify the Cloudant/CouchDB classes to avoid the duplication I introduced, and to improve the setup scripts.
from openwhisk.
Also, one point we should discuss is whether we want to make a CouchDB container an (optional) part of the deployment, or whether we "just" want to support connections to databases that users set up themselves.
from openwhisk.
@psuter can you pls document all changes you had to make for supporting couchdb?
to your 2nd point....how much effort would that be? i guess no code changes?
from openwhisk.
just looked at the branch, seems like there were no real changes needed?
from openwhisk.
@psuter is head of my changes, I am working off his fork.
from openwhisk.
Here are two patches required to get the CLI tests to pass on the couchdb-in-a-box branch.
diff --git a/common/scala/src/whisk/core/entity/WhiskStore.scala b/common/scala/src/whisk/core/entity/WhiskStore.scala
index 661c7ba..eebc1bb 100644
--- a/common/scala/src/whisk/core/entity/WhiskStore.scala
+++ b/common/scala/src/whisk/core/entity/WhiskStore.scala
@@ -80,7 +80,7 @@ protected[core] object Util {
if(config.dbProvider == "Cloudant") {
new CloudantStore[RawDocument, DocumentAbstraction](config.dbUsername, config.dbPassword, name(config))
} else {
- new CouchDbStore[RawDocument, DocumentAbstraction](config.dbHost, config.dbPort.toInt, config.dbUsername, config.dbPassword, config.dbAuths)
+ new CouchDbStore[RawDocument, DocumentAbstraction](config.dbHost, config.dbPort.toInt, config.dbUsername, config.dbPassword, name(config))
}
}
}
diff --git a/tools/db/couchdb/createAdmin.sh b/tools/db/couchdb/createAdmin.sh
index e6c7917..fe64386 100755
--- a/tools/db/couchdb/createAdmin.sh
+++ b/tools/db/couchdb/createAdmin.sh
@@ -45,3 +45,6 @@ CURL="curl -k"
# - an output of "" is a good sign.
# - an output of {"error": ...} is not a good sign.
${CURL} -X PUT https://${COUCHDB_HOST}:${COUCHDB_PORT}/_config/admins/${COUCHDB_USER} -d "\"${COUCHDB_PASS}\""
+
+# Disable reduce limit on views
+${CURL} -X PUT https://${COUCHDB_HOST}:${COUCHDB_PORT}/_config/query_server_config/reduce_limit -d '"false"' -u ${COUCHDB_USER}:${COUCHDB_PASS}
The reduce_limit is set false to suppress couch's heuristic for map/reduce on views (which detect if a view is not reducing to a scalar). As this scripts will require further refactoring to restructure the build and deployment, I'm providing a patch for @psuter to merge as part of the ongoing work.
from openwhisk.
The branch at psuter/openwhisk@5226d62 passes all tests using either Cloudant or a generic CouchDB installation as the database backend. The database code is shared to the extent possible, considering the Java APIs for Cloudant and CouchDB are type-incompatible.
We still need to make a pass on all comments and documentation elements that are Cloudant-specific. We also need to consider how the refactoring (in particular of environment variables in shell scripts) affects our various builds.
from openwhisk.
The code has made it to master, and Travis continuous integration testing is now done on the full test suite, using CouchDB as store. Keeping this issue open to remind me to document the setup for interested CouchDB users.
from openwhisk.
Docs checked in -- closing as fixed
from openwhisk.
Related Issues (20)
- waht' is the rule of autoscaler HOT 1
- Error while trying to run `ansible-playbook -i environments/$ENVIRONMENT routemgmt.yml` HOT 2
- use Apache Pekko instead of Akka HOT 2
- Missed config keys on Scala 2.13.x
- Invocation-level fault tolerance guarantees HOT 6
- GPU support for OpenWhisk Actions HOT 1
- OpenWhisk Releases HOT 3
- AkkaContainerClient breaks the ConcurrentTests of nodejs runtime HOT 2
- Deployment Components HOT 5
- The openwhisk is incompatible with java version higher than 16
- Web function 400 Bad Request HOT 1
- Package-installer-pod not-completed on Minikube
- The connection failed, or timed out. (HTTP status code 500) and There was an internal server error.
- How to correctly modify OpenWhisk’s gateway blocking limit from source code (currently 60s) HOT 13
- Ubuntu 22.04 Serve Install issue HOT 1
- Local ansible deployment API gateway error 502
- Setting the number of containers created per action
- Standalone Openwhisk error: Key not found 'etcd' HOT 11
- deploy failed when run ansible-playbook using openwhisk.yml HOT 8
- Question: How to create an action using a custom Ubuntu docker image HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openwhisk.