Files
coder/docs/cli/coder_scaletest_create-workspaces.md
2023-02-23 01:53:21 +00:00

7.0 KiB

coder 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.

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.

Usage

coder scaletest create-workspaces [flags]

Flags

--cleanup-concurrency

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

Consumes $CODER_LOADTEST_CLEANUP_CONCURRENCY
Default 1

--cleanup-job-timeout

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

Consumes $CODER_LOADTEST_CLEANUP_JOB_TIMEOUT
Default 5m0s

--cleanup-timeout

Timeout for the entire cleanup run. 0 means unlimited.

Consumes $CODER_LOADTEST_CLEANUP_TIMEOUT
Default 30m0s

--concurrency

Number of concurrent jobs to run. 0 means unlimited.

Consumes $CODER_LOADTEST_CONCURRENCY
Default 1

--connect-hold

How long to hold the WireGuard connection open for.

Consumes $CODER_LOADTEST_CONNECT_HOLD
Default 30s

--connect-interval

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

Consumes $CODER_LOADTEST_CONNECT_INTERVAL
Default 1s

--connect-mode

Mode to use for connecting to the workspace. Can be 'derp' or 'direct'.

Consumes $CODER_LOADTEST_CONNECT_MODE
Default derp

--connect-timeout

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

Consumes $CODER_LOADTEST_CONNECT_TIMEOUT
Default 5s

--connect-url

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

Consumes $CODER_LOADTEST_CONNECT_URL

--count, -c

Required: Number of workspaces to create.

Consumes $CODER_LOADTEST_COUNT
Default 1

--job-timeout

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

Consumes $CODER_LOADTEST_JOB_TIMEOUT
Default 5m0s

--no-cleanup

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

Consumes $CODER_LOADTEST_NO_CLEANUP
Default false

--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.

Consumes $CODER_LOADTEST_NO_PLAN
Default false

--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.

Consumes $CODER_LOADTEST_NO_WAIT_FOR_AGENTS
Default false

--output

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

Consumes $CODER_SCALETEST_OUTPUTS
Default [text]

--parameter

Parameters to use for each workspace. Can be specified multiple times. Overrides any existing parameters with the same name from --parameters-file. Format: key=value.

Consumes $CODER_LOADTEST_PARAMETERS
Default []

--parameters-file

Path to a YAML file containing the parameters to use for each workspace.

Consumes $CODER_LOADTEST_PARAMETERS_FILE

--run-command

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

Consumes $CODER_LOADTEST_RUN_COMMAND

--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.

Consumes $CODER_LOADTEST_RUN_EXPECT_OUTPUT

--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.

Consumes $CODER_LOADTEST_RUN_EXPECT_TIMEOUT
Default false

--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.

Consumes $CODER_LOADTEST_RUN_LOG_OUTPUT
Default false

--run-timeout

Timeout for the command to complete.

Consumes $CODER_LOADTEST_RUN_TIMEOUT
Default 5s

--template, -t

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

Consumes $CODER_LOADTEST_TEMPLATE

--timeout

Timeout for the entire test run. 0 means unlimited.

Consumes $CODER_LOADTEST_TIMEOUT
Default 30m0s

--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.

Consumes $CODER_LOADTEST_TRACE
Default false

--trace-coder

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

Consumes $CODER_LOADTEST_TRACE_CODER
Default false

--trace-honeycomb-api-key

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

Consumes $CODER_LOADTEST_TRACE_HONEYCOMB_API_KEY

--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.

Consumes $CODER_LOADTEST_TRACE_PROPAGATE
Default false