wiki:PostGreSQLBasedServerDeploy

Version 1 (modified by mdehaan, 8 years ago) (diff)

--

Deployment SOP for developers

This SOP describes how to deploy MOLGENIS v2.0 on a server with a clean Golden VM deployed

  • Login on VM
    ssh lobby+molgenis[0-9]
    
  • Execute the following as molgenis user.
    #
    # Edit the existing molgenis-server.properties file
    # 
    echo '
    db_user=molgenis  
    db_password=molgenis  
    db_driver=org.postgresql.Driver
    db_uri=jdbc\:postgresql\://localhost/molgenis?reWriteBatchedInserts=true&autosave=CONSERVATIVE
    admin.password=admin  
    user.password=admin  
    mail.username=<Username>
    mail.password=<Password>
    ' > ~/.molgenis/molgenis-server.properties 
    
    #
    # Install tomcat users
    #
    nano -w ~/apache-tomcat/conf/tomcat-users.xml
    
    #
    # Paste just before the closing tag from tomcat-users (</tomcat-users>):
    # Update the password to the true passwords.
    #
    <role rolename="manager-gui"/>
    <user username="molgenis" password="password" roles="manager-gui,manager-script"/>
    <role rolename="login"/>
    <user username="molgenis_user" password="password" roles="login"/>
    
    #
    # Start Tomcat server
    #
    sudo service tomcat7 start
    
    #
    # Start Apache HTTPD server
    #
    sudo service httpd start
    
  • Deploying a server in Jenkins
  • Make sure that relevant daemons startup on reboot.
    sudo chkconfig
    
    If httpd, tomcat7 or mysqld are off, turn them on:
    sudo chkconfig httpd on
    sudo chkconfig tomcat7 on
    sudo chkconfig mysqld on
    
  • Starting and stopping daemons
    sudo service [daemon] [start|stop|status|reload|restart]
    
    For example to restart Tomcat:
    sudo service tomcat7 restart