Add some more scripts and information that is used in the OMPI project
infrastructure. This commit was SVN r31358.
Этот коммит содержится в:
родитель
df311b82aa
Коммит
6d61f1edcd
58
contrib/infrastructure/README-setup-github-diff-emails.txt
Обычный файл
58
contrib/infrastructure/README-setup-github-diff-emails.txt
Обычный файл
@ -0,0 +1,58 @@
|
|||||||
|
When creating the github email hook thingy...
|
||||||
|
|
||||||
|
First, clone down the repo from github that you want:
|
||||||
|
|
||||||
|
cd /u/mpiteam/git
|
||||||
|
git clone ...
|
||||||
|
|
||||||
|
The rest of these instructions assume that you cloned into directory "foo".
|
||||||
|
Change "foo" as appropriate for your repo name.
|
||||||
|
|
||||||
|
Make a bare clone of your new clone:
|
||||||
|
|
||||||
|
git clone --bare foo foo.git
|
||||||
|
|
||||||
|
In the non-bare repo, add a remote named "email" that is the bare repo:
|
||||||
|
|
||||||
|
cd foo
|
||||||
|
git remote add email /u/mpiteam/git/foo.git
|
||||||
|
|
||||||
|
Now in the foo repo, edit the config and in the remote "origin" section, add
|
||||||
|
the following line if it's not already there:
|
||||||
|
|
||||||
|
emacs .git/config
|
||||||
|
# Add this line in the "origin" section:
|
||||||
|
|
||||||
|
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||||
|
|
||||||
|
Still in that same config file, add a line in the remote "email" section:
|
||||||
|
|
||||||
|
push = +refs/remotes/origin/*:refs/heads/*
|
||||||
|
|
||||||
|
Now exit the editor and remove the tracking branch of the origin:
|
||||||
|
|
||||||
|
git branch -d -r origin/HEAD
|
||||||
|
|
||||||
|
IF YOU SCREW UP AND "push" to the email remote before deleting the origin/HEAD
|
||||||
|
tracking branch, then run the "git branch -d ..." and the following (both in
|
||||||
|
the original repo, not the bare repo):
|
||||||
|
|
||||||
|
git push email :refs/heads/HEAD
|
||||||
|
|
||||||
|
Copy the hooks/post-receive script from any of the other bare repos to the
|
||||||
|
hooks subdir in this bare repo (e.g., from
|
||||||
|
/u/mpiteam/git/hwloc.git/hooks/post-receive). Ensure that this script is
|
||||||
|
executable.
|
||||||
|
|
||||||
|
Edit the file named "description" in the bare repo and put a 1-word name of the
|
||||||
|
project in the file (this word will be used in the email subject).
|
||||||
|
|
||||||
|
Now in the bare repo, add the following "[hooks]" section -- MAKE SURE TO USE
|
||||||
|
THE CORRECT URL FOR YOUR GITHUB REPO, and set the email address properly:
|
||||||
|
|
||||||
|
[hooks]
|
||||||
|
emailprefix = "GIT: "
|
||||||
|
mailinglist = netloc-commits@open-mpi.org
|
||||||
|
diffopts = --stat --summary --find-copies-harder
|
||||||
|
emailmaxlines = 5000
|
||||||
|
showrev="t=%s; printf https://github.com/open-mpi/netloc/commit/$t; echo; echo; git show --stat --patch -C $t; echo"
|
13
contrib/infrastructure/README.txt
Обычный файл
13
contrib/infrastructure/README.txt
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
There are several files and scripts in this directory.
|
||||||
|
|
||||||
|
- Crontab for jaguar.crest.iu.edu (aka mtt.open-mpi.org, where much
|
||||||
|
nightly processing for the Open MPI project occurs).
|
||||||
|
|
||||||
|
- Crontab for lion.crest.iu.edu (aka www.open-mpi.org, which you can't
|
||||||
|
directly SSH login to from outside of iu.edu).
|
||||||
|
|
||||||
|
- Script used to send diff emails from github repos (because github
|
||||||
|
refuses to send diff emails). This script is fired from cron.
|
||||||
|
|
||||||
|
- README for how to setup diff emails for new github repos (i.e., how
|
||||||
|
to use the above script to send diff emails for each github repo).
|
125
contrib/infrastructure/crontab-mpiteam-at-jaguar.crest.iu.edu.txt
Обычный файл
125
contrib/infrastructure/crontab-mpiteam-at-jaguar.crest.iu.edu.txt
Обычный файл
@ -0,0 +1,125 @@
|
|||||||
|
#########################
|
||||||
|
# MPI Testing Tool (MTT)
|
||||||
|
# - Original plan
|
||||||
|
#
|
||||||
|
# Everyday
|
||||||
|
# - 23:00 - 1:00 Update MTT Statistics [Database]
|
||||||
|
# - 1:00 - 3:00 Update MTT Statistics [Contribution]
|
||||||
|
# - 3:00 - 3:05 Update Contrib Graph
|
||||||
|
# - 4:00 - 4:30 Maintain internal PostgreSQL stats (Day)
|
||||||
|
# - 4:30 - 8:30 Update Static MTT Visualization Extension (Disabled due to heavy load)
|
||||||
|
#
|
||||||
|
# Saturday
|
||||||
|
# - 1:00 - 12:00 Backup the MTT database
|
||||||
|
# - 14:30 - 18:30 Update Static MTT Visualization Extension
|
||||||
|
#
|
||||||
|
# Sunday
|
||||||
|
# - 4:00 - 4:30 Maintain internal PostgreSQL stats (Week)
|
||||||
|
# - 4:00 - 4:30 Maintain internal PostgreSQL stats (Month) [1st sunday only]
|
||||||
|
# - 5:00 - 5:30 Check for Integrity Violations (week)
|
||||||
|
#
|
||||||
|
#########################
|
||||||
|
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Update MTT Statistics [Database]
|
||||||
|
# - everyday at 11:00
|
||||||
|
# - runs in about 25 - 30 min
|
||||||
|
#########################
|
||||||
|
0 23 * * * /l/osl/www/mtt.open-mpi.org/cron/mtt-update-stats-db-only.pl
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Update MTT Statistics [Contribution]
|
||||||
|
# - everyday at 1 am
|
||||||
|
# - runs in about 2 hours
|
||||||
|
#########################
|
||||||
|
0 1 * * * /l/osl/www/mtt.open-mpi.org/cron/mtt-update-stats.pl
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Update Contrib Graphs
|
||||||
|
# - 3 am Everyday
|
||||||
|
# - Runs in < 1 min
|
||||||
|
# "-l" limits to just last year of data. (slightly faster to run)
|
||||||
|
#########################
|
||||||
|
0 3 * * * /l/osl/www/mtt.open-mpi.org/cron/create-contrib-graph.pl -l
|
||||||
|
30 3 * * * /l/osl/www/mtt.open-mpi.org/cron/create-contrib-graph.pl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Maintain internal PostgreSQL stats (Week)
|
||||||
|
# - Sunday at 4 am (except when Monthly is running)
|
||||||
|
# - runs in about 30 min
|
||||||
|
# JJH: 11/7/2011 - Since Monthly disabled, run every week
|
||||||
|
#########################
|
||||||
|
##0 4 * * 0 if [ `date +\%d` -ge 8 ]; then /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -week 1> /dev/null 2> /dev/null; fi
|
||||||
|
0 4 * * 0 /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -week 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Maintain internal PostgreSQL stats (Year)
|
||||||
|
# - Dec. 1 at 4 am
|
||||||
|
# - runs in about 6 hours (?? Verify)
|
||||||
|
#########################
|
||||||
|
0 4 1 12 * /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -year 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Email Reports
|
||||||
|
# - Tues - Thursday at 9 am (Past 12 hours)
|
||||||
|
# - Tues - Thursday at 9 pm (Past 24 hours)
|
||||||
|
# - Monday at 9 am (Past 60 hours)
|
||||||
|
#########################
|
||||||
|
0 9 * * 2-4 /l/osl/www/mtt.open-mpi.org/cron/alerts.php -f /l/osl/www/mtt.open-mpi.org/cron/morning.ini 1> /dev/null 2> /dev/null
|
||||||
|
0 21 * * 2-4 /l/osl/www/mtt.open-mpi.org/cron/alerts.php -f /l/osl/www/mtt.open-mpi.org/cron/evening.ini 1> /dev/null 2> /dev/null
|
||||||
|
0 9 * * 1 /l/osl/www/mtt.open-mpi.org/cron/alerts.php -f /l/osl/www/mtt.open-mpi.org/cron/monday.ini 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# Build nightly tarballs
|
||||||
|
#######################################################################
|
||||||
|
0 21 * * * $HOME/scripts/netloc-nightly-tarball.sh </dev/null >/dev/null 2>&1
|
||||||
|
1 21 * * * $HOME/scripts/hwloc-nightly-tarball.sh </dev/null >/dev/null 2>&1
|
||||||
|
5 21 * * * $HOME/scripts/openmpi-nightly-tarball.sh </dev/null >/dev/null 2>&1
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# Update web sites
|
||||||
|
#######################################################################
|
||||||
|
*/15 * * * * $HOME/scripts/openmpi-update-www.open-mpi.org.sh < /dev/null > $HOME/tmp/git-www-ompi.log 2>&1
|
||||||
|
*/10 * * * * $HOME/scripts/forum-update-meetings.mpi-forum.org.sh < /dev/null > $HOME/tmp/svn-up-forum.log 2>&1
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# Github does not send diff emails, so send our own
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
# The script takes a list of local repo directories.
|
||||||
|
*/5 * * * * /u/mpiteam/scripts/github-send-commit-mails.pl /u/mpiteam/git/hwloc /u/mpiteam/git/hwloc-debian /u/mpiteam/git/netloc /u/mpiteam/git/docs /u/mpiteam/git/ompi-www
|
||||||
|
|
||||||
|
#=====================================================================
|
||||||
|
#=====================================================================
|
||||||
|
# Outdated / unused scripts
|
||||||
|
#=====================================================================
|
||||||
|
#=====================================================================
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Maintain internal PostgreSQL stats (Day)
|
||||||
|
# - every weekday at 4 am
|
||||||
|
# - runs in about 10 - 20 min
|
||||||
|
#
|
||||||
|
# JJH: 12/20/2011 Disable this to try to help with memory issues in the db
|
||||||
|
#########################
|
||||||
|
#0 4 * * 1-5 /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -day 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Maintain internal PostgreSQL stats (Month)
|
||||||
|
# - 1st Sunday of the Month at 4 am
|
||||||
|
# - runs in about 21 hours (not 20 min)
|
||||||
|
# JJH: 11/7/2011 - Disabled due to long runtime causing submission errors
|
||||||
|
#########################
|
||||||
|
#0 4 * * 0 if [ `date +\%d` -lt 8 ]; then /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -month 1> /dev/null 2> /dev/null; fi
|
||||||
|
|
||||||
|
#30 20 * * * $HOME/scripts/openmpi-nightly-tmpbranch-tarball.sh </dev/null >/dev/null 2>&1
|
||||||
|
#0 0 * * * $HOME/scripts/openmpi-ft-cr-tarball.sh </dev/null >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Don't build any more LAM/MPI tarballs!
|
||||||
|
#0 4 * * * $HOME/scripts/lammpi-nightly-tarball.sh </dev/null >/dev/null 2>&1
|
17
contrib/infrastructure/crontab-mpiteam-at-lion.crest.iu.edu
Обычный файл
17
contrib/infrastructure/crontab-mpiteam-at-lion.crest.iu.edu
Обычный файл
@ -0,0 +1,17 @@
|
|||||||
|
#########################
|
||||||
|
# Update the OSL FT webpage
|
||||||
|
#
|
||||||
|
# Everyday @ 1:00 am
|
||||||
|
#
|
||||||
|
0 1 * * * (cd /l/osl/www/www.osl.iu.edu/research/ft && svn up ) 1> /dev/null 2> /dev/null
|
||||||
|
#########################
|
||||||
|
|
||||||
|
|
||||||
|
##########################
|
||||||
|
# Official Open MPI repo mirrors
|
||||||
|
##########################
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Update the ompi hg repository
|
||||||
|
#
|
||||||
|
10,25,40,55 * * * * /home/ompi-hg/update-hg-svn.sh
|
42
contrib/infrastructure/github-send-commit-mails.pl
Исполняемый файл
42
contrib/infrastructure/github-send-commit-mails.pl
Исполняемый файл
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
|
|
||||||
|
die "Must specify location of source git repo"
|
||||||
|
if ($#ARGV < 0);
|
||||||
|
|
||||||
|
sub doit {
|
||||||
|
my ($cmd, $repo) = @_;
|
||||||
|
|
||||||
|
my $rc;
|
||||||
|
my $outfile = "/tmp/github-send-email-tmp.$$";
|
||||||
|
unlink($outfile);
|
||||||
|
$rc = system("$cmd >$outfile 2>&1");
|
||||||
|
if (0 != $rc) {
|
||||||
|
print "Command failed:
|
||||||
|
|
||||||
|
Command: $cmd
|
||||||
|
Repo: $repo
|
||||||
|
Output:\n";
|
||||||
|
open(IN, $outfile);
|
||||||
|
print $_
|
||||||
|
while (<IN>);
|
||||||
|
close(IN);
|
||||||
|
die "Aborting";
|
||||||
|
}
|
||||||
|
unlink($outfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $src_repo (@ARGV) {
|
||||||
|
die "Specified location of source git repo is invalid"
|
||||||
|
if (! -d $src_repo);
|
||||||
|
chdir($src_repo);
|
||||||
|
die "Could not chdir to $src_repo"
|
||||||
|
if (getcwd() != $src_repo);
|
||||||
|
|
||||||
|
doit("/u/mpiteam/git/local/bin/git fetch", $src_repo);
|
||||||
|
doit("/u/mpiteam/git/local/bin/git push email", $src_repo);
|
||||||
|
}
|
||||||
|
|
Загрузка…
x
Ссылка в новой задаче
Block a user