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.
To set up remote deployments, complete the following steps:
- In the Watson Machine Learning client, open the project release as its
Admin and click the Export button (). 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.
- Click the Download WSLR command line utility button () to download the wsr.exe command line utility.
- 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.
- On the remote edge node, initialize the new release and create storage keys by entering: wsr init <release_directory_path>.
- List all active and inactive deployments in the release by entering wsr list deployments <release_directory_path>.
- 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.
- 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".
- Verify which deployments are running by entering wsr status --all.
- 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>.
- 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.