Skip to content

Commit d486481

Browse files
runner update from old docs (#145)
* runner update from old docs * split lines to make it easier to read * remove backticks from titles
1 parent ffe1263 commit d486481

File tree

1 file changed

+58
-15
lines changed

1 file changed

+58
-15
lines changed

docs/guides/modules/execution-runner/pages/machine-runner-3-configuration-reference.adoc

Lines changed: 58 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,37 @@ logging:
2424

2525
NOTE: Machine runner can also be configured via environment variables. These will be prioritized over the YAML file, if set.
2626

27+
---
28+
2729
[#api-auth-token]
28-
=== `api.auth_token`
30+
=== api.auth_token
2931

3032
`$CIRCLECI_RUNNER_API_AUTH_TOKEN`
3133

3234
The token is used to identify the machine runner to CircleCI and can be generated by the xref:toolkit:local-cli.adoc[CircleCI CLI]. An existing token may be shared among many installations, but this token only allows a particular `resource_class` to be specified.
3335

36+
---
37+
3438
[#api-url]
35-
=== `api.url`
39+
=== api.url
3640

3741
`$CIRCLECI_RUNNER_API_URL`
3842

3943
The URL will be pointing to `https://runner.circleci.com` by default. It should not be modified unless you have a CircleCI server installation. In that case, it must be set to the URL of your server installation.
4044

45+
---
46+
4147
[#runner-name]
42-
=== `runner.name`
48+
=== runner.name
4349

4450
`$CIRCLECI_RUNNER_NAME`
4551

4652
`RUNNER_NAME` is a unique name of your choosing assigned to this particular machine runner. 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 web app. The only special characters accepted in `RUNNER_NAME` are `. () - _`.
4753

54+
---
4855

4956
[#logging-level]
50-
=== `logging.level`
57+
=== logging.level
5158

5259
`$CIRCLECI_RUNNER_LOGGING_LEVEL`
5360

@@ -60,9 +67,10 @@ logging:
6067
level: "info"
6168
```
6269

70+
---
6371

6472
[#logging-format]
65-
=== `logging.format`
73+
=== logging.format
6674

6775
`$CIRCLECI_RUNNER_LOGGING_FORMAT`
6876

@@ -80,9 +88,10 @@ logging:
8088
format: "color"
8189
```
8290

91+
---
8392

8493
[#logging-file]
85-
=== `logging.file`
94+
=== logging.file
8695

8796
`$CIRCLECI_RUNNER_LOGGING_FILE`
8897

@@ -95,9 +104,10 @@ logging:
95104
file: "-"
96105
```
97106

107+
---
98108

99109
[#runner-task-agent-directory]
100-
=== `runner.task_agent_directory`
110+
=== runner.task_agent_directory
101111

102112
`$CIRCLECI_RUNNER_TASK_AGENT_DIRECTORY`
103113

@@ -108,9 +118,10 @@ runner:
108118
task_agent_directory: "~/.local/libexec/circleci"
109119
```
110120

121+
---
111122

112123
[#runner-command-prefix]
113-
=== `runner.command_prefix`
124+
=== runner.command_prefix
114125

115126
`$CIRCLECI_RUNNER_COMMAND_PREFIX`
116127

@@ -151,8 +162,10 @@ runner:
151162
command_prefix: ["/var/opt/circleci/wrapper.sh"]
152163
```
153164

165+
---
166+
154167
[#runner-working-directory]
155-
=== `runner.working_directory`
168+
=== runner.working_directory
156169

157170
`$CIRCLECI_RUNNER_WORK_DIR`
158171

@@ -169,8 +182,10 @@ runner:
169182
working_directory: "/var/lib/circleci-runner/workdir"
170183
```
171184

185+
---
186+
172187
[#runner-cleanup-working-directory]
173-
=== `runner.cleanup_working_directory`
188+
=== runner.cleanup_working_directory
174189
`$CIRCLECI_RUNNER_CLEANUP_WORK_DIR`
175190

176191
This flag enables you to control the working directory cleanup after each job.
@@ -189,8 +204,10 @@ runner:
189204
cleanup_working_directory: true
190205
```
191206

207+
---
208+
192209
[#runner-use-ssh-dir-for-checkout-keys]
193-
=== `runner.use_home_ssh_dir_for_checkout_keys`
210+
=== runner.use_home_ssh_dir_for_checkout_keys
194211
`$USE_HOME_SSH_DIR_FOR_CHECKOUT_KEYS`
195212

196213
This flag enables you to use the home directory of the user running the self-hosted runner instance for storing SSH checkout keys.
@@ -209,8 +226,10 @@ runner:
209226
use_home_ssh_dir_for_checkout_keys: true
210227
```
211228

229+
---
230+
212231
[#runner-mode]
213-
=== `runner.mode`
232+
=== runner.mode
214233

215234
`$CIRCLECI_RUNNER_MODE`
216235

@@ -249,8 +268,26 @@ runner:
249268
mode: single-task
250269
```
251270

271+
---
272+
273+
[#cache-task-agent]
274+
=== runner.cache_task_agent
275+
276+
`$CIRCLECI_RUNNER_CACHE_TASK_AGENT`
277+
278+
When set to true, machine runner will not clear the task-agent cache when the agent shuts down. On startup the machine agent will check for an already downloaded task agent and will use that task-agent unless there is a newer version of task-agent available for download. This feature is off by default. This may be particularly useful for Windows which relies on `single-task` mode.
279+
280+
Example:
281+
282+
```yaml
283+
runner:
284+
cache_task_agent: true
285+
```
286+
287+
---
288+
252289
[#runner-max-run-time]
253-
=== `runner.max_run_time`
290+
=== runner.max_run_time
254291

255292
`$CIRCLECI_RUNNER_MAX_RUN_TIME`
256293

@@ -285,8 +322,10 @@ Draining can end in one of two ways:
285322
* The task has been in the draining state for longer than the configured `max_run_time`
286323
* An additional TERM signal is received by the machine runner during _draining_
287324

325+
---
326+
288327
[#runner-idle-timeout]
289-
=== `runner.idle_timeout`
328+
=== runner.idle_timeout
290329
`$CIRCLECI_RUNNER_IDLE_TIMEOUT`
291330

292331
This timeout will enable a machine runner 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 (for example, `5m` is 5 minutes).
@@ -300,8 +339,10 @@ runner:
300339
idle_timeout: 1h
301340
```
302341

342+
---
343+
303344
[#runner-ssh-advertise-addr]
304-
=== `runner.ssh.advertise_addr`
345+
=== runner.ssh.advertise_addr
305346
`$CIRCLECI_RUNNER_SSH_ADVERTISE_ADDR`
306347

307348
This parameter enables the “Rerun job with SSH” feature. Before enabling this feature, there are <<#considerations-before-enabling-ssh-debugging,*important considerations*>> that should be made. Rerun with SSH is not currently available on container runner.
@@ -328,6 +369,8 @@ Task-agent runs an embedded SSH server and agent on a dedicated port when the
328369
* The SSH server is configured for public key authentication. Anyone with permission to initiate a job can rerun it with SSH. However, only the user who initiated the rerun will have their SSH public keys added to the server for the duration of the SSH session.
329370
* Rerunning a job with SSH will hold the job open for *two hours* if a connection is made to the SSH server, or *ten minutes* if no connection is made, unless cancelled. While in this state, the job is counted against an organization’s concurrency limit, and the task-agent will be unavailable to handle other jobs. Therefore, it is recommended to cancel an SSH rerun job explicitly (through the web UI or CLI) when finished debugging.
330371

372+
---
373+
331374
[#basic-full-configuration-for-machine-runner]
332375
=== Basic full configuration for a machine runner
333376

0 commit comments

Comments
 (0)