Changes between Version 1 and Version 2 of SysAdmin/ContinuousIntegration


Ignore:
Timestamp:
12/17/12 12:12:23 (9 years ago)
Author:
spM
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SysAdmin/ContinuousIntegration

    v1 v2  
    11== EDEN CONTINUOUS INTEGRATION ==
    22
    3 == RESULTS ==
     3=== URL TO ACCESS RESULTS ===
    44http://82.71.213.53/eden/admin/result
    55
    6 == LOGIN DETAILS ==
     6=== LOGIN DETAILS ===
    77
    88ssh youraccount@82.71.213.53
    99
    1010Password: *****
     11
     12=== Location of Cron Job Automation file to run Test Framework: ===
     13
     14/etc/cron.custom/testsuite
     15
     16* What this does currently :
     17  * Prepares Server
     18  * Pulls latest codes from web2py/web2py (update  web2py)
     19  * Pulls latest codes from flavour/eden (update Eden)
     20  * Deletes prepopulated data
     21  * Loads all models
     22  * Fixes permissions of the web2py folder
     23  * Runs Automated Test Suite
     24  * Runs Smoke Tests
     25  * Runs Roles Tests
     26
     27=== Edit cron times: ===
     28 (Currently set to run Test Suite every 6 hours every day of every week of every month of every year)
     29
     30crontab -e
     31
     32=== Location of Web2Py and Eden Directory ===
     33*  web2py
     34  * /home/web2py
     35* Eden
     36  * /home/web2py/applications/eden
     37
     38=== Overall Restart ===
     39If 82.71.213.53 goes down with these errors:
     40
     41    * Internal Error
     42    * Server Maintenance
     43    * Connection Timeout by every web browser
     44    * Unresolvable Ticket Error
     45
     46Simply type these services restart commands in consoles:
     47
     48* Server Reboot :
     49  * sudo /sbin/reboot
     50    *  '''Note''' : There will be a downtime of a few minutes after you execute this command
     51* Cherokee Restart
     52  * sudo /etc/init.d/cherokee restart
     53* Web2Py SSL Restart
     54  * sudo /etc/init.d/uwsgi start
     55
     56=== Start Test Suite Manually ===
     57
     58
     59xvfb-run -a python web2py.py -S eden -M -R ~web2py/applications/eden/modules/tests/suite.py
     60
     61
     62==== Shell Script to Start The Test Suite On The CI Server ====
     63
     64Simply run this shell script to start Functional selenium test, followed by Smoke test and then finally the Role test.
     65You can comment out the lines you don't want to run.
     66* Save the Code given below in a file (say, named as startSuite)
     67* Add Execution permission to the file
     68  * chmod +x /location/to/script/startSuite
     69* Execute the shell script
     70  * sudo sh /location/to/script/startSuite
     71
     72{{{
     73#!div style="font-size: 80%"
     74{{{#!sh
     75#!/bin/sh
     76########
     77# Cron Script to run Sahana Eden Test Suite
     78########
     79#Server preparation
     80sudo /etc/init.d/cherokee restart
     81sudo /etc/init.d/uwsgi start
     82
     83# Pull latest codes from web2py/web2py (update  web2py)
     84cd /home/web2py
     85sudo git stash
     86sudo git pull upstream master
     87
     88# Pull latest codes from flavour/eden (update Eden)
     89cd /home/web2py/applications/eden
     90sudo git stash
     91sudo git pull upstream master
     92
     93# Delete prepopulated data
     94rm -f /home/web2py/applications/eden/databases/*
     95
     96# Re pre pop db and fix permissions
     97cd /home/web2py
     98python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py
     99chown -R web2py /home/web2py
     100
     101# Run Automated Test Suite
     102cd /home/web2py
     103xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --html-path /home/web2py/applications/eden/static/test_automated/ -V 2
     104
     105# Run Smoke Test (on linkdepth 16)
     106cd /home/web2py
     107xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --html-path /home/web2py/applications/eden/static/test_smoke/ --suite smoke --force-debug --link-depth 16 -V 3
     108
     109# Run Roles Test
     110cd /home/web2py
     111xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite roles --html-path /home/web2py/applications/eden/static/test_roles/
     112}}}
     113}}}
     114
     115
     116