0

I am using the mongodb cookbook from edelight/chef-mongodb repo to install multiple instance of mongodb on the same node (OS System: Ubuntu 12.04), but when I follow the file instructions to obtain this goal I can't derive the result expected.

My recipes have only this lines:


include_recipe 'mongodb::10gen_repo'
include_recipe 'mongodb::default'

mongodb_instance "mongodb" do
  port 27017
end

mongodb_instance "my_instance" do
  port 27333
  dbpath "/data/"
end

And the result was one instance of mongodb that is listening by port 27017 and this process configuration is loading from /etc/mongodb.conf. However I need two process, one that is listening from 27017 port and second from 27333.

Does anyone know how this mongodb cookbook can create multiple instances on the same node? or ...is this behavior a new bug to publish as a new Issue on edelight/chef-mongodb repo?

Mark
  • 3,609
  • 1
  • 22
  • 33
enrique-carbonell
  • 5,836
  • 3
  • 30
  • 44
  • You can't. You should create your own wrapper for the community cookbook. The easiest way is just create two symlinks for community cookbook and pass to each one different port values. – Rostyslav Mar 23 '14 at 16:33
  • This situation was declared as bug issue of the edelight/chef-mongodb repository (https://github.com/edelight/chef-mongodb/issues/270) – enrique-carbonell Apr 09 '14 at 00:46
  • @RostyslavFridman Can you tell me, how to do that with symlinks / wrapper? I want to use different config files for each mongodb instance. – Dheeraj Kumar Aggarwal Aug 25 '14 at 06:42

0 Answers0