Choose a Target Grid
caGrid provides the ability to be easily reconfigured to access 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.
Checking Current Target Grid
You can find details about what grid you are currently targeting at anytime by typing the following command from the caGrid directory:
Running this command should output something similar to the following.
configureHelp:
[echo] =====================================================================================
[echo] | CONFIGURED TO USE GRID: nci_prod-1.2 AT: ${target.grid.configure.time}
[echo] |
[echo] | THE VALID TARGET GRIDS ARE:
[echo] | - nci_dev-1.1
[echo] | - nci_dev-1.2
[echo] | - nci_prod-1.1
[echo] | - nci_prod-1.2
[echo] | - nci_qa-1.1
[echo] | - nci_qa-1.2
[echo] | - nci_stage-1.1
[echo] | - nci_stage-1.2
[echo] | - osu_dev-1.1
[echo] | - osu_dev-1.2
[echo] | - training-1.1
[echo] | - training-1.2
[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=nci_prod-1.2 configure
[echo] =====================================================================================
BUILD SUCCESSFUL
Total time: 2 seconds
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 do a different grid.
Selecting a Target Grid
You need to select a target Grid with a version that matches your release (or higher). For example, using caGrid 1.2, you can target a 1.2 Grid or a 1.3 Grid.
In order to use the 1.2 training grid, the following command should be run from the caGrid directory:
ant -Dtarget.grid=training-1.2 configure
NOTE: In the caGrid 1.1 release, you would use:
ant -Dtarget.grid=training configure
Running this command will:
- run through a process of reconfiguring all of the projects which have some dependency on the grid
- removes any locally stored preferences which 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
- display the configuration information which was just applied (as is 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 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, you may just type the following command from the caGrid directory:
ant configure-clean configure
Issues
If you are building caGrid 1.2, you need to make sure to use a 1.2 grid. If you use a 1.1 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.2 has new services (such as the CDS) that some components depend on, which did not exist in caGrid 1.1.
Obtain URLs for Your Current Target Grid
The URLs for your Grid are in various files the following directory:
$CAGRID_LOCATION/repository/caGrid/target_grid/\{your chosen grid\}
For example, if you chose "training-1.2" above, use that directory name for the {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 simlar to the following:
runClient:
[echo] Discovering from Index Service: http: