Workspace 6.21.5
Distributing workload to other (non-cluster) remote machines with the Workspace-Server service

Introduction

Workspace can be used to make use of other remote machine resources that reside outside of a cluster. In this section we will cover:

  • How to configure and start a workspace-server
  • How to connect a workspace client to a running workspace server

Contents


How to configure and start a workspace-server

Workspace has a remotely installable service called the 'workspace-server' that, when installed on a machine, enables a workspace client to distribute workflows to that machine for execution. In reality we would install the workspace-server onto a number of remote machines we want to use to help process our workflows, to simplify the tutorial however we will install the workspace-server onto our local machine.

  1. Workspace comes with an administration utility (called the 'Workspace server admin' utility) to help you configure, start and stop a workspace server. As mentioned, normally you would additionally install the workspace package onto a remote machine so as to be able to start the workspace server remotely however as mentioned, to simplify the tutorial we will perform this client server test on a single machine. Let's launch the Workspace server admin utility from our start menu. IMPORTANT - You MUST launch the Workspace server admin utility using the same user account configured to launch the Workspace server service. Failure to do so will result in your configuration changes not being visible to the Workspace server service.
  2. Once launched you will be presented with the workspace server admin graphical user interface that looks as follows:
    Workspace server admin graphical user interface
  3. Before a client can connect to our workspace server we must configure the security settings. To do this, navigate to the tab entitled "Authentication".
    Configuring authentication
  4. Click the "Add entry" button to add an authentication entry.
  5. In the newly added row, ensure the first column "Authentication" is set to "None". This will grant any user access to the server.
  6. Click the Save button to apply your changes.
  7. To start the workspace server simply click the "Start" button on the "Server control" tab (NB. you may need to run this application under an administrator account in order to be able to start the workspace-server service).
  8. By default, on starting the service, the service will bind itself to port 42150. You can change the default port in the "Settings" tab.
    The settings tab
  9. You should now have a running workspace-server, the next thing to do is to configure a workspace client to connect to our workspace-server.

How to connect a workspace client to a running workspace server

In the previous section we started a workspace-server on our local machine using the workspace server admin utility, in this section we will configure our workspace editor to be able to connect to this workspace-server.

  1. Open the workspace editor
  2. Go to Settings / Configure application... menu and select the "Parallel / Remote execution" settings entry from the left hand list
  3. You should have two default servers in your servers list: one default Out of process server as well as a default Workspace server, remove any other servers from your list
    Configuring workspace editor client settings
  4. We are now going to register our local workspace server so click the "Add server" button
    New workspace server is added with default settings
  5. Set the Server Type to "Workspace Server"
  6. Set the Host to "127.0.0.1"
  7. Set the Port to 42150 (or the port that the workspace server above was configured to run on if you changed this)
  8. Set the Max Jobs to 2
  9. Set the Enabled field to ticked
  10. Next, click on the Configure... button and set the authentication provider to "none" and click OK
    The TCP scheduler specific configuration dialog
  11. Click 'Apply' then 'Close'
  12. For your settings to be applied restart the workspace editor
  13. Next, open the sample workflow.
  14. This workflow will generate many images in parallel. As an image can potentially be generated on one of several machines (depending on how we have configured our workspace-server i.e. running locally, remotely on a single machine or remotely on multiple machines) we would like to see the name of the executing machine in the image file name along with the iteration number. The workflow, as mentioned, will generate many images in parallel with the following naming convention:
    {DATADIR}/{iteration#}_{HOST}.png
    
  15. DATADIR will be an environment variable configured on all our executing machines to point to the generated image output directory. Create this environment variable now as per your OS documentation. This environment variable should hold the full absolute path of the directory into which you would like the workflow to generate images.
  16. HOST will be an environment variable configured on all our executing machines to hold an executing machine's host name. Again, create this now as per your OS documentation. This environment variable should hold the name of your machine.
  17. In order for your environment variables to be detected by the workflow you will need to restart the workspace editor.
  18. Similarly, you will need to re-launch your workspace-server administration utility and restart your workspace-server.
  19. With your environment variables in place, your workspace-server and workspace editor restarted you can now run the workflow. This workflow will generate a set of blank images with the title of each image being the host name and iteration number combined into the directory specified by the DATADIR environment variable you created above.
  20. On workflow completion, check the contents of the DATADIR directory and confirm that it contains a complete set of images i.e. one per iteration.
  21. You can repeat this tutorial running a workspace-server on an arbitrary number of Windows, Linux and / or Macintosh machines. Ensure that you have each workspace-server machine registered with your workspace editor as desrcibed above and you have configured your data directory and host name environment variables on each machine.

As mentioned, the workspace server can be installed onto any number of remote machines however in this demonstration we ran both the workspace client and server on a single machine. Additionally, access to the workspace server can be restricted to an explicit set of users and communication between workspace client and server can be further secured over an SSL connection. To configure SSL simply register your SSL private and public keys with the workspace server and modify your workspace editor's server entry providing the public key.


Summary

This concludes the tutorial on making use of remote compute resources using the workspace server.