
Run Remote Linux Jobs from IRI Workbench
This article demonstrates how you can run SortCL-compatible jobs configured in your local Linux IRI Workbench on a remote Linux machine with a licensed CoSort SortCL executable. This is necessary when you have different Linux environments for design and deployment; e.g., the former has a graphical environment and the latter is a multi-user, large production server.
See this article if you want to launch Linux SortCL from Workbench on Windows.
In this example we are using the Ubuntu version of Linux on both the Workbench job design client and the server running the SortCL job. To set up the remote job, you must:
- Set up the Remote Connection
- Define the Remote Connection in IRI Workbench
- Create a New Remote Folder to Hold Project Assets
- Create a Remote Project
- Define the Remote Executable
- Launch the Remote Job from the Client
- Verify Job Results on the Server
Set up the Remote Connection
To connect between two Linux machines you will need to install and use OpenSSH on both the client and server. OpenSSH is a powerful tool for remotely controlling networked computers.
Traditional tools like telnet or RCP are insecure and transmit user passwords in cleartext. SSH uses a server daemon and client tools to facilitate secure, encrypted, remote control and file transfer operations.
The OpenSSH server component, sshd, listens continuously for client connections from any of the client tools. When a connection request occurs, sshd sets up the correct connection depending on the type of a client tool connecting.
To install OpenSSH on the client, run:
sudo apt install openssh-client
To install OpenSSH on the server, run:
sudo apt install openssh-server
My IRI Workbench is running on a Linux desktop PC called ‘Hydra’ while the SortCL executable is licensed on a Linux server called ‘Cyclops.’ So I establish the SSH connection between the two systems:
SSH uses port 22 by default, though that can be changed for security. Note also that the user name must be specified in the connection unless it is the same on both systems.
You can also run the command $COSORT_HOME/bin/sortcl /version to confirm your SortCL program license is active after installation of CoSort on the remote server; e.g.,
Define the Remote Connection in IRI Workbench
To connect the Linux version of IRI Workbench between client and remote server, you will use the Remote Systems Explorer (RSE) in the client machine. The RSE view should be in the Workbench perspective by default. If not, select and open it from the top Window menu.
Once open, click on the leftmost icon in the Remote Systems Explorer (RSE) view, shown here:
This will open the New Connection dialog. Select SSH Only and click Next:
In the subsequent dialog, specify the source machine name (in my case, it’s Hydra) and the IP address of the remote machine (in this case, Cyclops at 192.168.3.173). Then click Finish:
Create a New Remote Folder to Hold Project Assets
The SortCL program on the remote server will need access to the job scripts, separate data definition file (DDF) metadata assets (if any), and possibly input files, in order to run. To facilitate the ‘local’ storage of those artifacts on the (remote) server, you should create a remote folder on the server directly from your local IRI Workbench client.
To create a new folder on the remote server, in the RSE view, click on a top level directory and then click New > Folder:
This will open a dialog recognizing the current remote folder activated and allow you to define a subfolder (directory) below it:
Create a Remote Project
You can also create a remote project linked to a local project, within the new remote folder you just created. This is more convenient than manually copying files from the local to remote folders.
- Highlight Remote Folder in Remote Systems
- Right-click on that remote folder (here, called RemoteProject)
- Select New=>IRI Project
- In this new dialog called New IRI Project, name the project (in my case, ‘chiefs’) and locate it in the remote folder, which is in the RSE file system option and the path and IP address revealed through the browse view:
5. Click OK in the Browse to File dialog and after confirming the settings in the New IRI Project dialog, click Finish.
We now have a shared remote project (chiefs) visible from the IRI Workbench RSE view. From here, you can run a new job wizard to create a remote project job through the local Workbench project menu.
Define the Remote Executable
Once you are ready to run your remote job from your local Workbench, you must have the remote CoSort (SortCL) product location defined in Preferences. To do that, perform the steps below:
- Click IRI Menu=>IRI Preferences=>IRI=>Products
- Click the Add button
- In the Name section, type any name , in this case I have used RemoteCoSort
- From the dropdown menu Select CoSort
- Change the File System to RSE
- Browse the location of Cosort in the Remote Server. In my case it expressed as: rse://192.168.3.173/home/cosort/Downloads/cosort-10.5.1?192.168.3.173
- Click Ok
Launch the Remote Job from the Client
Navigate to the Project in the Remote Systems Explorer and open it to find the .scl job script to be run.
Once you have highlighted that job, right-click on it, then click IRI=>Run As=>Run Configuration:
In this dialog, you, unfortunately, have to re-browse to the same remote project, add the specific job script again, and confirm the remote executable before you can click Run to actually perform the job on the remote system.
Verify Job Results on the Server
Depending on where you directed the output data in the job script, you can either see the standard output in the remote system from the local Workbench console view here:
The outfile is going to stdout, and I am also defining an output file.
Otherwise, if you specified an actual output file in the job, it will write to a target on the remote system which you can open independently there:
In addition to the data targets from the remote SortCL job, a number of log files should also be created in the remote folder. If you have any questions about or need help with this process, please contact support@iri.com.