Changes between Version 4 and Version 5 of SysAdmin/ContinuousIntegration


Ignore:
Timestamp:
12/17/12 12:57:16 (12 years ago)
Author:
spM
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SysAdmin/ContinuousIntegration

    v4 v5  
    2727=== Edit cron times: ===
    2828 (Currently set to run Test Suite every 6 hours every day of every week of every month of every year)
    29 
     29{{{#!sh
    3030crontab -e
     31}}}
    3132
    3233=== Location of Web2Py and Eden Directory ===
     
    131132}}}
    132133
    133 
    134 
     134=== Postgresql Instance Details for CI Server ===
     135
     136'''Database name''': sahana
     137
     138'''Database user''': kunal
     139
     140'''Database user password''': eden
     141
     142'''Host''': localhost
     143
     144'''Port''': 5432
     145
     146
     147==== How to Connect to Sahana Database from the console ====
     148{{{#!sh
     149psql -d sahana -U kunal
     150}}}
     151
     152==== How to Restart Postgresql Server (You can give it a shot, if psql fails to connect) ====
     153{{{#!sh
     154sudo su - postgres
     155/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
     156}}}
     157
     158===  Other Useful Linux command sets ===
     159
     160* '''Pre-populate database (any type of db)''' :
     161{{{#!sh
     162cd ~web2py
     163sudo python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py
     164}}}
     165* '''chmod directory recursively (chmod everything inside dir with -R):'''
     166{{{#!sh
     167chmod -R 777 /home/web2py
     168}}}
     169* '''start web2py'''
     170{{{#!sh
     171cd ~web2py
     172python web2py.py -a root
     173}}}
     174* '''reboot server'''
     175{{{#!sh
     176sudo /sbin/reboot
     177}}}
     178* '''Restart Cherokee'''
     179   {{{#!sh
     180   sudo /etc/init.d/cherokee restart
     181   }}}
     182* '''Restart Web2Py SSL'''
     183   {{{#!sh
     184   sudo /etc/init.d/uwsgi start
     185   }}}
     186* '''Recreate Sahana DB''' :
     187{{{#!sh
     188psql -U postgres -c "drop database sahana"
     189psql -U postgres -c "create database sahana"
     190psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE sahana to kunal" #Assuming kunal is the name of the postgresql username which will be used by Sahana Eden instance
     191psql -d sahana -U kunal
     192}}}
     193* '''Setup Cron''' :
     194{{{#!sh
     195crontab -e
     196}}}
     197'''Note''' : You can refer to examples of crontab expressions here : http://code.google.com/p/ncrontab/wiki/CrontabExamples
     198* '''start Window based applications (x11)''':
     199  * If the GUI window of the application is of no intrest to you
     200  {{{#!sh
     201  xvfb-run -a *test commands here*
     202  }}}
     203  For example :
     204  {{{#!sh
     205  xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A -V 2
     206  }}}
     207  '''Note''': Xvfb basically makes a virtual display which isn't displayed anywhere. Xserver itself actually requires a real display
     208  * If you want to see the GUI interface of the application
     209    * If your machine you use to ssh into the server, has X Server installed, then you can access the GUI window by using the -X flag when loggin into the server
     210    {{{#!sh
     211    ssh -X youraccount@82.71.213.53
     212    }}}
     213    And now, if you simply execute any application which has a Xserver attached to it, it will be displayed on your screen.