Access Keys:
Skip to content (Access Key - 0)

How to Change the Target Grid


caGrid provides easily reconfigured access to multiple, different, grid environments. That is, when its clients and applications access "the grid," they are configured with the appropriate settings (e.g., service addresses, security settings, etc.) for the appropriate grid. The most common use for this capability is to easily target a development or training grid when learning to use caGrid (or while developing applications and services) and then re-targeting the official production grid for production development or deployment.

Process

In order to use any feature of caGrid, you must first build the project. You can find detailed instructions on building caGrid here, but generally you just need to type the following command from the caGrid directory:

 ant all

Once caGrid is built, it is already configured to target a default grid. If you are using a development checkout of caGrid, this will be the development grid; if you are using a release, this will be the current production grid. You can find details about what grid you are currently targeting at any time by typing the following command from the caGrid directory:

 ant configureHelp

Running this command should output something similar to the following.

configureHelp:
     [echo] =====================================================================================
     [echo] |    CONFIGURED TO USE GRID: training-1.3 AT: 2009/03/10 13:40
     [echo] |
     [echo] |    THE VALID TARGET GRIDS ARE:
     [echo] |      - nci_prod-1.3
     [echo] |      - nci_qa-1.3
     [echo] |      - nci_stage-1.3
     [echo] |      - training-1.3
     [echo] |
     [echo] -------------------------------------------------------------------------------------
     [echo] |    NOTE: To use a different target grid, set property 'target.grid'
     [echo] |    to the grid's name, and run the 'configure' target.
     [echo] |
     [echo] |    For example, type:
     [echo] |        ant -Dtarget.grid=training-1.3 configure
     [echo] =====================================================================================

BUILD SUCCESSFUL
Total time: 1 second

The first line shows the current target grid and when caGrid was configured to use it. Next, the available target grids are listed. Finally, brief instructions are given for how to change to a different grid.

In order to use the training grid, the following command should be run from the caGrid directory:

 ant -Dtarget.grid=training-1.3 configure

Running this command performs the following functions:

  • runs through a process of reconfiguring all of the projects that have some dependency on the grid
  • removes any locally stored preferences that are grid specific (such as used by Introduce and the security UIs)
  • reinstalls all caGrid Introduce extensions into Introduce
  • synchronizes your local machine with the appropriate trust fabric
  • displays the configuration information that was just applied (as shown above from the configureHelp target)

NOTE: If the command is not successful, make sure you are using a target grid as specified in the list of valid grids from the configureHelp target and that you have previously built caGrid (ant all).*Also note that cleaning and rebuilding caGrid does not remove these settings; they must be reset with the configure-clean command.

To change back to the default grid at any time, type the following command from the caGrid directory:

 ant configure-clean configure

Issues

If you are building caGrid 1.3, you need to make sure to use a 1.3 grid. If you use an earlier grid, you may see an error like this:

[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 		::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 		:: caGrid#target_grid;training-1.1: configuration(s) not found in caGrid#target_grid;training-1.1: cds-ui. It was required from caGrid#gaards-ui;1.2-dev target_grid
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]
[ivy:resolve]
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

This is because caGrid 1.3 has new services that some components depend on which did not exist in earlier versions.

Obtain URLs for Your Current Target Grid

The URLs for your Grid are located in various files in the following directory:

$CAGRID_LOCATION/repository/caGrid/target_grid/\{your chosen grid\}

For example, if you chose "training-1.3" above, use that directory name for {your chosen grid}

Obtain Index Service URL for Your Current Target Grid

You can run the Discovery Client, which prints out the Index Service URL of your current Grid:

cd $CAGRID_LOCATION/projects/discovery
ant runClient

This will print out something similar to the following:

runClient:
     [echo] Discovering from Index Service: http://index.training.cagrid.org:8080/wsrf/services/DefaultIndexService
Last edited by
Sarah Honacki (631 days ago) , ...
Adaptavist Theme Builder Powered by Atlassian Confluence