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

TypeError: Property 'createUser' of object test-production is not a function #43

Closed kilianc closed 10 years ago

kilianc commented 10 years ago

I just installed it and ran dokku mongodb:create node-js-sample test

jeffutter commented 10 years ago

hmm.. what is your host OS?

kilianc commented 10 years ago

ubuntu 14.04 and mongodb in the docket says 2.4.6 :S

jeffutter commented 10 years ago

Interesting. On a new install mongodb version should be 2.6 i think... also it should use addUser if it is a version older than 2.6 instead of createUser.

OH! wait, no just realized this is on a branch not yet merged into master. I'll try to get that merged soon and let you know

jeffutter commented 10 years ago

There I just merged it, would you mind upgrading the plugin and trying again?

kilianc commented 10 years ago

will do, but I guess I am more interested in why I am running 2.4x :(

jeffutter commented 10 years ago

Yeah.. you got me :-P it is running the jeffutter/mongodb image and that is up to date? (pull jeffutter/mongodb) that should contain mongodb 2.6

kilianc commented 10 years ago
/var/lib/dokku/plugins/mongodb# dokku plugin-install
/var/lib/dokku/plugins/mongodb/commands: line 12: get_mongodb_version: command not found
/var/lib/dokku/plugins/mongodb/commands: line 13: vercomp: command not found
jeffutter commented 10 years ago

Ok, I think i fixed that. Try again please.

Thanks for the testing help. I don't really have an environment setup at the moment to test this thoroughly.

kilianc commented 10 years ago

I can use one of these https://github.com/jeffutter.keys and give you access it's a test machine

jeffutter commented 10 years ago

That could be helpful. The top key is good.

kilianc commented 10 years ago

ok give it a try -deleted-.compute-1.amazonaws.com

kilianc commented 10 years ago

btw

#docker run --rm jeffutter/mongodb mongod --version db version v2.6.1

jeffutter commented 10 years ago

ok that is what I would expect.

I'm checking things out on the ec2 instance now.

jeffutter commented 10 years ago

Username root?

Maybe the order isn't consistent. Its the one ending in 30zQ==

kilianc commented 10 years ago

ubuntu :D

jeffutter commented 10 years ago

seems to be working for me

# dokku mongodb:create node-js-sample test
Successfully added user: { "user" : "node-js-sample", "roles" : [ "dbOwner" ] }
kilianc commented 10 years ago

for me too now, what did you do, touched anything?

jeffutter commented 10 years ago

... didn't touch anything.. just ran plugins-install (I don't think that did anything) and then it worked. Perhaps it was the last git push.

kilianc commented 10 years ago

DUDE I ran "plugin-install" :(

jeffutter commented 10 years ago

Haha, not sure. There could still be something wonky going on. Let me know if you run into any problems again. And thanks for letting me use your host to debug.

kilianc commented 10 years ago

@jeffutter I meant that I missed the S in dokku plugins-install:(

littleStudent commented 9 years ago

In my case the problem was that the mongo shell i had on my host machine was version 2.4. The mongodb in the docker container was 2.6.

updating my local mongo shell to 2.6 fixed the problem

jeffutter commented 9 years ago

@littleStudent Good to know. I have a fix planned that will avoid that issue all together, just need time to code it.