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

Re: generic way to find internal IP address of application



thanks a ton Andy!  that is totally what I've been looking for. 


On Thu, Mar 27, 2014 at 9:16 AM, Andy Goldstein <agoldste redhat com> wrote:
I don't know which version of OpenShift you're using, but we have this in the latest:

https://github.com/openshift/origin-server/blob/master/node/misc/usr/lib/cartridge_sdk/bash/sdk#L482-L488

Andy

On Mar 27, 2014, at 9:01 AM, jeff mccormick <jeffmc04 gmail com> wrote:

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




--
Jeff McCormick
843-327-5754
jeffmc04 gmail com

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