<div dir="ltr">Nice. I'd suggest 2 things:<div><ul><li>Change the mongo command line to include `--authenticationDatabase admin` and then change the database being connected to in the URL to "juju" instead of "admin". That way you get dropped straight into the juju database which is usually what you want.</li><li>Quote $PASSWORD, just in case.</li></ul><div>I have a similar thing which works for controllers on any cloud type but it's pretty awful. FWIW here it is: <a href="http://paste.ubuntu.com/21232100/">http://paste.ubuntu.com/21232100/</a></div></div><div><br></div><div>It currently only works for xenial machines and adds a PPA to get a MongoDB 3.2 client onto the host. The 2.6 client which ships with Xenial can't connect to a MongoDB 3.2 instance (I think something was being sorted out for this). It wouldn't be hard to have it install install mongodb-clients for non-xenial machines.</div><div><br></div><div>- Menno</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 July 2016 at 14:46, Andrew Wilkins <span dir="ltr"><<a href="mailto:andrew.wilkins@canonical.com" target="_blank">andrew.wilkins@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span class=""><div dir="ltr">On Thu, Jul 28, 2016 at 12:32 AM John Meinel <<a href="mailto:john@arbash-meinel.com" target="_blank">john@arbash-meinel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Did you intend to attach the script to the email? It does sound like something useful. I know when we were investigating at some client sites we had a small snippet of a bash function to dig the content out of agent.conf and launch mongo with the right options. It would be nice to have that in a more official place so it doesn't get forgotten.</div></blockquote><div><br></div></span><div>Kapil wrote a plugin for inspecting Mongo: <a href="https://github.com/kapilt/juju-dbinspect" target="_blank">https://github.com/kapilt/juju-dbinspect</a>. It's almost certainly broken in Juju 2.0. I've found it handy in the past, it'd be good to have that brought up to date.</div><div><br></div><div>Cheers,</div><div>Andrew</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>John</div><div>=:-></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 6:19 PM, Katherine Cox-Buday <span dir="ltr"><<a href="mailto:katherine.cox-buday@canonical.com" target="_blank">katherine.cox-buday@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I frequently need to connect to Juju's Mongo instance to poke around and see if something I've done is having the desired effect. Back when we were using LXC, I had a script that would pull the password from agent.conf and open a shell. When we switched to LXD my script broke, and I never updated it. I finally got frustrated enough to modify[1] it, and thought others might find this useful for poking around Mongo.<br>
<br>
Let me know if you have any suggestions.<br>
<span><font color="#888888"><br>
--<br>
Katherine<br>
<br>
[1] - <a href="http://pastebin.ubuntu.com/21155985/" rel="noreferrer" target="_blank">http://pastebin.ubuntu.com/21155985/</a><br>
<br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</font></span></blockquote></div><br></div>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</blockquote></span></div></div>
<br>--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></blockquote></div><br></div>