Installing Stored Procedures on Greenplum

Follow these steps to install Team Studio stored procedures within a Greenplum data base (GPDB).

Perform this task on the server side for the Greenplum data base.

Prerequisites

  • GPDB must be installed and running.
  • The Greenplum database administrator must own the database_setup directory and all the content in it.

Procedure

  1. Verify that the master node can communicate with theTeam Studio server.
    1. Modify the file /etc/hosts on the Team Studio server to include the GPDB master node IP address and hostname.
    2. Modify the file /etc/hosts on the GPDB master node to include the Team Studio IP address and hostname.
  2. On the GPDB master host, create a folder called /home/gpadmin/database_setup.
  3. Use secure copy (SCP) to transfer $CHORUS_HOME/alpine-current/database_setup.zip from the Team Studio server to the GPDB master node.

    Place it in the folder /home/gpadmin/database_setup.

  4. Unzip the database_setup.zip file.

    This generates several folders.

    unzip /home/gpadmin/database_setup/database_setup.zip
    1. If the Greenplum database administrator does not possess the ownership of this directory, then issue the chown command to reassign the ownership.
      # chown -R gpadmin:gpadmin /home/gpadmin/database_setup/
  5. Log in to the system as the GPDB administrator (for example, gpadmin) on the Greenplum master host.
    # su - gpadmin
  6. Set the search path to include the public schema.
  7. Navigate to the database_setup/Greenplum directory.
    $ cd /home/gpadmin/database_setup/Greenplum
  8. Run the Team Studio installer (the .bin file).
    $ sh alpine_miner_installer_Greenplum.bin
    1. Read and accept the license agreement.
    2. Specify the Greenplum installation path. The setup places the required shared library in the directory $GPDBHOME/lib/postgres/.
    3. Specify if the installer should copy the shared library to the segment hosts. Enter y for multi-node clusters.
    4. If you entered y, then enter the full path to the file containing the segment host names.

      You can create your own host file. For example, create a file /tmp/hostfile and add all the segment host names or IP addresses one after the other in the file, similar to the following.

      segmenthost1
      segmenthost2
      segmenthost3
      /path/to/hostfile_gpinitsystem 
      (or /tmp/hostfile)
    5. Specify the default database to install the Team Studio functions.
    6. Specify the port on which the Greenplum database is running.
    7. Specify if you would like to create the Team Studio demo database.
    8. Verify the shared library exists on each segment node.
  9. Modify the file /var/lib/pgsql/data/pg_hba.conf to allow users access to the appropriate databases.

    Using the miner_demo database as an example, add the following lines to the end of pg_hba.conf.

    local miner_demo miner_demo trust
    host miner_demo miner_demo 192.168.1.0/24 password
  10. Reload the Greenplum database to activate the changes made in the configuration file.
    $ gpstop -u