Skip to content

Commit 5589f7a

Browse files
authored
WIP - start Grafana Cloud docs (#1063)
1 parent ce87b8f commit 5589f7a

File tree

19 files changed

+1039
-0
lines changed

19 files changed

+1039
-0
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.cache/
22
public/
3+
grafana-cloud/
34
node_modules/
45
CONTRIBUTING_FILE_FORMAT.md
56
src/data/markdown/docs/40 xk6-disruptor/04 Examples/01 Inject HTTP faults into Pod.md

grafana-cloud/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Prototype of docs for k6 in Grafana
2+
3+
This repo contains the work in progress to document the k6-in-Grafana app.
4+
These docs use the Hugo as a static site generator.
5+
6+
To build locally, you need:
7+
- [ ] Docker
8+
9+
To start the server, make sure the Docker daemon is running.
10+
Then follow these steps:
11+
1. Go to the docs repo `cd docs/` .
12+
1. Run `make docs` (or `sudo make docs`, depending on the necessary Docker priviledges).
13+
1. Enter to confirm.
14+
1. Preview docs at [http://localhost:3002/docs/k6-in-grafana/](http://localhost:3002/docs/k6-in-grafana/).
15+
16+
The process builds the site using the [docs-base Docker image](https://hub.docker.com/r/grafana/docs-base).
17+
The presentation you see at `localhost` depends on what the latest version of that image is.
18+

grafana-cloud/docs/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DEFAULT_GOAL: help
2+
3+
# Adapted from https://www.thapaliya.com/en/writings/well-documented-makefiles/
4+
.PHONY: help
5+
help: ## Display this help.
6+
help:
7+
@awk 'BEGIN {FS = ": ##"; printf "Usage:\n make <target>\n\nTargets:\n"} /^[a-zA-Z0-9_\.\-\/%]+: ##/ { printf " %-45s %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
8+
9+
include docs.mk

grafana-cloud/docs/docs.mk

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.ONESHELL:
2+
.DELETE_ON_ERROR:
3+
export SHELL := bash
4+
export SHELLOPTS := pipefail:errexit
5+
MAKEFLAGS += --warn-undefined-variables
6+
MAKEFLAGS += --no-builtin-rule
7+
8+
DOCS_IMAGE = grafana/docs-base:latest
9+
DOCS_PROJECT = k6-in-grafana
10+
DOCS_DIR = sources
11+
12+
# This allows ports and base URL to be overridden, so services like ngrok.io can
13+
# be used to share a local running docs instances.
14+
DOCS_HOST_PORT = 3002
15+
DOCS_LISTEN_PORT = 3002
16+
DOCS_BASE_URL ?= "localhost:$(DOCS_HOST_PORT)"
17+
18+
HUGO_REFLINKSERRORLEVEL ?= WARNING
19+
DOCS_DOCKER_CONTAINER = $(DOCS_PROJECT)-docs
20+
21+
.PHONY: docs-docker-rm
22+
docs-docker-rm:
23+
docker rm -f $(DOCS_DOCKER_CONTAINER)
24+
25+
.PHONY: docs-pull
26+
docs-pull:
27+
docker pull $(DOCS_IMAGE)
28+
29+
.PHONY: docs
30+
docs: ## Serve documentation locally.
31+
docs: docs-pull
32+
@echo "Documentation will be served at:"
33+
@echo "http://$(DOCS_BASE_URL)/docs/$(DOCS_PROJECT)/"
34+
@echo ""
35+
@if [[ -z $${NON_INTERACTIVE} ]]; then \
36+
read -p "Press a key to continue"; \
37+
fi
38+
docker run -it --name $(DOCS_DOCKER_CONTAINER) \
39+
-v $(CURDIR)/$(DOCS_DIR):/hugo/content/docs/$(DOCS_PROJECT)/:rw,z \
40+
-e HUGO_REFLINKSERRORLEVEL=$(HUGO_REFLINKSERRORLEVEL) \
41+
-p $(DOCS_HOST_PORT):$(DOCS_LISTEN_PORT) \
42+
--rm $(DOCS_IMAGE) \
43+
make server
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
cascade:
3+
public_docs: true
4+
search_section: Grafana Cloud k6
5+
search_type: doc
6+
title: Grafana Cloud k6
7+
menuTitle: Grafana Cloud k6
8+
description: Run k6 in Cloud servers, visualize and scripts in your Grafana instance.
9+
description: 'Script performance tests locally, run tests from the CLI on servers all over the world, and visualize test results in Grafana Cloud.'
10+
weight: 100
11+
---
12+
13+
# Grafana Cloud k6
14+
15+
With the k6 app, you can script performance tests locally,
16+
run tests from the CLI on servers all over the world,
17+
and visualize test results in Grafana Cloud.
18+
19+
In these docs, learn how to:
20+
21+
- Write and run Cloud tests.
22+
- Analyze results.
23+
- Incorporate k6 with other dashboards.
24+
- Manage performance-testing projects across your organization.
25+
26+
For introductory videos, check out the [k6 Cloud Playlist](https://www.youtube.com/playlist?list=PLJdv3RhAQXNGkRCp7Q0k77n5jif4qjz2o)
27+
28+
29+
## k6 Cloud vs. OSS
30+
31+
Grafana k6 cloud is designed to manage and enhance the [k6 OSS](https://k6.io/docs) API and testing application.
32+
It aims to keep your k6 tests as portable as possible, while saving your teams the effort of managing cloud infrastructure or maintaining a beautiful front end.
33+
34+
### Infrastructure benefits
35+
36+
When you run tests on Grafana Cloud k6 servers, Grafana handles the following infrastructure work for you:
37+
- Autoscaling huge tests
38+
- Distributing test across different geographic zones
39+
- Storing and aggregating massive amounts of test metrics
40+
41+
For a glimpse of the infrastructure work that this requires, read [Peeking under the hood of k6 Cloud](https://k6.io/blog/the-glorious-backend/).
42+
43+
### Extra features
44+
45+
Grafana Cloud k6 is not only an engine for test execution and storage.
46+
It's also a software as a service, which provides a frontend to visually explore tests and to manage test suites and teams.
47+
48+
Some of the key features include the following:
49+
- Live visualizations of test execution
50+
- A graphical test builder
51+
- Performance insights to alert you about test issues
52+
- Portable test-results panels to put in other dashboards
53+
- Detailed analysis of different test metrics
54+
- Cloud environment variables to share between teams
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Analyze tests
3+
menuTitle: Analyze tests
4+
weight: 300
5+
---
6+

0 commit comments

Comments
 (0)