garrensmith commented on issue #496: Couchdb 3287 pluggable storage engines URL: https://github.com/apache/couchdb/pull/496#issuecomment-299138654 Here are the steps to use this branch with a [couch_ngen](https://github.com/cloudant/couch_ngen) Most of this is obvious for someone experienced with Erlang development. But for someone like me who is not that familiar with erlang, I needed to complete all these steps. # Erlang dirty scheduler `couch_ngen` requires erlang with a dirty scheduler. So to install that on a mac: ``` brew install kerl KERL_CONFIGURE_OPTIONS=--enable-dirty-schedulers kerl build 19.3 19.3-dirty kerl install 19.3-dirty /Users/username/kerl/19.3-dirty . /Users/username/kerl/19.3-dirty/activate ``` # Setup dependancies In the CouchDB repo add these two lines to the `rebar.config.script` in the `DepDescs` section: ``` %% PSE {couch_ngen, {url, "https://github.com/cloudant/couch_ngen"}, "45c73d3d822e7cf42fbe60cd3e316f4ff12c2399"}, {nifile, {url, "https://github.com/cloudant/nifile"}, "d5f3b909846137f616cd5e754b810246802394e1"}, ``` Then run `rebar get-deps`. # Edit local.ini Edit `rel/overlay/etc/local.ini and add these settings in: ``` [couchdb] default_engine = couch_bt_engine [couchdb_engines] couch = couch_bt_engine ngen = couch_ngen ``` This sets up the list of supported engines and which is the default engine. If you change `default_engine=ngen` then that will be the default storage engine used. *Important to note*, don't add these settings to the bottom of the file if you are using `dev/run` it will break `dev/run`. Rather add it somewhere in the middle. # Build CouchDB `make clean && make` to build a new version # Run CouchDB `dev/run --with-haproxy -a tester:testerpass` # Create database with couch_ngen If `couch_ngen` isn't the default storage engine. To create a database using that engine: ``` curl -X PUT http://testuser:[email protected]:5984/testdbname?engine=ngen ``` Boom! You now have multiple storage engines running. ---------------------------------------------------------------- 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: [email protected]
With regards, Apache Git Services
