HOW TO build and release Thalia

Contents:

  1. Prepration
  2. Code Build and Release
  3. Deploying the Static HTML

PREPARATION 

ARE YOU DOING A RELEASE?
Before deploying anything, confirm that you won't interrupt anyone else's work:

BEFORE STARTING:

  1. Make sure all developers have checked in their code.
  2. For releases, make sure everyone has resolved their fixed bugs so the release notes are accurate.
  3. Make sure you have no uncommitted code hanging around in your local working copy, if that's what you're using for the build. ("svn status")

CODE BUILD AND RELEASE

Thalia code has two pieces: the IME back end, which is a Java .war file, and the .swf front end, which is written in OpenLazlo. The .swf front-end is built into the IME's .war file, although it's actually a distinct build and may be a separate .war file at some point in the future.

WHAT YOU'LL NEED

To build Thalia, you need the following tools which you may already have (and which are already installed on isda-build1):

BUILD PREP

  1. Log in to isda-build1.mit.edu as the isdasnap user. Any test, staging, or production build is built as user isdasnap on isda-build1.mit.edu . This ensures we are installing identical executables in all environments. To ssh in, you must be in isdasnap 's .k5login file.
  2. Check out the source code:
    svn checkout svn+ssh://username@svn.mit.edu/zest/thalia
    (Note the revision number reported; you'll want it later to confirm the release.)
    Note that the front end code is in thalia/ui/trunk, while the back end code is in thalia/ime/Trunk.

BUILDING THE FRONT END

N.B #1.: These instructions replace the old interactive build using the OpenLaszlo server's dynamic compilation facilities.

N.B. #2: If you're building on isda-build1 and the UI binaries built from the trunk are appropriate for your build, you can skip the UI build and just have Maven use the autobuild that's already on the system; see below under "BUILDING THE BACK END" for details.

  1. For a QA release, create the release branch:
    svn cp ui/trunk ui/branches/thaliaUI<version>-sprint<num>
    For a production release, create a tag instead:
    svn cp ui/trunk ui/tags/thaliaUI<version>-sprint<num>
  2. ...then build the .swf files that comprise the UI:
    cd thalia/ui/branches/thalia<ver>-sprint<num>
    mvn clean compile
  3. Alternatively, if you just want to build the UI from the trunk:
    cd thalia/ui/trunk
    mvn clean compile
    The .swf files will be in the newly-created (by Maven) target subdirectory.

BUILDING THE BACK END

  1. For a QA release, create the release branch:
    svn cp ime/Trunk/thalia ime/Branches/thalia<version>-sprint<num>
    For a production release, create a tag instead of a branch:
    svn cp ime/Trunk/thalia ime/tags/thalia<version>-sprint<num>#
  2.  If you need to include updated flash files for the UI, do one of:
    1. Copy the files manually. Or,
    2. Invoke the IME build with the -Dincludeui=true option; this will copy the compiled and uncompiled OL code (the IME needs some of each!) from, in order of preference:
      1. The path specified with the -Duipath=/some/path/with/target/and/src/ui/directories option.
      2. The build products from the UI trunk which are part of the same checkout (../../../../../../ui/trunk/target)
      3. The automatic trunk build product directory (only meaningful on isda-build1).
  3. Make a clean build of the .war file:
    cd thalia/ime/Branches/thalia<ver>-sprint<num>
    mvn clean package -Denv=prod1
    This will create or update the target directory and add the file ROOT.war .  Please note that the Thalia maven build has multiple profiles:
  4. If you're doing a release and the build completed without error, commit the branch:
    svn commit
  5. Deploy the war:

DEPLOYING WITH MAVEN

  1. To specify tomcat authentication info for Maven, make sure the lines below are in $M2_HOME/conf/settings.xml , noting that:
  2. The commands to deploy with Maven:

DEPLOYING VIA THE WEB INTERFACE:

There are usually two front ends (IME servers) per environment; you must repeat these steps for each of them. Visit the tomcat manager page for each front end server. See the Thalia environments list for the relevant hostnames.

  1. Download the freshly built ROOT.war from isda-build1  to your local machine.
  2. Open the Tomcat server manager for each front end in a web browser.  (http://hostname/manager/html/upload)
  3. Undeploy the root application, /.
  4. Further down the page, upload the ROOT.war you built just before.

CONFIRMING THE RELEASE:

Point a web browser at any valid domain in the environment you just deployed to. Make sure:

  1. The version number, release date, and subversion revision number reported by the ui (in the top right corner) is as expected.
  2. Add "/info" to the URL, and check that the build date and subversion rev are correct.

FINAL STEPS:

For all deployment methods, do a smoke test to confirm Thalia came back up. Brian Childs suggests:

DEPLOYING the STATIC HTML

Html pages are kept in our subversion repository at svn+ssh://svn.mit.edu/zest/thalia/website/. The HTML is divided into Branches, Tags, and Trunk, like the code, because the help changes with product versions. Make sure to deploy the HTML from the branch relevant to the release of Thalia which has been deployed on the IME server in question.

IME Servers store the static HTML under  /home/www/sash-server/servers/thalia/webapps/  . So far, we use the /about, /help, and /quickstarts directories.

Static html is deployed from svn+ssh://svn.mit.edu/zest/thalia/website/help to /home/www/sash-server/servers/thalia/webapps/  on the relevant IME servers. You may either check out the files directly with subversion right on the IME server or make a fresh copy on your local machine and scp it over.

The entire help directory may be copied, or you can copy only the newly updated files if you have a list.

Don't deploy  the top-level files in svn+ssh://svn.mit.edu/zest/thalia/website/. Most of them are out of date, and the directory is due for a cleanup after Thalia 1.0 sprint 4 . [jriley]