CLI Reference
tap.exe runner start
Starts the Runner using the config located at <OpenTapInstallation>/Config/runner.json
. See Runner Config section for configuration
Environment variables:
OPENTAP_RUNNER_TOKEN
If RunnerRegistrationUrl
is specified in config, and OPENTAP_RUNNER_TOKEN
environment variable is set and the CredentialsFilePath
is either not set or does not exist, a registration flow will start, similar to the runner register
CLI action by using the RunnerRegistrationUrl
and RunnerRegistrationToken
specified in the configuration file.
If RunnerRegistrationUrl
is specified in config, and OPENTAP_RUNNER_TOKEN
environment variable is set and the connection is refused by the server due to an Autorization Violation
exception, a registration flow will start and if the registration is successful another connection will be attempted.
tap.exe runner session
Arguments:
--id : Guid formatted ID
--nats-server : List of nats servers to connect to
--log : File path to session log
--creds : NATS Credentials formatted as 'seed;jwt'
--auth : Url to Keycloak authentication configuration
--default-domain : When 'authorization' headers are received, the access token value is associated with the default domain value
--runner-id : ID of the runner that manages this session. This is used to retrieve the capabilities of the Session and communicate with the Runner
Sessions created by a runner (when using –runner-id) will have the following subject structure:
OpenTap.Runner.{RunnerId}.Session.{ID}
Sessions started on their own (without using –runner-id) will have the following subject structure:
OpenTap.Session.{ID}
tap.exe runner register
Sets up a new <OpenTapInstallation>/Config/runner.json
config file and registers the runner at the specified --url
using the --token
as authentication and sets the --name
as the display name of the runner.
Arguments:
--config : File path to config file
--url : Runners Service Registration Url
--token : Runners Service Registration Token
--name : Display name of the runner
--nats-server : NATS Server to connect to
--capability : Add capability tags
Environment variables:
OPENTAP_RUNNER_TOKEN
Runner Configuration
{
// Display name sent to Runner Service as part of registration and also used in the connection name to NATS.
"Name": "John Runner",
// Directory to store session logs. Created Sessions will also store their sessionlogs at this location.
"LogDestination": "./SessionLogs",
// A performance optimization in image creation. If a previously resolved image is requested again, do not consult repositories, just return last resolved image
"UseImageCache": true,
// Runner Service url. If this is set, the Runner will register and store registration details in the runner.json config
"RunnerRegistrationUrl": "http://runner-url.com",
// Tags to specify the capabilities of this runner. TestPlans created on this Runner will default request to be loaded in Runners with these tags
"Capabilities": [
"PowerAnalyzer",
"SCPI"
],
// Connect to specified NATS servers. If registering using the "RunnerRegistrationUrl", leave this empty to use servers retrieved by the registration process
// If "ws://" or "wss://" scheme is used, the Runner will use the "NATS Server" TapPackage and connect as a leaf server. This eliminates firewall issues.
"NatsUrls": [
"nats://nats:4222"
],
// Enables JWT Bearer token authentication of incomming requests. The signing keys are retrieved by the runner using <AuthUrl>/.well-known/openid-configuration.
"AuthUrl": "http://keycloak.ks8500-url.com/auth/realms/Default",
// Default domain. Client's using SetAccessToken will set their access tokens against this domain.
"DefaultDomain": "http://ks8500-url.com",
// Preconfigured NATS Seed. The Runner will register towards RunnerRegistrationUrl using this seed. If not specified, a new seed will be generated
"NatsSeed": "SUAO4HD23JK4UCLUO2BCQ3FGHNTJ4UOBP3B2G5AS7MABB4ANFSN4RIF27U"
}
Configuration can be overwritten using environment variables. The variables are prefixed with OPENTAP_RUNNER_
.
Examples:
- To change the
LogDestination
, setOPENTAP_RUNNER_LOGDESTINATION=<DesiredLogDirectory>
- To change an array, e.g. the
NatsUrls
, setOPENTAP_RUNNER_NATSURLS__0=<Index 0 Nats URL>