rtabench/jsonbench: remove personal key defaults and label account-specific values - #44
Draft
SferaDev wants to merge 1 commit into
Draft
rtabench/jsonbench: remove personal key defaults and label account-specific values#44SferaDev wants to merge 1 commit into
SferaDev wants to merge 1 commit into
Conversation
…ecific values Follow-up to #40, which hardened clickbench/'s EC2 harness; this applies the same conventions to the rtabench/ and jsonbench/ harnesses. Makefiles: - Drop the personal EC2_KEY ?= ~/.ssh/tsg.pem default. Provide KEY_NAME=<key> (derives ~/.ssh/<key>.pem) or an explicit EC2_KEY=<path>; a lazy $(error) fires only on targets that actually ssh/rsync, so launch-ec2/destroy-ec2/report/fetch-competitors still work keyless. - launch-ec2 forwards KEY_NAME to launch-ec2.sh. - Label AWS_PROFILE as a Xata account default (env-overridable). - jsonbench: replace the personal JSONBENCH_DIR ?= /Users/tsg/src/JSONBench default with the sibling-checkout convention used by CLICKBENCH_DIR / RTABENCH_DIR (still env-overridable); AGENTS.md updated to match. launch-ec2.sh (both): - KEY_NAME/KEY_FILE must be provided (no tsg default); checked before any AWS call on the launch path, not required for --terminate-only. - Account-specific values (PROFILE/REGION/AMI/SUBNET/SG) moved into a labeled "Xata account defaults" block, all env-overridable; INSTANCE_TYPE/VOLUME_SIZE/NAME env-overridable too. - --region on every aws call instead of relying on the profile default. - Replace the hardcoded serial-console root password with a random per-launch one (printed at the end), as in clickbench's script. - Cloud-init wait loop now fails loudly instead of reporting a half-initialized box as ready. - rtabench/create.sql: drop a personal absolute path from a comment. Unlike clickbench's script, these keep their documented replace semantics (launch terminates an existing same-name instance) — changing that is left as a separate decision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up flagged in #40: that PR hardened
clickbench/'s EC2 harness; this applies the same conventions tortabench/andjsonbench/.What changed
Makefiles (
rtabench/Makefile,jsonbench/Makefile)EC2_KEY ?= ~/.ssh/tsg.pemdefault. Same convention as clickbench: passKEY_NAME=<ec2-key-pair>(derives~/.ssh/<key>.pem) or an explicitEC2_KEY=<path>. The$(error ...)is lazy — it only fires on targets that actually ssh/rsync, solaunch-ec2,destroy-ec2,report, andfetch-competitorskeep working keyless.launch-ec2forwardsKEY_NAMEtolaunch-ec2.sh.AWS_PROFILE ?= managementlabeled as a Xata account default (env-overridable).JSONBENCH_DIR ?= /Users/tsg/src/JSONBenchdefault with the sibling-checkout convention already used byCLICKBENCH_DIR/RTABENCH_DIR($(CURDIR)/../../../JSONBench, env-overridable).AGENTS.mdupdated to match.Launch scripts (
rtabench/launch-ec2.sh,jsonbench/launch-ec2.sh)These are copies of clickbench's script (per-bench
NAME/INSTANCE_TYPE/VOLUME_SIZE), not a shared file, so the #40 fixes are mirrored into each:KEY_NAME=tsg/~/.ssh/tsg.pemdefaults —KEY_NAMEis required (checked before any AWS call on the launch path; not required for--terminate-only),KEY_FILEderived/overridable.PROFILE/REGION/AMI/SUBNET/SGmoved into a labeled "Xata account defaults" block, all env-overridable;INSTANCE_TYPE/VOLUME_SIZE/NAMEenv-overridable too.--regionon every aws call instead of relying on the profile's default region.Rt4b3nch!s3rial#2026,Jb3nch!s3rial#2026); replaced with a random per-launch password, printed at the end — same mechanism as clickbench.Misc
rtabench/create.sql: scrubbed a personal absolute path (/Users/tsg/src/rtabench/...) from a comment.rtabench/.env/jsonbench/.envare gitignored and untouched.Deliberately NOT changed
These launch scripts keep their documented replace semantics (launching terminates an existing same-name instance). clickbench's abort-on-existing behavior predates #40 and wasn't part of its diff, so changing rtabench/jsonbench to match is left as a separate decision — worth considering given the shared-account concern #40 documents.
Testing
bash -non both launch scripts.bash launch-ec2.shexits 1 with a clearKEY_NAMEerror before any AWS call (both dirs); unknown options rejected.make -ndry-runs in both dirs: keylesspsql EC2=...fails with theEC2_KEYerror;KEY_NAME=mykeyderivesssh -i ~/.ssh/mykey.pem; explicitEC2_KEY=/tmp/other.pemis honored;launch-ec2 KEY_NAME=mykeyforwards the env;destroy-ec2and rtabenchreportexpand without requiring a key. Documented workflows (make -C rtabench query EC2=<ip> Q=17,make -C jsonbench query EC2=<ip> Q=2) unchanged given a key.