[Piuparts-commits] rev 319 - in piatti: . home/piupartsm home/piupartss/bin

Holger Levsen holger at alioth.debian.org
Sun Apr 5 12:36:34 UTC 2009


Author: holger
Date: 2009-04-05 12:36:33 +0000 (Sun, 05 Apr 2009)
New Revision: 319

Added:
   piatti/home/piupartss/bin/slave_join
   piatti/home/piupartss/bin/slave_run
Modified:
   piatti/README.txt
   piatti/home/piupartsm/crontab
Log:
add scripts to run slave in screen, to join that session and a cronjob to send the tail-output every six hours to monitor piuparts

Modified: piatti/README.txt
===================================================================
--- piatti/README.txt	2009-04-04 19:09:48 UTC (rev 318)
+++ piatti/README.txt	2009-04-05 12:36:33 UTC (rev 319)
@@ -1,22 +1,23 @@
 Notes about the piuparts installation on piatti.debian.org 
 ==========================================================
 
-todo
-----
-- script for starting piuparts-slave in screen and cronjob to send mail with its output
+== ToDo
+
 - use local mirror
 - there should be a 2nd group of piuparts-people. those who can sudo into piupartsm to process logfiles. maybe make that the qa-group
 
+== Installation
 
-User setup
-----------
+=== User setup
+
 A piupartss and a piupartsm user is need. Both are members of the group piuparts and /org/piuparts.debian.org is 774 piupartss.piuparts.
 Both user have some files in $HOME which are kept in svn, including hidden files.
 
 Create an SSH keypair for piupartss and put it into ~/.ssh/authorized_keys of the piupartsm user, so the piupartss can login with ssh to localhost as piupartsm.
 
-'/etc/sudoers' for piatti
--------------------------
+=== '/etc/sudoers' for piatti
+
+----
 # The piuparts slave needs to handle chroots
 piupartss       ALL=(ALL) NOPASSWD: ALL
 
@@ -25,15 +26,15 @@
 %piuparts       ALL=(piupartsm) ALL
 ---
 
-piuparts installation from svn source
--------------------------------------
+=== piuparts installation from svn source
+
 * sudo apt-get install apt python debootstrap lsof lsb-release python-debian make dpkg-dev docbook2x python-support docbook-xml asciidoc dblatex
 * you need a webserver too, if you run the master
 * Copy 'svn://svn.debian.org/svn/piuparts/piatti/home/piupartss/bin/update-piuparts-setup' on the host and run it. It assumes you want to set it up in '/org/piuparts.debian.org' and does all further svn checkouts as well as source code installation. It needs the piupartss and piupartsm user set up as described below, though.
 * sudo ln -s /org/piuparts.debian.org/etc/ /etc/piuparts
 	
-Apache configuration
---------------------
+=== Apache configuration
+
 (Any other webserver will do.)
 ----
 <VirtualHost *:80>
@@ -56,33 +57,46 @@
 </VirtualHost>
 ----
 
-Generating reports for the website
-----------------------------------
-'piuparts-report' is run from '~piupartsm/crontab'
+== Updating the piuparts installtion
 
+----
+piupartss at piatti:/org/piuparts.debian.org$ ./update-piuparts-setup
+----
 
-Cronjobs to aid problem spotting
---------------------------------
-Reside in '~piupartsm/bin/' and are run by '~piupartsm/crontab'.
+== Running piuparts
 
+=== Starting the slave
+
+Use the following command to start piuparts-slave on piatti, piuparts-master will be started automatically by the slave.
+
+----
+piupartss at piatti:~$ slave_run
+----
+
+There is a cronjob installed (in '~piupartsm/crontab') which sends a mail with the tail of the session every six hours.
+
+=== Filing bugs
+
+to be written
+
+=== Generating reports for the website
+
+'piuparts-report' is run daily five minutes after midnight from '~piupartsm/crontab'
+
+=== Cronjobs to aid problem spotting
+
+Some cronjobs to aid problem spotting reside in '~piupartsm/bin/' and are run daily by '~piupartsm/crontab'.
+
 - 'detect_network_issues' should detect failed piuparts runs due to network issues on the host.
 - 'detect_stale_mounts' should detect stale mountpoints (usually of /proc) from failed piuparts runs.
 
 More checks should be added as we become aware of them.
 
 
-to start a new run and throw away all results:
-----------------------------------------------
-----
-piupartss at piatti:/org/piuparts.debian.org$ ./update-piuparts-setup
-piupartss at piatti:/org/piuparts.debian.org/slave$ nice python ../share/piuparts/piuparts-slave 
-----
+== Authors
 
-filing bugs
------------
-to be written
+March+April 2009
 
+Holger Levsen <holger at debian.org>
+Luk Claes <luk at debian.org>
 
-March 2009
-Luk Claes <luk at debian.org>
-Holger Levsen <holger at debian.org> 

Modified: piatti/home/piupartsm/crontab
===================================================================
--- piatti/home/piupartsm/crontab	2009-04-04 19:09:48 UTC (rev 318)
+++ piatti/home/piupartsm/crontab	2009-04-05 12:36:33 UTC (rev 319)
@@ -9,6 +9,12 @@
 #  (dinstall runs 1|7|13|19:52, so this is long after mirror pushes...)
 #
 5 0 * * * PYTHONPATH=/org/piuparts.debian.org/lib/python2.4/site-packages:/org/piuparts.debian.org/lib/python2.5/site-packages nice python /org/piuparts.debian.org/share/piuparts/piuparts-report
-
+#
+# monitor slave session every six hours
+#
+23 0,6,12,18 * * *  tail /org/piuparts.debian.org/slave/screenlog.0
+#
+# monitor for problems once a day
+#
 42 7 * * * /home/piupartsm/bin/detect_stale_mounts
 43 7 * * * /home/piupartsm/bin/detect_network_issues

Added: piatti/home/piupartss/bin/slave_join
===================================================================
--- piatti/home/piupartss/bin/slave_join	                        (rev 0)
+++ piatti/home/piupartss/bin/slave_join	2009-04-05 12:36:33 UTC (rev 319)
@@ -0,0 +1,7 @@
+#!/bin/sh 
+#
+# reattach to an existing slave session
+#
+set -e
+sudo screen -R -S piuparts-slave-screen
+


Property changes on: piatti/home/piupartss/bin/slave_join
___________________________________________________________________
Name: svn:executable
   + *

Added: piatti/home/piupartss/bin/slave_run
===================================================================
--- piatti/home/piupartss/bin/slave_run	                        (rev 0)
+++ piatti/home/piupartss/bin/slave_run	2009-04-05 12:36:33 UTC (rev 319)
@@ -0,0 +1,10 @@
+#!/bin/sh 
+#
+# run piuparts-slave in screen so that a screendump can be mailed via cron to monitor the slave
+#
+set -e
+cd /org/piuparts.debian.org/slave
+(ps fax|grep -v grep| grep piuparts-slave.py ) || exit 0
+sudo rm /org/piuparts.debian.org/slave/screenlog.0
+sudo screen -L -d -m -S piuparts-slave-screen su - piupartss -c "cd /org/piuparts.debian.org/slave && python ../share/piuparts/piuparts-slave"
+


Property changes on: piatti/home/piupartss/bin/slave_run
___________________________________________________________________
Name: svn:executable
   + *




More information about the Piuparts-commits mailing list