= '''How to update bbmri app''' = == Export war & mysql file == 1. Run the app on your molgenis-legacy workspace (using tomcat, not standalone) 1. Export the war file 1. In eclipse: File--> export --> Web --> war file 1. 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 [mailto:david.van.enckevort@nbic.nl 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. 1. 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. 1. Copy the war file and the mysql migration script to the server as follows: 1. scp .war [mailto:molgenis@molgenis35.target.rug.nl:./ molgenis@molgenis14.target.rug.nl:./] 1. Ssh to the server: * ssh [mailto:molgenis@molgenis35.target.rug.nl molgenis@molgenis14.target.rug.nl] * 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/bbmriDB.mysql * Check the dumbed file if it is not just an error file … * Apply migration steps: * mysql -u molgenis –pmolgenis * use bbmri * * '''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/ * 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 .war /usr/share/tomcat6/webapps/biobanks.war * You can check the tomcat & mysql service with: * sudo service tomcat6 status * sudo service mysqld status * Check your deployment at: [https://molgenis14.target.rug.nl/biobanks/ https://molgenis35.target.rug.nl/biobanks/] '''The same steps apply to the production server molgenis14 . '''