Mirrorlist CGI Script

From CDOT Wiki
Jump to: navigation, search

Package the Mirrorlist CGI Script Library

Project Description

This project will create a script that will optimize the performance of all yum updates and package installation.

Project Leader

Matthew Kam-Man Wong

Project Contributor(s)

  • TBA

Project Details

Dependencies required:

  • ping
  • ifconfig
  • grep
  • sed
  • awk

The following are optional:

  • scamper


Algorithm 1 The algorithm for the script measures the speed of each mirrorlist and repository within the yum mirrorlist. By using the ping command the script will capture the time for an icmp packet to return from the target destination

  • The script will capture 4 packets per site
  • awk and sed will be used to extract the last two lines of the ping results

For each site, the data will be stored in a database for future references.

  • The database will be rearranged by using sed by ascending order
  • After the rearrangement the data will be append to the current yum static file.

When yum performs an update or installation of a package it will refer to the static file's first line and work its way down the list.

This algorithm will execute in the following conditions

  • A change in gateway IP address
  • Change in DNS server IP address
  • running fedora for the first time

Algorithm 2 Another Algorithm that can implemented is to rearrange the mirrorlist according to location Note: This algorithm will not be as reliable as the first therefore time invested on this algorithm will be low The algorithm will extract the current location of the device via time zone and geographically locate each site's location The algorithm will rearrange the database according to the closest site server. This works by a process of elimination

  • By country
  • Province/State
  • City

Conditions for this algorithm:

  • if ICMP is disabled
  • the bandwidth is to low to download
  • change of location
  • restrictions on iptables



Project Plan

Tracking

  • Bugzilla or Trac will be used for review management.


Goals by Release

Goals for each release and plans for reaching those goals:

  • 0.1 - Completion of the script
  • 0.2 - Review issues addressed, testing, compilation issue (if found)
  • 0.3 - Package in Fedora 19-20

Communication

Mailing Lists

  • Google group:

Upsteam Wiki and Web

Links/Bugs/Tracking

Source Code Control

Blogs


Project News

  • 2013-10-07: Project started!