coder/docs/cli/scaletest_create-workspaces.md

11 KiB

scaletest create-workspaces

Creates many users, then creates a workspace for each user and waits for them finish building and fully come online. Optionally runs a command inside each workspace, and connects to the workspace over WireGuard.

Usage

coder scaletest create-workspaces [flags]

Description

It is recommended that all rate limits are disabled on the server before running this scaletest. This test generates many login events which will be rate limited against the (most likely single) IP.

Options

--cleanup-concurrency

Type int
Environment $CODER_SCALETEST_CLEANUP_CONCURRENCY
Default 1

Number of concurrent cleanup jobs to run. 0 means unlimited.

--cleanup-job-timeout

Type duration
Environment $CODER_SCALETEST_CLEANUP_JOB_TIMEOUT
Default 5m

Timeout per job. Jobs may take longer to complete under higher concurrency limits.

--cleanup-timeout

Type duration
Environment $CODER_SCALETEST_CLEANUP_TIMEOUT
Default 30m

Timeout for the entire cleanup run. 0 means unlimited.

--concurrency

Type int
Environment $CODER_SCALETEST_CONCURRENCY
Default 1

Number of concurrent jobs to run. 0 means unlimited.

--connect-hold

Type duration
Environment $CODER_SCALETEST_CONNECT_HOLD
Default 30s

How long to hold the WireGuard connection open for.

--connect-interval

Type duration
Environment $CODER_SCALETEST_CONNECT_INTERVAL
Default 1s

How long to wait between making requests to the --connect-url once the connection is established.

--connect-mode

Type enum[derp direct]
Environment $CODER_SCALETEST_CONNECT_MODE
Default derp

Mode to use for connecting to the workspace.

--connect-timeout

Type duration
Environment $CODER_SCALETEST_CONNECT_TIMEOUT
Default 5s

Timeout for each request to the --connect-url.

--connect-url

Type string
Environment $CODER_SCALETEST_CONNECT_URL

URL to connect to inside the the workspace over WireGuard. If not specified, no connections will be made over WireGuard.

-c, --count

Type int
Environment $CODER_SCALETEST_COUNT
Default 1

Required: Number of workspaces to create.

--job-timeout

Type duration
Environment $CODER_SCALETEST_JOB_TIMEOUT
Default 5m

Timeout per job. Jobs may take longer to complete under higher concurrency limits.

--no-cleanup

Type bool
Environment $CODER_SCALETEST_NO_CLEANUP

Do not clean up resources after the test completes. You can cleanup manually using coder scaletest cleanup.

--no-plan

Type bool
Environment $CODER_SCALETEST_NO_PLAN

Skip the dry-run step to plan the workspace creation. This step ensures that the given parameters are valid for the given template.

--no-wait-for-agents

Type bool
Environment $CODER_SCALETEST_NO_WAIT_FOR_AGENTS

Do not wait for agents to start before marking the test as succeeded. This can be useful if you are running the test against a template that does not start the agent quickly.

--output

Type string-array
Environment $CODER_SCALETEST_OUTPUTS
Default text

Output format specs in the format "[:]". Not specifying a path will default to stdout. Available formats: text, json.

--run-command

Type string
Environment $CODER_SCALETEST_RUN_COMMAND

Command to run inside each workspace using reconnecting-pty (i.e. web terminal protocol). If not specified, no command will be run.

--run-expect-output

Type string
Environment $CODER_SCALETEST_RUN_EXPECT_OUTPUT

Expect the command to output the given string (on a single line). If the command does not output the given string, it will be marked as failed.

--run-expect-timeout

Type bool
Environment $CODER_SCALETEST_RUN_EXPECT_TIMEOUT

Expect the command to timeout. If the command does not finish within the given --run-timeout, it will be marked as succeeded. If the command finishes before the timeout, it will be marked as failed.

--run-log-output

Type bool
Environment $CODER_SCALETEST_RUN_LOG_OUTPUT

Log the output of the command to the test logs. This should be left off unless you expect small amounts of output. Large amounts of output will cause high memory usage.

--run-timeout

Type duration
Environment $CODER_SCALETEST_RUN_TIMEOUT
Default 5s

Timeout for the command to complete.

-t, --template

Type string
Environment $CODER_SCALETEST_TEMPLATE

Required: Name or ID of the template to use for workspaces.

--timeout

Type duration
Environment $CODER_SCALETEST_TIMEOUT
Default 30m

Timeout for the entire test run. 0 means unlimited.

--trace

Type bool
Environment $CODER_SCALETEST_TRACE

Whether application tracing data is collected. It exports to a backend configured by environment variables. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md.

--trace-coder

Type bool
Environment $CODER_SCALETEST_TRACE_CODER

Whether opentelemetry traces are sent to Coder. We recommend keeping this disabled unless we advise you to enable it.

--trace-honeycomb-api-key

Type string
Environment $CODER_SCALETEST_TRACE_HONEYCOMB_API_KEY

Enables trace exporting to Honeycomb.io using the provided API key.

--trace-propagate

Type bool
Environment $CODER_SCALETEST_TRACE_PROPAGATE

Enables trace propagation to the Coder backend, which will be used to correlate server-side spans with client-side spans. Only enable this if the server is configured with the exact same tracing configuration as the client.

--use-host-login

Type bool
Environment $CODER_SCALETEST_USE_HOST_LOGIN
Default false

Use the use logged in on the host machine, instead of creating users.