Open MPI logo

How to become an Open MPI mirror site

  |   Home   |   Support   |   FAQ   |  

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:
    1. 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).
    2. 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.
    3. 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 Git 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:

    1. 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.
    2. The physical location of your server. We organize the list by location.
    3. The official URL for your mirror site. This will be added to the main Open MPI mirror list.
    4. 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: Git and rsync.

    1. Using Git

      The web pages can be anonymously checked out from Git:

      shell$ cd /path/to/your/docroot
      shell$ git clone https://github.com/open-mpi/ompi-www.git

      Create an automated process to run "git pull" 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; git pull

      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: Git 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"
      git pull > "$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; "git pull" 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

    2. Using rsync

      The web pages can be anonymously obtained via rsync:

      shell$ rsync -r -p -t -L -H --copy-unsafe-links --delete --delete-excluded \
        --delete-after --ignore-errors --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 -L -H --copy-unsafe-links --delete --delete-excluded \
        --delete-after --ignore-errors --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 Git 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 -L -H --copy-unsafe-links --delete --delete-excluded \
        --delete-after --ignore-errors --force www.open-mpi.org::ompi_web "$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; rsync 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

    3. Using Subversion

      This method is no longer supported. The Open MPI web site is now maintained in Git, not Subversion.

      If you were previously using subversion, please switch to using Git.


  • 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!
    1. 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.
    2. 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).

  • Two important files that can be created and maintained by mirror sites:
    1. includes/when_mirrored.inc: If this file exists, it is expected to be a short time/date stamp of when the last time this mirror was updated. The contents will be displayed in the footer of all the pages on your mirror site. The use of this file is shown in the example, above.
    2. includes/mirror_footer.inc: If this file exists, it is included via PHP's include() directive underneath all other content in Open MPI web pages, but before </BODY> (and </HTML>). Mirrors can use this to add a short amount of information at the end of each page, such as attribution and recognition for hosting the mirror. Since it is included by PHP, you can use PHP code in the file.

Thanks!