diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index d09b736a..bcd1e1aa 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -38,6 +38,21 @@ jobs: - name: Validate HTML run: npx --yes html-validate@9 website/index.html + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: cli/go.mod + cache-dependency-path: cli/go.sum + + - name: Lint the scenario the page shows + run: | + python3 - > "$RUNNER_TEMP/scenario.yaml" <<'PY' + import html, re + page = open("website/index.html").read() + code = re.search(r'
(.*?)', page, re.S).group(1)
+ print(html.unescape(re.sub(r"<[^>]+>", "", code)))
+ PY
+ cd cli && go run . test lint "$RUNNER_TEMP/scenario.yaml"
+
- name: Check that every local asset the page references exists
run: |
set -euo pipefail
diff --git a/website/index.html b/website/index.html
index 7245a2a9..749e6921 100644
--- a/website/index.html
+++ b/website/index.html
@@ -98,8 +98,8 @@ Break your Kafka cluster before production does.
-
- $ kates health
+
+ $ kates health
✓ Kates API http://localhost:8080
✓ Kafka krafter.kafka 3 brokers · 3 zones
@@ -109,13 +109,13 @@ Break your Kafka cluster before production does.
P50 / P95 / P99 3.1 / 9.4 / 17.8 ms
errors 0 grade A
-$ kates resilience run --type LOAD --fault broker-pod-kill
-fault broker-pod-kill → krafter-kafka-1
+$ kates resilience run -f broker-kill.yaml
+fault POD_KILL → krafter-brokers-1
before/after P99 17.8 → 41.2 ms (+131%)
recovery 6.4 s lost records 0
-$ kates gate --min-grade B
-PASS grade A ≥ B exit 0
+$ kates gate --min-grade C
+PASS grade A ≥ C exit 0
@@ -234,18 +234,18 @@ A multi-zone lab on one machine
Quick start
- From an empty laptop to a graded load test in five commands.
+ From an empty laptop to a graded load test.
You need Docker, Kind, kubectl and Helm, and about 16 GB of RAM. Everything else,
Strimzi, Kafka, Prometheus, Grafana, LitmusChaos and the Kates API, is installed by
kates deploy.
- - Install the CLI with Homebrew, or download a single binary from the latest release.
- - Create the lab: a three-zone Kind cluster named
panda.
- - Deploy the stack with a wizard, or
--dry-run to see the plan first.
+ - Install the CLI with Homebrew, and clone the repository for its
make targets.
+ - Create the lab: a three-zone Kind cluster named
panda, with the Kates API image loaded.
+ - Deploy the stack with a wizard, or
--dry-run to see the plan first. It installs into kubectl's current context, so check that first.
- Open the ports: the CLI context is configured with the API URL and key.
- - Run a test and read the graded report.
+ - Run a test and read the graded report. When you finish,
make clean removes the lab.
Full quick start
@@ -258,6 +258,7 @@ From an empty laptop to a graded load test in five commands.
# 1. The CLI (macOS or Linux)
brew install bmscomp/tap/kates
git clone https://github.com/bmscomp/kates && cd kates
+git checkout "$(git describe --tags --abbrev=0 --match 'v*')"
# 2. A three-zone Kind cluster named panda
make cluster
@@ -269,7 +270,7 @@ From an empty laptop to a graded load test in five commands.
# 4. Port-forwards and a ready CLI context
kates ports
-# 5. A first load test, then a CI gate
+# 5. A first load test, then a CI gate (exit 1 below the grade)
kates test create --type LOAD --records 100000 --wait
kates gate --min-grade C --records 100000
@@ -279,7 +280,7 @@ From an empty laptop to a graded load test in five commands.
with:
api-url: ${{ secrets.KATES_API_URL }}
api-key: ${{ secrets.KATES_API_KEY }}
- min-grade: B
+ min-grade: C
@@ -294,7 +295,7 @@ Three parts that fit how you already run Kafka.
Performance tests work against any Kafka cluster the Kates API can reach. Fault injection
targets Strimzi-managed brokers. Every run is stored, so the numbers from last month are
- there to compare with today's.
+ there to compare with today's. The numbers in the two figures below are illustrative.
@@ -398,7 +399,7 @@ Three parts that fit how you already run Kafka.
- kafka-0 · 1 · 2
+ brokers-0 · 1 · 2
@@ -554,17 +555,17 @@ Three parts that fit how you already run Kafka.
Kates API · producers● 48,112 rec/s · acks=all