Versions Compared

Key

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

SeaLights .NET Core agent is integrated into the Cloud Foundry .NET core buildpack. So you can use it in your application by performing the following simple steps:

  1. Create SeaLights service configuration

  2. Push an application

  3. Bind an application with the service

  4. Restage an application

Create Service Configuration

To manage application integrations with third-party services Cloud Foundry has the mechanism of the User-Provided Services. So the first step is to create such a service with the configuration.

Here is the command “create-user-provided-service“ that does that:

Code Block
cf cups sealights -p '{"token":"ey…", "bsId":"as…"}'
Info

Note: you have to escape " character in the windows commands line

...

Code Block

so that the command will look like this:

...

cf

cups

sealights

-p

'{\"token\":\"ey…\",

\"bsId\":\"as…\"}'

You will be able to change the parameters later with the command “update-user-provided-service. See below the complete list of the available parameters.

Push an application

You can push an application as usual with the command “push” just taking into account that to perform the testListener phase in the CloudFoundry container you have to publish an application unit tests

Code Block
cf push

...

Info

You can use a manifest.yml file to simplify an application deployment

Bind Application with the service

Now you can bind your published application with the service

Code Block
cf bind-service [app name] sealights

Restage Application

In order to To apply changes you have to publish your application again, or just restage it with a command restage

Code Block
cf restage [app name]

Sealights user-provided service options

Prameter

Parameter name

Description

Prameter name

Description

version

By default pointer to the latest released version. Use this parameter if you want to use some specific agent version

customAgentUrl

This URL can be used to replace agent installation package completely with another one. Expect url to tar.gz archive

labId

Allow to determine customer lab id - unique ID for a set of test labs in case multiple labs are running simultaneously

mode

Default value: testListener.

token

Sealights token

tokenFile

File that contains Sealights token. Should be deployed together with target application

bsId

Sealights workflow session

bsIdFile

File that contains Sealights session id.

target

Default value is ‘dotnet’. Will be used dotnet runtime version that specified in the target application. If an application is published without framework dependencies - will be used an agent’s version - 6.0.3

If target parameter is exist - specified parameter will be used.

targetArgs

Default value for testListener is test <target.dll>

If target parameter is exist - specified parameter will be used.

workingDir

Root application folder

profilerLogDir

Path to log folder for Profiler

profilerLogLevel

Profiler log level

proxy

Address of proxy to run connection through

proxyUsername

The proxy username if needed

proxyPassword

The proxy password if needed

ignoreCertificateErrors

Ignore server certificate error

tools

 

tags

 

notCli

 

appName

application name - will be displayed in dashboard

branchName

current branch name

buildName

current build name

includeNamespace

filter for the application namespaces. Only specified namespaces will be handled

workspacePath

current workspace path

ignoreGeneratedCode

 

testStage

Name of the test stage

 

How does it work

Sealights use the AfterCompile hook in the dotnet-core-buildpack to install an agent and all required dependencies in the target container. So, once the application is pushed to the cloud foundry service, the following steps occur:

...