Difference between revisions of "How to become a resource repository mirror"
Line 11: | Line 11: | ||
=== Mirror Number === | === Mirror Number === | ||
Ask [[User:Luke-Jr|Luke]] for a mirror number. Be sure to include your machine's IP address(es). References to this mirror number below are in English. For example, 'one' and 'two'. | Ask [[User:Luke-Jr|Luke]] for a mirror number. Be sure to include your machine's IP address(es). References to this mirror number below are in English. For example, 'one' and 'two'. | ||
+ | |||
+ | === Sync Document Root === | ||
+ | You probably don't want to run this as root: | ||
+ | mkdir -p/var/www/armagetron/resource | ||
+ | rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource | ||
=== Setup Apache === | === Setup Apache === | ||
Line 28: | Line 33: | ||
After setting up apache, you need to reload your configuration :) | After setting up apache, you need to reload your configuration :) | ||
− | === | + | === Automatic Updating === |
− | + | ==== Cron ==== | |
− | + | Put in a crontab that gets run daily or hourly (with non-root permissions): | |
rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource | rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource | ||
+ | You may with to append <code>&>/dev/null</code> so you don't get logs every time. | ||
+ | |||
+ | Using this method, your server will redirect to the master mirror when it doesn't have a resource. | ||
+ | |||
+ | ==== Armabot ==== | ||
+ | Armabot is our bot that handles IRC and also updates things when there are changes. | ||
+ | |||
+ | Add to your SSH account's <code>~/.ssh/authorized_keys</code> file: | ||
+ | command="rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtW5agPIL23MDpL6zFhJnLumv0pQrpIz7QkTlBbZ60KTVN0xITrVB7cf/Uphx7+WFYSde42Sf666jomDRu9ZwkBauGQjvKH7BlWRuLnFazdSd3X4jSEhAl38pQI/dV7QhUP0lBpIGv25h40S6YG1QwxQII4+BkbzoPIJs4RM4Pmn5piTN7OHdT/S8XxT/oVPiU1WrD08ewjxS7fawfQ31NKcAApDl5IFUkHY0+Zqzk0QACuWRRGTSa8h051JUWAnkEfNEg75PIstA6sgzXFqVcJLD4Mvk8sKkBqITniX8btxzW9kSfo/bzdgfx6C8X2r2ES/cY1ttTnp4Gb32GzuvXw== supybot@butler | ||
+ | |||
+ | Now, contact [[User:wrtlprnft|wrtlprnft]] to add a notifier for resource additions. | ||
+ | |||
+ | Using this method, you should always have all the latest resources. | ||
+ | |||
+ | === Activate Mirror === | ||
+ | Inform [[User:Luke-Jr|Luke]] that you're done. He'll check your mirror to make sure it's sane and put it in the round-robin. |
Revision as of 17:57, 18 February 2007
Requirements
- Apache 2
- mod_rewrite
- ability to edit Apache vhost config
- rsync
- One of:
- cron
- ssh account
Mirror Setup
Mirror Number
Ask Luke for a mirror number. Be sure to include your machine's IP address(es). References to this mirror number below are in English. For example, 'one' and 'two'.
Sync Document Root
You probably don't want to run this as root:
mkdir -p/var/www/armagetron/resource rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource
Setup Apache
Add to your vhost configuration:
<VirtualHost *:80> ServerName mirror-number.resource.aa.dashjr.org ServerAlias resource.armagetronad.net *.resource.armagetronad.net resource.aa.dashjr.org *.resource.aa.dashjr.org ServerPath / DocumentRoot /var/www/armagetron/resource/htdocs UseCanonicalName On AllowOverride All Options SymLinks </VirtualHost>
With Gentoo, this should be /etc/apache2/vhosts.d/02_armagetronad.conf
After setting up apache, you need to reload your configuration :)
Automatic Updating
Cron
Put in a crontab that gets run daily or hourly (with non-root permissions):
rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource
You may with to append &>/dev/null
so you don't get logs every time.
Using this method, your server will redirect to the master mirror when it doesn't have a resource.
Armabot
Armabot is our bot that handles IRC and also updates things when there are changes.
Add to your SSH account's ~/.ssh/authorized_keys
file:
command="rsync --delete -a rsync://master.resource.aa.dashjr.org/armagetron-resource/ /var/www/armagetron/resource" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtW5agPIL23MDpL6zFhJnLumv0pQrpIz7QkTlBbZ60KTVN0xITrVB7cf/Uphx7+WFYSde42Sf666jomDRu9ZwkBauGQjvKH7BlWRuLnFazdSd3X4jSEhAl38pQI/dV7QhUP0lBpIGv25h40S6YG1QwxQII4+BkbzoPIJs4RM4Pmn5piTN7OHdT/S8XxT/oVPiU1WrD08ewjxS7fawfQ31NKcAApDl5IFUkHY0+Zqzk0QACuWRRGTSa8h051JUWAnkEfNEg75PIstA6sgzXFqVcJLD4Mvk8sKkBqITniX8btxzW9kSfo/bzdgfx6C8X2r2ES/cY1ttTnp4Gb32GzuvXw== supybot@butler
Now, contact wrtlprnft to add a notifier for resource additions.
Using this method, you should always have all the latest resources.
Activate Mirror
Inform Luke that you're done. He'll check your mirror to make sure it's sane and put it in the round-robin.