wiki:SopUpdateBbmriApp

Version 2 (modified by antonak, 12 years ago) (diff)

--

How to update bbmri app

Export war & mysql file

  1. Run the app on your molgenis-legacy workspace (using tomcat, not standalone)
  2.  Export the war file
    1. In eclipse: File--> export --> Web --> war file
  3. The database is updated as follows: apply the mysql changes that you have made locally to the database on the server, so that you have the latest version of data for the server and the changes you want applied there. About the database changes you need to track them in a migration a file like one in the end of this document.

Deploy to server

  1. As also listed here: http://www.molgenis.org/wiki/MolgenisServers the test server is at molgenis35(https://molgenis35.target.rug.nl/biobanks/) and the production server at molgenis14(https://catalogue.bbmri.nl/biobanks/) .
  1. First deploy at test server, notify david.van.enckevort AT nbic.nl. He will notify BBMRI office, they will review the changes and if everything is ok proceed to updating bbmri production server. 
  2. Deploy at test molgenis14 (Take a look here also http://www.molgenis.org/wiki/SopCreateMolgenisVM#SopDeploymentForDevs ) : 
    1. Ask credentials for molgenis35, molgenis14 from Pieter or Morris.
    2. Copy the war file and the mysql migration script to the server as follows:
      1. scp  <filename>.war molgenis@…
    3. Ssh to the server:      
      • ssh molgenis@…
      • You are now at /srv/molgenis/ where your files where copied.
      • The database is bbmri, so in order to apply the migration steps you created:
      • BACKUP your DATABASE FIRST
        • mysqldump bbmri -u molgenis –pmolgenis  > ~/databaseDumps/<date>bbmriDB.mysql
  •   Check the dumbed file if it is not just an error file …
  •   Apply migration steps:
    • mysql -u molgenis –pmolgenis
    • use bbmri
    • <apply mysql commands>
  • Backup & replace the war file on server:
    • The war file is in /usr/share/tomcat6/webapps/biobanks.war
    • cp  /usr/share/tomcat6/webapps/biobanks.war ~/warFiles/<date_bbmri.war>
  • Now replace the file there with your recent file uploaded in the server. This will OVERWITE the old file and tomcat will take affect immediately. Do not delete the old first, that won’t work! Just overwrite it!
    • cp   <filename>.war  /usr/share/tomcat6/webapps/biobanks.war
  •  You can check the tomcat & mysql service with: 
    • sudo service tomcat6 status
    • sudo service mysqld status