You need to update Introduce Java Heap settings when running Introduce since, we're developing such large services.

<macrodef name="runPortal">
    <sequential>
        <echo message="Running portal"/>
        <java classname="gov.nih.nci.cagrid.introduce.portal.Introduce" fork="true">
            <jvmarg value="-Xms256m"/>
            <jvmarg value="-Xmx1024m"/>
            <jvmarg value="-Djava.endorsed.dirs=extensions/endorsed" />
            <sysproperty key="GLOBUS_LOCATION" value="${ext.globus.dir}"/>
            <classpath refid="Portal.run.classpath"/>
        </java>
    </sequential>
</macrodef>

NCI Enterprise Services (NES) Email list

Subscribe to the NES-USERS-L@LIST.NIH.GOV mailing list for announcements of new releases, changes to the services, etc. You can also use this list for any questions you may have about using the services. This list is intended to be fully interactive and not just for announcements from the CTRP/COPPA team - we encourage all users to ask questions and respond to anyone else's questions freely.

Quick Start Guide

These instructions are written for pa-grid but apply to po-grid as well (change pa to po, etc, as needed). You may check out the code from https://ncisvn.nci.nih.gov/svn/coppa/trunk/code/ (or the appropriate tag for a specific release under https://ncisvn.nci.nih.gov/svn/coppa/tags/)

You'll need to specify the host and port in local.properties.  Host names are all of the format [https://ctms-services-[po]|pa][3-0|3-1|3-2]<tier>.nci.nih.gov (see a list of deployed hosts and ports).  Local ports are 39543 (for PO) and 39543 (for PA), although those are set by default.
Here's a sample local.properties for accessing the PA 3.2 services on the integration tier.

service.port=1522
service.hostname=ctms-services-pa-3-2-integration.nci.nih.gov

Developing Secure Services (PO / PA)

These instructions are written for developers of po-grid secure COPPA services on non-Windows (Linux / OSX) platforms.

Purpose

To inform our developers how to develop on secure grid services.

