Connecting Watson Machine Learning Accelerator to Watson Machine Learning

After deploying both the Watson Machine Learning service and the Watson Machine Learning Accelerator service, you can connect the two services to share training resources and use Watson Machine Learning resources with Watson Machine Learning Accelerator.

Before you begin

Ensure that Watson Machine Learning is installed to a different namespace from Watson Machine Learning Accelerator.

Procedure

  1. Get the JWT public key used by the Watson Machine Learning service deployment which can be found on the Watson Machine Learning training pod in the /user-home/public.pem location:
    kubectl -n wmlzen exec -it wmltraining bash
    cat /user-home/public.pem
    where wmltraining is the name of the Watson Machine Learning training pod.
  2. Update the public.pem key value in the dlpd pod of Watson Machine Learning Accelerator.
    1. Get the dlpd pod name from the Watson Machine Learning Accelerator namespace.
      oc get pods -n wmla-tether-namespace
      where wmla-tether-namespace is the name of the Watson Machine Learning Accelerator deployed namespace.

      The dlpd pod name starts with wmla-dlpd-*. For example: wmla-dlpd-dcbdb6bc7-m8k8p

    2. SSH into the dlpd service pod to get the JWT token information.
      oc exec -it wmla-dlpd-dcbdb6bc7-m8k8p -c dlpd sh -n wmla-tether-namespace
    3. Get the current JWT public key set in the dlpd service using the below commands:
      cat /var/shareDir/dli/conf/dlpd/dlpd.conf | grep -i JWT
      "DLI_JWT_SECRET_KEY" : "/var/shareDir/dli/conf/dlpd/cpd_jwt.pub",
      "DLI_JWT_VERIFY_NOTBEFORE_TIME": "on",
      "DLI_JWT_VERIFY_EXPIRATION_TIME": "on",
      "DLI_JWT_SINGLE_USER_MODE": "on",
      "DLI_JWT_SINGLE_USER_NAME": "Admin",
    4. Update the Watson Machine Learning JWT token in cpd_jwt.pub. The location of this file is specified by the DLI_JWT_SECRET_KEY parameter in the previous step, for example: /var/shareDir/dli/conf/dlpd/cpd_jwt.pub.
  3. Restart the dlpd service:
    cd /var/shareDir/dli
    /opt/ibm/spectrumcomputing/dli/2.2.2/dlpd/tools/msd/msdctl restart_dlpd
  4. In Watson Machine Learning, run the updateWMLClusterdetails.sh command line utility which allows Watson Machine Learning to locate and use a WML Accelerator instance.
    1. Navigate to the cpd-linux-workspace/modules/wml/x86_64/3.5.0 directory.
    2. Extract the script files from wml-base-3.5.0-*.tgz.
      For example:
      tar -zxvf wml-base-3.5.0-39.tgz
    3. Export the Watson Machine Learning namespace.
      export NAMESPACE=wml-namespace
      where wml-namespace is the name of the Watson Machine Learning namespace.
    4. Run the updateWMLClusterdetails.sh script.
      sh updateWMLClusterdetails.sh wmla_route 443 wml-ig wml-ig-edt wml_routename
      where:
      • wmla_route is the Watson Machine Learning Accelerator routing information. To obtain the routing information, issue the following command:
        oc get route/wmla-dlpd -o jsonpath={.spec.host} -n wmla-namespace
      • wml_routename is the Watson Machine Learning route name. To obtain the route name, issue the following command:
        oc get route/cpd-namespace-cpd -o jsonpath={.spec.host} -n cpd-namespace
        where cpd-namespace is the Cloud Pak for Data namespace.