You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This section will walk a developer through the steps of setting up Moves, on Windows or Linux. It does not cover OC4J installation, since that is covered elsewhere in this Wiki.

Prerequisites

A machine running Windows or Linux. (This should work for Macs too... but the author does not use a mac).
OC4J should be running, and accessible on port 8888 (preferably).
In your oc4j/j2ee/home/config folder, there should be a file called default-web-site.xml, that looks something like this:

Example default-web-site.xml
<?xml version="1.0"?>
<web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd"
    port="8888"
    display-name="OC4J 10g (10.1.3) Default Web Site"
    schema-major-version="10"
    schema-minor-version="0" > 
	<default-web-app application="default" name="defaultWebApp" />
	<web-app application="system" name="dms0" root="/dmsoc4j" />
	<web-app application="system" name="dms0" root="/dms0" />
	<web-app application="system" name="JMXSoapAdapter-web" root="/JMXSoapAdapter" />
	<web-app application="default" name="jmsrouter_web" load-on-startup="true" root="/jmsrouter" />
	<web-app application="javasso" name="javasso-web" root="/jsso" />
	<web-app application="ascontrol" name="ascontrol" load-on-startup="true" root="/em" ohs-routing="false" />
	<access-log path="../log/default-web-access.log" split="day" />
</web-site>

(Don't worry that we will not be developing over https, since in production, https is handled by the apache server).

What we'll set up

  • A recent JDK, with strong cryptography enabled
  • SSH (or PuTTY on Windows)
  • Kerberos
  • Subversion with kerberos authentication
  • Maven (with MIT trustore)
  • The link to the Development Moves component registry.

Setting up your JDK.

Get as recent a version of the JDK as MIT IS&T support, and install the Java Cryptography Extension (JCE) Unlimited Strength FOR THAT JDK. Make sure you get the JDK, and not just the JRE. Also make sure that the JDK is the FIRST java found in your path, and that you have the System environment variable JAVA_HOME pointing to that JDK. To install the JCE, simply backup %JAVA_HOME%/jre/lib/security/local_policy.jar and %JAVA_HOME%/jre/lib/security/US_export_policy.jar with the copies in the JCE zip file. For my windows jdk, the location was C:/Program Files/Java/jdk1.6.0_29/jre/lib/security.

SSH setup

SSH on Ubuntu

type sudo apt-get install subversion

SSH on Windows

Download PuTTY (e.g from here)
Make a note of the path (for example C:/Program Files (x86)/PuTTY

At this stage you must be able to type C:/Program Files (x86)/PuTTY/plink svn.mit.edu and get a connection. The connection will look something like the following, until you hit CTRL-C

Last login: Wed Nov 30 12:22:56 2011 from west-ninetytwo-fourty.mit.edu

RHN kickstart on 2009-01-14

( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay ) ) )

Kerberos

Moves does a WHOLE LOT of subversion activity. Unless you set yourself up for password-less authentication, you're gonna spend most of your life typing in your kerb username and password over and over again. Since you probably won't get an ssh private key installed on svn.mit.edu, you're gonna have to set yourself up with Kerberos. When we have Kerberos hooked up with svn, you'll only have to type in your username once per session. (A session lasts for about 10 hours). Sharing a production ssh key is not advisable (though it's been done).

Kerberos on Ubuntu (should work for Debian)

Type which kinit. If that doesn't return anything, type
\$ sudo apt-get install ssh-krb5 krb5-user krb4-config
type
\$kinit
and enter in your kerberos username and password. If that works, you're done.
If it doesn't, then type
# sudo mv /etc/krb5.conf /etc/krb5.backup
Type
# sudo gedit /etc/krb5.conf
and copy the attached file to /etc/krb5.conf
(works for me).

Kerberos on Windows

If you have 64 bit windows, install the 64 bit kerberos client first, from http://www.secure-endpoints.com/#kfw
For 32 bit AND 64 bit windows, install the 32 bit client from http://web.mit.edu/kerberos/dist/index.html#kfw-3.2
Restart windows if it asks you to

If all went well you should be able to open a (new) command prompt and type
C:/Program Files (x86)/PuTTY/plink svn.mit.edu
This time, instead of asking you at the command line to type in your username, a dialog box will pop up, looking something like this:

The beauty of this is that next time you type C:/Program Files (x86)/PuTTY/plink svn.mit.edu you will not be asked for your password.
Try it and see. You should get this step working before proceeding.

Subversion

Subversion on Ubuntu

\$ sudo apt-get install

Subversion on Windows

  • Download Subversion from Collabnet. (You'll probably need to register).
  • The 32 bit client is recommended, even if you have 64 bit windows... 'cos we'll be talking to Putty and Kerberos, and Putty is 32 bit only.
  • Put Subversion in your path.

If all is well we should now be able to list subversion repositories without a password (or at least the second time we try listing a repository we should not get asked for a password. Try the following command twice. You should be asked for a password 0 or 1 times only. (0 if you're already authenticated with kerberos, 1 if you're not.

svn ls svn+ssh://svn.mit.edu/sais-sis-common/maven/releases/trunk

Maven (with MIT trustore)

Get the latest 2.x version of maven from http://maven.apache.org/download.html (unless MIT IS&T is already on 3.x when you're reading this document).
Install it to C:\Program Files\apache-maven-x.x.x (where x.x.x is the version you downloaded)
Set MAVEN_HOME=C:\Program Files\apache-maven-x.x.x (where x.x.x is the version you downloaded)
Set MAVEN_OPTS=-Xmx1024m -Xms1024m -XX:MaxPermSize=1024m -Djavax.net.ssl.trustStore=c:\Users*${your-user-name}*\.m2\maven-serverTruststore.jks -Djavax.net.ssl.trustStorePassword=changeit
(don't worry about the file c:\Users*${your-user-name}*\.m2\maven-serverTruststore.jks just yet, we'll get to that).

Now we will export settings.xml and maven-serverTruststore.jks into your maven m2 home directory from the bamboo build configuration repository (which always has the latest/greatest).
On windows 7, the maven m2 home directory will be c:\Users*${your-user-name}\.m2. On Linux, it will likely be /home/${your-user-name}*/.m2

If the folder does not exist, create it. Then in a command shell change to that directory.
If the folder already contains settings.xml and/or maven-serverTrustStore.jks, rename them to settings.xml.backup and/or maven-serverTrustStore.jks.backup.
Now type
svn export svn+ssh://svn.mit.edu/sais-sis-common/sais-common-conf/trunk/.m2/settings.xml
and then
svn export svn+ssh://svn.mit.edu/sais-sis-common/sais-common-conf/trunk/maven-serverTrustStore.jks

We are ALMOST at the point where you can build commons, commons-workflow and moves.

  • No labels