Getting the caGrid Developer Node

  • Unpack the tar.gz file
  • Install VMware Player on your own machine.
  • Open the vm and log in with the username cagrid, password cagrid. (When you boot the VM, you will be asked if this VM has been copied. Answer yes to create a new unique ID for the VM. Please see ticket:55 for information on configuring the network for this new VM.)
    • Since we chose "Copy," VMware has created a new virtual ethernet card with its own distinct ethernet address, and at first the installed Linux won't apply the network configuration of the original card to the new virtual ethernet card. This gives us the temporary problem of being unable to get the new VM connected to the network.
    • Boot the VM and remove the existing ethernet card configuration.
    • Reboot the VM and allow the VM configuration state to be re-detected and configured.
  • In /home/cagrid/src there is a cagriddownload directory where the installation files discussed in the caGrid install page can be found. The installer can be run from here:

cd /home/cagrid/src/cagriddownload 
java -jar caGrid-installer-1.2.jar

When the installer successfully starts, first you are asked to agree to the caGrid license. If you agree, put a check in I agree and click Next. Then the installer asks which of the following it should do:

  • Install caGrid
  • Configure Container
  • Install caGrid Services
  • Install caGrid Portal

This machine has had the first step performed, Install caGrid. That includes the installation of Ant and Globus, which are prerequisites. If you want to install services such as Dorian, simply check the box beside Install caGrid Services and follow the wiki instructions caGrid install page from the Running the installer section about halfway down the page.

The actual caGrid installation is in /home/cagrid/src/caGrid

Adding Disk Space to caBigBox

Here we will assume there are home directories for users called upt and caarray that we will move to the new space.

Shut down the VM. In VMware Server Console go to Settings of the VM and click Add. Add a new virtual disk, 10 GB. Say no to pre-allocating and yes to splitting into 2 GB files. Then just Finish the wizard and click OK. Start the VM.

df
fdisk /dev/sdb
sfdisk -l /dev/sdb
mke2fs -j /dev/sdb1
mkdir /share
mount /dev/sdb1 /share
df
mkdir share/home
cd ..
ls -l
mv upt /share/home ; mv caarray /share/home
cd /home
ln -s /share/home/upt upt
ln -s /share/home/caarray caarray

Tutorials

HelloWorld or other ad hoc service

We can put our notes here about services we create or modify that are not structured tutorials provided by caBIG. One service that is already present as an example to be modified is HelloWorld.




Introduce 1.2 - Stock Quoting Grid Service Example

There is a good tutorial for Introduce 1.2 at http://www.cagrid.org/wiki/Introduce:1.2:Tutorial. This can be performed on our VMs.

Working through it here are a few things that went "wrong" for me and their resolutions:

  1. Problem: When the tutorial said to start the globus container:
$GLOBUS_LOCATION/bin/globus-start-container -nosec

I got an error:

bash: ./globus-start-container: Permission denied

Solution: Add execute permission to the globus-start-container file:

chmod a+x globus-start-container
  1. Problem: When trying to test the client after Calendar and GregorianCalendar are added (Introduce:1.2:Tutorial:Phase3:EditService), I got compile errors

"cannot find symbol ......class Calendar" "cannot find symbol ..... class GregorianCalendar"

Solution: Add

import java.util.Calendar;
import java.util.GregorianCalendar:

to import statements in <YourStockManagerLocation>/src/org/cagrid/introduce/tutorial/stockmanager/client/StockManagerClient.java

  1. Problem: When trying to test client after making the resources persistent (Introduce:1.2:Tutorial:Phase4:EditClient), the client seemed to hang and never "saw" that the user had pressed <Enter>. The test for <Enter> in <YourStockManagerLocation>/src/org/cagrid/introduce/tutorial/stockmanager/client/StockManagerClient.java according to the original tutorial is:
while (System.in.read() != 13);

For some reason, the client just sat and waited and never recognized that Enter had been pressed. I'm not sure why, but when I used the character '\n' instead, it worked. Substitute this line for the one above:

while ((char)System.in.read() != '\n');
  1. Problem: When trying to test the client after modifying <YourStockManagerLocation>/src/org/cagrid/introduce/tutorial/stockmanager/portfolio/client/StockPortfolioManagerClient.java to make it support notifications (Introduce:1.2:Tutorial:Phase5:EditClient), I got compile errors

"cannot find symbol.....class List"

Solution: Add

import java.util.List

to import statements in <YourStockManagerLocation>/src/org/cagrid/introduce/tutorial/stockmanager/portfolio/client/StockPortfolioManagerClient.java

  1. Problem: When testing the client after adding our user to the Trainees group (Introduce:1.2:Tutorial:Phase6:Test Client), there is an error message message that begins with
