Chapter 6: Deploying The Globus Toolkit 4.0.x
Configuring the RFT Service
Before starting the container and the grid services that run within it such as GRAM WS, we need to configure the RFT service so that it uses the Postgres database we initialized before and we need to initialize the database tables that RFT needs.
First make sure again that Postgres is running:
[root@nodeB opt]# ps auwwwwx|grep postmaster
postgres 26088 0.0 0.3 19476 3172 pts/0 S Feb20 0:00 /usr/bin/postmaster -D /opt/pgsql/data -o -i
Become the 'postgres' user:
[root@nodeB opt]# su - postgres
When you create a postgres password for the globus user you can use the same thing as the unix password "globususer".
As the 'postgres' user run the 'createuser' command to create a 'globus' user for the database. Use the '-A' and '-d' flags so that the globus user has the correct permissions. When prompted enter a password for the globus user (for the database, not the UNIX password). We recommend a password with no spaces or strange characters:
-bash-3.00$ createuser -A -d -P globus
Enter password for new user:
Enter it again:
CREATE USER
Next we need to edit the Postgres permissions file and add a line that allows the 'globus' user to connect to the database from this host. Use any text editor to edit the file
/opt/pgsql/data/pg_hba.conf
Add the following line:
host rftDatabase "globus" "192.168.31.40" 255.255.255.255 md5
You should replace the IP address with the IP address for your nodeB.
After having edited that file we need to restart the Postgres database. Run the "ps -aux" command and look for the /usr/bin/postmaster -i -D /opt/pgsql/data process. Note the process id number for this process and send it a TERM signal.
-bash-3.00$ kill -SIGTERM "process id"
Now (as user postgres') restart the database server:
-bash-3.00$ /usr/bin/postmaster -i -D /opt/pgsql/data > /opt/pgsql/logfile 2>&1 & [2] 5707
The next step is to create the database and tables that the globus user and the RFT service need. Start by becoming the globus user and making sure your environment is set up properly:
[root@nodeB ~]# su - globus
[globus@nodeB ~]$ export GLOBUS_LOCATION=/opt/globus-4.0.1
[globus@nodeB ~]$ source $GLOBUS_LOCATION/etc/globus-user-env.sh
Now, as user globus, run the 'createdb' command from the Postgres distribution. If the Postgres commands are not in the default path you may need to set your PATH:
[globus@nodeB ~]$ createdb rftDatabase
CREATE DATABASE
Now initialize the tables in that database:
[globus@nodeB ~]$ psql -d rftDatabase -f $GLOBUS_LOCATION/share/globus_wsrf_rft/rft_schema.sql
psql:/opt/globus-4.0.1/share/globus_wsrf_rft/rft_schema.sql:6: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "requestid_pkey" for table "requestid"
CREATE TABLE
psql:/opt/globus-4.0.1/share/globus_wsrf_rft/rft_schema.sql:11: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "transferid_pkey" for table "transferid"
CREATE TABLE
psql:/opt/globus-4.0.1/share/globus_wsrf_rft/rft_schema.sql:30: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "request_pkey" for table "request"
CREATE TABLE
psql:/opt/globus-4.0.1/share/globus_wsrf_rft/rft_schema.sql:65: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "transfer_pkey" for table "transfer"
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE INDEX
With the database and tables created, we need to next edit the RFT configuration file so that it knows the correct password to use when authenticating to the database. Use any text editor and edit the file
$GLOBUS_LOCATION/etc/globus_wsrf_rft/jndi-config.xml
Search for the password "foo" (it will be the only occurence of that word in the file) and change it from "foo" to the password you set for the globus user to use the Postgres database.
|