Discussion:
How to open port with juju when no application is instlaled?
Akshat Jiwan Sharma
2017-11-23 17:54:50 UTC
Permalink
Hi,

I've used juju to deploy postgres on aws. On the same machine I've
installed an nginx server manually (i.e without juju) that listens on ports
80 and 443. I want both of these ports to be open but juju command
open-port only works when an application is exposed.



*open-portopen-port registers a port or range to open on the
public-interface. On public clouds the port will only be open while the
application is exposed.*

Now according to juju I only have one application (postgres) on my machine,
that I don't want exposed anyway. However I do want ports 80 and 443 to be
accessible publicly. Is adding a policy to aws manually my only option
here?


Thanks,

Akshat
John Meinel
2017-11-23 18:09:39 UTC
Permalink
I believe there is an nginx charm, which you could have installed with
"juju deploy nginx --to X" (where X is the machine id of the postgres
charm), and then used "juju expose nginx".
Is there a reason you prefer to install it manually?
One other option would be to co-locate the "ubuntu" charm and than use open
port from there, if you really don't want any other applications installed.
Generally we model ports-to-be-opened as part of an application, rather
than on a machine. So there's likely to be friction there without an
application to expose.

John
=:->
Post by Akshat Jiwan Sharma
Hi,
I've used juju to deploy postgres on aws. On the same machine I've
installed an nginx server manually (i.e without juju) that listens on ports
80 and 443. I want both of these ports to be open but juju command
open-port only works when an application is exposed.
*open-portopen-port registers a port or range to open on the
public-interface. On public clouds the port will only be open while the
application is exposed.*
Now according to juju I only have one application (postgres) on my
machine, that I don't want exposed anyway. However I do want ports 80 and
443 to be accessible publicly. Is adding a policy to aws manually my only
option here?
Thanks,
Akshat
--
Juju mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/
mailman/listinfo/juju
Akshat Jiwan Sharma
2017-11-23 18:21:42 UTC
Permalink
Post by John Meinel
Is there a reason you prefer to install it manually?
Well actually I'm installing openresty <https://openresty.org/en/> and
there is no charm available for it at the moment....

But thanks for your idea about installing some other charm that I can use,
expose it and then use the open port functionality.
That will work for me.

Best,
Akshat
Post by John Meinel
I believe there is an nginx charm, which you could have installed with
"juju deploy nginx --to X" (where X is the machine id of the postgres
charm), and then used "juju expose nginx".
Is there a reason you prefer to install it manually?
One other option would be to co-locate the "ubuntu" charm and than use
open port from there, if you really don't want any other applications
installed.
Generally we model ports-to-be-opened as part of an application, rather
than on a machine. So there's likely to be friction there without an
application to expose.
John
=:->
On Thu, Nov 23, 2017 at 9:54 PM, Akshat Jiwan Sharma <
Post by Akshat Jiwan Sharma
Hi,
I've used juju to deploy postgres on aws. On the same machine I've
installed an nginx server manually (i.e without juju) that listens on ports
80 and 443. I want both of these ports to be open but juju command
open-port only works when an application is exposed.
*open-portopen-port registers a port or range to open on the
public-interface. On public clouds the port will only be open while the
application is exposed.*
Now according to juju I only have one application (postgres) on my
machine, that I don't want exposed anyway. However I do want ports 80 and
443 to be accessible publicly. Is adding a policy to aws manually my only
option here?
Thanks,
Akshat
--
Juju mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
an/listinfo/juju
Tim Penhey
2017-11-23 19:02:55 UTC
Permalink
I think you might be able to use:

juju run postgresql/0 'open-port 80'

Tim
Post by Akshat Jiwan Sharma
Hi,
I've used juju to deploy postgres on aws. On the same machine I've
installed an nginx server manually (i.e without juju) that listens on
ports 80 and 443. I want both of these ports to be open but juju command
open-port only works when an application is exposed.  
/open-port
open-port registers a port or range to open on the public-interface. On
public clouds the port will only be open while the application is exposed./
Now according to juju I only have one application (postgres) on my
machine, that I don't want exposed anyway. However I do want ports 80
and 443 to be accessible  publicly. Is adding a policy to aws manually
my only option here?
Thanks,
Akshat
--
Juju mailing list
***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/ma
John Meinel
2017-11-24 04:08:31 UTC
Permalink
I had thought of that, but it only works if you then 'juju expose
postgresql' which would also expose the other ports of postgres

John
=:->
Post by Tim Penhey
juju run postgresql/0 'open-port 80'
Tim
Post by Akshat Jiwan Sharma
Hi,
I've used juju to deploy postgres on aws. On the same machine I've
installed an nginx server manually (i.e without juju) that listens on
ports 80 and 443. I want both of these ports to be open but juju command
open-port only works when an application is exposed.
/open-port
open-port registers a port or range to open on the public-interface. On
public clouds the port will only be open while the application is
exposed./
Post by Akshat Jiwan Sharma
Now according to juju I only have one application (postgres) on my
machine, that I don't want exposed anyway. However I do want ports 80
and 443 to be accessible publicly. Is adding a policy to aws manually
my only option here?
Thanks,
Akshat
--
Juju mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/
mailman/listinfo/juju
Loading...