Installing third-party libraries and creating custom images in DataStage

You can install third-party libraries and use them as part of a DataStage flow. If a library requires root installation, build a custom image.

About this task

You can install third-party libraries to paths on a persistent volume, such as /px-storage.

Procedure

  1. Copy the required files to the runtime pod.
    # copy files to px-runtime pod
    oc -n <cp4d-namespace> copy thirdparty.tgz <px-runtime-pod>:/px-storage/
  2. Remote shell into the runtime pod to perform the installation.
    # rsh to px-runtime pod to perform installation
    oc -n <cp4d-namespace> rsh <px-runtime-pod>
  3. If LD_LIBRARY_PATH, PATH, or additional environment variables need to be updated, you can create the script /px-storage/extra_config.sh with the additional variables.
    # update LD_LIBRARY_PATH and PATH
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/px-storage/3rdparty/lib
    export PATH=$PATH:/px-storage/3rdparty/bin
    # export any additional variables needed
    export VARIABLE1=value1
  4. Alternatively, you can use a script in a different location by updating the deployment for PX runtime and the StatefulSet for PX compute to set the DS_EXTRA_CONFIG_SH environment variable with the new location.
    oc set env deployment/<instance-name>-ibm-datastage-px-runtime DS_EXTRA_CONFIG_SH=<path to extra config script>
    oc set env sts/<instance-name>-ibm-datastage-px-compute DS_EXTRA_CONFIG_SH=<path to extra config script>
  5. If a third-party library requires root installation, you must build a custom image for both px-runtime and px-compute to perform the root install. See Building custom images in DataStage.