Changes between Initial Version and Version 1 of NuWa_Slave

Show
Ignore:
Timestamp:
08/09/10 16:33:51 (14 years ago)
Author:
blyth (IP: 140.112.102.77)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NuWa_Slave

    v1 v1  
     1[[TracNav(NuwaNav)]] 
     2[[PageOutline]] 
     3 
     4= NuWa Slave : automated build/test setup = 
     5 
     6Running a slave provides : 
     7  * automatically updated and tested dybinst'allation 
     8  * web interface to the status of the installation including history of build/test status 
     9 
     10= How to setup a slave = 
     11 
     12== Pre-requisites : python 2.5?, setuptools, bitten ( 0.6dev-r561 ) == 
     13 
     14Although bitten is installed by dybinst into nuwa python as part of the nosebit external,  
     15it is more logical to install this into your system python as the slave  
     16can then perform ''green-field'' dybinst builds without recourse to existing dybinst-allations.  
     17{{{ 
     18svn checkout http://svn.edgewall.org/repos/bitten/branches/experimental/trac-0.11@561 bitn 
     19cd bitn 
     20python setup.py develop       ## probably with sudo 
     21}}} 
     22  * more recent revisions of bitten have incompatibilites with the trac 0.11 master  
     23 
     24 
     25== Interactive Test Running of the slave == 
     26 
     27  * Verify that '''bitten-slave''' is installed and in your PATH and is the expected ''standard'' version  
     28{{{ 
     29[blyth@belle7 ~]$ which bitten-slave 
     30/usr/bin/bitten-slave 
     31[blyth@belle7 ~]$ bitten-slave --version 
     32bitten-slave 0.6dev-r561 
     33}}} 
     34 
     35  * export dybinst into directory to be used for slave builds (you could use an existing dybinst-allation also)  
     36  * interactive test run of the slave 
     37{{{ 
     38./dybinst trunk slave  
     39}}} 
     40     * this should fail complaining of lack of config in your {{{$HOME/.dybinstrc}}} 
     41 
     42  * add or create {{{$HOME/.dybinstrc}}} containing connection credentials 
     43{{{ 
     44slv_buildsurl=http://dayabay.ihep.ac.cn/tracs/dybsvn/builds 
     45slv_username=slave 
     46slv_password=*** 
     47slv_loghost=http://your.address       ## if you are able to publish logfiles  
     48}}} 
     49 
     50 
     51If your credentials are correct the expected startup messages are : 
     52{{{ 
     53[blyth@cms01 trunk]$ ./dybinst trunk slave 
     54Updating existing installation directory installation/trunk/dybinst. 
     55Updating existing installation directory installation/trunk/dybtest. 
     56 
     57 
     58Mon Aug  9 16:12:04 CST 2010 
     59Start Logging to /data/env/local/dyb/trunk/dybinst-20100809-161204.log (or dybinst-recent.log) 
     60 
     61 
     62Starting dybinst commands: slave 
     63 
     64Stage: "slave"...  
     65 
     66 
     67dybinst-slave invoking : /data/env/local/dyb/trunk/installation/trunk/dybinst/scripts/slave.sh trunk 
     68 
     69Contacting the master instance, this will take a while.  Go get muffins... 
     70 
     71=== slv-main : derive config /home/blyth/.bitten-slave/dybslv.cfg from source /home/blyth/.dybinstrc 
     72[INFO    ] Setting socket.defaulttimeout : 15.0  
     73[INFO    ] Setting socket.defaulttimeout : 15.0  
     74[DEBUG   ] Sending POST request to 'http://dayabay.ihep.ac.cn/tracs/dybsvn/builds' 
     75[INFO    ] No pending builds 
     76}}}  
     77 
     78 
     79Note that slave asked the master if there are any builds to do and got reply  '''No pending builds''' , the default config is to  
     80ask the master every 5 mins if there is anything to do. 
     81 
     82 
     83In order for the master to instruct the slave to perform builds you must send the '''hostname''' to Simon : 
     84{{{ 
     85[blyth@belle7 ~]$ hostname 
     86belle7.nuu.edu.tw 
     87}}} 
     88who will inform add the slave to the master through the Trac Admin web interface. 
     89 
     90 
     91 
     92== Running the slave continuously == 
     93 
     94Supervisord is recommended to keep the slave running,  
     95  * http://supervisord.org/ 
     96 
     97Install supervisord into your system python with easy_install or pip : 
     98{{{ 
     99easy_install supervisor 
     100}}} 
     101 
     102For tips on using supervisord, see : 
     103  * http://dayabay.phys.ntu.edu.tw/tracs/env/browser/trunk/base/sv.bash 
     104     * ( includes functions to setup redhat init.d scripts that restart supervisord and all its children when your machine is rebooted )  
     105 
     106An example of the supervisord config used to keep the dybslv running : 
     107{{{ 
     108[program:dybslv] 
     109environment=HOME=/home/blyth,BITTEN_SLAVE=/usr/bin/bitten-slave,SLAVE_OPTS=--verbose 
     110directory=/data1/env/local/dyb 
     111command=/data1/env/local/dyb/dybinst -l dybinst-slave.log trunk slave 
     112redirect_stderr=true 
     113redirect_stdout=true 
     114autostart=true 
     115autorestart=true 
     116priority=999 
     117user=blyth 
     118}}} 
     119 
     120 
     121 
     122 
     123 
     124