Skip to content

clickbench: EC2 launch configuration comes from the environment - #40

Open
SferaDev wants to merge 2 commits into
mainfrom
chore/launch-ec2-hardening
Open

clickbench: EC2 launch configuration comes from the environment#40
SferaDev wants to merge 2 commits into
mainfrom
chore/launch-ec2-hardening

Conversation

@SferaDev

@SferaDev SferaDev commented Jun 12, 2026

Copy link
Copy Markdown
Member

What

The clickbench EC2 harness now reads its provisioning inputs — AWS profile, region, AMI, subnet, security group, key pair — from environment variables or the untracked clickbench/.env (sourced automatically when present). Nothing environment-specific is committed; launching without the required values aborts with guidance before any AWS call.

Also:

  • The serial console gets a random per-launch password (printed to the operator) instead of a fixed value.
  • The cloud-init wait loop fails loudly (exit 1, inspect/teardown guidance) instead of printing success after exhausting its retries.
  • Teardown (--terminate-only) requires an explicit --name; all abort checks run before any AWS mutation.
  • clickbench/Makefile: EC2_KEY derives from KEY_NAME (~/.ssh/<key>.pem) or is passed explicitly; the missing-key error only fires on targets that need it.

Testing

bash -n clean; all abort paths exercised without AWS calls (missing config, missing key, terminate-only without name, empty/missing --name value, unknown option — each exits 1 with guidance); Makefile dry-runs verified for key derivation, explicit EC2_KEY, and keyless error. No instances launched.

A follow-up PR applies the same conventions to rtabench/ and jsonbench/.

@SferaDev
SferaDev marked this pull request as draft June 12, 2026 22:41
SferaDev added 2 commits June 13, 2026 00:46
Provisioning inputs (profile, region, AMI, subnet, security group, key
pair) are read from environment variables or the untracked
clickbench/.env; nothing account-specific is committed. The serial
console gets a random per-launch password instead of a fixed one, the
cloud-init wait fails loudly instead of printing success after timing
out, and teardown requires an explicit instance name.
@SferaDev
SferaDev force-pushed the chore/launch-ec2-hardening branch from 3ddc28e to f1c4620 Compare June 12, 2026 22:46
@SferaDev SferaDev changed the title launch-ec2: remove hardcoded credentials and account-specific defaults clickbench: EC2 launch configuration comes from the environment Jun 12, 2026
@SferaDev
SferaDev marked this pull request as ready for review June 12, 2026 22:47
@SferaDev
SferaDev requested a review from tsg June 12, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant