Sarah Honacki, Justin Permar, Mark Grand
This article is an advanced article intended for Grid administrators. This article walks a Grid administrator through the process of adding a new Grid to the list of choices that are presented in the caGrid installer. The primary motivation is to allow others to easily integrate with and utilize the Grid services that you have deployed for your own Grid.
This guide assumes prior knowledge of the caGrid target Grid configuration process. Please read the following documentation if you are not familiar with the "target Grid" concept in caGrid: How to Change Target Grid
Throughout this document, we denote portions that should be changed by you by putting an indicator of the contents surrounded by "[" and "]". An example is [GRID_NAME], where you should replace everything including the brackets with the indicated contents. An example for a Grid name of "abc" is to replace "[GRID_NAME]" with "abc". This guide was designed using caGrid 1.3.
The caGrid installer has the ability to configure a caGrid installation for a chosen target grid. When using the installer, there are several choices available as possible target grids. This article presents the steps to follow to add a new target Grid configuration to the list of choices in your own custom caGrid installer.
There are 3 phases in this guide:
- Download a caGrid distribution.
- Create a new target Grid and add it to the distribution.
- Update the installer to use the custom caGrid distribution.
To begin, download caGrid 1.3 Source Distribution from Obtain caGrid 1.3 Source. Unzip the file to a temporary location. We will now refer to this location as CAGRID_HOME.
In this phase there are 5 steps that must be completed:
- Create your Grid directory
- Copy the Files
- Modify the Files
- Modify the ivy xml
- Re-zip the file
First, navigate to CAGRID_HOME and locate the target_grid directory.
Here you will see several target grid file folders along with several corresponding Ivy XML files. We need to create our own grid folder and then copy existing (template)target grid files to this folder. Then we will copy an Ivy XML file and modify it to provide information about our new target grid configuration.
Then create a new folder with a name that has the following format: [GRID_NAME]-1.3. For example, if your one-word grid name is "abc" then the folder would be named "abc-1.3".
For this tutorial we are going to copy and modify the Training Grid files. Open training-1.3. You will see the following:
Copy the directory contents (all files including all sub-folders) into the [GRID_NAME]-1.3 folder you just created.
Also copy the corresponding ivy XML file from the target_grid directory (e.g., ivy-training-1.3.xml) and give it a new name with the following format: ivy-[GRID_NAME]-1.3.xml. For example, ivy-abc-1.3.xml.
In this step, you will update the files you just copied to point to the services in your Grid. These files are copied to various locations in the caGrid installation when you configure caGrid with a chosen target Grid.
For example, the target Grid configuration files will have URLs of the "core" services in your Grid deployment (e.g,. Dorian). This step involves updating those URLs as outlined below.
The files that you will modify are in the [GRID_NAME]-1.3 directory.
In the [GRID_NAME]-1.3 directory, modify the following XML files:
For these files, use a text editor to change the values of the <DisplayName>, <ServiceURL> and <ServiceIdentity> elements to the proper values for your grid.
The recommended value for the <DisplayName> element is the name of the grid followed by the name of the service, like this:
For a grid named "abc", the respective recommended values for the <DisplayName> element in these files would be
- abc CDS
- abc Dorian
- abc Grid Grouper
- abc GTS
For the <ServiceURL> element in each file, just change the host name and port number to the appropriage value. Leave the rest of each URL as is.
The value of the <ServiceIdentity> element is the grid identity of the host that will be running the service that the file is named for. If you are setting up this target grid configuration for an existing grid, then check the identity in each host's actual grid certificate.
If you are setting up this target grid configuration for a new grid, then if you follow the naming pattern described below, the names will be right. For the cds-services-configuration, dorian-services-configuration and gridgrouper-services-configuration files, the pattern to use for the value of the <ServiceIdentity> element is
For example, if the grid name is "abc" and the name of the host that the service runs on is dorian.abc.example.org, then the value for the <ServiceIdentity> element should be
The pattern for the <ServiceIdentity> element in the gts-services-configuration file is different:
For example, if the grid name is "abc" and the name of the host that the service runs on is mastergts.abc.example.org, then the value for the <ServiceIdentity> element should be
The gts-services-configuration file differes from the other files in another way. Because there may be multiple GTS services, there may be multiple sets of <DisplayName>, <ServiceURL> and <ServiceIdentity> elements. There should be one set of elements enclosed in a <ServiceDescriptor> element for each GTS service. Here is an example of what this looks like:
The above example shows what the gts-services-configuration file looks like for new grids that are configured with a master GTS and a slave GTS. If you are configuring for a grid that has just one GTS service, then this file will contain only one <ServiceDescriptor> element rather than two.
If the grid you are configuring for uses websso, you will need to edit the websso-properties.xml file in the [GRID_NAME]-1.3 directory. There are three parts of this XML file that you will need to change.
First, in the <credential-delegation-service-information> element, you will need to change the value of the <service-url> and <service-identity> elements to the same values that they have in the cds-services-configuration file.
Next, in the <dorian-services-information> element, you will need to change the value of the <display-name>, <service-url> and <service-identity> elements to the same values that they have in the dorian-services-configuration file.
Finally, you will need to configure the services to which websso will delegate credentials. Edit the <delegated-applications-group> element so that it contains a name and host identity for each such service:
You must edit the sync-description.xml file in the [GRID_NAME]-1.3 directory. you will need to modify the values of the following elements to match your grid's properties:
The value of this element is the URL of the GTS service that most other services will user the synchronize with the trust fabric. This value should be copied from the value of a <ServiceURL> element in the gts-services-configuration file. If there is more then one <ServiceURL> element in the gts-services-configuration file, use the URL for the slave GTS service. Here is an example of a <ns1:gtsServiceURI> element
The value of this element is the expected grid identity for the host that the runs the GTS service whose URL is the value of the <ns1:gtsServiceURI> element. This should be the same as the value of the <ServiceIdentity> that was with the <ServiceURL> element that the value of the <ns1:gtsServiceURI> element came from. Here is an example
The value of this element is the distinguished name of the certificate authority that issued the host certificate for the host that the GTS runs on. If you don't know this, you can find it out be logging onto the GTS host and issuing the Windows or Unix/Max version of the following command:
You may also verify the issuer of your user certificates and host certificates using functionality provided by Globus:
- Unix / Mac
Here is an example of what a <ns1:CASubject> element might look like:
<ns1:CASubject>O=abc,OU=GTS,OU=Trust Fabric,CN=Trust Fabric CA</ns1:CASubject>
If the grid you are configuring for will be running an instance of the Workfow Factory Service, then you will need to edit the workflow-ui-configuration.xml file. You will need to modify the value of the <value> element to be the URL of the service. Here is an example of what this looks like:
For the service_urls properties file, modify all of the urls except cagrid.master.cadsr.data.service.url to point to the corresponding service on your grid.
Remove the files in the certificates directory. You will need to copy into this directory the certificate for the certificate authority that signed the GTS host's certificate. You can find this file on the host you specified for the master GTS in the gts-services-configuration file, in the $HOME/.globus/certificates directory.
If this directory contains just one file, whose names ends with ".0", that is probably the file you want. If there are multiple ".0" files or just to verify that you have the right file, issue a command like
- Unix / Mac
Replace fileName.0 with the name of a ".0" file in the directory. The output of this command looks like
What you are looking for is for the subject and issuer to be the same as each other and to also be the same as issuer of the GTS hots's host certificate. The file that fits this description is the correct file. Copy the correct file from the $HOME/.globus/certificates directory on the GTS host to the certificates directory.
Now that all files have been copied to your grid folder and modified, we can edit the ivy-[GRID_NAME]-1.3.xml file in the CAGRID_HOME/caGrid/repository/caGrid/target_grid directory. In this file, set revision= to your grid folder file ([GRID_NAME]-1.3). Also set the <description> value to an appropriate description of your Grid.
Also in the ivy-[GRID_NAME]-1.3.xml file, change the artifact name to match your root certificate.
If the certificates directory contains a corresponding .signing_policy file, then edit the following line to match the actual name:
If there is no .signing_policy file in the certificates directory, then delete the artifact element that specifies ext="signing_policy" from the ivy-[GRID_NAME]-1.3.xml file.
1. Next, re-zip the caGrid-220.127.116.11 directory (which now contains your target grid).
Now that we have zipped our version of caGrid with your Grid, we can create a new custom installer containing your grid for selection.
There are 4 steps to this phase:
- Modify the installer.properties file
- Update the download.properties file
- Create a new jar
- Run the Installer and Verify
- Download the caGrid installer that corresponds to your version of caGrid.
- Unzip the file. We will refer to this directory as ORIG_CAGRID_LOCATION.
- Among the extracted files is a caGrid-installer-1.3.jar. Extract this jar to a temporary location located in the same directory. We will call this location TEMP_CAGRID_LOCATION
- Locate and open the download.properties file in a text editor
- Copy the url from the file and paste it into a web browser.
- Save the page (For windows, right-click and select "Save page as.."). The page should default to save with a file name of cagrid-1.3.installer.properties
- Open the file in a text editor
- Set cagrid.download.url= to the location of the caGrid.18.104.22.168.zip we bundled earlier.
Remember to use "file:///". Also remember to use "/" as the path separator (and NOT "\"). Wordpad should not be used for editing as it adds non-ascii characters. Notepad is acceptable to use.
- Set cagrid.md5.checksum to the checksum for the new caGrid.22.214.171.124.zip file.
If the program you are using to create the zip file does not provide an easy way to find out what the md5 checksum of the file is, you can get it by running the installer with the old checksum. It will fail with an error message that contains the correct checksum for the new file.
- Save the file
Now we need to update the download.properties file to point to the modified cagrid-1.3.installer.properties file.
- Re-open the download.properties file.
- Set download.url= to the cagrid-1.3.installer.properties file we modified.
Remember to use "file:///". Also remember to use "/" in all of the pathnames. Wordpad should not be used for editing as it causes complications. Notepad is acceptable to use.
- Save the file.
Now that the files have been updated, we can create a new jar file for the installer. The following commands will create a new jar file that includes the updated download.properties file that points to your local cagrid-1.3.installer.properties file (which is now set to use your modified version of caGrid with your Grid as a possible selection).
In a command prompt, change directory to TEMP_CAGRID_LOCATION and type the following command:Once the new jar file is created, we need to use it to replace the original installer jar. To do this, open the TEMP_CAGRID_LOCATION. Copy the caGrid-installer-1.3.jar that you created. Paste it in the ORIG_CAGRID_LOCATION directory. When asked if you want to overwrite the existing file, select Yes.
You can now run the installer using from a command prompt using the following command:Verify that you can install caGrid and select your new target Grid.