You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "Rian R. Maloney" <ri...@yahoo.com> on 2014/03/27 18:09:20 UTC

Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Is there a simple way to run multiple concurrent instances of CouchDB on a single MAC computer or is it not recommended to do this. I am trying to test multiple client types on an application w/o requiring multiple PCs. 

Thank You
Rian

Re: Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Posted by Ryan Ramage <ry...@gmail.com>.
There is also this:

https://github.com/hoodiehq/node-multicouch

Used in hoodie. Not used personally, but probably would find lots of
helpful people around here to help you use it.


On Thu, Mar 27, 2014 at 12:02 PM, Dale Harvey <da...@arandomurl.com> wrote:

> I had a little script to configure isolated instances, you should be able
> to point 'couchdb' to the couchdb commands inside the .app at a guess
>
>
> https://github.com/crodjer/pouchdb/blob/36eb513b580d5d1870bde81cfeae6ae51d4611a3/scripts/start_standalone_couch.sh
>
>
> On 27 March 2014 12:56, Rian R. Maloney <ri...@yahoo.com> wrote:
>
> > Thanks M.C. for the suggestion. It looks like more than I need at this
> > point. A "3 minute startup" indicates far more complexity than running a
> > few more CouchDB processes. I was hoping for something along the lines of
> > copying "Apache CouchDB.app" and creating several ../Application
> > Support/CouchDB folders and updating the various  "Apache CouchDB.app"
> > packages to point to these new folders?
> >
> > Rian
> >
> >
> >
> > On Thursday, March 27, 2014 12:11 PM, M.C. Wilson <ni...@gmail.com>
> > wrote:
> >
> > Well, if you've got a beefy enough machine I suppose you could use
> Vagrant
> > to spin up a few CouchDB VMs. I haven't used it, but there appears to be
> a
> > Couch box for Vagrant over here:
> > https://github.com/concord-consortium/couchdb-vagrant
> >
> >
> > On Mar 27, 2014, at 10:09 AM, Rian R. Maloney <ri...@yahoo.com>
> > wrote:
> >
> > > Is there a simple way to run multiple concurrent instances of CouchDB
> on
> > a single MAC computer or is it not recommended to do this. I am trying to
> > test multiple client types on an application w/o requiring multiple PCs.
> > >
> > > Thank You
> > > Rian
> >
>

Re: Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Posted by Dale Harvey <da...@arandomurl.com>.
I had a little script to configure isolated instances, you should be able
to point 'couchdb' to the couchdb commands inside the .app at a guess

https://github.com/crodjer/pouchdb/blob/36eb513b580d5d1870bde81cfeae6ae51d4611a3/scripts/start_standalone_couch.sh


On 27 March 2014 12:56, Rian R. Maloney <ri...@yahoo.com> wrote:

> Thanks M.C. for the suggestion. It looks like more than I need at this
> point. A "3 minute startup" indicates far more complexity than running a
> few more CouchDB processes. I was hoping for something along the lines of
> copying "Apache CouchDB.app" and creating several ../Application
> Support/CouchDB folders and updating the various  "Apache CouchDB.app"
> packages to point to these new folders?
>
> Rian
>
>
>
> On Thursday, March 27, 2014 12:11 PM, M.C. Wilson <ni...@gmail.com>
> wrote:
>
> Well, if you've got a beefy enough machine I suppose you could use Vagrant
> to spin up a few CouchDB VMs. I haven't used it, but there appears to be a
> Couch box for Vagrant over here:
> https://github.com/concord-consortium/couchdb-vagrant
>
>
> On Mar 27, 2014, at 10:09 AM, Rian R. Maloney <ri...@yahoo.com>
> wrote:
>
> > Is there a simple way to run multiple concurrent instances of CouchDB on
> a single MAC computer or is it not recommended to do this. I am trying to
> test multiple client types on an application w/o requiring multiple PCs.
> >
> > Thank You
> > Rian
>

Re: Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Posted by "Rian R. Maloney" <ri...@yahoo.com>.
Thanks M.C. for the suggestion. It looks like more than I need at this point. A "3 minute startup" indicates far more complexity than running a few more CouchDB processes. I was hoping for something along the lines of copying "Apache CouchDB.app" and creating several ../Application Support/CouchDB folders and updating the various  "Apache CouchDB.app" packages to point to these new folders?

Rian



On Thursday, March 27, 2014 12:11 PM, M.C. Wilson <ni...@gmail.com> wrote:
 
