How to update a LAT component

  1. Extract the tarball. You will receive a tarball (.tar.gz archive) from MPI containing the new version of the webapp. Copy it to the LAT server and extract it to the directory of the corresponding web app.
    Example: You want to update LAMUS. The webapps are located in /lat/webapps, so extract the lamus tarball to /lat/webapps/lamus.
  2. Extract the webapp. Inside the newly extracted directory, find the WAR archive (which is just a zip file containing the actual web app) and extract it
    Example:
    cd lamus-1.x.x/war
    unzip lamus-1.x.x.war
  3. Follow update instructions. Read the UPDATES.txt, CHANGES.txt and INSTALL.txt files inside the app package and follow the instructions for you specific update path if any. Make any required changes to the corresponding context.xml in /lat/conf etc.
  4. Link new version to ./current. The tomcat servers are configured such that they will load an app from the /lat/webapps/[app name]/current directory which is a symbolic link to the most recent (or currently active) version of the app. To make tomcat use the new version, you have to adjust the symlink.
    Example:
    # we are in /lat/webapps/lamus.
    rm current
    ln -s lamus-1.x.x/war/ ./current
  5. Configure the app for LANA Authentification. The software as packaged by MPI is configured for Shibboleth authentification, but we’re using LANA AMS authentification.
    To configure the package to use LANA, open the file current/war/WEB-INF/web.xml (given you have updated the current symlink as described in the previous step). Do a couple of changes:

    1. Find the section that looks like the example below. Find the “Shibboleth Auth” section and comment it out. Below that there is usually the LANA section commented out. Uncomment the LANA section.
      The web.xml looks slightly different for each package, but the general procedure is the same. The Shibboleth and LANA sections are usually denoted as such by a comment. If not, have a look at web.xml from another package and see how these sections look so you can identify them later.
    2. Inside the now uncommented LANA section, find the following entry.
      <init-param>
         <param-name>authenticationService</param-name>
          <param-value>[something]AuthenticationSrv</param-value>
          </init-param>
      Make sure that the ONLY non-commented param-value for authenticationService is amsAuthenticationSrv. Delete or comment out all other values if present.
    3. If there is a commented out section somewhere in the file looking like the one below, uncomment it:
      <resource-ref>
         <description>AMS2DB Datasource</description>
         <res-ref-name>${db.ams2.jndi.name}</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
      </resource-ref>
  6. Adapt Tomcat configuration. For some updates, it is required to modify the tomcat configuration such that it loads the app with IMDI AMS support instead of CMDI AMS support. This is not required for all LAT components, but it doesn’t hurt to perform this step just to be sure.
    1. Inside the directory of the tomcat server in which the updated application lives (eg. /lat/tomcat-corpman for LAMUS, /tomcat-webuser/ for ASV, Annex, Trova, etc…), enter the conf/Catalina/localhost subdirectory.
    2. Open the .xml file that corresponds to the URL of the updated application, eg. ds#asv.xml for ASV or jkc#lamus.xml for Lamus.
    3. Inside the <Context> element, add the following context parameter:
      <Parameter name=”spring.profiles.active” value=”ams-old” />
  7. Perform component dependent configuration
    General
    Re-apply any branding customisations you might have done in the HTML and JSP files
    AMS2
    AMS contains a script to restart the Apache Web Server so it will apply changed access rights. Make sure the script has the right permissions. It needs to be owned and executable by latuser.-rwxr-xr-x 1 latuser latuser 398 Mar 3 14:25 /lat/webapps/ams2/current/WEB-INF/scripts/apacherestart.shNext, edit apacherestart.sh, comment out the command beginning with “/etc/init.d/“ and uncomment the command beginning with “/lat/init.d-scripts/“.
  8. Restart LAT
    sudo /lat/init.d-scripts/lat restart

How to install a new LAT component

In the unlikely event of you receiving a new LAT webapp to install, the process is generally the same as with updating as described above except of these two additional steps:

  1. Create the webapp directory for the new app below /lat/webapps/.
  2. Create a new tomcat configuration file to mount the webapp to an URL.
    1. Find out (ask MPI) in which tomcat the new app is supposed to live in (corpman, webuser or ams).
    2. Given you want to install the app foobar that is supposed to run inside tomcat-webuser: enter /lat/tomcat-xxx/conf/Catalina/localhost/
    3. create a file named ds#foobar.xml with the following content:
      <?xml version=’1.0′ encoding=’utf-8′?>
      <Context path=”/ds/foobar” docBase=”/lat/webapps/rrs/current” debug=”0″ reloadable=”true” crossContext=”true”>
      <Parameter name=”spring.profiles.active” value=”ams-old” />
      </Context>

      where path is the url path used to access the application over the WEB and docBar is where you extracted the WAR file.

Facebooktwittergoogle_pluslinkedin