How best to accomplish geographic location of clients?

11 views
Skip to first unread message

randal cobb

unread,
Sep 2, 2014, 4:31:30 PM9/2/14
to puppet...@googlegroups.com
Hello all,

I have a small problem I'm trying to resolve, and I'm bowing to the masters for suggestions.   Our development organization uses VMware and desktop VMs to perform development efforts;  I've come up with mechanisms to populate these VMs using puppet to install all the tools they need, such as Eclipse, Maven, JDKs, etc. but I'm faced with an issue that I have put off until now:  using geographically located tools and servers.  In my environment, we have several geographically located "mirror" or "slave" servers for key infrastructure environments such as Nexus, Sonar, Subversion, etc.  So, while all of our "master" servers are located in data-centers in the US, we will have "slave" versions of them located in other countries, such as Brazil, India, Canada, etc.   So, on to my question:  Is there a way for Puppet to detect where a client is running, geographically?   For example, if a VM starts up in Hyderabad, India, I want to add host entries to the VM that point services like SVN, Nexus, Sonar, Jenkins, etc. to local slaves.  I already have manifests to set the host entries appropriately for a given location, so this is the easy part.  To add a wrinkle, my company has added rules so that ALL VMs that end-users can run on their desktops or laptops MUST use NAT ip addresses, so I can't easily use an IP subnet to calculate what the best hosts to use are.

So, might anyone have any suggestions or ideas of how I might try to accomplish this?

Thanks in advance!
Randy

Nan Liu

unread,
Sep 2, 2014, 5:24:50 PM9/2/14
to puppet...@googlegroups.com
anycast. Ok, in all seriousness, you can either write a custom fact using geoip lookup if the WAN address is reliable. Or you need pass location info to the VM via ovf properties and read it back as a custom fact using vmtoolsd. See http://blogs.vmware.com/vapp/2009/07/selfconfiguration-and-the-ovf-environment.html for more info on the second option.

HTH,

Nan
Reply all
Reply to author
Forward
0 new messages