NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Tip
titleIntroduce

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

Code Block
titleUpdate <CAGRID_HOME>/projects/introduce/antfiles/introduce-utils.xml
<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/)

  • to run a client, use "ant run<service name>Client" from the pa-grid directory ("ant -p" will display the full list of targets)
  • if you edit a client, use "ant jarTests-quick" to recompile the clients
  • if you need to regenerate everything (eg, after a clean), use the "compile" or "all" targets
  • If you just need to recompile or test your code, after all the stubs have been generated once, use any of these targets:
    • compile-quick
    • jars-quick
    • test-quick
  • to deploy, use deployJBoss (to build the stubs) or deploy:jboss:quick (if the stubs have already been built
  • to undeploy, use undeployJBoss
  • to regenerate just the PA-specific stubs (eg, after editing CoppaPA.xsd), run "ant init postStubs"
  • if you've upgraded one or more jars, you'll have to manually remove the old jars from <jboss>/server/pagrid/wsrf.war/WEB-INF/lib

Here are the relevant host names for local.properties if you want to run the service clients against any of the tiers (just uncomment the one you want):
#service.port=80
#service.hostname=ctms-services-pa-stage.nci.nih.gov
#service.hostname=ctms-services-pa-qaYou'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
#service.hostname=ctms-services-pa-qa2.nci.nih.gov
#service.hostname=ctms-services-pa-dev.nci.nih.gov
#service.hostname=ctms-services-pa-integration.nci.nih.gov
#service.(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.

Code Block
service.port=1522
service.hostname=ctms-services-pa-

...

3-2-integration.nci.nih.gov

Developing Secure Services (PO / PA)

...

  1. Obtain a grid credential (or Dorian User Account) for the grid trust fabric needed, e.g. Training Grid. (developers working locally 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 gridor 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
    Code Block
    steve-matyass-macbook-pro-2:~ smatyas$ echo $HOSTNAME
    steve-matyass-macbook-pro-2.local
    steve-matyass-macbook-pro-2:~ smatyas$
    
    Tip
    titleExport your HOSTNAME

    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)

    Code Block
    titlevi ~/.bash_profile (or equivalent)
    export HOSTNAME=steve-matyass-macbook-pro-2.local
    
    Tip
    titleExport your JBOSS_HOME when running build-po/** scripts

    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
    Code Block
    /O=caBIG/OU=caGrid/OU=Training/OU=Dorian/CN=matyass
    

...

  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" 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).
    Code Block
    titleConnect to PO DB
    psql -U poadmin -d podb
    password: poadmin123
    
    Code Block
    titleConnect to PA DB
    psql -U paadmin -d ctods_pa
    password: paadmin123
    
    Code Block
    sql
    sql
    --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, PASSWORDUPDATE_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'));