Changes between Initial Version and Version 1 of MolgenisDeployUnderOtherName


Ignore:
Timestamp:
2010-09-28T15:20:34+02:00 (14 years ago)
Author:
jvelde
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MolgenisDeployUnderOtherName

    v1 v1  
     1= How to deploy a MOLGENIS project under a different name =
     2This manual explains how you can succesfully deploy a MOLGENIS project under a different name and database. For example, ''''animaldb'''' instead of ''''xgap_1_4_distro''''. This means you do not have to copy your project in order to set up a new instance with another name.
     3
     4There are two solution flavours, depending on the situation you can make a choice:''''
     5
     6 * ''Permanent solution:'' This change __persists__, but will __only take place__ when you re-generate your project.
     7
     8 * ''Temporary solution: ''This change takes effect __immediatly__, but will be __overwritten__ the next time you re-generate your project.
     9
     10== Project name ==
     11''Permanent solution:'' Change the property 'molgenis name' in the last MOLGENIS XML file that is loaded by the parser. For example: molgenis name="'''animaldb'''" and run !MolgenisGenerator.java''.[[BR]]Temporary solution: C''hange 'getMolgenisVariantID()' in !MolgenisServlet. For example: return "'''animaldb'''";.
     12
     13== Database name ==
     14''Permanent solution:'' Change db name in 'molgenis.properties'. For example: db_uri= !jdbc:mysql://localhost/'''animaldb'''?innodb_autoinc_lock_mode=2 and run !MolgenisGenerator.java.''[[BR]]Temporary solution: ''Change 'url' in META-INF/context.xml. For example: url="!jdbc:mysql://localhost/'''animaldb'''?innodb_autoinc_lock_mode=2".
     15
     16== Deploy name ==
     17Now deploy as '''animaldb.war''' so the URL will be: [http://myserver.somewhere.com:8080/brassica http://myserver.somewhere.com:8080/animaldb]
     18
     19== Optional: add or remove security ==
     20Add or enable to WEB-INF/web.xml the properties <security-constraint>, <login-config>, <security-role>. For example:
     21
     22<!--security-constraint>[[BR]]      <web-resource-collection>[[BR]]                     <web-resource-name>!MolgenisServlet</web-resource-name>[[BR]]                   <url-pattern>*.do</url-pattern>[[BR]]       </web-resource-collection>[[BR]]            <auth-constraint><role-name>'''animaldb'''</role-name></auth-constraint>[[BR]]  </security-constraint>[[BR]][[BR]]      <login-config>[[BR]]            <auth-method>BASIC</auth-method>[[BR]]          <realm-name>MOLGENIS</realm-name>[[BR]] </login-config>[[BR]][[BR]]     <security-role>[[BR]]           <description>[[BR]]             The role that is required to log in to the application.[[BR]]           </description>[[BR]]            <role-name>'''animaldb'''</role-name>[[BR]]     </security-role-->
     23
     24== Final note ==
     25My personal convention is to have the SAME (simple, lowercased) name everywhere. So as molgenis name, database name, deploy name, role name. This will save you a lot of trouble for (hopefully) obvious reasons. The actual name of your base project (from which you can spawn instances) doesn't matter then.