Skip to content

Commit abd2ac6

Browse files
authored
Enable Grafana Cloud k6 Docs (#1187)
* Enable `Grafana Cloud k6` Docs * Add `query` param for grafana.com links * Add `blockquote` on the k6 Cloud homepage * Add external link icon on header menu option * Update `Running k6/Execution modes` * Update `Cloud` option to stream results * Update `Test Builder` * Fix grammar * Sort the `Cloud docs` header menu
1 parent a4b879a commit abd2ac6

File tree

13 files changed

+124
-186
lines changed

13 files changed

+124
-186
lines changed

gatsby-node.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ const topLevelLinks = [
193193
{
194194
label: 'Cloud Docs',
195195
to: '/cloud/',
196+
submenu: [
197+
{ label: 'k6 Cloud', to: `/cloud/` },
198+
{
199+
label: 'Grafana Cloud k6',
200+
to: 'https://grafana.com/docs/grafana-cloud/k6',
201+
},
202+
],
196203
},
197204
{
198205
label: 'Extensions',

src/components/blocks/footer/footer.view.js

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,17 @@ export const Footer = () => {
124124
<li className={styles.navColumnItem}>
125125
<a
126126
className={styles.navColumnLink}
127-
href={`${main}/cloud`}
127+
href={'https://grafana.com/products/cloud/k6/?src=k6io'}
128128
>
129-
Cloud
129+
Grafana Cloud k6
130130
</a>
131131
</li>
132132
<li className={styles.navColumnItem}>
133133
<a
134134
className={styles.navColumnLink}
135-
href={`${main}/pricing`}
135+
href={'https://grafana.com/pricing/?src=k6io'}
136136
>
137-
Pricing
137+
Grafana Cloud k6 Pricing
138138
</a>
139139
</li>
140140
<li className={styles.navColumnItem}>
@@ -148,17 +148,9 @@ export const Footer = () => {
148148
<li className={styles.navColumnItem}>
149149
<a
150150
className={styles.navColumnLink}
151-
href={'https://go2.grafana.com/k6-contact.html'}
151+
href={`${main}/what-to-consider-when-building-or-buying-a-load-testing-solution`}
152152
>
153-
Schedule a Cloud Demo
154-
</a>
155-
</li>
156-
<li className={styles.navColumnItem}>
157-
<a
158-
className={styles.navColumnLink}
159-
href={`${main}/professional-services`}
160-
>
161-
Professional services
153+
Build vs Buy
162154
</a>
163155
</li>
164156
<li className={styles.navColumnItem}>
@@ -180,8 +172,11 @@ export const Footer = () => {
180172
</a>
181173
</li>
182174
<li className={styles.navColumnItem}>
183-
<Link className={styles.navColumnLink} to={'/cloud/'}>
184-
Cloud Docs
175+
<Link
176+
className={styles.navColumnLink}
177+
href={'https://grafana.com/docs/grafana-cloud/k6'}
178+
>
179+
Grafana Cloud k6 Docs
185180
</Link>
186181
</li>
187182
<li className={styles.navColumnItem}>
@@ -200,14 +195,6 @@ export const Footer = () => {
200195
Integrations
201196
</Link>
202197
</li>
203-
<li className={styles.navColumnItem}>
204-
<a
205-
className={styles.navColumnLink}
206-
href={`${main}/why-your-organization-should-perform-load-testing`}
207-
>
208-
Not a developer. Why k6?
209-
</a>
210-
</li>
211198
<li className={styles.navColumnItem}>
212199
<a
213200
className={styles.navColumnLink}
@@ -219,9 +206,9 @@ export const Footer = () => {
219206
<li className={styles.navColumnItem}>
220207
<a
221208
className={styles.navColumnLink}
222-
href={`${main}/what-to-consider-when-building-or-buying-a-load-testing-solution/`}
209+
href={`${main}/why-your-organization-should-perform-load-testing`}
223210
>
224-
Build vs Buy
211+
Not a developer. Why k6?
225212
</a>
226213
</li>
227214
</ul>

src/components/blocks/header/item-with-submenu/item-with-submenu.module.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@
8888
padding: 0;
8989
height: 100%;
9090
}
91+
svg {
92+
margin-left: 6px;
93+
path {
94+
stroke: $color-primary;
95+
}
96+
}
97+
&:hover {
98+
svg {
99+
path {
100+
stroke: $color-accent-primary;
101+
}
102+
}
103+
}
91104
}
92105

93106
.link {

src/components/blocks/header/item-with-submenu/item-with-submenu.view.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React from 'react';
44
import useDropdownMenu from 'react-accessible-dropdown-menu-hook';
55

66
import styles from './item-with-submenu.module.scss';
7+
import ExternalIcon from './svg/exnternal-link-icon.inline.svg';
78

89
export const ItemWithSubmenu = ({ label, submenu, shouldBeHighlighted }) => {
910
const { buttonProps, itemProps, isOpen } = useDropdownMenu(submenu.length);
@@ -46,6 +47,9 @@ export const ItemWithSubmenu = ({ label, submenu, shouldBeHighlighted }) => {
4647
{...itemProps[i]}
4748
>
4849
{item.label}
50+
{item.to.startsWith('http') && !item.to.includes('k6.io/') && (
51+
<ExternalIcon />
52+
)}
4953
</Link>
5054
</li>
5155
))}
Lines changed: 1 addition & 0 deletions
Loading

src/data/markdown/docs/03 cloud/01 Creating and running a test/02 Cloud tests from the cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ On this page, read about how to:
2121
## Before you start
2222

2323
To run tests on k6 Cloud, you to need to:
24-
- [ ] Have a k6 Cloud account. If you don't have one, [sign up](https://app.k6.io/account/register) and get 50 cloud tests with the Free Trial.
24+
- [ ] Have a k6 Cloud account.
2525
- [ ] [Install k6](/get-started/installation) on your local machine:
2626

2727
## Run test on the CLI

src/data/markdown/translated-guides/en/01 Get started/03 Running k6.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ You can run the same test in different modes with minimal changes.
198198

199199
k6 supports three execution modes to run a k6 test: local, distributed, and cloud.
200200

201-
- [Local](#running-local-tests): the test execution happens entirely on a single machine, container, or CI server.
201+
- **Local**: the test execution happens entirely on a single machine, container, or CI server.
202202

203203
```bash
204204
k6 run script.js
205205
```
206206

207-
- [Distributed](https://k6.io/blog/running-distributed-tests-on-k8s/): the test execution is distributed across a Kubernetes cluster.
207+
- **Distributed**: the test execution is [distributed across a Kubernetes cluster](https://k6.io/blog/running-distributed-tests-on-k8s/).
208208

209209
<CodeGroup labels={["Running", "k6-resource.yaml"]} lineNumbers={[true]}>
210210

@@ -228,11 +228,11 @@ k6 supports three execution modes to run a k6 test: local, distributed, and clou
228228
229229
</CodeGroup>
230230
231-
- [Cloud](/cloud/creating-and-running-a-test/cloud-tests-from-the-cli/): the test runs on k6 Cloud.
231+
- **Cloud**: the test runs on [k6 Cloud](/cloud/creating-and-running-a-test/cloud-tests-from-the-cli/) or [Grafana Cloud k6](https://grafana.com/docs/grafana-cloud/k6/get-started/run-cloud-tests-from-the-cli/).
232232
233233
```bash
234234
k6 cloud script.js
235235
```
236236

237-
Additionally, k6 Cloud can run cloud tests on your [own cloud infrastructure](/cloud/creating-and-running-a-test/private-load-zones/), and accept the test results from a [local](/results-output/real-time/cloud/) or [distributed test](https://github.com/grafana/k6-operator#k6-cloud-output).
237+
Additionally, cloud-based solutions can run cloud tests on your [own cloud infrastructure](/cloud/creating-and-running-a-test/private-load-zones/), and accept the test results from a [local](/results-output/real-time/cloud/) or [distributed test](https://github.com/grafana/k6-operator#k6-cloud-output).
238238

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
---
22
title: 'Cloud'
3-
excerpt: 'When streaming the results to the k6 Cloud, the machine - where you execute the k6 CLI command - runs the test and uploads the results to the k6 Cloud. Then, you will be able to visualize and analyze the results on the web app in real-time.'
3+
excerpt: 'When streaming the results to the cloud, the machine - where you execute the k6 CLI command - runs the test and uploads the results to the cloud. Then, you will be able to visualize and analyze the results on the web app in real-time.'
44
---
55

6-
Besides [running cloud tests](/cloud/creating-and-running-a-test/cloud-tests-from-the-cli), you can also run a test locally and stream the results to the [k6 Cloud](/cloud).
6+
Besides [running cloud tests](/get-started/running-k6/#execution-modes), you can also run a test locally and stream the results to:
7+
- [Grafana Cloud k6](https://grafana.com/docs/grafana-cloud/k6/get-started/run-cloud-tests-from-the-cli/#run-locally-and-stream-to-the-cloud)
8+
- [k6 Cloud](/cloud) (only available for existing customers)
79

8-
When streaming the results to the k6 Cloud, the machine - where you execute the k6 CLI command - runs the test and uploads the results to the k6 Cloud. Then, you will be able to visualize and analyze the results on the web app in real-time.
10+
When streaming the results to the cloud, the machine - where you execute the k6 CLI command - runs the test and uploads the results to the cloud-based solution. Then, you will be able to visualize and analyze the results on the web app in real-time.
911

10-
<Blockquote mod="attention"
11-
title="k6 charges your subscription for cloud streaming"
12-
>
13-
14-
Data storage and processing are primary cloud costs,
15-
so `k6 run --out cloud` will consume VUh or test runs from your subscription.
16-
17-
</Blockquote>
1812

1913

2014
## Streaming results vs. running on cloud servers
@@ -25,48 +19,57 @@ cloud script.js`.
2519
Fundamentally the difference is the machine that the test runs on:
2620

2721
- `k6 run --out cloud` runs k6 locally and streams the results to the cloud.
28-
- `k6 cloud`, on the other hand, uploads your script to [k6 cloud](/cloud) and runs the test on the cloud infrastructure,
29-
to run the
30-
In this case you'll only see status updates in your CLI.
22+
- `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.
23+
24+
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/).
25+
26+
<Blockquote mod="attention"
27+
title="k6 charges your subscription for cloud streaming"
28+
>
29+
30+
Data storage and processing are primary cloud costs,
31+
so `k6 run --out cloud` will consume VUh or test runs from your subscription.
32+
33+
</Blockquote>
3134

32-
In all cases you'll be able to see your test results at `https://app.k6.io`.
3335

3436
## Instructions
3537

36-
**1 (Optional) - Log in to the k6 Cloud**
38+
**1 (Optional) - Log in to the cloud**
3739

38-
Assuming you have installed k6, the first step is to log in to k6 Cloud. You can use your [API token](https://app.k6.io/account/api-token) or username and password:
40+
Assuming you have installed k6, the first step is to log in to the cloud service.
3941

40-
<CodeGroup labels={["Log in to k6 Cloud", "Log in with username and password"]}>
42+
With the `k6 login cloud` command, you can set up your API token on the k6 machine to authenticate against the cloud service.
43+
44+
Copy your token from [k6 Cloud](https://app.k6.io/account/api-token) or [Grafana Cloud k6](https://grafana.com/docs/grafana-cloud/k6/author-run/tokens-and-cli-authentication/) and pass it as:
4145

42-
```bash
43-
$ k6 login cloud --token <YOUR_K6_CLOUD_API_TOKEN>
44-
```
46+
47+
<CodeGroup labels={["Log in to the cloud"]}>
4548

4649
```bash
47-
$ k6 login cloud
50+
$ k6 login cloud --token <YOUR_API_TOKEN>
4851
```
4952

5053
</CodeGroup>
5154

5255
**2 - Run the tests and upload the results**
5356

54-
Now, k6 will authenticate you against the k6 Cloud, and you can use the `--out` option to send the k6 results to the k6 Cloud as:
57+
Now, k6 will authenticate you against the cloud service, and you can use the `--out` option to send the k6 results to the cloud as:
5558

56-
<CodeGroup labels={["Upload results to the k6 Cloud"]}>
59+
<CodeGroup labels={["Upload results to the cloud"]}>
5760

5861
```bash
5962
$ k6 run --out cloud script.js
6063
```
6164

6265
</CodeGroup>
6366

64-
Alternatively, you could skip the `k6 login` command when using your [API token](https://app.k6.io/account/api-token) with the `k6 run` command as:
67+
Alternatively, you could skip the `k6 login cloud` command when passing your API token to the `k6 run` command as:
6568

66-
<CodeGroup labels={["Upload results to the k6 Cloud using K6_CLOUD_TOKEN"]}>
69+
<CodeGroup labels={["Upload results to the cloud using K6_CLOUD_TOKEN"]}>
6770

6871
```bash
69-
$ K6_CLOUD_TOKEN=<YOUR_K6_CLOUD_API_TOKEN> k6 run --out cloud script.js
72+
$ K6_CLOUD_TOKEN=<YOUR_API_TOKEN> k6 run --out cloud script.js
7073
```
7174

7275
</CodeGroup>
@@ -77,15 +80,15 @@ After running the command, the console shows an URL. Copy this URL and paste it
7780

7881
```bash
7982
execution: local
80-
output: cloud (https://app.k6.io/runs/721751)
83+
output: cloud (https://acmecorp.grafana.net/a/k6-app/runs/123456)
8184
script: script.js
8285
```
8386

8487
</CodeGroup>
8588

86-
![k6 Cloud Test Results](./images/Cloud/k6-cloud-results.png)
89+
![Grafana Cloud k6 Test Results](./images/Cloud/screenshot-stream-k6-results-to-grafana-cloud-k6.png)
8790

88-
When you send the results to the k6 Cloud with `k6-out`, data will be
91+
When you send the results to the k6 Cloud with `k6 run --out`, data will be
8992
continuously streamed to the cloud. While this happens the state of the test run
9093
will be marked as `Running`. A test run that ran its course will be marked
9194
`Finished`. The run state has nothing to do with the test passing any
@@ -95,12 +98,12 @@ If you deliberately abort your test (e.g. by pressing _Ctrl-C_), your test will
9598
end up as `Aborted by User`. You can still look and analyze the test data you
9699
streamed so far. The test will just have run shorter than originally planned.
97100

98-
Another possibility would be if you lose network connection with the k6 Cloud
99-
while your test is running. In that case the k6 Cloud will patiently wait for
101+
Another possibility would be if you lose network connection with the cloud service
102+
while your test is running. In that case the cloud service will patiently wait for
100103
you to reconnect. In the meanwhile your test's run state will continue to
101104
appear as `Running` on the web app.
102105

103-
If no reconnection happens, the k6 Cloud will time out after two minutes of no
106+
If no reconnection happens, the cloud service will time out after two minutes of no
104107
data, setting the run state to `Timed out`. You can still analyze a timed out
105108
test but you'll of course only have access to as much data as was streamed
106109
before the network issue.
@@ -113,9 +116,9 @@ When streaming, k6 will collect all data and send it to the cloud in batches.
113116

114117
| Name | Description |
115118
| ---- | ----------- |
116-
| `K6_CLOUD_METRIC_PUSH_INTERVAL` | How often to send data to the k6 cloud (default `'1s'`). |
119+
| `K6_CLOUD_METRIC_PUSH_INTERVAL` | How often to send data to the cloud (default `'1s'`). |
117120

118-
k6 can also _aggregate_ the data it sends to the k6 cloud each batch. This
121+
k6 can also _aggregate_ the data it sends to the cloud each batch. This
119122
reduces the amount of data sent to the cloud. Aggregation is disabled by
120123
default.
121124

@@ -138,10 +141,5 @@ Outlier data&mdash;far outside the lower and upper quartiles&mdash; is not aggre
138141
> aggregate. For that case the aggregation settings are however set by the
139142
> cloud infrastructure and are not controllable from the CLI.
140143
141-
## Read more
142-
143-
- [Analyzing results on the k6 Cloud](/cloud/analyzing-results/overview)
144-
- [Running cloud tests](/cloud/creating-and-running-a-test/cloud-tests-from-the-cli)
145-
146144

147145
[iqr]: https://en.wikipedia.org/wiki/Interquartile_range
-194 KB
Binary file not shown.
471 KB
Loading

0 commit comments

Comments
 (0)