Project

General

Profile

MLCR Deployment » History » Revision 36

Revision 35 (Rogers, Chris, 09 July 2013 11:05) → Revision 36/42 (Rogers, Chris, 09 July 2013 11:10)

h1. MLCR Deployment 

 * The MAUS online person is *Chris Rogers* 

 There are four installations of MAUS in the MICE Local Control Room: 

 * The current version @.maus_release@ (bound to lp:maus) 
 * The previous version @.maus_release_old@ (bound to lp:maus) 
 * A development copy @.maus_control-room@ (bound to lp:~maus-mlcr/maus/control-room/) 
 * A copy for cdb uploads @.maus_cdb@ (bound to lp:maus, third party libraries from .maus_release) 

 The current and previous version are updated by leapfrogging; at the moment only the control-room version is used for online reconstruction, the control room stuff was never merged into the trunk. Note that versions are in hidden folders (prefixed by '.'). To see them do  

 <pre>cd MAUS 
 ls -a</pre>  

 There is a soft link that points to the "default" version (for use by shifters). This should usually point at the current version @.maus_release@. 

 There is also a .maus_cdb version, specifically for doing uploads/etc. This is hackable, but the MAUS online person will occasionally clean it out, so don't leave code there. It is disabled for running online recon, however. 

 h2. New version of main MAUS release 

 To update to a new version: 

 # Let MOM know what you are doing 
 # First move the current MAUS install onto the fall back release 
 ## @mv .maus_release_old .maus_release_old_@ 
 ## @mv .maus_release .maus_release_old@ 
 ## Reconfigure the old install  
 *** @cd .maus_release_old; ./configure; source env.sh@ 
 ## Check it is okay 
 *** @bash tests/unit_tests.bash; bash tests/application_tests.bash@ 
 # Next get the current MAUS release copy (or a version as specified by MAUS experts) 
 ## Do @bzr checkout lp:maus .maus_release@ 
 ## Build the code @cd .maus_release; ./install_build_test.bash@ 
 ## Rebuild with added online library @bash third_party/bash/70daq.bash; scons -j8@ 
 ## Run the integration tests @bash tests/application_tests.bash >& application_tests.log@ 
 *** If there is a SKIPPED, this is bad - should not skip any tests 
 *** If you are working through a terminal, there is a test which fails if you don't forward X11 connections (test_help.py) 
 ## Check that the online libraries are running okay @python python tests/integration/test_distributed_processing/_test_online_okay.py@ 
 ## Run @tests/integration/test_analyze_data_online/test_analyze_data_online.py@. -Bring up a browser and look at pretty plots.- 
 ## Check that the integration tests passed; check that analyze_data_online and test_multi_vs_single_threaded tests did not skip. 
 # Check for changes in power cycle procedure [[Onrec_power_cycle_procedure]] or "shifter instructions":http://micewww.pp.rl.ac.uk/documents/32 
 # Check the updated installation functions correctly by following the "shifter instructions":http://micewww.pp.rl.ac.uk/documents/32 
 ** A cosmics run is ideal 
 # Remove the old old release @rm -rf .maus_release_old_@ 
 # Add a note in the ELog 
 # Email MOGUL head and MOM to let them know that something changed 



 h2. New version of control room branch 


 To update the control room branch 

 # Let MOM and MAUS online person know what you are doing. 
 # cd MAUS/.maus_control_room 
 # @bzr update@ 
 # @./install_build_test.bash@ 
 # Run whatever tests you want 

 h2. New version of cdb branch 

 To update the cdb branch 

 # Let MOM and MAUS online person know what you are doing  
 # @cd MAUS/.maus_cdb@ 
 # @bzr update@ 
 # @rm bin/analyze_data_online@ 
 # @./install_build_test.bash ../.maus_release@ 
 # Run whatever tests you want 

 h2. -Apache server- (Not used) 

 If you want to use the Apache web server, then: 

 * Configure the web server, 
 <pre> 
 cd /home/mice/MAUS.new/maus-apps 
 ./configure 
 rm -rf media/thumbs/* 
 rm -rf media/raw/* 
 </pre> 
 * As super user, restart Apache, 
 <pre> 
 /usr/local/apache2/bin/apachectl restart 
 </pre> 
 * Check the logs, 
 <pre> 
 more /usr/local/apache2/logs/error_log  
 </pre> 
 * You should see something like, 
 <pre> 
 [Mon Mar 12 12:41:16 2012] [notice] Apache/2.2.22 (Unix) mod_wsgi/3.3  
  Python/2.7.2 configured -- resuming normal operations 
 </pre> 
 * If you get a warning like, 
 <pre> 
 httpd: Syntax error on line 55 of /usr/local/apache2/conf/httpd.conf:  
 Cannot load /usr/local/apache2/modules/mod_wsgi.so into server: libpython2.7.so.1.0:  
 cannot open shared object file: No such file or directory 
 </pre> 
 ** Then unset @MAUS_ROOT_DIR@ and try again: 
 <pre> 
 unset MAUS_ROOT_DIR 
 /usr/local/apache2/bin/apachectl restart 
 </pre> 

 h2. Install from Scratch 

 The following libraries/services need to be installed and do not come as part of the MAUS prepacked stuff. 

 Nb: in a few places we have @/usr/sbin/service@; on some systems this should just be @/sbin/service@ 

 h3. Install MongoDB 

 MongoDB can be installed using @yum@ as follows. 

  * Log in as a super-user by using @sudo su -@ or @su@. 
  * Edit @/etc/yum.repos.d/10gen.repo@ and add the lines 
 <pre> 
 [10gen] 
 name=10gen Repository 
 baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686 
 gpgcheck=0 
 </pre> 
  * Run  
 <pre> 
 $ yum install mongo-10gen 
  ... 
  mongo-10gen           i686           2.0.1-mongodb_1             10gen            28 M 
  ... 
 $ yum install mongo-10gen-server 
  ... 
  mongo-10gen-server         i686         2.0.1-mongodb_1            10gen         5.4 M 
 ... 
 </pre> 
  * Start the server 
 <pre> 
 $ /usr/sbin/service mongod start 
 Starting mongod: forked process: 4357 
                                                            [    OK    ] 
 all output going to: /var/log/mongo/mongod.log 
 $ /usr/sbin/service mongod status 
 mongod (pid 4357) is running... 
 </pre> 
 (as an alternative to @service mongod@ you can use @/etc/init.d/mongod@) 

 By default MongoDB is available on http://localhost:27017/. 


 h3. Install RabbitMQ 

 


 To install on Scientific Linux or RedHat you should: 

 * Follow the rabbitmq installation guide "here":http://www.rabbitmq.com/install-rpm.html 
 ** Install erlang from VMware  
 ** Install rabbitmq-server 
 * Log in as a super-user by using @sudo su -@ or @su@. 
 * Run: 
 <pre> 
 $ yum install rabbitmq-server 

 Installing: 
  rabbitmq-server          noarch          2.2.0-1.el5            epel             890 k 
 Installing for dependencies: 
  erlang                   i386            R12B-5.10.el5          epel              39 M 
  unixODBC                 i386            2.2.11-7.1             sl-base          832 k 
 </pre> 
 * Start the RabbitMQ server: 
 <pre> 
 $ /usr/sbin/service rabbitmq-server start 
 </pre> 
 * Create a MAUS username and password pair e.g. 
 <pre> 
 $ rabbitmqctl add_user maus suam 
 Creating user "maus" ... 
 ...done. 
 </pre> 
 * Create a MAUS virtual host: 
 <pre> 
 $ rabbitmqctl add_vhost maushost 
 Creating vhost "maushost" ... 
 ...done. 
 </pre> 
 * Set the permissions for the user on this host: 
 <pre> 
 $ rabbitmqctl set_permissions -p maushost maus ".*" ".*" ".*" 
 Setting permissions for user "maus" in vhost "maushost" ... 
 ...done. 
 </pre> 
 * Check it is running OK: 
 <pre> 
 $ /sbin/service rabbitmq-server status 
 Status of all running nodes... 
 Node 'rabbit@maus' with Pid 1377: running 
 done. 
 </pre> 

 Default port: 

 By default RabbitMQ uses port 5672. If you want worker nodes outside your firewall to use the RabbitMQ broker then you will need to open this port.