jeffutter / dokku-mongodb-plugin

Plugin to setup Mongodb accounts for containers deployed to Dokku
GNU General Public License v2.0
154 stars 52 forks source link

Fix install with correct mongo client #69

Closed ebeigarts closed 9 years ago

ebeigarts commented 9 years ago

The error that I am receiving when running dokku plugins-install with set -x is:

+ echo MongoDB shell version: 2.4.9 connecting to: 127.0.0.1:49159/admin Thu Mar 19 11:25:34.904 TypeError: Property ''\''createUser'\''' of object admin is not a function

The install script was installing the wrong client (2.4.9):

$ apt-cache policy mongodb-clients
mongodb-clients:
  Installed: 1:2.4.9-1ubuntu2
  Candidate: 1:2.4.9-1ubuntu2
  Version table:
 *** 1:2.4.9-1ubuntu2 0
        500 http://mirrors.digitalocean.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

The correct way is to use 10gen package mongodb-org-shell:

$ apt-get install mongodb-org-shell
The following packages will be REMOVED:
  mongodb-clients
The following NEW packages will be installed:
  mongodb-org-shell

This fixes #47.

jeffutter commented 9 years ago

OK. I think I am on-board with this. @dj-hedgehog Can you try this branch out since the switch to mongodb-clients was in your pull request?

ebeigarts commented 9 years ago

I think @dj-hedgehog switched to mongodb-clients because mongodump/restore was in mongodb-org-tools and not in mongodb-org-shell.

crunchtime-ali commented 9 years ago

Yup, I did that in the first place too. I'm fine with using mongodb-org-tools.

jeffutter commented 9 years ago

Looks good. I'll merge it. Thanks for your work.