Changes between Version 20 and Version 21 of OpenSpecimen HowTo Install


Ignore:
Timestamp:
05/19/16 11:23:19 (9 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenSpecimen HowTo Install

    v20 v21  
    3131}}}
    3232
    33 == Notes from watching Nitesh upgrade our dev version
    34 
    35 1. Our customisations are in the file {{{/local/os_v20/app/plugin-dir/os-le-1.0.0.jar}}}.  This file can be copied between installations.
    36 2. He copied the build zip file (linked in the page above) into the directory {{{/local/os_v20/installable}}} and unzipped it.
    37 3. `cd` into the newly unzipped folder.
    38 3. `chmod 744 install.sh
    39 6. Run:
    40 
    41 {{{
    42 nohup ./install.sh -dhost localhost -dport 3306 -dname {db name} -duser {db user name} -dpass {db password name} -dtype mysql -ahome /local/{Open Specimen Directory}/app -ahost localhost -aport 8280 -adtype fresh -adatadir /local/{Open Specimen Directory}/app/os-data -aplugindir /local/{Open Specimen Directory}/app/plugin-dir &
    43 }}}
    44 
    45 7. Run `cp /local/{Open Specimen Directory}/installable/os-le-1.0.0.jar /local/{Open Specimen Directory}/app/plugin-dir`
    46 
    47 7. Create the script `run_open_specimen.sh`:
    48 
    49 {{{
    50 #!/bin/bash
    51 
    52 unset JAVA_TOOL_OPTIONS
    53 export JAVA_ROOT=/usr/lib64/jvm/java
    54 export JDK_HOME=/usr/lib64/jvm/java
    55 export SDK_HOME=/usr/lib64/jvm/java
    56 export JAVA_BINDIR=/usr/lib64/jvm/java/bin
    57 export JRE_HOME=/usr/lib64/jvm/java/jre
    58 JAVA_HOME=/opt/java
    59 JRE_HOME=/opt/java/jre
    60 OPEN_SPECIMEN_DIR=/local/{Open Specimen Directory}/app
    61 
    62 export JAVA_TOOL_OPTIONS=-XX:CompressedClassSpaceSize=10m
    63 export JAVA_OPTS="-Xmx2G -XX:-UseCompressedClassPointers"
    64 
    65 $OPEN_SPECIMEN_DIR/bin/catalina.sh start >$OPEN_SPECIMEN_DIR/logs/tomcat-start.log  2>$OPEN_SPECIMEN_DIR/logs/tomcat-start.err &
    66 }}}
    67 
    68 8. Create the script `stop_open_specimen.sh`:
    69 
    70 {{{
    71 #!/bin/bash
    72 
    73 unset JAVA_TOOL_OPTIONS
    74 export JAVA_ROOT=/usr/lib64/jvm/java
    75 export JDK_HOME=/usr/lib64/jvm/java
    76 export SDK_HOME=/usr/lib64/jvm/java
    77 export JAVA_BINDIR=/usr/lib64/jvm/java/bin
    78 export JRE_HOME=/usr/lib64/jvm/java/jre
    79 JAVA_HOME=/opt/java
    80 JRE_HOME=/opt/java/jre
    81 OPEN_SPECIMEN_DIR=/local/openSpecimen_v2_4/app
    82 
    83 export JAVA_TOOL_OPTIONS=-XX:CompressedClassSpaceSize=10m
    84 export JAVA_OPTS="-Xmx2G -XX:-UseCompressedClassPointers"
    85 
    86 $OPEN_SPECIMEN_DIR/bin/catalina.sh stop
    87 }}}
    88 
    89 9. Give `www-run` account permission to run the scripts:
    90 
    91 {{{
    92 setfacl -m u:wwwrun:rx /local/{Open Specimen Directory}/run_open_specimen.sh
    93 setfacl -m u:wwwrun:rx /local/{Open Specimen Directory}/stop_open_specimen.sh
    94 }}}
    95 
    96 10. Give `www-run` permission to write to the logs and work directories:
    97 
    98 {{{
    99 setfacl -R -m u:wwwrun:rwx /local/{Open Specimen Directory}/app/logs/
    100 setfacl -R -m u:wwwrun:rwx /local/{Open Specimen Directory}/app/work/
    101 }}}
    102 
    103 11. Give `www-run` and yourself (go on, treat yourself) permission to run Tomcat:
    104 {{{
    105 chmod 774 /local/{Open Specimen Directory}/app/bin/catalina.sh
    106 setfacl -m u:wwwrun:rx /local/{Open Specimen Directory}/app/bin/catalina.sh
    107 }}}
    108 
    109 12.  Then `run_open_specimen.sh` as yourself.  You need to do this to be able to unpack the WAR file.  The site will not come up successfully because there is a bug or somesuch in the database upgrade scripts.
    110 
    111 13. Nitesh changed one of the change sets because it fails if you don't.  Hurray.
    112  1. The file is `/local/{Open Specimen Directory}/app/webapps/openspecimen/WEB-INF/classes/db/2.0/schema.xml`
    113  2. Change `<changeSet author="vlonushte" id="FK on domain name of users table">` to `<changeSet author="vlonushte" id="FK on domain name of users table" failOnError="false">`
    114 
    115 == UPDATE WORKFLOW table to correct format
    116 
    117 Run the command:
    118 
    119 {{{
    120 update os_cp_workflows set workflows = '[{"name":"registerParticipant","view":"plugin-ui-resources/le/collect-specimens.html","ctrl":"leRegAndCollectSpecimensCtrl","data":{"boxOpts":{"dimension":{"rows":8,"columns":12},"compact":false}}}]';
    121 }}}
    122 
    123 == New Process
     33== Process
    12434
    125351. `cd /local`
     
    133437. Check it starts by running `tail -f app/logs/catalina.out`
    13444
     45== UPDATE WORKFLOW table to correct format
     46
     47Run the command:
     48
     49{{{
     50update os_cp_workflows set workflows = '[{"name":"registerParticipant","view":"plugin-ui-resources/le/collect-specimens.html","ctrl":"leRegAndCollectSpecimensCtrl","data":{"boxOpts":{"dimension":{"rows":8,"columns":12},"compact":false}}}]';
     51}}}
     52
     53
    13554[[BackLinks]]