Creating a custom route to Db2 Graph

After enabling Db2 Graph you can create and customize the route by which users access the Db2 Graph user interface (UI) and server.

Before creating the route, you need the name of the Db2 Graph service. Run the following command to find the service name:
oc get svc | grep db2u-graph-svc
The result looks similar to the following example:
c-db2oltp-1621022757650703-db2u-graph-svc                 NodePort    172.30.237.60    <none>        8182:30403/TCP,3000:30412/TCP                62s
In the preceding example, the Db2 Graph service name is:
c-db2oltp-1621022757650703-db2u-graph-svc
Note: The Db2 Graph service name is referenced as GRAPH_SERVICE_NAME in the topics Creating a route for the Db2 Graph user interface and Creating a route for the Db2 Graph server.
Tip:
After creating these custom routes, consider updating the default values for the following parameters in your /etc/haproxy/haproxy.cfg file:
  • timeout client
  • timeout server

The default values are each set at 1 minute. With these settings, the Db2 Graph UI will encounter timeout errors for any queries running longer than a minute. Update these values to be greater than the default Db2 Graph gremlin timeout value of two minutes.

To apply your changes to the /etc/haproxy/haproxy.cfg file, run the following command:
systemctl reload haproxy