iriscouch / build-couchdb

Batteries-included CouchDB build system
227 stars 36 forks source link

Clarification needed: what to do to move locations #9

Closed Stwissel closed 12 years ago

Stwissel commented 13 years ago

First of all: Thx very much! Worked like a charm on Ubuntu 11.04. Love it!

1 question (is this the right place to ask?):

If I want to move the resulting couchdb instance (executables and database) I need to adjust the couchdb shell script and the default.ini and local.ini right?

Missing anything?

Background of my question: I'm toying with wrapping CouchDB into an OSGi plug-in, so it can be easily installed into OSGi containers (TomEE, Websphere, Domino, Notes etc.) It is about 100 times easier to get an admin to deploy an OSGI plug-in than to do a "classic" install

jhs commented 13 years ago

You're welcome! One minor quibble: software often does not work; but really, charms never do.

If your build process is reliable and reproducible (I often clean everything out and rebuild from scratch--it takes longer but it is pretty dependable), then you can simply rebuild with a different install location.

You can actually move the entire installation reasonably reliably. The only code software I know of which does this is the Couchbase Single Server post-install script. I do not think it is open source; however it is publicly-distributed and you can see what it does. Basically that script (which I originally wrote) has a list of all files you need to search-and-replace to get the paths working.

Stwissel commented 13 years ago

Thx. I'll have a look. What I actually have in mind: When the OSGi starts up it checks "where am I", do I have a base location set (if not use the "where am I"), load all the scripts/ini from inside the JAR which have {{moustache}} place holders, write them out where the CouchDB stuff is and then launch CouchDB. This way the install survives moving of nodes and data (Something not uncommon in JEE land). And it allows configuration without editing files manually (important when deploying into desktop environments). I'll have a look. Now I need to find a windows guy :-)

jhs commented 12 years ago

Yes, all of that definitely works. Let me know if you have any issues or other questions.