Upgrade Grid Grouper
Step 0: Shutdown caGrid 1.3 Grid Grouper Service
- Connect to your caGrid 1.3 Grid Grouper server
- Shutdown your Tomcat Container

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

$ mysql --user=root --password=<PASSWORD>
- Create GTS Database

$ create database grouper;
- Create user and grant permissions

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

$ quit
- Connect to MySQL as root
Step 2: Obtain caGrid 1.3 Grouper files
Backup the caGrid 1.3 Grouper database
- Connect to caGrid 1.3 Master Grouper host.
- You or your DB administrator must execute a MySQL dump to file.

$ mysqldump --user=<DBUSER> --password=<PASSWORD> <DBAME> > <DBNAME>.sql
Copy Database and Certificates to caGrid 1.4 Host
- Secure Copy Grouper database from caGrid 1.3 Grouper

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

$ scp -r ~/.cagrid/certificates <griduser>@<cagrid1.4-Grouper>:/home/griduser/tmp/.
Step 3: Prepare Database and Configuration Files.
Copy Grouper configuration files to new host.
- Download and extract https://wiki.cagrid.org/download/attachments/10617829/caGrid-1.4-Configs-NCI.zip
.
- Copy <target_grid>/GridGrouper/grouper.hibernate.properties to $HOME/tmp
- Copy <target_grid>/GridGrouper/GridGrouper_serviceMetadata.xml to $HOME/tmp
- Copy <target_grid>/GridGrouper/alter_grouper_db.sql to $HOME/tmp
- Edit grouper.hibernate.properties
- Set database password in hibernate.connection.password field
Load Grouper Database.
- Verify the storage engine used for your database tables
- Open the <DBNAME>.sql file
- Replace any reference to "ENGINE=MyISAM" with "ENGINE=InnoDB"
- Save the updated SQL file.
- You or your DB administrator must load the Grouper dump to the new database

$ mysql --user=<DBUSER> --password=<PASSWORD> <DBNAME> < $HOME/tmp/<DBNAME>.sql
Add New Tables to Grouper Database
- You or your DB administrator must add two new tables to the Grouper database

$ mysql --user=<DBUSER> --password=<PASSWORD> <DBNAME> < $HOME/tmp/alter_grouper_db.sql
Update MySQL collation to support case sensitive comparison of usernames.
The default collation setting for MySQL is latin1_swedish_ci. This collation is case insensitive. This command will change the setting on a single column in the member table. This is to prevent mistyped grid identities from appearing in GridGrouper.

$ cd GRID_GROUPER_HOME/resources/sql
$ mysql -u YOUR_DATABASE_USER -p
Enter password: YOUR_DATABASE_PASSWORD
mysql> use grouper;
mysql> source set_collation.mysql.sql;
mysql> quit
Step 4: Install caGrid 1.4 Software and configure a Secure Container
In this step you will use the installer to install and configure caGrid. Be sure to read the following blue info box for special instructions for step 11, 15 and 16 of the installer before proceeding.
Install caGrid and Configure a Secure Container Using the caGrid 1.4 Installer
| At Step 11: 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 Step 15: The hostname must be the externally routable name. For example, the Training Grid Master GTS external hostname is mastergts.training.cagrid.org and internal is cagrid-1_3-training-master-gts.cagrid.org. We specified mastergts.training.cagrid.org when creating credentials. Step 16: Select the option to create credentials with the GAARDS UI
|
At this point, your should set the following environment variables. The last step of the installer provides the paths for these settings:
- CAGRID_HOME which points to the location of your 'caGrid' source directory
- ANT_HOME which points to the location of your apache-ant-1.7.0 directory
- JAVA_HOME which points to the location of your jdk1.6.0_* directory
- GLOBUS_LOCATION which points to the location of your ws-core-4.0.3 directory
- CATALINA_HOME which points to the location of your apache-tomcat-5.5.27 directory
Step 5: Configure Grid Grouper
- Copy grouper.hibernate.properties

$ cp ~/tmp/grouper.hibernate.properties $CAGRID_HOME/projects/gridgrouper/resources/conf/.
- Copy GridGrouper_serviceMetadata.xml

$ cp ~/tmp/GridGrouper_serviceMetadata.xml $CAGRID_HOME/projects/gridgrouper/etc/.
Step 6: Install Grid Grouper Service

> cd $CAGRID_HOME/projects/gridgrouper > ant deployTomcat
Step 7: Start Tomcat
Start Tomcat as follows:

$CATALINA_HOME/bin/startup.sh
| Check the $CATALINA_HOME/logs/catalina.out file for any errors. |
Step 8: Validate
- Start GAARDS UI

$ cd $CAGRID_HOME $ ant security
- Open Preferences, set target grid
- Open the GAARDS Preferences Panel via the "Window" menu -> Preferences.
- Double click the grid that you wish to configure, then click the Set Target Grid button
- Click the "Login" button.
- Enter user and password, click "Login".
- View your groups via the "My Account" menu -> "My Groups"
- This will cause GAARDS to connect to Grouper and search for your associated groups.
- Open Preferences, set target grid
Step9: Configure Grouper to Start Automatically
For the Grouper 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 must 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






