-
-
Save freyes/0828055f1eef3b423a36999d451b8411 to your computer and use it in GitHub Desktop.
Connect to Juju 2.0 Mongodb
This file contains 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
# valid for juju 2.0 | |
# see https://bugs.launchpad.net/ubuntu/+source/juju-mongodb3.2/+bug/1583740 | |
$ juju ssh -m controller 0 | |
# when running a Xenial controller | |
/usr/lib/juju/mongo3.2/bin/mongo --sslAllowInvalidCertificates --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin | |
# when running a Bionic controller | |
mongo --sslAllowInvalidCertificates --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin | |
mongo --sslAllowInvalidCertificates --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') --eval 'db = db.getSiblingDB("juju"); db.system.profile.find().sort( { millis : -1 } ).pretty();' localhost:37017/admin | tee system.profile.log | |
# | |
# When using juju-db from a snap (e.g. Focal controller). | |
# | |
juju-db.mongo --sslAllowInvalidCertificates --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment