Table of contents

Set up remote deployments (Beta)

A Watson Studio Local release can be exported as a TAR.GZ file and uncompressed on a remote edge node. Its deployments can then be started and administered using the new wsr command line utility. This solution works best for data that is spread out across multiple sites, and can dramatically improve compute performance for each deployment.

Restriction: Watson Studio Local supports remote deployments for web services and job deployments only. SAAS, PMML, and WML models are not supported. Also, R models and SPSS modeler jobs can only be deployed remotely with local data sets (not remote data sets).
Requirement: The remote edge node requires the Linux x86 operating system and Docker version 1.13 or later.
Want to see remote deployment in action? Watch this short video:
Figure 1. Video that shows deployment on the edge in Watson Studio Local.

To set up remote deployments, complete the following steps:

  1. In the Watson Machine Learning client, open the project release as its Admin and click the Export button (Export). All deployments (whether active or not), configuration files, scripts, and metadata are exported as a TAR.GZ file. You will also see a list of all docker images required for the deployments. You must manually transfer all of these docker images to the remote edge node. See Best practices for transferring docker images from Watson Studio Local to a remote node for instructions. Note that docker images can be shared between releases.

    Export release

  2. Click the Download WSLR command line utility button (Download WSLR) to download the wsr.exe command line utility.
  3. Transfer both the exported TAR.GZ file and the wsr.exe command line utility to the remote edge node and uncompress the TAR.GZ file into its own directory. Each release should have its own directory. The wsr.exe can be in any directory but must have executable permissions.
  4. On the remote edge node, initialize the new release and create storage keys by entering: wsr init <release_directory_path>.
  5. List all active and inactive deployments in the release by entering wsr list deployments <release_directory_path>.
  6. List all data sources by entering wsr list datasources <release_directory_path>. If a deployment requires reading or writing to a remote data set, enter wsr user <release_directory_path> <deploymentName> and wsr passwd <release_directory_path> <deploymentName> to set the data source credentials before staring the deployment. You can also set a new data source by entering ./wsr set datasource <release_directory_path> <deploymentName> --description=<description> --driverClassName=<driverClassName> --host=<host> --url=<url> --port=<port> and then rerunning the data source credential commands on it.
  7. Start each deployment in the release by entering wsr start <release_directory_path> <deploymentName> -port <portNumber>. You can also stop a deployment by entering wsr stop <deploymentName>. Optional: To batch score or evaluate with custom files, you must first bind mount the directory that they are in on to the container, then supply the custom files as input and output parameters: wsr start <release_directory_path> <deploymentName> -v "/root/datasets:/containerData:rw" -- --outputFile="/containerData/local_output.csv" --inputFile="/containerData/custom_batch_input.csv" or wsr start <release_directory_path> <deploymentName> -v "/root/datasets:/containerData:rw" -- --inputFile="/containerData/custom_eval_input.csv".
  8. Verify which deployments are running by entering wsr status --all.
Tip: If a deployment has a Failed status, complete the following steps to view the logs:
  1. Retrieve the containerID by entering docker ps -a | grep <deploymentName>. For deployments with the same name across releases, use docker ps -a | grep <route>-<deploymentName>. Docker container names will be of the form <route>-<deploymentName>.
  2. View the deployment logs by entering docker logs <containerID>.

To retrieve the curl command for a started web service deployment, enter wsr showsamplecurl <release_directory_path> <deploymentName>. You can also test the web service deployment by entering wsr testwebservice <deploymentname> --show-curl.

Enter wsr --help for a list of all available commands.