Changes between Version 30 and Version 31 of SopUpdateBbmriApp


Ignore:
Timestamp:
2013-05-29T14:12:20+02:00 (11 years ago)
Author:
antonak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SopUpdateBbmriApp

    v30 v31  
    2525 1. If you know the exact changes of the database, compared to the old version in live server, then the migration script is consisted of the commands that synchornize the two versions.
    2626 1. You do not know, you can can compare the mysql dump files between the live and the local version. This is easier if you dump only the schemas (not the data) .
    27    1. First ssh to molgenis14, create file & copy it 
     27   1. First ssh to molgenis14, create file & copy it
    2828     1. ssh molgenis@molgenis14.target.rug.nl
    2929     1. create a dump file: mysqldump --no-data, -d bbmri -u molgenis –pmolgenis > ~/databaseDumps/<date>bbmriDBlive.mysql
     
    3232   1. diff <date>bbmriDBlive.mysql <date>bbmriDBlocal.mysql
    3333
    34 === 2.2 copy war file & migration script from your  computer to test server ===
     34=== 2.2 Copy war file & migration script from your  computer to test server ===
    3535 1. Copy the war file and the mysql migration script  from your computer  to the server as follows:
    3636   1. scp  <filename>.war molgenis@molgenis35.target.rug.nl:./
    3737   1. scp <migrationScriptFilename> molgenis@molgenis35.target.rug.nl:./
    3838
    39 === 2.3 Export data from LIVE server ===
    40 === 2.5 Copy data from your computer to test server ===
     39=== 2.3 Copy live data from your computer to test server ===
    4140 1. scp   ./mysql<date>LIVEdata.mysql molgenis@molgenis35.target.rug.nl:./databaseDumps/mysql<date>LIVEdata.mysql
    4241
    43 === 2.6 Deploy at test server ===
     42=== 2.4 Deploy at test server ===
    4443 1. Ssh to the server:
    4544   * ssh  !molgenis@molgenis35.target.rug.nl
    4645   * You are now at /srv/molgenis/ where your files where copied.
    4746
    48 === 2.7 Backup ===
    49  1. '''BACKUP your DATABASE FIRST''':
    50    * mysqldump bbmri -u molgenis –pmolgenis  > ~/databaseDumps/<date>bbmriDB.mysql
    51    * Check the dumbed file if it is not just an error file …
    52 
    53 === 2.8 Insert the data from live server to test server ===
    54 compare the sql file from test server with the live server. then make a migrationscript and insert this tables into testserver
    55 
    56 === * mysql -u molgenis -pmolgenis bbmri < 29Maydump.mysql ===
    57   ===
    58 
    59 === 2.9 Apply migration steps: ===
     47=== 2.5 Backup Database ===
     48 1. mysqldump bbmri -u molgenis –pmolgenis  > ~/databaseDumps/<date>bbmriDB.mysql
     49 1. Check the dumbed file if it is not just an error file …
     50
     51=== 2.6 Insert the data from live server to test server ===
     52 * '''Insert live data (copied from your computer previously) '''
     53   * mysql -u molgenis -pmolgenis bbmri < ./databaseDumps/mysql<date>LIVEdata.mysql
     54
     55
     56
     57=== 2.7 Apply migration steps: ===
    6058 * mysql -u molgenis –pmolgenis
    6159 * use bbmri
    6260 * <apply mysql commands>
    63  * '''Backup & replace the war file on server''':
    64    * The war file is in /usr/share/tomcat6/webapps/biobanks.war
    65    * cp  /usr/share/tomcat6/webapps/biobanks.war ~/warFiles/<date_bbmri.war>
     61
     62=== '''2.8 Backup & replace the war file on server''': ===
     63 * The war file is in /usr/share/tomcat6/webapps/biobanks.war
     64 * BACKUP : cp  /usr/share/tomcat6/webapps/biobanks.war ~/warFiles/<date_bbmri.war>
    6665 * Delete the old *.war  (Do NOT stop tomcat; leave it running): rm /usr/share/tomcat6/webapps/biobanks.war
    6766 * Wait a few seconds; Tomcat will notice the *.war is gone and then it will remove the unzipped folder.
     
    7271   * sudo service mysqld status
    7372
    74  * Check your deployment at: https://molgenis35.target.rug.nl/biobanks/
    75 
    76 == ''' The same steps apply to the production server molgenis14 . ''' ==
     73= 3. Check your deployment  =
     74=  *  Check your deployment at: https://molgenis35.target.rug.nl/biobanks/
     75
     76 =
     77'''The same steps apply to the production server molgenis14 .'''
     78
    7779== '''Appendix ''' ==
    7880 * Find miscellaneous issues here: http://www.molgenis.org/wiki/DespoinaLog