-
-
Save reedobrien/7190dc91669be226e86300e365537910 to your computer and use it in GitHub Desktop.
Connect to Juju Mongodb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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> db.machines.update({'_id': "32"}, {$set:{'addresses.0.value':'172.24.0.58'}}) | |
juju:PRIMARY> db.machines.update({'_id': "32"}, {$set:{'addresses.1.value':'192.168.128.58'}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment