IBM Support

Make Database services accessible from outside of Cloud Pak for Data cluster.

How To


Summary

By default, Cloud pak for data provisioned data sources such as Data Virtualization, mongodb and DB2 AE SE exposes endpoint services which can only be reached from inside the cluster. The tutorial shows step by step process to expose them on OCP infrastructure nodes so it is accessible from outside the cluster.

Steps

Locate the Port number
1. Go to "My Instances" page and locate the service.
2. On the extreme end of the column, click on the three dots and click View details
image 3152
3. On the details page, find the Port on which the service is installed. This can be obtained by clicking on the copy icon next to it and pasting it in a notepad.
image 3149
Assuming the URL jdbc:db2://worker-01.demo.ibmcloudpack.com:30870/BLUDB, the Port is 30870
4. Get the service name related to this port. (In order to run this command, make sure oc is authenticated and you are in CPD project)
 
  $ oc get svc | grep NodePort | grep 30870    db2oltp-1583008427092-db2u-engn-svc                NodePort    172.30.222.208   <none>        50000:30870/TCP,50001:32476/TCP 
Expose the service as Route
  $ oc expose service db2oltp-1583008427092-db2u-engn-svc --name mydb2  route.route.openshift.io/mydb2 exposed
Validate that route was exposed
 
  $  oc get routes  NAME      HOST/PORT                                            PATH      SERVICES                              PORT                   TERMINATION   WILDCARD  mydb2     mydb2-zen.apps.master-01.demo.ibmcloudpack.com               db2oltp-1583008427092-db2u-engn-svc   legacy-server                        None  zen-cpd   zen-cpd-zen.apps.master-01.demo.ibmcloudpack.com             ibm-nginx-svc                         ibm-nginx-https-port   passthrough   None
Now, you should be able to reach the service from outside of the cluster using
mydb2-zen.apps.master-01.demo.ibmcloudpack.com:30870

Document Location

Worldwide

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSHGYS","label":"IBM Cloud Pak for Data"},"ARM Category":[{"code":"a8m0z000000GoyHAAS","label":"Tutorials"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
06 May 2020

UID

ibm16204880