caGrid provides for easy reconfiguration to access multiple, different grid environments. That is, when caGrid 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.
In order to use any feature of caGrid, the project must first be built. You can see detailed instructions on building caGrid here, but generally you just need to type the following command from the caGrid directory: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: Running this command should output something similar to the following:
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, run the following command from the caGrid directory:Running this command performs the following functions:
- Reconfigures all projects that have some dependency on the grid
- Removes any locally stored preferences that are grid-specific (such as those 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 applied configuration information (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:
If you are building caGrid 1.4, you need to use a 1.4 grid. If you use an earlier grid, you may see an error like this:
This is because caGrid 1.4 has new services that some components depend on which did not exist in earlier versions.