AxisFault
  faultcode: {http://schemas.xmlsoap.or/soap/envelop/}Server.userException
  faultString: GSSException: Defective credential detected [Caused by: Proxy file (/tmp/x509up_u1000) not found.]

Solution: 1000 is the user number for the user cagrid on the VM. The error message is that the credential for user 1000 can not be found. In Gaards, Local Account Management, add user cagrid, since that is the user name we are logged into the VM with. Add that user to the Trainees group as specified in the tutorial. When logged onto Gaards as the user cagrid, go to Credential Manager. see the Credential Information for cagrid user, and click Save Credential. Save it in /tmp and call the file x509up_u1000 (which is the name of the file the error message says it can not find). Now when you test the client, you will get the expected results described in the tutorial.

caCORE SDK 4 Tutorial

Another tutorial we can perform on our VM has to do with creating a data service and caCORE SDK 4.0. Tutorial for Creating a Data Service backed by caCORE SDK 4.0 Comments or tips for that will be here. I do not yet have it working.

Here are the explorations and findings with caCORE SDK 4.0

Rough Notes for LSD Test Box

Following the instructions in Life Sciences Distribution 1.0.0 pdf but will record deviations or points to emphasize here.

MySQL

  • Downloaded 5.0.27 from http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.27 as specified on page 3. I downloaded the mysql-standard-5.0.27-linux-686.tar.gz then followed installation instructions on the MySQL website's documentation. On page 9 of the LSD Local Installation Guide there are two steps to be performed in Linux machines after MySQL has been installed. The first is to edit the /etc/init.d/mysqld (or mysql) file to specify --lower_case_table_names = 1. After that, the instructions specify to restart MySQL:
/etc/init.d/mysqld restart

I don't know if I overlooked that, but I must have the first time, because by the time I installed UPT in the next section, the installation failed, complaining of not finding a table it wanted. I looked at the tables in the database and they were all there, but the names were in upper case! So I dropped that database, restarted MySQL to make sure the --lower_case_table_names = 1 took effect, then ran the installation for UPT again. This time it was successful.

UPT

  • Used home/upt/src/upt as <installation_directory> and /home/upt/apps/upt as <application_root_directory>.

caArray


caGWAS

  • Following the instructions in the LSD Local Installation Guide, when I tried to install caGWAS by invoking
ant

I got this error originally:

BUILD FAILED
/home/cagwas/src/cagwas/build.xml:354Z: The following error occurred while executing this line:
/home/cagwas/src/common/macrodefs.xml:334: Database connection failed for jdbc:mysql://localhost:3306/${database.name).Verify that your database.system.user and database.system.password property are valid in the *-install.properties file. Your database version must be least 5.0.27.

I think that was due to an incorrect value for external.url in /home/cagwas/src/cagwas/cagwas-install.properties file. For external.url I substituted localhost for the REPLACE value and the installation did succeed. To view the application after installation, I was able to go to http://localhost:42210/cagwas and log in as user cagwas_user, password = cagwas_user.

caTissue

caTissue utilities and caTissue core both built successfully according to the caTissue Core v1.2.1 Deployment Guide and JBoss started up successfully. http://localhost:43210/catissuecore goes to the caTissue web app, and then I was able to log in with the first.admin.emailAddress and first.admin.password set in /home/catissue/src/caTissue_Core_Installable_v1.2.1.

Still to work on - I am unable to get the jboss shutdown command to work. To shut the jboss server down, the command is supposed to be:

$JBOSS_HOME/bin /shutdown.sh -s <machine-IP-address>: <JNDI Port>

If I use machine-IP-address = 127.0.0.1 and JNDI Port = 43200, I get errors that it could not connect to localhost:1099 and jboss does NOT shut down. The only way I've been able to shut it down for restart is to kill the processes.

CTODS

CTODS installed easily when I followed the instructions in the LSD manual. to access it, I was able to go to http://localhost:44210/CTODSViewer. The user lsdtestuser1 with password password was able to log in.

NCIA

NCIA installed successfully and I was able to go to http://localhost:45210/ncia/

After NCIA install, there are vague instructions for

MIRC

. Here is the site where I am have been directed to get installation instructions.

Additional reference

Following MIRC install instrux from their wiki] I set up Tomcat successfully and downloaded MIRC. Trying to run the installer I got this error:

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
        at java.awt.Window.init(Window.java:270)
        at java.awt.Window.<init>(Window.java:318)
        at java.awt.Frame.<init>(Frame.java:419)
        at java.awt.Frame.<init>(Frame.java:384)
        at javax.swing.JFrame.<init>(JFrame.java:150)
        at org.rsna.mircsite.installer.Installer.<init>(Installer.java:31)
        at org.rsna.mircsite.installer.Installer.main(Installer.java:25)

