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

GeoIP and mirrors in anaconda



Hi everybody,
I was looking at the Anaconda/UX Redesign/Discussion pages [1] and came
accross the 'Mirrors' and 'IP-based geolocation' sections. I've spent
some time searching for our possibilities to make it work in the
suggested way and these are the summed-up results:

1) As for the Mirrors:
Yum uses Fedora mirrors list server [2] which runs the Mirror Manager.
The Mirror Manager is able to choose the best mirror using many methods
including GeoIP [3]. So we already have this functionality in Anaconda
and it can be changed on the wiki page [1].

2) As for the GeoIP:
There is a free database with GPL API in many languages (including C and
Python) [4]. This is the solution used by the Mirror Manager. But the
problem is that we would need the "outer IP address" of the machine to
query the database for which we would have to use some server.
So I think the best solution for Anaconda would be using Mirror Manager
running on Fedora mirrors list server (the same as yum does). We could
use a simple HTTP request to get the mirrors list which contains
information about prefered countries on the first (commented) line. Here
is the example (from Masaryk university in Brno): 

# repo = fedora-15 arch = i386 Using preferred netblock Using ASN 2852
Using ASN 2852 Using ASN 2852 Using Internet2 country = CZ country = BE
country = BG country = BY country = RO country = GR country = GB country
= HR country = HU country = PT country = PL country = EE country = IT
country = ES country = MD country = IL country = FR country = FI country
= NL country = NO country = CH country = SK country = SE country = DK
country = DE country = LV country = IS country = AT country = IE country
= UA 
http://ftp.linux.cz/pub/linux/fedora/linux/releases/15/Everything/i386/os/
http://ultra.linux.cz/MIRRORS/fedora.redhat.com/linux/releases/15/Everything/i386/os/
http://ftp.sh.cvut.cz/MIRRORS/fedora/linux/releases/15/Everything/i386/os/
...

And even it's easy to parse the first line to get the country we of
course don't need the whole mirrors list. So I'm communicating with the
author of the Mirror Manager and searching for some better suiting
solution for us.

Do you think it's the right way? And should I try to add it to Anaconda
in current state? It could be used to set default values for locale and
language settings and possibly also the default time zone.

Thanks in advance for any suggestions and comments.
Vrata Podzimek



[1] https://fedoraproject.org/wiki/Anaconda/UX_Redesign/Discussion
[2] via repos' mirrorlists' URLs in
https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=
$basearch format
[3] https://fedorahosted.org/mirrormanager/wiki
[4] http://www.maxmind.com/app/c 


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