Skip to content

Commit a27c57b

Browse files
Document configuring launch-agent via environment variables
1 parent b9bf2cd commit a27c57b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

jekyll/_cci2/runner-installation.adoc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ After setup completes, the Launch Agent starts automatically and begins looking
483483

484484
See: xref:runner-on-kubernetes.adoc[Runner on Kubernetes]
485485

486-
== Configuration file reference
486+
== Configuration reference
487487

488488
A YAML file is used to configure the launch agent, how it communicates with our servers and how it will launch the task agent.
489489

@@ -496,27 +496,35 @@ runner:
496496
name: RUNNER_NAME
497497
```
498498

499+
NOTE: The launch agent can also be configured via environment variables by supplying the `--env` flag to the launch agent command.
500+
499501
=== runner.name
502+
`$LAUNCH_AGENT_RUNNER_NAME`
500503

501504
`RUNNER_NAME` is a unique name assigned to this particular running launch agent. CircleCI recommends using the hostname of the machine so that it can be used to identify the agent when viewing statuses and job results in the CircleCI UI.
502505

503506
=== api.auth_token
507+
`$LAUNCH_AGENT_API_AUTH_TOKEN`
504508

505509
This is a token used to identify the launch agent to CircleCI and can be generated by the CircleCI CLI. An existing token may be shared among many installations, but this token only allows a particular `resource_class` to be specified.
506510

507511
=== runner.command_prefix
512+
`$LAUNCH_AGENT_RUNNER_COMMAND_PREFIX`
508513

509514
This prefix enables you to customize how the task agent process is launched. Using a custom script here can allow you to execute arbitrary commands before and after the task runner. You should take care to ensure the supplied arguments are executed, and the correct exit code is returned from the script upon completion.
510515

511516
=== runner.working_directory
517+
`$LAUNCH_AGENT_RUNNER_WORK_DIR`
512518

513519
This directory allows you to control the default working directory used by each job. If the directory already exists, task agent will need permissions to write to the directory. If the directory does not exist, then the task agent will need permissions to create the directory. If `%s` is present in the value, this value will be replaced with a different value for each job. Note that these directories will not be automatically removed.
514520

515521
=== runner.cleanup_working_directory
522+
`$LAUNCH_AGENT_RUNNER_CLEANUP_WORK_DIR`
516523

517524
This directory enables you to control the working directory cleanup after each job. The default value is `false`.
518525

519526
=== runner.mode
527+
`$LAUNCH_AGENT_RUNNER_MODE`
520528

521529
This parameter allows you to specify whether you want to terminate this runner instance upon completion of a job (single-task) or to continuously poll for new available jobs.
522530

@@ -528,6 +536,7 @@ The possible values are:
528536
NOTE: The default value is continuous.
529537

530538
=== runner.max_run_time
539+
`$LAUNCH_AGENT_RUNNER_MAX_RUN_TIME`
531540

532541
This value can be used to override the default maximum duration the task agent will run each job. Note that the value is a string with the following unit identifiers `h`, `m` or `s` for hour minute and seconds respectively:
533542

@@ -553,12 +562,14 @@ Draining can end in one of two ways:
553562
* An additional TERM signal is received by the Launch Agent during "draining".
554563

555564
=== runner.idle_timeout
565+
`$LAUNCH_AGENT_RUNNER_IDLE_TIMEOUT`
556566

557567
This timeout will enable a launch agent to terminate if no task has been claimed within the given time period. The value is a string with the following unit identifiers: `h`, `m` or `s` for hours, minutes and seconds, respectively (e.g., `5m` is 5 minutes).
558568

559569
NOTE: The default behaviour is to never time out due to inactivity.
560570

561571
=== runner.ssh.advertise_addr
572+
`$LAUNCH_AGENT_RUNNER_SSH_ADVERTISE_ADDR`
562573

563574
This parameter enables the 'Rerun job with SSH' feature. Before enabling this feature, there are xref:runner-installation.adoc#considerations-before-enabling-ssh-debugging[*important considerations that should be made*].
564575

0 commit comments

Comments
 (0)