This error means that the app could not get access to the display so it failed. I switched to the user who owns the desktop environment (cagrid) and used this command to give any app on localhost access to the display:

xhost +localhost

Then I was able to install MIRC successfully as the user ncia:

java -jar MIRCsite-installer-full.jar

That opened up a gui and I just selected defaults or clicked Install when something was not yet installed and I had a choice to install or skip. Then to see the app, http://localhost:6472/mirc/query

Making MySQL run as a service

reference

If you install MySQL from a source distribution or using a binary distribution format that does not install mysql.server automatically, you can install it manually. The script can be found in the support-files directory under the MySQL installation directory or in a MySQL source tree.

To install mysql.server manually, copy it to the /etc/init.d directory with the name mysql, and then make it executable. Do this by changing location into the appropriate directory where mysql.server is located and executing these commands:

cp mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql

Then make the mysql script execute automatically on system startup with this command:

chkconfig --add mysql

Using UPT to administer the LSD apps

The instructions in the LSD manual were easy to follow and I was able to log into UPT at http://localhost:46210/upt/ with the password superadmin, password = changeme, application name csmupt. From there, new users can be created, and applications can be added, entering a name for the app, the database login, dialect and driver, and the actual database URL: jdbc:mysql://${database.server}:${databse.port}/${csm.database.name}. I created a test user, entered information for caGWAS, and made the test user the admin for caGWAS. The test user was able to log into the User Provisioning Tool and manipulate the sample.

Running JBoss as a service


We are referred to the JBoss Wiki for starting JBoss as a service. We will have the scripts in /etc/init.d/ with one script for each user: jboss-catissue, jboss-caarray, etc. Each script will start the service under the userid of the account that owns the service in its home directory. I am starting to create those scripts now, will update this documentation as I get any of them working.

I have copied the jboss_init_redhat.sh script from $JBOSS_HOME/bin to /etc/init.d as jboss-catissue and modified the items inside the file like user (changed from jboss to catissue, changed $JBOSS_HOME to /home/catissue/apps/catissue/jboss-4.0.4.GA, etc. Then I chmod +x the file and chkconfig --add jboss-catissue. At this point, when the VM is restarted, jboss does not start. However, if I run /etc/init.d/jboss-catissue, I get the message that I need a parameter like start - stop - etc. If I run /etc/init.d/jboss-catissue start then jboss starts successfully!

LabKey/CPAS

CPAS caBIG Architecture describes how the CPAS service is being integrated with caBIG.

Following tutorial at https://www.labkey.org/Project/home/CPAS/tutorial/begin.view? on LSD box. Created user labkey, password labkey.

Installing on Linux

1. Downloaded JRE 1.6 as specified in tutorial and ran the .bin file from /home/labkey/dist directory.

2. Downloaded Tomcat from link on tutorial and installed in /home/labkey/src/apache-tomcat-5.5.26.

3. Downloaded PostgreSQL from http://www.postgresql.org/ftp. Initdb as user labkey since it is installed in labkey's home directory.

4. Downloaded third party components and installed: Graphviz, X!Tandem, Trans Proteomic Pipeline.

At this point I could see http://localhost:8080 Tomcat page just fine, but got a 404 with http://localhost:8080/labkey Was about to repeat the process, this time installing as root as indicated by instructions, but we realize that the current CPAS installation is probably the Windows version so we are now preparing a Windows XP VM to use. I will run the express install of CPAS in order to become familiar with it.

Installing on Windows

Installed using express installation and successfully viewed test folder "published" to caBIG. Logins for this test server cpas-xp are as follows:

1) Database superuser: user = labkey pw = labkey

2) Windows service: user = labkey_postgres pw = postgres

3) Admin user for CPAS: user = cmbellah@uab.edu pw = hard2Guess

Enabling the caBIG Interface - reference LabKey Software Foundation

1. The Windows installation will configure the Tomcat web application publish automatically. You should be able to access http://localhost:8080/publish/ and see the caCORE SDK browser.

2. Site settings should be set to enable publishing. There is a checkbox on the "Customize Site" page that is accessible to site admininstrators via the [site settings] link on the Admin Console (under Manage Settings, on the left). The setting says, "Allow publishing folders to caBIG"
3. For a folder or project that has data you want to publish, select the project from the left side of the page, and select the permissions page under the "Manage Project" setting. In the section of the page that says, "Publish to caBIG," if the button says "Publish," clicking on it will enable caBIG access to the folder. If the button says "Unpublish," the data is already accessible and clicking it would disable caBIG access to the data.

Upgrade to Labkey/Cpas 8.3

