Skip to content

Instantly share code, notes, and snippets.

Created January 20, 2015 19:28
Show Gist options
  • Save anonymous/39c467c22ee3c4523d94 to your computer and use it in GitHub Desktop.
Save anonymous/39c467c22ee3c4523d94 to your computer and use it in GitHub Desktop.
Jump into a mongodb session ( juju )
$ juju ssh 0
machine-0# sudo apt-get install mongodb-clients
machine-0# mongo --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin
MongoDB shell version: 2.4.9
connecting to: localhost:37017/admin
juju:PRIMARY> db = db.getSiblingDB("juju")
juju
juju:PRIMARY> show collections
constraints
containerRefs
environments
instanceData
machines
networkinterfaces
networks
relations
requestednetworks
sequence
settings
stateServers
statuses
system.indexes
system.users
txns
txns.log
txns.stash
units
users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment