Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
*\[N.B.: I'm in the middle of a rewrite and this is a work in progress.   \--amb 3jan2008\]*

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:

...

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.

GENERAL DEPENDENCIESWHAT YOU'LL NEED

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

  • Java: we use the Java version 1.6 JDK; there are a wide variety of packagings and installation methods if you don't already have it; ask the net about this one. Make sure your JAVA_HOME environment variable is set correctly. (On isda-build1, set JAVA_HOME=/usr/java/jdk1.6.0.)
  • Subversion: if "svn --version" results in "command not found", you need subversion. Again, packagings vary; your operating system may be able to get it for you, or download it from http://subversion.tigris.org.
  • maven: if "mvn -version" results in "command not found", you need to download the latest version of maven (currently 2.0.7) from http://maven.apache.org/download.html and install it locally, making sure to add maven's bin directory to your path.
  • Repository access: if "svn ls svn+ssh://svn.mit.edu/zest/thalia" doesn't do something useful, you can't check out the code; you need to be in the zest-cvs moira group to access the repository.
  • For the UI build only: if "lzc --help" doesn't give you useful help information for the OpenLaszlo compiler, you need to install version 4.0.2 from http://www.openlaszlo.org; this is hairy enough that it's been split off into its own a separate wiki page: OpenLaszlo.  If you're on isda-build1, make sure /home/lps-4.0.2/bin is in your PATH.

BUILDING THE FRONT END

BUILD PREPARATIONNOTE: THIS IS THE NEW SETUP WHICH IS BEING TESTED AS OF 3JAN2008.  FOR THE OLD UI BUILD INSTRUCTIONS, SEE THE CHILD PAGE OF THIS ONE. 

  1. Check out the Thalia code: 
    svn checkout svn+ssh://username@svn.mit.edu/zest/thalia
  2. For a release, create the release branch:
    svn cp ime/Trunk/thalia ime/Branches/thalia<version>-sprint<num>

...

  1. ui/trunk ui/branches/thaliaUI<version>-sprint<num>
  2. Make a clean build of the .swf files that comprise the UI, checking them into the IME trunk in the process:
    cd thalia/ui/branches/thalia<ver>-sprint<num>
    mvn clean package

BUILDING THE BACK END

  1. Check out the Thalia code: 
    svn checkout svn+ssh://username@svn.mit.edu/zest/thalia
  2. For a release, create the release branch:
    svn cp ime/Trunk/thalia ime/Branches/thalia<version>-sprint<num>
  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:
    • The default profile is the development profile on thalia-dev.mit.edu.
    • If you want to choose the test profile, use -Denv=test1 or -Denv=test2(

...

    • When packaging, test1 and test2 are exactly the same. When deploying, test1 deploys to isda-thalia2 and test2 deploys to isda-thalia11.)

...

    • If you want to choose the production profile, use -Denv=prod1 or -Denv=prod2(

...

    • When packaging, prod1 and prod2 are exactly the same. When deploying, prod1 deploys to isda-thalia5 and prod2 deploys to isda-thalia8.)
    • N.

...

    • B.: Part of the profile definition is in thalia/ime

...

    • /Trunk

...

    • /thalia

...

    • /pom.xml under the profiles section; it specifies which servers to deploy to in each environment. Part of the profile definition is in thalia

...

    • /ime

...

    • /Trunk

...

    • /thalia

...

    • /src

...

    • /main

...

    • /filters*.properties files; it specifies the alfresco server address/port and alfresco passwords for user and admin. To change the development environment, edit dev.properties. To change the test environment, edit test.properites. To change the prodution environment, edit prod.properties.
  1. If you're doing a release and the build completed without error, commit the branch:
    svn commit
  2. Deploy the war:
      a. 
      • Check that it's ok to deploy.  Start
      in
      • with the thalia-
      talk chat 
      • talk@conference.mit.edu jabber chat.  If deploying to QA, check in with the QA contractor in thalia-
      qa
      • qa@conference.mit.edu.  If deploying to production, you will already have
      emailed
      • coordinated the downtime with asst@mit.edu
      about the scheduled down time ahead of time
      • and isda-ops@mit.edu so they will not be alarmed when nagios reports the
      nagios service fails on
      • Thalia failure.
       
      6. 
      • There are two ways to deploy: one through the web, and one via maven. 
      Do one of the following:
      DEPLOY WITH MAVEN 
      a.
      • See the DEPLOYING WITH MAVEN or DEPLOYING VIA THE WEB INTERFACE sections following.

DEPLOYING WITH MAVEN

  1. To specify tomcat authentication info in for Maven, add the following line in settings.xml in make sure the lines below are in $M2_HOME/conf/settings.xml  . Username xml , noting that:
    • The username and password are for the tomcat manager
    . Ask
    • ; ask if you don't have that information.
     
    Maven settings are in the maven directory in conf/settings.xml.
    • deploymentserver is used for release to the development cluster.
    • testserver* is used for release to the test cluster.
    • prodserver* is used for release to the production cluster.

          <server>
            <id>deploymentserver</id>
            <username>username</username>
            <password>password</password>
          </server>
          <server>
            <id>testserver1</id>
            <username>username</username>
            <password>password</password>
          </server>
          <server>
             <id>testserver2</id>
             <username>username</username>
             <password>password</password>
          </server>
         <server>
            <id>prodserver1</id>
            <username>username</username>
            <password>password</password> 
         </server>
         <server>
            <id>prodserver2</id>
            <username>username</username>
            <password>password</password>
         </server>

  2. c. Deploy The commands to deploy with Maven:
      mvn tomcat:undeploy
      • To deploy to the development server (the default), just run:
        mvn tomcat:
      deploy
      This should also work:
      mvn clean tomcat:deploy
      By default this will undeploy and deploy thalia on the development server.
      • undeploy
        mvn tomcat:deploy
      • To deploy to the QA (test) environment:
       mvn
      • mvn tomcat:undeploy -Denv=test1
       mvn
      • mvn clean tomcat:deploy -Denv=test1
       mvn
      • mvn tomcat:undeploy -Denv=test2
       mvn
      • mvn clean tomcat:deploy -Denv=test2
      • To deploy to production:
       mvn
      • mvn tomcat:undeploy -Denv=prod1
       mvn
      • mvn clean tomcat:deploy -Denv=prod1
       mvn
      • mvn tomcat:undeploy -Denv=prod2
       mvn
      • mvn clean tomcat:deploy -Denv=prod2
      DEPLOY BY WEB PAGE

DEPLOYING VIA THE WEB INTERFACE:

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

  1. Download the freshly built ROOT.war from isda-build1  to your local machine.

...

  1. Open the Tomcat server manager for each front end in a web browser.  (http://hostname/manager/html/upload

...

  1. )

...

  1. Undeploy the root

...

  1. application, /.

...

...

  1. Further down the page, upload the ROOT.war you built just before.

FINAL STEPS:


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

...

  • you can create an album
  • you can create a slideshow 

...


DEPLOYING the STATIC HTML

...

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

Static html is deployed from svn+ssh://svn.mit.edu/zest/thalia/website//help to /home/apache-tomcat-5.5.23/webapps/help  .    You help on the relevant IME servers; you may either copy check out the files with svn directly to the target machine, 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, as it is always the up to date Branched version, or you can copy only the newly updated files if you have a list.

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