|
|
|
The Open MPI Team greatly appreciates any new mirror site.
There are four main steps to becoming an official Open MPI
mirror site:
- Please read the following guidelines:
- Open MPI web mirrors must support serving PHP4
web pages. The Open MPI web pages use some esoteric PHP
functionality, such as the
curl functions. Hence, be
sure that your web server supports the PHP curl
extensions (e.g., view
this page and ensure that your server shows the same content that
is displayed on the main Open MPI web site).
- Please join the Open MPI
mirrors mailing list. This is a very low-volume mailing list that
we use for sending out announcements, problems with mirror sites, etc.
Questions, comments, and suggestions about the mirroring process can
also be sent to this list.
- Please update your mirror site at least once a week. We recognize
that not all sites have the bandwidth luxury to update every day (note
that Subversion is quite efficient and transfers very little data,
especially if the Open MPI web site has not changed since your last
update). However, we would like to have mirror sites that are at
least "mostly current" with the main web site.
- Send the following information to the Open MPI mirrors list:
- Text for the tagline for your mirror site. This text appears on
both the main mirror list and on the lower left corner of every page
on your mirror site. This text is typically the physical location of
your mirror site.
- The physical location of your server. We organize the list by
location.
- The official URL for your mirror site. This will be added to the main Open MPI
mirror list.
- The hostname of the server that will be serving the web pages.
This is for cross-referencing so that the correct tagline will be
displayed; typically it is the same hostname as used in your official
URL (specifically, it is what is returned by PHP's
$_SERVER["SERVER_NAME"]).
- Obtain a copy of the Open MPI web site. There are two main
mechanisms to obtain / update your mirror: Subversion and rsync.
- Using Subversion
The web pages can be anonymously checked out from Subversion:
shell$ cd /path/to/your/docroot
shell$ svn co http://svn.open-mpi.org/svn/ompi-www/trunk . |
Create an automated process to run "svn up" in your
checkout at whatever frequency you want (see the guidelines, above).
This will keep you web pages up to date. An easy way to do this is to
add a crontab entry for a user who has write permissions in the Open
MPI docroot tree. The follow sample crontab entry updates the tree at
4:23am every morning:
23 4 * * * cd /path/to/your/docroot; svn up |
Alternatively, a slightly more elegant mechanism to update and
mail someone only if there are errors would be to use the following
script:
#!/bin/sh
# Open MPI web site mirroring script: Subversion synchronization
# Replace this with the path to your docroot
docroot=/path/to/your/docroot
# Replace this with a directory that can be used for temporary files
tmpdir=/tmp
# Do the update
stdout="$tmpdir/open-mpi-mirror-update.$$.out"
stderr="$tmpdir/open-mpi-mirror-update.$$.err"
cd "$docroot"
svn up > "$stdout" 2> "$stderr"
status=$?
# This timestamp is included in the footer of pages to indicate the
# last time the mirror was updated
rm -f includes/when_mirrored.inc
date > includes/when_mirrored.inc
# Check for error
if test "$status" != "0"; then
cat <<EOF
There was a problem with updating the Open MPI mirror; "svn up" exited
with a status code of $status.
--Standard output----------------------------------------------------------
`cat "$stdout"`
--Standard output----------------------------------------------------------
--Standard error-----------------------------------------------------------
`cat "$stderr"`
--Standard error-----------------------------------------------------------
EOF
fi
rm -f "$stdout" "$stderr"
exit 0 |
- Using
rsync
The web pages can be anonymously obtained via rsync:
shell$ rsync -r -p -t -D -L -H --copy-unsafe-links --delete --delete-excluded \
--delete-after --force www.open-mpi.org::ompi_web /your/local/docroot |
Create an automated process to run this rsync command
at whatever frequency you want (see the guidelines, above). This will
keep you web pages up to date. An easy way to do this is to add a
crontab entry for a user who has write permissions in the Open MPI
docroot tree. The follow sample crontab entry updates the tree at
4:23am every morning:
23 4 * * * rsync -r -p -t -D -L -H --copy-unsafe-links --delete --delete-excluded \
--delete-after --force www.open-mpi.org::ompi_web /your/local/docroot |
Alternatively, a slightly more elegant mechanism to update and
mail someone only if there are errors would be to use essentially the
same script that is listed in the Subversion method (above) but
replace the "svn up" command with the "rsync
..." command:
#!/bin/sh
# Open MPI web site mirroring script: rsync synchronization
# Replace this with the path to your docroot
docroot=/path/to/your/docroot
# Replace this with a directory that can be used for temporary files
tmpdir=/tmp
# Do the update
stdout="$tmpdir/open-mpi-mirror-update.$$.out"
stderr="$tmpdir/open-mpi-mirror-update.$$.err"
cd "$docroot"
rsync -r -p -t -D -L -H --copy-unsafe-links --delete --delete-excluded \
--delete-after --force www.open-mpi.org::ompi_web /your/local/docroot > "$stdout" 2> "$stderr"
status=$?
# This timestamp is included in the footer of pages to indicate the
# last time the mirror was updated
rm -f includes/when_mirrored.inc
date > includes/when_mirrored.inc
# Check for error
if test "$status" != "0"; then
cat <<EOF
There was a problem with updating the Open MPI mirror; "svn up" exited
with a status code of $status.
--Standard output----------------------------------------------------------
`cat "$stdout"`
--Standard output----------------------------------------------------------
--Standard error-----------------------------------------------------------
`cat "$stderr"`
--Standard error-----------------------------------------------------------
EOF
fi
rm -f "$stdout" "$stderr"
exit 0 |
- The first time you mirror the OMPI web site, a black
skull-nand-crossbones flag will appear in the lower left of all your
web pages. This is normal!
- Once you have a basic mirror site working properly, send your
mirror site entry information to the "mirrors" mailing list and we'll
add your information to the site PHP. This will enable your country's
flag to appear in the lower left instead of the Jolly Roger.
- Let an automatic update occur to get the PHP change. If all of
this goes well, let us know, and we'll update the PHP again to display
your mirror in the official listing (which all sites
will pick up via the normal mirror updating mechanisms).
Thanks!
|
|
|