2,427 bytes added
, 17:15, 7 July 2011
m==New Push Mirror==
We are implementing a new push style of mirrors.
----
====In order to participate you will need the following:====
* Static IP address
* Dedicated user for syncing
* Allow SSH from internet to static IP (port doesn't matter)
----
====Advantages to push mirror:====
* Sync only happens when there are changes
* Changes are propagated as close to real-time as possible
* Changes can be staged (sync data first, repodata second)
* Less out of sync mirrors for yum
----
====How push works:====
# Master mirror updates timestamp file
# Master initiates ssh into tier 1 mirrors to start stage 1 sync (wait)
# Tier 1 mirrors rsync everything but repodata from designated targets (no delete)
# Tier 1 mirrors initiate ssh into tier 2 mirrors to start stage 1 sync (wait)
# Repeat prior to steps for each tier under 2
# Master initiates ssh into tier 1 mirrors to start stage 2 sync
# Tier 1 mirrors rsync everything from designated targets (with delete)
# Tier 1 mirrors initiate ssh into tier 2 mirrors to start state 2 sync
# Repeat prior to steps for each tier under 2
# Master mirror checks freshness of mirrors and generates mirrorlists
----
====Steps to configure push sync:====
# create location for mirror
# create new user to perform sync
# download ftpsync script
#* <tt>wget http://contribs.org/ftpsync.tgz</tt>
# extract tarball in users directory
#* <tt>tar zxvf ftpsync.tgz</tt>
# append the keys to authorized_keys file
#* <tt>cat .ssh/pushmirror-*.pub >> .ssh/authorized_keys</tt>
# change ownership of directories to new user
#* <tt>chown -R ''{newuser}'' bin etc log .ssh ''{path to mirror}''</tt>
# update location (TO) in config file (etc/ftpsync.conf)
# perform initial sync (and test that script does what it needs to)
#* <tt>su - ''{newuser}'' -s /bin/bash<br>~/bin/ftpsync</tt>
# check logs to see if there were any errors
#* <tt>cd ~/log<br>cat rsync-ftpsync.error.0</tt>
# open bug requesting to be added to the mirror infrastructure
Please include the following in the bug report:
* name of site
* primary contact name/email
* location/country
* bandwidth available to mirror
* URL to site (for freshness checks and yum)
* hostname to connect to (for ssh)
* port to connect to (for ssh)
* username to connect with (for ssh)
----
The scripts should keep the 14 most recent sync attempts and will email (root by default) if there are any errors that occur during the sync attempt.