Upgrade Slave GTS
These instructions explain how to install a Slave GTS to a new host, copy the caGrid 1.3 GTS database and credentials, and configure the new GTS.
Shut Down caGrid 1.3 Slave GTS Service
- Connect to your caGrid 1.3 Slave GTS server.
- Shut down your Tomcat container.

$ $CATALINA_HOME/bin/shutdown.sh
Step 1: Prepare caGrid 1.4 Host
The caGrid 1.4 Training grid host was installed and configured according to the specifications listed on caGrid 1.4 Host Configuration page.
GTS specific requirements:
- MySQL 5.0.45 database
- Secure Container
Create the GTS Database
- You or your DB administrator must create a new Slave GTS database.
- Connect to MySQL as root.

$ mysql --user=root --password=<PASSWORD>
- Set default engine to INNODB

$ SET storage_engine=INNODB;
- Create the GTS database.

$ create database <DBNAME>;
- Create user and grant permissions.

$ GRANT ALL PRIVILEGES on <DBNAME>.
* to '<DBUSER>'@'%' IDENTIFIED BY '<PASSWORD>' WITH GRANT OPTION;
- Logout of MySQL.

$ quit
- Connect to MySQL as root.
Step 2: Obtain caGrid 1.3 GTS Files
Backup the Slave GTS Database
- Connect to caGrid 1.3 Slave GTS host.
- You or your DB administrator must execute a MySQL dump to file.

$ mysqldump --user=<DBUSER> --password=<PASSWORD> <DBAME> > <DBNAME>.sql
- Verify INNODB Engine Type for Tables
- Run the following command and view the Engine type of GTS tables

$ grep -i "Engine=" <DBNAME>.sql
- If any table specifies an "engine" that is not INNODB, update the file to specify the required type.
- Save file.
- Run the following command and view the Engine type of GTS tables
Copy Database and Certificates to caGrid 1.4 Host
- Secure Copy GTS database from caGrid 1.3 Slave GTS.

$ scp <DBNAME>.sql <griduser>@<cagrid1.4-GTSSlave>:/home/griduser/tmp/<DBNAME>.sql
- Copy host keys and certificates from caGrid Slave GTS.

$ scp -r ~/.cagrid/certificates <griduser>@<cagrid1.4-GTSSlave>:/home/griduser/tmp/
Step 3: Prepare Database and Configuration Files
Copy the GTS configuration files to new host.
- Download and extract https://wiki.cagrid.org/download/attachments/10617829/caGrid-1.4-Configs-NCI.zip
.
- Copy gts-conf.xml to $HOME/tmp/gts-conf.xml.
- Copy serviceMetadata.xml to $HOME/tmp/serviceMetadata.xml.
- Copy sync-description.xml to $HOME/tmp/sync-description.xml.
Load GTS Database
- You or your DB administrator must load the Slave GTS dump to the new database.

$ mysql --user=<DBUSER> --password=<PASSWORD> <DBNAME> < $HOME/tmp/<DBNAME>.sql
Step 4: Install caGrid 1.4 Software
| At Step 11 of the caGrid install make sure you select the correct target grid for your installation. QA: NCI QA Grid for caGrid 1.4 Stage: NCI QA Grid for caGrid 1.4 Production: NCI QA Grid for caGrid 1.4 Training: Training Grid for caGrid 1.4 |
Use the installer to install caGrid using these instructions: Install caGrid Using the caGrid 1.4 Installer
Your user should have the following environment variables set. The last step of the installer provides the paths for these settings:
|
Step 5: Configure the Container
| Step 5: The hostname must be the externally routable name. For example, the Training Grid Slave GTS external hostname is slavegts.training.cagrid.org and internal is cagrid-1_3-training-slave-gts.cagrid.org. We specified slavegts.training.cagrid.org when creating credentials.
Step 6: Select the option to browse to credentials on the host. Use the /home/griduser/tmp/certificates location. |
Use the installer to create a secure Tomcat container using the following instructions.
Configure Containers Using the caGrid 1.4 Installer
Your user should now have the following environment variables set. The last step of the installer provides the paths for these settings.
|
Step 6: Configure GTS
- Copy the edited gts-conf.xml to the GTS project.

$ cp $HOME/tmp/gts-conf.xml $CAGRID_HOME/projects/gts/etc/
- Copy GTS serviceMetadata.xml to the GTS project.

$ cp $HOME/tmp/serviceMetadata.xml $CAGRID_HOME/projects/gts/etc/
- Copy the SyncGTS configuration.

$ cp $HOME/tmp/sync-description.xml $CATALINA_HOME/webapps/wsrf/WEB-INF/etc/cagrid_SyncGTS/
Step 7: Deploy GTS
We have completed configuring GTS and the Tomcat container. We are now ready to deploy GTS to the Secure Tomcat Container. This can be done as follows from a command prompt.

$ cd $CAGRID_HOME/projects/gts $ ant deployTomcat
Step 8: Start the Container
- If you chose a Tomcat container, start Tomcat as follows:

$CATALINA_HOME/bin/startup.sh

Check the $CATALINA_HOME/logs/catalina.out file for any errors. - If you chose a JBoss container, start JBoss as follows:
- Windows:

$JBOSS_HOME\run.bat
- Unix/Mac:

$JBOSS_HOME/run.sh
- Windows:
| Check the $CATALINA_HOME/logs/catalina.out file for any errors. |
Step 9: Validate Installation
Verify that you can hit the Service URL.
- Open a browser to: https://<IP>:8443/wsrf/services/cagrid/GTS
You should see "Hi there, this is an AXIS service!"
Test using GAARDS UI
Step 10: Configure Mysql and Tomcat to Start Automatically
For the GTS service to be available upon reboot of your server, both MySQL and Tomcat must be configured to start automatically.
MySQL
- You or your DB administrator should configure MySQL to start automatically: http://dev.mysql.com/doc/refman/5.0/en/automatic-start.html

Tomcat
- Configure Tomcat to start automatically: http://tomcat.apache.org/tomcat-5.5-doc/setup.html

Step 11: Update DNS, if Needed
If you have installed GTS to a new host you now need to update your DNS to point to the IP address of the new host.





