Moves on Windows 7 - Summary

These notes outline the steps needed to be able to build, deploy, and run the Moves application in a Windows 7 environment. I began with IS&T’s Win 7 “Administrative” VM. This had basic MIT stuff like Kerberos installed, but no development tools.

As a developer, you may have some of this software already installed, but it’s useful to have the “from scratch” steps documented.

IMPORTANT: Because the Moves setup requires Kerberized access to SVN, it is important that you have Kerberos 5 tickets before you work with Moves. If you don’t, certain steps can hang or fail with no obvious error message.

Hardware Requirements

I found that at least 4GB of system RAM was necessary to build, deploy, and run Moves on the Windows 7 platform.

Useful Software

This is software I installed that is useful but not necessary for working with Moves:

  1. Firefox (mozilla.org)
  2. 7Zip (http://sourceforge.net/projects/sevenzip)

Required Software

This is software that is necessary for working with Moves:

  • MIT Kerberos for Windows (3.2.x). Version 4 may work but I didn’t test it.
  • Java JDK 6 (oracle.com). I used 1.6.0_38
  • MyEclipse 10 http://www.myeclipseide.com (custom/online installer). More on the MyEclipse config below.
  • svn client from http://www.sliksvn.com/en/download . IMPORTANT: if you already have a development environment set up (MyEclipse etc), make sure the version of SVN you install from sliksvn matches the version you are using in MyEclipse. If you mix svn client versions, project svn metadata could get messed up. Here's a rough guide:
    • If you are currently using a 1.6 client in MyEclipse (i.e. Subversive Connector SVNKit 1.3.8), then download the 1.6 client from sliksvn.
    • If you are currently using a 1.7 client in MyEclipse (i.e. Subversive Connector SVNKit 1.7.5), then download the 1.7 client from sliksvn.
    • If you do not have MyEclipse or SVN installed previously, I'd recommend downloading 1.7 from sliksvn and using the Subversive Connector SVNKit 1.7.5 connector in MyEclipse.
  • maven 3.0.4 binaries from http://maven.apache.org/download.cgi
  • SSH client that is capable of using Kerberos authentication. I used the Putty distribution from (http://www.chiark.greenend.org.uk/~sgtatham/putty/ - download the zip file for Windows that contains all the related binaries including putty and plink) , and reconfigure Putty to use Kerberos authentication (through GSSAPI). See below for details.
  • Oracle OC4J server - see CSF wiki for instructions on download & installation.
  • GNU Win Coreutils from http://gnuwin32.sourceforge.net/packages.html (provides “echo” utility, needed by Moves at runtime).

Steps

1. Configure MyEclipse.

  1. Install and set up MyEclipse as per CSF Wiki instructions.
  2. Set MyEclipse to use the external maven install (the 3.0.4 version)
  3. From Config Center, install Subversive plugin (SVN kit & SVN team provider). Choose the version that matches your SVN client installation (for svn client 1.7.x, use SVNKit 1.7.5 - for svn client 1.6.x, use SVNKit 1.3.8).
  4. From Config Center, install Maven SCM Handler for Subversive (update site URL is http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-subversive/0.13.0/N/0.13.0.201208191312 ). This add-on provides the “checkout as Maven proj” option in the SVN perspective.
  5. Add sais-sis-common as svn repo in MyEclipse SVN perspective (svn+ssh://svn.mit.edu/sais-sis-common)

2. Configure Maven

Configure Maven with “settings.xml” from CSF wiki page on Maven config in $HOME/.m2 folder.

3. Environment Variables

Various Windows environment variables need to be set:

  1. JAVA_HOME=your JDK location (e.g. C:\Program Files\Java\jdk1.6.0_38)
  2. SVN_SSH=C:/bin/plink.exe (or your location of plink.exe). NOTE: these are forward slashes, important for this variable.
  3. PATH: make sure the location of the MIT kerberos binaries is at the front of the path (or at least before the JDK binary folders). This will ensure that Kerberos will find your tickets.
  4. PATH: the following locations should be on the path:
    1. bin directory of your Maven install
    2. bin directory of your SVN install

Verify the kerberos position in the path by first getting Kerberos tickets with Network Identity Manager, then going to a command prompt and typing "klist". You should see a display of your Kerberos tickets, something like this:

Ticket cache: API:your-kerb-name@ATHENA.MIT.EDU
Default principal: your-kerb-name@ATHENA.MIT.EDU

Valid starting     Expires            Service principal
02/07/13 13:55:29  02/07/13 23:54:43  krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU        renew until 02/14/13 13:54:43

4. Putty Configuration.

We need to configure Putty (SSH client) for Kerberized login to svn.mit.edu so that Moves can do password-less logins to svn. The putty suite of apps has two programs we will use: putty.exe, a GUI SSH client, and plink.exe, a command line SSH client. We use putty to create a kerberized login configuration to svn.mit.edu, and we use plink as the SSH client for Moves.

To configure putty & plink, first make sure you have Kerberos 5 tickets via Network Identity Manager, then fire up putty.exe:

  1. Session section: created a saved session called “svn.mit.edu”
  2. Session section: set host name = svn.mit.edu
  3. Connection->data section: Auto-login username = your-kerberos-name
  4. Connection->SSH->Auth->GSSAPI section: check “Attempt GSSAPI Authentication” AND “Allow GSSAPI Credential Delegation”. In Preference Order for GSSAPI libraries, move “ User-supplied  GSSAPI DLL” to the top, then under “User-supplied GSSAPI library path” browse to the installed location of gssapi32.dll in your Kerberos folder (default location is C:\Program Files\Kerberos\bin\gssapi32.dll on 32-bit Windows.)
  5. Session section: hit the Save button to save the config.

To test this config out, go to a command prompt and type:

c:\putty-install-dir\plink.exe svn.mit.edu

where putty-install-dir is the path to your putty installation.

You should immediately see this:

Using username "your-kerb-name".

After a short while you should be logged into the svn server and should see:

RHN kickstart on 2009-01-14
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay ) ) )