Well, if you've got a beefy enough machine I suppose you could use Vagrant to spin up a few CouchDB VMs. I haven't used it, but there appears to be a Couch box for Vagrant over here:
https://github.com/concord-consortium/couchdb-vagrant


On Mar 27, 2014, at 10:09 AM, Rian R. Maloney <ri...@yahoo.com> wrote:

> Is there a simple way to run multiple concurrent instances of CouchDB on a single MAC computer or is it not recommended to do this. I am trying to test multiple client types on an application w/o requiring multiple PCs. 
> 
> Thank You
> Rian

Re: Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Posted by Alexander Shorin <kx...@gmail.com>.
The more lightweight solution would be to use Docker. It already
supports OSX. Just don't forget to update config file and set
different listen port for each instance.
--
,,,^..^,,,


On Thu, Mar 27, 2014 at 9:11 PM, M.C. Wilson <ni...@gmail.com> wrote:
> Well, if you've got a beefy enough machine I suppose you could use Vagrant to spin up a few CouchDB VMs. I haven't used it, but there appears to be a Couch box for Vagrant over here:
> https://github.com/concord-consortium/couchdb-vagrant
>
> On Mar 27, 2014, at 10:09 AM, Rian R. Maloney <ri...@yahoo.com> wrote:
>
>> Is there a simple way to run multiple concurrent instances of CouchDB on a single MAC computer or is it not recommended to do this. I am trying to test multiple client types on an application w/o requiring multiple PCs.
>>
>> Thank You
>> Rian
>

Re: Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Posted by "M.C. Wilson" <ni...@gmail.com>.
Well, if you've got a beefy enough machine I suppose you could use Vagrant to spin up a few CouchDB VMs. I haven't used it, but there appears to be a Couch box for Vagrant over here:
https://github.com/concord-consortium/couchdb-vagrant

On Mar 27, 2014, at 10:09 AM, Rian R. Maloney <ri...@yahoo.com> wrote:

> Is there a simple way to run multiple concurrent instances of CouchDB on a single MAC computer or is it not recommended to do this. I am trying to test multiple client types on an application w/o requiring multiple PCs. 
> 
> Thank You
> Rian


Re: Multiple Concurrent Instances of CouchDB on Mac OS X 10.7.5

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 27 March 2014 18:09, Rian R. Maloney <ri...@yahoo.com> wrote:
> Is there a simple way to run multiple concurrent instances of CouchDB on a single MAC computer or is it not recommended to do this. I am trying to test multiple client types on an application w/o requiring multiple PCs.
>
> Thank You
> Rian

All the proposed options are good ones, here's mine:

$ brew install couchdb (or your preferred macbrew/couchdb.app poison)
$ mkdir -p ./lounge/{1,2,3}/{db,view}
$ cd lounge

``` lounge.ini
; per instance settings
[couchdb]
; ensure existing local.ini doesn't get in the way
uuid           =
database_dir   = ./lounge/@/db
view_index_dir = ./lounge/@/view
uri_file       = ./lounge/@/couch.uri

[log]
file = ./lounge/@/couch.log

[httpd]
port = 598@
```

then:

copy lounge.ini into 1,2,3 and replace the @ with the appropriate digit.

.lounge
├── 1/
│   ├── lounge.ini
│   ├── couch.log
│   ├── couch.uri
│   ├── db/
│   └── view/
├── 2/
│   ├── lounge.ini
│   ├── couch.log
│   ├── couch.uri
│   ├── db/
│   └── view/
├── 3/
│   ├── lounge.ini
│   ├── couch.log
│   ├── couch.uri
│   ├── db/
│   └── view/
│
└── lounge.ini

couch.log, couch.uri, couch.pid won't exist until runtime.

use the -c switch to see what config files will be loaded:

$ couchdb -a 1/lounge.ini -c
/usr/local/etc/couchdb/default.ini
/usr/local/etc/couchdb/local.ini
1/lounge.ini

note that you can't get *rid* of default.ini and local.ini from the
normal install. You need to make sure all parameters are overridden in
your lounge.ini files. My sample lounge.ini should have got most of
them. All writes (updates) go into the last file, so this means that
an existing couch install will inherit things like admins from the
defaults if you are not careful.

And run them:

couchdb -i -a 1/lounge.ini -p 1/couch.pid
couchdb -i -a 2/lounge.ini -p 2/couch.pid
couchdb -i -a 3/lounge.ini -p 3/couch.pid
…

You can of course use other options of couchdb here, but this is
sufficient. And I like to see the URLs whizz by in separate terminal
windows.

BTW I didn't do fancy testing, but this looks about right to me.

A+
Dave