The Graphical Windows Installer without Java Runtime was used to upgrade Labkey Cpas in place on the XP box. (Since the JRE was already present on the server, it did not need to be reinstalled). At this point, http://10.0.0.18:8080/publish/Home.action actually takes us successfully to the caCore SDK page like it is supposed to! That did not happen in our old 8.2 installation. However, when I click Continue and select a field for a query and Submit, I get an error:

caCORE HTTP Servlet Error:

Error while executing nested search criteria query

Caused by: JDBC Exception in ORMDAOImpl

Caused by: Cannot open connection

Caused by: Connections could not be acquired from the underlying database!

Caused by: A ResourcePool could not acquire a resource from its primary factory or source.


I'm researching this error but may first try to find some more sample data to load into the Labkey database.


Building LabKey caBIG data service:

To get the caBIG client SDK that matches the Labkey 8.2, download and extract the Labkey 8.2 source distribution found at https://www.labkey.org/download/8.2/.

wget https://www.labkey.org/download/8.2/LabKey8.2-9166-src.tar.gz

mkdir labkey-8.2  # because LabKey's tarball doesn't create a subdirectory

cd labkey-8.2

tar -xzf ../LabKey8.2-9166-src.tar.gz

Once the directory structure has been extracted, there will be a caBIG subdirectory. Be sure to read the readme.txt file in the caBIG directory. Run the ant tasks to select PostgreSQL and to build the system.

cd caBIG

ant pick_pg

ant system

In Introduce, build a data service beginning with Create caGrid Service Skeleton, specifying Data Service, and when prompted select caCORE SDK 3.2.1 since this is the caCORE SDK version used by LabKey? to build the client library.

For Domain Model, select Discover Data Types - Refresh from caDSR Service... Select Project - !Labkey CPAS Client API and the corresponding org.labkey.cpas.client package. Click Add Full Project, and an error will appear saying that the imported domain model has a package that maps to a namespace that is not loaded into the service - please locate a suitable namespace. You'll then be prompted to find a file in the file system. Browse to labkey-8.2/build/caBIG/cacoresdk/output/publish/package/client/conf/org.labkey.cpas.client.xsd and select Load Schemas.

Now Introduce displays UML Class Selection org.labkey.cpas.client, and if Visualize Domain Model is clicked, a domain model is shown. Save the new data service. In Introduce, deploy the new data service to Globus.

Restart Globus.

Starting Globus on caBigBox

/home/cagrid/$GLOBUS_LOCATION/bin/globus-start-container -nosec 2>&1 > /tmp/gs-container.out &

To view the end of gs-container.out as it changes, the command is

tail -f /tmp/gs-container.out

caArray on Blotter

On the LSD box above, removed old caArray installation and installed caArray 2.1.0 using the caArray Local Installation Guide. Install.properties replace settings are as follows. The whole file is not displayed; just replace properties and other settings we had to change:

database.server=localhost
grid.server.hostname=blotter.lab.ac.uab.edu
grid.server.name=default
grid.server.port=18080
domain.name=blotter.lab.ac.uab.edu
grid.static.grid.port=8080

########################
###  JBOSS SETTINGS  ###
########################
jboss.home=${application.base.path}/jboss-4.0.5.GA
jboss.server.hostname=blotter.lab.ac.uab.edu
jboss.server.jndi.port=31099
jboss.server.port=38080

#######
# UPT
#######
upt.url=http://138.26.125.35:46210/upt

########
# MAIL
########
mail.smtp.host=vera.dpo.uab.edu
mail.smtp.port=25

Also, in the installation guide, for "Advertising the Grid Service," the editing of serviceMetadata.xml is not quite clear in the document. The part that "matters" is to ADD lines of point of contact - at the bottom of the file under ns1:hostingResearchCenter:

 <ns1:hostingResearchCenter>
  <ns15:ResearchCenter displayName="UAB Comprehensive Cancer Center" shortName="UAB-CCC" xmlns:ns15="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.common">
   <ns15:Address country="US" locality="Birmingham" postalCode="35294" stateProvince="AL" street1="1802 6th Avenue South"/>
      <ns15:pointOfContactCollection>
       <ns15:pointOfContact affiliation="UAB Comprehensive Cancer Center" email="John.Sandefur@ccc.uab.edu" firstName="John" lastName="Sandefur" phoneNumber="" role="Deployment Lead"/>
      </ns15:pointOfContactCollection>
  </ns15:ResearchCenter>
 </ns1:hostingResearchCenter>

Once the steps in the installation guide were completed, JBoss 4.04 was restarted and the service was in the index successfully (and soon in the portal too). To start JBoss in the background and log to a file:

/home/caarray/apps/caarray2/jboss-4.0.5.GA/bin/run.sh 2>&1 > /home/caarray/log/jboss405.out
/home/caarray/apps/caarray2/jboss-4.0.4.GA/bin/run.sh 2>&1 > /home/caarray/log/jboss404.out