Skip to content

Commit

Permalink
Replace the 'k6 cloud' references with the new subcommands (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez authored Aug 12, 2024
1 parent 5746fe9 commit 9b78991
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions docs/sources/next/get-started/running-k6.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Follow along to learn how to:
4. Ramp the number of requests up and down as the test runs.

With these example snippets, you'll run the test with your machine's resources.
But, if you have a k6 Cloud account, you can also use the `k6 cloud` command to outsource the test to k6 servers.
But, if you have a k6 Cloud account, you can also use the `k6 cloud run` command to outsource the test to k6 servers.

## Before you begin

Expand Down Expand Up @@ -235,7 +235,7 @@ k6 supports three execution modes to run a k6 test: local, distributed, and clou
- **Cloud**: the test runs on [Grafana Cloud k6](https://grafana.com/docs/grafana-cloud/testing/k6/get-started/run-cloud-tests-from-the-cli/).

```bash
k6 cloud script.js
k6 cloud run script.js
```

Additionally, cloud-based solutions can run cloud tests on your [own cloud infrastructure](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/private-load-zone-v2/), and accept the test results from a [local](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/cloud) or [distributed test](https://github.com/grafana/k6-operator#k6-cloud-output).
2 changes: 1 addition & 1 deletion docs/sources/next/misc/archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ as needed.

k6 offers a commercial service for running large scale and geographically
distributed load tests on managed cloud infrastructure. Cloud executed tests are triggered
from the k6 command-line via the `k6 cloud script.js` command (similar to `k6 run`) which will
from the k6 command-line via the `k6 cloud run script.js` command (similar to `k6 run`) which will
trigger an implicit creation of a k6 archive that is uploaded and distributed to k6 cloud
load generators for execution.

Expand Down
12 changes: 6 additions & 6 deletions docs/sources/next/results-output/real-time/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ When streaming the results to the cloud, the machine - where you execute the k6

## Streaming results vs. running on cloud servers

Don't confuse `k6 run --out cloud script.js` (what this page is about) with `k6 cloud script.js`.
Don't confuse `k6 run --out cloud script.js` (what this page is about) with `k6 cloud run script.js`.

Fundamentally the difference is the machine that the test runs on:

- `k6 run --out cloud` runs k6 locally and streams the results to the cloud.
- `k6 cloud`, on the other hand, uploads your script to the cloud solution and runs the test on the cloud infrastructure. In this case you'll only see status updates in your CLI.
- `k6 cloud run`, on the other hand, uploads your script to the cloud solution and runs the test on the cloud infrastructure. In this case you'll only see status updates in your CLI.

In all cases you'll be able to see your test results at [k6 Cloud](https://app.k6.io) or [Grafana Cloud](https://grafana.com/products/cloud/).

Expand All @@ -34,14 +34,14 @@ so `k6 run --out cloud` will consume VUH or test runs from your subscription.

Assuming you have installed k6, the first step is to log in to the cloud service.

With the `k6 login cloud` command, you can set up your API token on the k6 machine to authenticate against the cloud service.
With the `k6 cloud login` command, you can set up your API token on the k6 machine to authenticate against the cloud service.

Copy your token from [k6 Cloud](https://app.k6.io/account/api-token) or [Grafana Cloud k6](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/tokens-and-cli-authentication/) and pass it as:

{{< code >}}

```bash
$ k6 login cloud --token <YOUR_API_TOKEN>
$ k6 cloud login --token <YOUR_API_TOKEN>
```

{{< /code >}}
Expand All @@ -58,7 +58,7 @@ so `k6 run --out cloud` will consume VUH or test runs from your subscription.

{{< /code >}}

Alternatively, you could skip the `k6 login cloud` command when passing your API token to the `k6 run` command as:
Alternatively, you could skip the `k6 cloud login` command when passing your API token to the `k6 run` command as:

{{< code >}}

Expand Down Expand Up @@ -131,7 +131,7 @@ Outlier data&mdash;far outside the lower and upper quartiles&mdash; is not aggre
| `K6_CLOUD_AGGREGATION_OUTLIER_IQR_COEF_LOWER` | How many quartiles below the lower quartile are treated as non-aggregatable outliers (default `1.5`) |
| `K6_CLOUD_AGGREGATION_OUTLIER_IQR_COEF_UPPER` | How many quartiles above the upper quartile are treated as non-aggregatable outliers (default `1.3`) |
> When running a test entirely in the cloud with `k6 cloud`, `k6` will always
> When running a test entirely in the cloud with `k6 cloud run`, `k6` will always
> aggregate. For that case the aggregation settings are however set by the
> cloud infrastructure and are not controllable from the CLI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ Unlike `TestRun` deployment, when a `PrivateLoadZone` is first created, there ar
### Running tests in `PrivateLoadZone`
Each time a user runs a test in a PLZ, for example with `k6 cloud script.js`, there is a corresponding `TestRun` being deployed by the k6 Operator. This `TestRun` will be deployed in the same namespace as its `PrivateLoadZone`. If the test is misbehaving, for example, it errors out, or doesn't produce the expected result, then you can check:
Each time a user runs a test in a PLZ, for example with `k6 cloud run script.js`, there is a corresponding `TestRun` being deployed by the k6 Operator. This `TestRun` will be deployed in the same namespace as its `PrivateLoadZone`. If the test is misbehaving, for example, it errors out, or doesn't produce the expected result, then you can check:

1. If there are any messages in the GCk6 UI.
2. If there are any messages in the output of the `k6 cloud` command.
2. If there are any messages in the output of the `k6 cloud run` command.
3. The resources and their logs, the same way as with a [standalone `TestRun` deployment](#testrun-deployment)

## Common scenarios
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/next/using-k6/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PS C:\k6> $env:MY_HOSTNAME="test.k6.io"; k6 run script.js

#### ⚠️ Warning

By default, passing system environment variables doesn't work for `k6 archive`, `k6 cloud`, and `k6 inspect`.
By default, passing system environment variables doesn't work for `k6 archive`, `k6 cloud run`, and `k6 inspect`.
This is a security measure to avoid the risk of uploading sensitive data to k6 Cloud.
To override this mode, specify [--include-system-env-vars](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference#include-system-env-vars).

Expand Down
Loading

0 comments on commit 9b78991

Please sign in to comment.