| 1 | = Deployment SOP for developers = |
| 2 | This SOP describes how to deploy MOLGENIS v2.0 on a server |
| 3 | with a clean Golden VM deployed |
| 4 | |
| 5 | * Login on VM |
| 6 | {{{ |
| 7 | ssh lobby+molgenis[0-9] |
| 8 | }}} |
| 9 | |
| 10 | * Execute the following as molgenis user. |
| 11 | {{{ |
| 12 | # |
| 13 | # Edit the existing molgenis-server.properties file |
| 14 | # |
| 15 | echo ' |
| 16 | db_user=molgenis |
| 17 | db_password=molgenis |
| 18 | db_driver=org.postgresql.Driver |
| 19 | db_uri=jdbc\:postgresql\://localhost/molgenis?reWriteBatchedInserts=true&autosave=CONSERVATIVE |
| 20 | admin.password=admin |
| 21 | user.password=admin |
| 22 | mail.username=<Username> |
| 23 | mail.password=<Password> |
| 24 | ' > ~/.molgenis/molgenis-server.properties |
| 25 | |
| 26 | # |
| 27 | # Install tomcat users |
| 28 | # |
| 29 | nano -w ~/apache-tomcat/conf/tomcat-users.xml |
| 30 | |
| 31 | # |
| 32 | # Paste just before the closing tag from tomcat-users (</tomcat-users>): |
| 33 | # Update the password to the true passwords. |
| 34 | # |
| 35 | <role rolename="manager-gui"/> |
| 36 | <user username="molgenis" password="password" roles="manager-gui,manager-script"/> |
| 37 | <role rolename="login"/> |
| 38 | <user username="molgenis_user" password="password" roles="login"/> |
| 39 | |
| 40 | # |
| 41 | # Start Tomcat server |
| 42 | # |
| 43 | sudo service tomcat7 start |
| 44 | |
| 45 | # |
| 46 | # Start Apache HTTPD server |
| 47 | # |
| 48 | sudo service httpd start |
| 49 | }}} |
| 50 | * [http://www.molgenis.org/wiki/GccSopInstallationDeployServerInJenkins Deploying a server in Jenkins] |
| 51 | * Make sure that relevant daemons startup on reboot. |
| 52 | {{{ |
| 53 | sudo chkconfig |
| 54 | }}} |
| 55 | If httpd, tomcat7 or mysqld are ''off'', turn them on: |
| 56 | {{{ |
| 57 | sudo chkconfig httpd on |
| 58 | sudo chkconfig tomcat7 on |
| 59 | sudo chkconfig mysqld on |
| 60 | }}} |
| 61 | * Starting and stopping daemons |
| 62 | {{{ |
| 63 | sudo service [daemon] [start|stop|status|reload|restart] |
| 64 | }}} |
| 65 | For example to restart Tomcat: |
| 66 | {{{ |
| 67 | sudo service tomcat7 restart |
| 68 | }}} |