Azure Database: Setting up Postgresql bsub Job IN RIS.
- This document walks us through the step of developing a bsub environment for postgresql to be ran in the RIS server.
- The bsub job allows users to run a local image of the postgressql database in the RIS server.
Step 1: Log into RIS Server:
- The first step is to log in the RIS server using th ssh command
RIS Login
(enlarged image)
Step 2: Create a password File
- The password will be stored in a variable file.
- This password allows us to run the local postgresql docker immage safely & securely on the ris server.
Password file
(enlarged image)
Step 3: Update .bashrc file
- Update the .bashrc to point to the directory where the postgresql executable files are stored.
- Both the export PATH & export LD_LIBRARY_PATH variables points to the folder where all the postgresql 15 executable files are stored.
- The .bashrc export PGSSLMODE=require ensures that we can run the bsub job with the password.
.bashrc file
(enlarged image)
Step 4: Create a .sh file
- The script to launch the bsub job will be wrapped in a shell file (.sh).
- The bsub job file name for the postgresql environment is get-postgressinteractive-job.sh
- The file is usually stored in the home directory that is same as the password file.
- The LSF_DOCKER_ENV_FILE references the password file for the postgresql database server password.
- The a docker(postgres:15) references the docker image that will be use to initiate the bsub environment.
bsub job
(enlarged image)
Step 5: Run the bsub job
- The bsub job needs to be initiated to access the postgresql database environment.
- This script allows you to initiate that connection.
./get-postgressinteractive-job.sh
Running bsub job
(enlarged image)