Prerequisites

  1. Install caGrid v1.3 locally, http://cagrid.org/display/downloads/caGrid+1.3+Installation+Quick+Start. You may install it anywhere. Personally, I put it in my User's Home folder under dev
    steve-matyass-macbook-pro-2:cagrid smatyas$ pwd
    /Users/smatyas/dev/cagrid
    steve-matyass-macbook-pro-2:cagrid smatyas$ ll
    total 0
    drwxr-xr-x   5 smatyas  staff  170 Oct  7 11:42 .
    drwxr-xr-x   5 smatyas  staff  170 Oct  7 11:41 ..
    drwxr-xr-x  17 smatyas  staff  578 Oct  7 11:41 apache-ant-1.7.0
    drwxr-xr-x  14 smatyas  staff  476 Oct 15 12:56 caGrid
    drwxr-xr-x  20 smatyas  staff  680 Oct  7 11:41 ws-core-4.0.3
    steve-matyass-macbook-pro-2:cagrid smatyas$ set HOSTNAME=steve-matyass-macbook-pro-2.local
    
  1. Obtain a grid credential (or Dorian User Account) for the grid trust fabric needed, e.g. Training Grid. Developers working outside the NIH firewall should use the Training Grid, while developers inside the firewall should use either the training or stage grids. See http://cagrid.org/display/cagrid13tutorials/Create+User+Account for instructions. You can either create a new grid account for yourself or log in as the existing "coppagridtest" account on the training or stage grids.
  2. Request a Host Cert to be used locally, http://cagrid.org/display/knowledgebase/Request+a+Host+Certificate. You should specify your local machine's hostname. For example, locally I use the value of my HOSTNAME environment variable
    steve-matyass-macbook-pro-2:~ smatyas$ echo $HOSTNAME
    steve-matyass-macbook-pro-2.local
    steve-matyass-macbook-pro-2:~ smatyas$
    

    Our developers have found this to be useful as the HOSTNAME can and does change from time to time when signing on to different networks, etc.. (VPN, Home, Offices, WiFi, NIH ethernet, NIH WiFi)

    export HOSTNAME=steve-matyass-macbook-pro-2.local
    

    Since the build-po/** scripts auto-gen the ${jboss.home} (~/app/po/jboss...) you need to EITHER remove your JBOSS_HOME env var when running build-po related scripts or SET your JBOSS_HOME to ~/app/po/jboss... To determine your current state / situation, type 'export' from the shell / terminal window you're using.

  3. Record your grid credential (aka Grid Identity) for later use. For example, mine is
    /O=caBIG/OU=caGrid/OU=Training/OU=Dorian/CN=matyass
    

Steps to Code & Test Locally

Each day before you start using coding and testing locally, you'll want to Login to Dorian using the GAARDS UI to extend your local grid identity certificates. Roughly ever 24 hours they expire.

  1. Lauch GAARDS-UI and login using shared COPPA Grid Test account
    steve-matyass-macbook-pro-2:cagrid smatyas$ pwd
    /Users/smatyas/dev/cagrid/caGrid
    steve-matyass-macbook-pro-2:caGrid smatyas$ ant security
    ...
    
    1. Click Login button and specify the following:
      Credential Provider: Training
      Organization: Training
      Username: coppagridtest
      Password: Coppa#12345
      
  2. Ensure your build-po/install.properties and build-po/upgrade.properties files contain the correct values, namely the following:
    pogrid.grid.secure.cert.location=${user.home}/.cagrid/certificates/${pogrid.grid.external.secure.host}-cert.pem
    pogrid.grid.secure.key.location=${user.home}/.cagrid/certificates/${pogrid.grid.external.secure.host}-key.pem
    pogrid.grid.external.secure.host=${env.HOSTNAME}
    
    Here is what my HOSTNAME environment variable is set to:
    steve-matyass-macbook-pro-2:~ smatyas$ echo $HOSTNAME
    steve-matyass-macbook-pro-2.local
    steve-matyass-macbook-pro-2:~ smatyas$
    
  3. Ensure that your GLOBUS_LOCATION environment variable is set
    steve-matyass-macbook-pro-2:~ smatyas$ echo $GLOBUS_LOCATION
    /Users/smatyas/dev/cagrid/ws-core-4.0.3
    
  4. Build your local dev instances
    steve-matyass-macbook-pro-2:build-po smatyas$ pwd
    /Users/smatyas/dev/projects/coppa/code/build-po
    steve-matyass-macbook-pro-2:build-po smatyas$ ant deploy:local:install
    ...
    
    steve-matyass-macbook-pro-2:build-pa smatyas$ pwd
    /Users/smatyas/dev/projects/coppa/code/build-pa
    steve-matyass-macbook-pro-2:build-pa smatyas$ ant deploy:local:install
    ...
    
  5. After you receive a BUILD SUCCESSFUL, you'll need to wait for all JBoss server instances to start fully.
  6. Now that the servers have stared fully, you're ready to test the secure services
    steve-matyass-macbook-pro-2:build-po smatyas$ cd ../po-grid/
    steve-matyass-macbook-pro-2:po-grid smatyas$ pwd
    /Users/smatyas/dev/projects/coppa/code/po-grid
    steve-matyass-macbook-pro-2:po-grid smatyas$ ant runPersonClient
    ...
    
    In PO, you may pass-in runtime paramters to test the clients. An example of such parameter is -getId. In addition, you may choose to run any number of methods within the grid client classes. You do this using the -runMethods parameter. Sample run command might be:
    christophe-ludets-macbook-pro:po-grid ludetc$ ant runPatientClient -Dargs="-getId 888"
    christophe-ludets-macbook-pro:po-grid ludetc$ ant runPatientClient -Dargs="-getId 888 -runMethods testGetById,testUpdate"
    
    steve-matyass-macbook-pro-2:build-pa smatyas$ cd ../pa-grid/
    steve-matyass-macbook-pro-2:pa-grid smatyas$ pwd
    /Users/smatyas/dev/projects/coppa/code/pa-grid
    steve-matyass-macbook-pro-2:pa-grid smatyas$ ant runStudyProtocolClient
    ...
    
  7. Congratulations!

Adding your own Grid Identity to the DB

  1. Add your Grid Identity to your local PO or PA database. Example shows adding "/O=caBIG/OU=caGrid/OU=Training/OU=Dorian/CN=coppagridtest" Grid Identity (an example stage grid identity would be "/O=caBIG/OU=caGrid/OU=Stage LOA1/OU=Dorian/CN=coppagridtest"). Replace "coppagridtest" with your own account as needed (or just use the coppagridtest user).
    psql -U poadmin -d podb
    password: poadmin123
    
    psql -U paadmin -d ctods_pa
    password: paadmin123
    
    --adding /O=caBIG/OU=caGrid/OU=Training/OU=Dorian/CN=coppagridtest as a grid client test user account
    INSERT INTO CSM_USER (LOGIN_NAME, FIRST_NAME, LAST_NAME, UPDATE_DATE) VALUES ('/O=caBIG/OU=caGrid/OU=Training/OU=Dorian/CN=coppagridtest', 'Test', 'GridClientUser', now());
    INSERT INTO CSM_USER_GROUP (USER_ID, GROUP_ID) VALUES ((select user_id from csm_user where login_name = '/O=caBIG/OU=caGrid/OU=Training/OU=Dorian/CN=coppagridtest'),
                                                           (select group_id from csm_group where group_name = 'gridClient'));