whirr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Heneveld <alex.henev...@cloudsoftcorp.com>
Subject Re: getting the internal FQDN of a host from the whirr client
Date Fri, 05 Oct 2012 11:20:07 GMT

Hi Steve,

> it does. but net traffic to it gets billed at the external rate on many infrastructures

good point.  so, personally, i think changing DNS there to give the 
"best IP" for the hostname is a good solution.  not that i have anything 
against solutions which are devious and wrong. :)

i like your idea of using a local domain for disambiguation.  i don't 
have any re-usable scripts for this but i might borrow your idea and if 
I do i'll ping you.

i wonder also about -- as standard feature in whirr -- if we create some 
sort of "WhirrUniqueHostname" for each node and configure /etc/hosts on 
each of the machines to know about these private hostnames.  i take it 
you need a hostname, and can't use the private IP in the config file?  
that seems the only problem this would solve, i think, but if this is a 
common requirement it's maybe worth doing.

as for other custom cloud-specific things the following might be useful 
/ borrowable:

- 
https://github.com/brooklyncentral/brooklyn/blob/master/core/src/main/java/brooklyn/location/basic/jclouds/JcloudsLocation.java#L1058

- 
https://github.com/cloudsoft/brooklyn-cdh/blob/master/src/main/java/io/cloudsoft/cloudera/brooklynnodes/WhirrClouderaManager.groovy#L117
- 
https://github.com/cloudsoft/brooklyn-cdh/blob/master/src/main/java/io/cloudsoft/cloudera/brooklynnodes/WhirrClouderaManager.groovy#L175

- http://www.cloudsoftcorp.com/blog/automating-mapr-with-brooklyn-technical/

--A


On 05/10/2012 11:56, Steve Loughran wrote:
> On 4 October 2012 22:23, Alex Heneveld <alex.heneveld@cloudsoftcorp.com>wrote:
>
>> Steve-
>>
>> He he I have scars from all the times I've banged my head against this.
>>   I've come to the conclusion you should pretty much always use:
>>
>> cluster.getInstanceMatching(**RolePredicates.role("cmserver"**
>> )).getPublicHostname()
>>
>> which is the *public* hostname admittedly -- but should normally resolve
>> within a private subnet to the private IP if the public IP is not
>> accessible.
>
> it does. but net traffic to it gets billed at the external rate on many
> infrastructures
>
>
>>   In a good network anyway.  Failing that you should just be able to use
>> the private IP.  If you're feeling ambitious, fix /etc/hosts / DNS for the
>> boxes you manage so that public hostnames do work everywhere in your
>> universe.
>
> oh, that's both devious and wrong. I'll think about using it though.
>
>
>> Otherwise you end up hacking different things for different target clouds.
>>
> do you have those per-target hacks anywhere? a whirr-contrib module perhaps?
>
>
>> I think private hostname is a nebulous concept ... good that
>> Instance.getPrivateHostname is deprecated.  (Private to whom? -- localhost
>> is quite a reliable private hostname but probably not what you are after!)
>>
>> So can you somehow use public hostname or private IP ?
>>
> I was thinking maybe I could run something on one of the hosts I bring up
> to do the mapping for me -give it the list of IPs, get back the locally
> rDNS'd list. I don't see anything in whirr right now, and the way
> statements get executed as async batches, it maybe tricky. I could imagine
> a new statement to do that.
>
> for now I'm just going to add an extra property for the domain, suffix that
> to the (known) hostname -and let the users sort it out
>


Mime
View raw message