Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The latest version of the dot net core agent can be downloaded in two archive formats to support the native capabilities of Linux (.tar.gz) and Windows (.zip). It is especially relevant when working with containers.

All the agents from the links below are provided as self-contained applications, if you need a platform dependent version, please contact Support.

Note

When using the Alpine version of the agent, please make sure your command are referring to the “right” executable (without file extension): SL.DotNet instead of SL.DotNet.exe or SL.DotNet.dll.

Info
  • If you have a limitation accessing the endpoint agents.sealights.co and are limited to your specific servers DNS, then you can also get the agent from https://{company}.sealights.co/dotnetcore/latest/sealights-dotnet-agent-{os}-self-contained.{archive-extension} and replace {company} with your company dns prefix

  • The Alpine distribution uses musl as the standard C library implementation, while most other Linux distributions use glibc as their standard C library implementation [Source]. It means the library compiled with glibc depends on a different set of standard libraries, leading to a separate artifact for Alpine distributions. The code base remains the same; only the build configuration is different.

Downloading from NuGet

We’re publishing the agent also in Nuget https://www.nuget.org/profiles/sealights-technologies

  • Sealights.DotNet.Windows

  • Sealights.DotNet.Linux

  • Sealights.DotNet.Alpine

You can download the agents from there.

Sample Scripts for download

Download from Nuget the Linux agent version predefined in the Settings page

In the script below:

  • We retrieve the version selected in the dashboard settings page

  • We download the .nupkg file, store it locally, and unzip it (.nupkg is a ZIP format)

  • We create a symbolic link to the content subfolder to keep compatibility with “existing” script commands (referring to `sl-dotnet-agent`) and keep things short and simple

Code Block
SL_PACKAGE="Sealights.DotNet.Linux"
NUGET_URL="https://www.nuget.org/api/v2/package"
$SEALIGHTS_URL="mydomain.sealights.co"

#SL_VERSION="3.10.1"
SL_VERSION=$(curl -s -X GET "https://$SEALIGHTS_URL/api/v2/agents/dotnet/recommended" -H "accept: application/json" -H "Authorization: Bearer $SEALIGHTS_AGENT_TOKEN" -L | jq -r .agent.version)
echo "[Sealights] Selected version in Dashboard settings is: $SL_VERSION"

wget -nv -O sealights-dotnet-linux-$SL_VERSION.nupkg "$NUGET_URL/$SL_PACKAGE/$SL_VERSION"
unzip -oq sealights-dotnet-linux-$SL_VERSION.nupkg -d "./sealights-dotnet-linux-$SL_VERSION"
ln -s ./sealights-dotnet-linux-$SL_VERSION/content ./sl-dotnet-agent
echo "[Sealights] Installed version is: $(cat ./sl-dotnet-agent/version.txt)"

Download the agent for Windows - ZIP archive

Code Block
languagepowershell
$global:ProgressPreference = "SilentlyContinue"
iwr -OutFile sealights-dotnet-agent.zip -UseBasicParsing -Uri https://agents.sealights.co/dotnetcore/latest/sealights-dotnet-agent-windows-self-contained.zip
Expand-Archive .\sealights-dotnet-agent.zip -DestinationPath sl-dotnet-agent -Force
Write-Output "[Sealights] .NetCore Agent version is: $(Get-Content .\sl-dotnet-agent\version.txt)"

You can deploy the token as a file in the agent folder automatically via a command like:
Out-File -InputObject $SL_AGENT_TOKEN -NoNewline -Force (Join-Path .\sl-dotnet-agent\ "sltoken.txt")
This will allow you to save the token parameter form the agents commands.

Note

In some Windows configurations, it may be necessary for you to enforce a compatible SSL protocol
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13

Download the agent for Linux - TAR GZ archive

Code Block
languagebash
wget -nv -O sealights-dotnet-agent-linux.tar.gz https://agents.sealights.co/dotnetcore/latest/sealights-dotnet-agent-linux-self-contained.tar.gz
mkdir sl-dotnet-agent && tar -xzf ./sealights-dotnet-agent-linux.tar.gz --directory ./sl-dotnet-agent
echo "[Sealights] .NetCore Agent version is: `cat$(cat ./sl-dotnet-agent/version.txt`"

#curl tool can also be used
#curl -L txt)"
Info

Instead of wget command, you can also use an equivalent curl call:
curl -L "https://agents.sealights.co/dotnetcore/latest/sealights-dotnet-agent-linux-self-contained.tar.gz"

--output

sealights-dotnet-agent-linux.tar.gz

Download the agent for Alpine distribution - TAR GZ archive

Code Block
languagebash
wget -nv -O sealights-dotnet-agent-alpine.tar.gz https://agents.sealights.co/dotnetcore/latest/sealights-dotnet-agent-alpine-self-contained.tar.gz
mkdir sl-dotnet-agent && tar -xzf ./sealights-dotnet-agent-alpine.tar.gz --directory ./sl-dotnet-agent
echo "[Sealights] .NetCore (Alpine) Agent version is: `cat$(cat ./sl-dotnet-agent/version.txt`txt)"

Security

If you download and copy the agent manually, its files might get blocked by Windows OS.

You have two options to unblock them, to unblock them:

  • Right-click both the SL.DotNet.exe and SL.DotNet.dll files and check the Unblock check box in the security section.

  • You can also use the following PowerShell command: Get-ChildItem -Path 'C:\Sealights\agent\' -Recurse | Unblock-File ( assuming they were unzipped in the same C:\Sealights\agent folder)