From 4b148de94343909e2b8598d6eecbcb0d131980df Mon Sep 17 00:00:00 2001 From: Dan Seban Date: Mon, 3 Aug 2026 11:13:00 +0200 Subject: [PATCH] docs: repair image --- README.md | 16 ++++++++-------- cloud/aws/deploy/modules/paris/security_group.tf | 2 +- cloud/aws/scripts/collect_results.sh | 2 +- cloud/aws/scripts/run_test.sh | 2 +- cloud/aws/scripts/stop_test.sh | 2 +- codabench_loadtest/setup/config.py | 2 +- docs/cloud/aws/codabench.md | 12 ++++++------ docs/cloud/aws/loadtest_infrastructure.md | 14 +++++++------- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 24ff661..3ec6dcd 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ This tool can be configured through two configuration file. It supports the usual locust configuration variables documented on the [locust documentation](https://docs.locust.io/en/stable/configuration.html#configuration-file). On top of these, this tool exposes the following variables: | Variable | Description | Default | -|---|---|---| +| --- | --- | --- | | `env` | Name of the environment file to load at runtime (e.g. `local`, `prod`) | `local` | | `competitions` | Space-separated list of competition names to test, matching the `` folders under `data/`. Omit to run all competitions found. | *(all)* | @@ -94,22 +94,22 @@ It supports the usual locust configuration variables documented on the [locust d This file will be loaded at runtime based on the `env` variable. It exposes the following variables: | Variable | Description | Default | Required | -|---|---|---|---| +| --- | --- | --- | --- | | `CODABENCH_HOST` | Target Codabench instance URL. It will override the host provided by locust| `http://localhost:8000` | Yes | -| `CODABENCH_CADDY_HOSTNAME` | Overrides the HTTP `Host` header when connecting via IP behind Caddy (e.g. `localhost` if Caddy's `DOMAIN_NAME` is `localhost`) | — | No | -| `CODABENCH_API_TOKEN` | API token for authentication (takes priority over username/password if set) | — | No* | +| `CODABENCH_CADDY_HOSTNAME` | Overrides the HTTP `Host` header when connecting via IP behind Caddy (e.g. `localhost` if Caddy's `DOMAIN_NAME` is `localhost`) | - | No | +| `CODABENCH_API_TOKEN` | API token for authentication (takes priority over username/password if set) | - | No* | | `CODABENCH_USERNAME` | Username for authentication (used if no API token is set) | - | No* | -| `CODABENCH_PASSWORD` | Password for authentication (used if no API token is set) | — | No* | +| `CODABENCH_PASSWORD` | Password for authentication (used if no API token is set) | - | No* | | `CODABENCH_POLL_INTERVAL` | Delay (seconds) between submission status polls | `5.0` | No | | `CODABENCH_POLL_TIMEOUT` | Max time (seconds) to wait for a submission to reach a terminal status | `3600.0` | No | | `CODABENCH_MAX_RESPONSE_TIME_P95` | Performance threshold: max acceptable p95 response time (seconds) | `2.0` | No | | `CODABENCH_MAX_ERROR_RATE` | Performance threshold: max acceptable error rate (0–1) | `0.01` | No | | `CODABENCH_MINIO_ENDPOINT` | MinIO endpoint, for storage monitoring. Required even if MinIO isn't used, provide an empty string ("") in that case | `http://localhost:9000` | Yes | -| `CODABENCH_MINIO_ACCESS_KEY` | MinIO access key | — | No | -| `CODABENCH_MINIO_SECRET_KEY` | MinIO secret key | — | No | +| `CODABENCH_MINIO_ACCESS_KEY` | MinIO access key | - | No | +| `CODABENCH_MINIO_SECRET_KEY` | MinIO secret key | - | No | | `CODABENCH_RABBITMQ_URL` | RabbitMQ management URL, for queue monitoring | `http://localhost:15672` | No | | `CODABENCH_RABBITMQ_USER` | RabbitMQ username | `guest` | No | -| `CODABENCH_RABBITMQ_PASSWORD` | RabbitMQ password | — | No | +| `CODABENCH_RABBITMQ_PASSWORD` | RabbitMQ password | - | No | ### How to manage the bundles ? diff --git a/cloud/aws/deploy/modules/paris/security_group.tf b/cloud/aws/deploy/modules/paris/security_group.tf index a554b70..832846d 100644 --- a/cloud/aws/deploy/modules/paris/security_group.tf +++ b/cloud/aws/deploy/modules/paris/security_group.tf @@ -64,7 +64,7 @@ resource "aws_vpc_security_group_egress_rule" "to_internet" { # --- Ingress rules --- -# Locust master web UI (port 8089) — only from within the Locust subnet +# Locust master web UI (port 8089) - only from within the Locust subnet resource "aws_vpc_security_group_ingress_rule" "master_ui" { security_group_id = aws_security_group.locust.id cidr_ipv4 = var.locust_subnet_cidr diff --git a/cloud/aws/scripts/collect_results.sh b/cloud/aws/scripts/collect_results.sh index 756e79a..85aa8b3 100755 --- a/cloud/aws/scripts/collect_results.sh +++ b/cloud/aws/scripts/collect_results.sh @@ -16,7 +16,7 @@ set -euo pipefail RUN_NAME="${1:?Usage: $0 }" BUCKET="${RESULTS_BUCKET:-codabench-loadtest-results}" -# AWS CLI profile — set AWS_PROFILE env var to use a non-default profile. +# AWS CLI profile - set AWS_PROFILE env var to use a non-default profile. PROFILE="${AWS_PROFILE:-default}" LOCAL_DIR="runs/${RUN_NAME}" diff --git a/cloud/aws/scripts/run_test.sh b/cloud/aws/scripts/run_test.sh index c118b29..f32e060 100755 --- a/cloud/aws/scripts/run_test.sh +++ b/cloud/aws/scripts/run_test.sh @@ -27,7 +27,7 @@ set -euo pipefail # - Terraform deployed (cloud/aws/deploy) # - Run from the repo root -# AWS CLI profile — set AWS_PROFILE env var to use a non-default profile. +# AWS CLI profile - set AWS_PROFILE env var to use a non-default profile. PROFILE="${AWS_PROFILE:-default}" TF_DIR="deploy" diff --git a/cloud/aws/scripts/stop_test.sh b/cloud/aws/scripts/stop_test.sh index 752c042..31a5e10 100755 --- a/cloud/aws/scripts/stop_test.sh +++ b/cloud/aws/scripts/stop_test.sh @@ -14,7 +14,7 @@ set -euo pipefail # - Terraform deployed (cloud/aws/deploy) # - Run from the repo root -# AWS CLI profile — set AWS_PROFILE env var to use a non-default profile. +# AWS CLI profile - set AWS_PROFILE env var to use a non-default profile. PROFILE="${AWS_PROFILE:-default}" TF_DIR="/deploy" PARIS_ONLY=false diff --git a/codabench_loadtest/setup/config.py b/codabench_loadtest/setup/config.py index 13259a5..4dc3bc1 100644 --- a/codabench_loadtest/setup/config.py +++ b/codabench_loadtest/setup/config.py @@ -19,7 +19,7 @@ class Settings(BaseSettings): # hostname, e.g. "localhost", but we connect via IP). caddy_hostname: str = "localhost:80" - # Authentication — defaults empty so anonymous web/ scenarios work. + # Authentication - defaults empty so anonymous web/ scenarios work. # Scenarios requiring auth must call require_auth() before use. username: str = "" password: SecretStr = SecretStr("") diff --git a/docs/cloud/aws/codabench.md b/docs/cloud/aws/codabench.md index c4e1998..6092609 100644 --- a/docs/cloud/aws/codabench.md +++ b/docs/cloud/aws/codabench.md @@ -60,10 +60,10 @@ uses AWS SSM Session Manager (no SSH bastion needed). | Resource | Name | Details | | ---------- | ------ | --------- | | VPC | `codabench-prodlike-vpc` | `10.0.0.0/16` | -| Public subnet 1 | `codabench-prodlike-public-1` | `10.0.1.0/24` — `eu-west-1a` | -| Public subnet 2 | `codabench-prodlike-public-2` | `10.0.2.0/24` — `eu-west-1b` | -| Private subnet 1 | `codabench-prodlike-private-1` | `10.0.11.0/24` — `eu-west-1a` | -| Private subnet 2 | `codabench-prodlike-private-2` | `10.0.12.0/24` — `eu-west-1b` | +| Public subnet 1 | `codabench-prodlike-public-1` | `10.0.1.0/24` - `eu-west-1a` | +| Public subnet 2 | `codabench-prodlike-public-2` | `10.0.2.0/24` - `eu-west-1b` | +| Private subnet 1 | `codabench-prodlike-private-1` | `10.0.11.0/24` - `eu-west-1a` | +| Private subnet 2 | `codabench-prodlike-private-2` | `10.0.12.0/24` - `eu-west-1b` | | NAT Gateway | `codabench-prodlike-nat-gw` | In public subnet 1; gives private instances internet access | | Internet Gateway | `codabench-prodlike-igw` | Attached to VPC for public subnets | @@ -120,7 +120,7 @@ All security groups allow **all egress** (`0.0.0.0/0`, all protocols). ## Access - **Web UI:** via ALB DNS on port 80 (output: `alb_dns`) -- **Admin/SSH:** via AWS SSM Session Manager — all instances have the +- **Admin/SSH:** via AWS SSM Session Manager - all instances have the `codabench-prodlike-ssm-role` IAM role with `AmazonSSMManagedInstanceCore` - **MinIO Console:** via ALB at path `/minio-console` - **MinIO API:** via the dedicated MinIO API ALB on port 80 @@ -136,7 +136,7 @@ aws ssm start-session --target --profile codabench | ------ | --------- | | `provider.tf` | AWS provider config, S3 backend | | `variables.tf` | All input variables (CIDRs, instance types, credentials, images) | -| `main.tf` | Root module — wires VPC, SGs, EC2, workers, ALBs, NAT gateway | +| `main.tf` | Root module - wires VPC, SGs, EC2, workers, ALBs, NAT gateway | | `outputs.tf` | ALB DNS, Codabench IPs, MinIO/RabbitMQ endpoints | | `modules/vpc/` | VPC, subnets, route tables, internet gateway | | `modules/security_groups/` | All security groups and their rules | diff --git a/docs/cloud/aws/loadtest_infrastructure.md b/docs/cloud/aws/loadtest_infrastructure.md index 1f8a5b2..43b0e96 100644 --- a/docs/cloud/aws/loadtest_infrastructure.md +++ b/docs/cloud/aws/loadtest_infrastructure.md @@ -5,13 +5,13 @@ nav_order: 1 --- This Terraform project deploys the load-testing infrastructure for Codabench -across three AWS regions. It creates the machines that **generate** the load — +across three AWS regions. It creates the machines that **generate** the load - the Codabench target infrastructure (the thing we're testing) is deployed separately and already exists. ## What gets deployed -### Paris (eu-west-1) — same VPC as Codabench +### Paris (eu-west-1) - same VPC as Codabench Lives inside the existing Codabench VPC so it can reach the ALB internally and monitor RabbitMQ directly. @@ -22,20 +22,20 @@ and monitor RabbitMQ directly. | Locust workers | ASG 2–6 × t3.medium | Generate HTTP load against the ALB | | Playwright | 1 × t3.large | Measures perceived frontend latency with headless Chromium | -New private subnet: `10.0.21.0/24` — internet access goes through the +New private subnet: `10.0.21.0/24` - internet access goes through the existing NAT Gateway. -### US East (us-east-1) — separate VPC +### US East (us-east-1) - separate VPC | Resource | Type | Role | | ---------- | ------ | ------ | | Locust workers | ASG 2–4 × t3.medium | Headless load from the US | New VPC `10.1.0.0/16` with a public subnet. Traffic goes over the **public -internet** to the ALB in Paris — no VPC peering, because we want to measure +internet** to the ALB in Paris - no VPC peering, because we want to measure real user latency from North America. -### Asia Pacific (ap-southeast-1) — separate VPC +### Asia Pacific (ap-southeast-1) - separate VPC | Resource | Type | Role | | ---------- | ------ | ------ | @@ -54,7 +54,7 @@ Same design as US East, VPC `10.2.0.0/16`. Measures real latency from Asia. ## Architecture diagram -![Architecture diagram](/docs/images/loadtest_architecture.jpg) +![Architecture diagram](/images/loadtest_architecture.jpg) ## Prerequisites