Des,

Thanks for your email.  As part of the all-in-one node that we've been working 
on over the last sprint or so, we have built a package that queries this 
information from AWS (although doesn't update DNS to match) - this might be 
useful to you.

Having said, I'm not sure I understand exactly what you're proposing.  As you 
say, there are three node-specific details in /etc/clearwater/config:

*         local IP - you don't mention this, but it could be got from ifconfig 
or by calling out into AWS

*         hostname - I'm not sure how you're proposing to deduce this for a 
given system

*         public IP - this both relies on you being able to determine the 
hostname, and also for that hostname to resolve to the public IP address even 
within the cloud (on EC2, ec2-* IP addresses are split horizon and resolve to 
the local IP within the cloud and the public IP outside).

Please can you elaborate?  Even better, you could take a look at the pending 
changes for the all-in-one node (at 
https://github.com/Metaswitch/clearwater-infrastructure/blob/aio-node-ami/debian/clearwater-auto-config.init.d),
 fork, modify and submit a pull request.  (I agree that simplifying the manual 
setup would be useful - I suspect the chef side is less important as we already 
have something that works and isn't too complex.)

The reason that we haven't focussed on this in the past is that stopping and 
restarting a VM is actually not a very cloud-y thing to do - generally, you're 
better to spin up a replacement and then spin down the old node.  What's the 
scenario in which you need to stop and restart?

Thanks,

Matt

From: [email protected] 
[mailto:[email protected]] On Behalf Of Des Hartman
Sent: 16 July 2013 03:50
To: [email protected]
Subject: Re: [Clearwater] EC2 public/private IPs and DNS usage

Matt,

I confirmed that if you stop and start an instance again, the IP addresses 
change. The private and in fact the public IPs changed on all my instances 
after I had started them again. This redoing DNS and going back to each one and 
redo ing the config file ;-(

This got me thinking.

90% of the config file is exactly the same for all the nodes. The only thing 
that changes is the local, public IP and public hostname. The public IP and 
host name are already in DNS, so this is a duplication and the public IP and 
name do not get used on the internal servers as far as I know. Would it make 
sense to remove this from the config file and rely entirely on DNS? You already 
dictate that the DNS entries have fixed names off the TLD like hs, homer, etc. 
so this would tie the private and public IPs to the names for all servers 
without the need to explicitly configure it in DNS and also in the config file.

Not sure how much work this is, but it would simplify the manual setup and also 
I think the chef updates, since all info goes into DNS and not also into the 
config files.

Let me know what you think?


Thanks
Des Hartman

_______________________________________________
Clearwater mailing list
[email protected]
http://lists.projectclearwater.org/listinfo/clearwater

Reply via email to