Introduction
============
This is the Java library providing interop capability with the SOA feature
on Windows HPC cluster.
All the source code reside in src\ folder. Samples are put under samples\.
Prerequisites
=============
1) JDK 1.6.0.23
Please follow JDK's instructions on how to install.
2) CXF 2.4.0 (Warning: other versions of CXF may not work.)
Download apache-cxf-2.4.0.zip to home directory. unzip it there.
How to build
============
Assuming you are on Linux,
1) On client machine download and install all "Prerequisites".
2) Switch to src\ directory and edit makejar.sh
( makejar.cmd if you are one Windows ).
3) Make sure CXF_HOME points to the correct location.
E.g., "export CXF_HOME=~/apache-cxf-2.4.0".
4) Run "makejar.sh" without any argument.
How to setup the system
=======================
On both head node and broker node, setup certificate.
(NOTE: if your broker node is your head node, only do it for once.)
a) make sure makecert.exe is in your PATH.
NOTE: you might need to install Windows SDK to get makecert.exe.
Or install Visual Studio 2010 to get Windows SDK.
b) Create a self-signed certificate. Run the following command in
elevated console:
createcert.cmd <nodename>
Createcert.cmd can be found under ~\tools\ directory.
c) Install the certificate. In PowerShell, run as an admin user,
- Set-ExecutionPolicy Unrestricted
- installcert.ps1 install
- select the new certificate just created above. It's the one named
"CN=<nodename>". Normally it should be the last one.
On java client (Linux) machine, set up SSL trust between Java client and Headnode/BrokerNode.
- Create the environment variable JAVA_HOME and set it to the Java installation path. Compile the GetCert.java under ~/tools/
- "$JAVA_HOME/bin/javac" GetCert.java
a) Create head node and broker node certificates.
- "$JAVA_HOME/bin/java" GetCert <HeadNode>
- The above should create a file called "cacerts_new"
- If broker node is a different node, call "$JAVA_HOME/bin/java" GetCert <BrokerNode>
- The above should update the file "cacerts_new" with the certificate for broker node
- copy ecacerts to overwrite $JAVA_HOME/jre/lib/security/cacerts (NOTE: You need administrate privilege on Vista/7)
Please note the above step on linux client is only required when the preference file ~/.java/.userPrefs/com/microsoft/hpc/scheduler/session/prefs.xml exists and contains the following entry:
<map MAP_XML_VERSION="1.0">
<entry key="RequireSSLValidation" value="true"/>
</map>
If the preference file does not exist or the value is "false" for the key "RequireSSLValidation", the certificates are not required.
How to use
==========
Refer to sample\helloworld\README.Linux.txt for how to use this library.
How to get WSDL
===============
Normally, WSDL is not needed since the Java Session API has already been
created. However, if you wish to develope your own client (e.g., a python
API), you need to configure the cluster to expose WSDL correctly.
To do this, on head node, edit %CCP_HOME%Bin\HpcSession.exe.config. Replace
"localhost:443" with your <headnode>:443.
For example, assume your headnode is called "HeadNode1"
<services>
<service name="Microsoft.Hpc.Scheduler.Session.Internal.SessionLauncher.SessionLauncher" behaviorConfiguration="EnableMetadata">
<host>
<baseAddresses>
<add baseAddress="https://HeadNode1:443/SessionLauncher"/>
</baseAddresses>
</host>
...
</service>