Type “quit” to log out.

5. Configure SVN

To configure svn to use this SSH config, first set the SVN_SSH environment variable. NOTE: these are forward slashes, important for this variable:

SVN_SSH=C:/bin/plink.exe

Then from the command line, try this in a temp directory:

svn co svn+ssh://svn.mit.edu/sais-sis-common/maven/releases/branches/playground c:\some-temp-dir

This should check out the referenced project into a subdirectory of your temp directory. Note that access to svn seems very slow, so don’t give up on it too soon - wait a minute or two for the checkout to happen.

6. Java Key Stores.

The following jks files are required. They can be placed wherever you like:

  1. registrar-test.jks
  2. serverTrustStore.jks
  3. moves-test.jks, which I got from a checkout of sais-common-conf

7. Property files.

The following property files are needed to build & run Moves. Place them in your home folder:

  1. sais-moves-web.properties
  2. sais-moves-web-build.properties*
  3. sais-moves-web-test.properties
  4. sais-common-test.properties

The property files all need to be examined and modifications made to username/password, jks locations etc.

In sais-moves-web.properties set these properties:

roles.function.category=APPM
local.mitroles = MOVES_ADMIN, MOVES_MANAGER, MOVES_DEV

* sais-moves-web-build.properties is auto-generated by Moves from the Admin->Build Configuration page. You don’t need to edit this file manually.

8. Other Windows Configuration

Moves requires a c:\tmp directory (/tmp on Unix/Linux). If it doesn’t already exist, create a c:\tmp folder.

9. Check Out Moves from SVN

Now we’re ready to check out the Moves app from Subversion! In MyEclipse, go to SVN perspective, find the sais-moves-web project under sais-sis-common and for the trunk: right-click and Check Out As Maven Project. This should create a working copy of the Moves app, correctly configured for MyEclipse/Maven.

10. Create a build config for Moves

In MyEclipse, create a Run Configuration to do a “clean install exec:exec” for Moves. Set the JVM memory parameters for this run configuration:

-Xmx768m -Xms512m -XX:MaxPermSize=768m

11. Build and deploy Moves:

Start the OC4J server, and then run the clean/install/exec Maven run configuration in MyEclipse.

12. First Test of Moves

Assuming Moves is built & deployed successfully, you should be able to access it via a web browser.

13.Set Up Moves Build Configuration

Once Moves is accessible in the web browser, you will need to set up the build configuration. In the Moves app, navigate to Administration -> Build Configuration and set these variables:

Maven Tab:
  1. Maven Command: mvn
  2. Build Home: a location of your choice, preferably outside of the MyEclipse Moves project location. Use forward slashes (/) not backslashes () in the directory path. I used C:/Users/dev/temp/moves-build
  3. Max Maven Build Time (in seconds): 3600
  4. MIT Maven Repository (containing releases): https://maven.mit.edu/nexus/content/groups/saisGroupRepo/
  5. mit-release-plugin version: 2.0.19 (this version was correct at the time of writing)
  6. Maven System Properties:
    1. javax.net.ssl.trustStore: your location for serverTrustStore.jks. Again, use forward slashes for the path.
    2. javax.net.ssl.trustStorePassword: password for the trust store.
  7. Maven Environment Variables:
    1. JAVA_HOME: path to your JDK. (e.g. C:/Program Files/Java/jdk1.6.0_38)
    2. MAVEN_OPTS: -Xmx768m -Xms768m -XX:MaxPermSize=768m -Djavax.net.ssl.trustStore=/path/toyour/servertruststore/file -Djavax.net.ssl.trustStorePassword=XXXXXX
    3. PATH: this is a semi-colon delimited path (using forward slashes) for binaries needed by Maven when Moves does builds, releases etc. It should contain the locations of:
      1. MIT Kerberos binaries (klist, kinit etc)
      2. JDK binaries
      3. Maven itself (mvn.exe)
      4. Windows system binaries (e.g. C:/Windows/system32)
      5. SVN binary (svn.exe)
    4. As an example, my maven PATH is set to: C:/Program Files/Kerberos;C:/Program Files/Java/jdk1.6.0_38/bin;C:/apache-maven-3.0.4/bin;C:/Windows/system32;c:/svn/bin
Subversion Tab:
  1. Svn Location of MIT Releases project: svn+ssh://svn.mit.edu/sais-sis-common/maven/releases/branches/playground
    Note that because we are using putty/plink, the “svn.mit.edu” spec here will point to a Putty saved session called “svn.mit.edu” - this is necessary so we can use the Kerberos authentication we set up for Putty. So it is important that the Putty saved session you created above is actually named “svn.mit.edu”.
  2. Subversion Command: svn
  3. Subversion Environment Variables:
    1. SVN_SSH: location of your “plink.exe”, using forward slashes (e.g. C:/bin/plink.exe).
OC4J Tab:
  1.   OC4J Home: path to your OC4J home folder, using forward slashes (e.g. C:/oracle/oc4j/j2ee/home)

After you’ve done all this, hit Save, and this info should be saved in the sais-moves-web-build.properties file in your home directory.

14. Using Moves

First, make sure you have Kerberos tickets via Network Identity Manager.

Now you are ready to actually use Moves. Navigate to the Home page and click “Build a Release”. This will take quite a long time (several minutes), but eventually you should see a list of all projects available for building a release.

From here you should be able to do all the Moves functions.

  • No labels