Service/mirrors: Difference between revisions

Added a tutorial
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 16: Line 16:
The current list of available mirrors is available at http://mirrors.sugarlabs.org/
The current list of available mirrors is available at http://mirrors.sugarlabs.org/


== Considerations ==
=== Bandwidth ===
To run a mirror you need a lot of bandwidth!  You should look at [http://stats.sugarlabs.org/download.sugarlabs.org/ the total bandwidth used by all the mirrors].
If you have trouble with bandwidth, you should look at [http://www.cloudflare.com CloudFlare].
=== HDD Space ===
Hosting a mirror takes a lot of space.  If you don't have a lot of space you can only choose to mirror some parts.  For example exclude all directories but the activities (~13gb):
  rsync -avzh rsync://download.sugarlabs.org/pub --exclude 'dextrose' --exclude 'hexoquinasa' --exclude 'images' --exclude 'sources' --exclude 'docs' --exclude 'packages' --exclude 'soas' /rsync/download.sugarlabs.org


== Setting up a new mirror ==
== Setting up a new mirror ==
Line 83: Line 96:
* Scan and enable the mirror:
* Scan and enable the mirror:
  sudo -u mirrorbrain mb scan -e <mirror name>
  sudo -u mirrorbrain mb scan -e <mirror name>
* Export the list of mirrors for mirmon (a hourly cronjob does this, but if you don't want to wait...):
mb export --format=mirmon-apache | sudo -u mirrorbrain tee /srv/mirrorbrain/mirmon/mirrorlist-export
* Finally, re-run mirmon to ensure it can check the health of the mirror (this is also done by a cronjob, but our patience is very short):
sudo -u mirrorbrain mirmon -v -get all -c /etc/mirmon.conf