[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: generic way to find internal IP address of application



Maybe you could use bash's compgen:

$ compgen -X '!*_IP' -e OPENSHIFT_

Mateus Caruccio
Master of Puppets
+55 (51) 8298.0026
gtalk: mateus caruccio getupcloud com
twitter: @MateusCaruccio

This message and any attachment are solely for the intended
recipient and may contain confidential or privileged information
and it can not be forwarded or shared without permission.
Thank you!


2014-03-27 10:01 GMT-03:00 jeff mccormick <jeffmc04 gmail com>:
thanks, for the replies, the add-on cartridges I'm writing need to know the web framework's internal IP address....so if
my add-on cartridge needs to run on jbossews and php, in my scripting I have to have a set of if-then-elseif statements
that essentially test various environment variables like (OPENSHIFT_PHP_IP, OPENSHIFT_JBOSSEWS_IP, etc)....would
be nice to have an API call that would let you find out what internal private IP addresses are out there for the installed web
framework, this might be a feature request.



On Wed, Mar 26, 2014 at 8:35 PM, Andrew Lau <andrew andrewklau com> wrote:
I don't think you'll find a generic standard, those IP addresses come from the manifest file eg. my cartridge's manifest.yml https://github.com/andrewklau/openshift-galera-mariadb/blob/master/metadata/manifest.yml#L68

I defined one internal address, which'll come out as $OPENSHIFT_MARIADB_DB_HOST, keep in mind if I were to define the next "Private-IP-Name" as a different variable, OpenShift would give me another internal address. 

On Thu, Mar 27, 2014 at 6:18 AM, jeff mccormick <jeffmc04 gmail com> wrote:
question for the list:

is there a generic way to determine the internally assigned IP address
within an application?

example:  OPENSHIFT_JBOSSEWS_IP, OPENSHIFT_PHP_IP,
OPENSHIFT_MYSQL_IP, OPENSHIFT_WILDFLY_IP, etc.

is there something like OPENSHIFT_INTERNAL_IP that is common
across all web frameworks that I can reference?  or an API call that
gives me this IP address?

many thanks


_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users





--

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]