Harness Delegate on Windows Host

Before we get started “Kindly note Harness Officially doesn’t Support Delegates on Windows Host”

The delegate installation used here is a shell type.

In your Windows Host you will first need to enable WSL.

How to enable WSL :

Open PowerShell as Administrator and run

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Also once the WSL is enabled you will to download and install a linux distribution.

Follow here to download a linux distribution :

We will be using an ubuntu linux distribution here.

Once you down the distribution, now you will need to extract and install it.

1.) Extract the <distro>.appx package’s contents, using PowerShell:

Rename-Item .\Ubuntu.appx .\Ubuntu.zip
Expand-Archive .\Ubuntu.zip .\Ubuntu

2.) Add your distro path to the Windows environment PATH (C:\Users\Administrator\Ubuntu in this example), using PowerShell:

$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")

3.) Run the distribution launcher application in the target folder. The launcher is typically named <distro>.exe (for example, ubuntu.exe ).

Setup the username and password for the linux distribution and you are all set to go.

Type bash and you will now enter the bash command prompt from Powershell.

Now you need to download a shell script from Harness UI :

Untar and start the delegate.

Now you delegate is up and running, you can validate the same from Harness UI.


Thanks for the tutorial!

Also if you are trying out items, can run on Minikube on Windows since all the recent advancements: Harness and Windows - Possibilities are Endless

Stay bold!

1 Like