Setup Rabix Composer Local Executor using WSL2

  • Installation of Rabix Composer on Windows 10, with WSL2 installed/enabled
  • Configuring the Rabix Local Executor which would allow workflows to be run/tested locally
  • Creation/Execution of sample pipelines

WSL2 References & Prerequisites


  • In order to access the Rabix Composer GUI from WSL2 VM, we need an Xserver running on the Windows host, which will render our display. For this article the Home Edition of Mobaxterm is used as an Xserver
  • A WSL2 enabled Linux distribution is required, and for the setup, Debian 10, Buster from Microsoft Store was used. The release details for the OS are shown below.
$ sudo apt install lsb-release
$ lsb_release -a
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
  • Docker for Desktop needs to be installed, with WSL2 integration enabled for the respective Linux distribution

Install/Configure XServer (MobaXterm)

  • Download Mobaxterm
  • From the Windows host, install MobaXterm
  • Launch the program and select Settings --> Configuration. Choose the options shown below on the X11 tab
  • We need to know the XServer IP address/details. These are required to direct Linux WSL2 to the location (DISPLAY=) where the Rabix display is to be sent
  • To find the Xserver IP, go to Tools --> List running processes
  • Make a note of the IP address as this will required it later on

Installation of Rabix and Dependencies

  • Open a prompt within our WSL2 Linux distro. Debian is used for this setup:
  • Install dependencies for X support
$ sudo apt update
$ sudo apt-get install libgtk2.0-0 fuse mesa-utils \
wget libdbus-glib-1-2 kdialog desktop-file-utils xdg-utils \
software-properties-common gnupg libnss3
$ sudo mkdir -p /usr/lib/jvm 
$ sudo tar zxvf jdk-8u261-linux-x64.tar.gz -C /usr/lib/jvm
$ rm jdk-8u261-linux-x64.tar.gz
$ sudo update-alternatives \
--install "/usr/bin/java" "java" \
/usr/lib/jvm/jdk1.8.0_261/bin/java" 1
$ sudo update-alternatives \
--set java /usr/lib/jvm/jdk1.8.0_261/bin/java

Configure JAVA_HOME and Global Profile

  • Add the following entries
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_261
export PATH=$JAVA_HOME/bin:$PATH
$ sudo vi /etc/profile..
export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64
export PATH=$JAVA_HOME/bin:$PATH
  • Activate the new configuration by exiting and logging back into WSL2 distro prompt, or by running:
$ source /etc/profile

Download Rabix

  • As of now, the latest release (1.0.2), can be downloaded to an appropriate subfolder via:
$ mkdir $HOME/rabix
$ cd $HOME/rabix
$ wget -O rabix-composer.1.0.2.AppImage
  • Add execute privileges
$ sudo chmod 755 rabix-composer.1.0.2.AppImage

Add Display Server to ~/.bashrc

  • Using the address of the XServer we noted earlier on, add the following to the bottom of your ~/.bashrc file, replacing the IP address with your XServer's IP
  • vi ~/.bashrc
export DISPLAY=
  • The LIBGL_ALWAYS_INDIRECT=1 variable enables OpenGL hardware rendering (if supported). If you experience issues in subsequent steps related to display output, try changing the "OpenGL acceleration" setting in the MobaXterm X11 Configuration tab from Hardware to Software

Launch/Configure Rabix

  • Start Rabix
$ cd $HOME/rabix
$ sudo ./rabix-composer.1.0.2.AppImage
  • Rabix frontend should appear in a Window on your host
  • Check Rabix is configured to use the bundled executor, and also configure an output folder for logs Output folder: $HOME/rabix/Executions

Sample Workflows

1. Running a Command from within a Docker Container

  • Start by adding a local workspace from within Rabix My Projects --> Open a Project --> Select Folder
  • Add workspace location $HOME/rabix
  • You should now be back at the home screen and on the left hand pane, workspace rabix should be visible under local files
  • Right click on rabix folder in the left hand pane and choose New CommandLineTool
  • For the App name enter Alpine Docker Image
  • Save to $HOME/rabix/alpine-docker.cwl
  • Click on the Code tab and paste the following
cwlVersion: v1.0
class: CommandLineTool
label: Alpine Docker Image
- echo
- id: message
type: string
position: 1
- id: std_out
type: stdout
- class: DockerRequirement
dockerPull: alpine
stdout: output.txt
  • To test the workflow, click on the Test tab and for the message parameter, enter value Hello World
  • Click Run to execute the workflow
  • If all goes well, you should be able to see output similar to the following, indicating the workflow successfully completed
  • Detailed logs related to the workflow execution are stored at $HOME/rabix/Executions
  • WSL2 terminal using standard Linux commands, such as cat
  • Adding the $HOME/rabix/Executions folder to the Rabix workspace, which will allow access to the logs as plain text files from Rabix
  • or, by using Windows Explorer to browse the Linux distro file system
\\wsl$\<linux distro name>
\<Linux distro username>
\<workflow name>

2. Workflow with Embedded Python Script

  • The script is created/populated and executed during the execution of the workflow inside a python:3 docker container
  • The python script sets a variable var="value of var" and prints its value stdout
  • stdout, is mapped to file export.txt
  • Right click on rabix folder in the left hand pane and choose New CommandLineTool
  • For the App name enter Run an Embedded Python script
  • Save as $HOME/rabix/pyscript.cwl
  • Copy the below and paste into the Code area in Rabix
cwlVersion: v1.0
class: CommandLineTool
label: Run an embedded Python script
dockerPull: python:3
baseCommand: python

type: File
position: 1
class: File
basename: ""
contents: |-
var = "value of var"

type: stdout

stdout: export.txt
  • Run the workflow
  • Check the output

Where to From Here?



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store