<div dir="ltr">Thanks Andrew. Just one more question how does the open-port command behave with respect to the  firewalls with cloud providers. Specifically I'm asking in context of google cloud platform which by default only allows port 80 and 443(IIRC). So after running this command will I have to adjust firewall rules there as well? <div><br></div><div>Thanks,</div><div>Akshat</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 23, 2017 at 7:28 AM, 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 Mon, Oct 23, 2017 at 4:20 AM Akshat Jiwan Sharma <<a href="mailto:akshatjiwan@gmail.com" target="_blank">akshatjiwan@gmail.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">HI,<div><br></div><div>I'm trying to manually expose a port on a juju machine. According to <a href="https://askubuntu.com/questions/808176/how-to-manually-open-a-port-in-juju" target="_blank">this answer</a> I should be able to do something like this:- </div><div><br></div><div> juju run  "open-port 443" --all <br></div><div><br></div><div>However when I type this in my shell it throws an error </div><div><br></div><div>open-port: command not found</div></div></blockquote><div><br></div></span><div>The different between the command you're running, and the one on AskUbuntu, is that you're not passing --unit. When you pass --unit, it runs the command in the context of a unit on the machine. You must be running in the context of a unit to use "hook tools", such as open-port.</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I can verify that the application on this particular controller is already exposed and it thus satisfies the requirement for running this command. </div><div><br></div><div>>"The port range will only be open while the application is exposed."</div><div><br></div><div>Can you help me understand what I'm doing wrong? </div></div></blockquote><div><br></div></span><div>Ports are managed on a per-unit basis, so you need to execute the "run" command against a unit or application, using --unit or --application respectively.</div><div><br></div><div>Once you've run open-port, you'll need to run "juju expose <application>" for the ports to actually be opened up.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks,</div><div>Akshat</div></div><span class="HOEnZb"><font color="#888888">
--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com" target="_blank">Juju@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/juju</a><br>
</font></span></blockquote></div></div>
</blockquote></div><br></div>