Skip to content

Commit

Permalink
scripts: add wrapper for managing drt clusters
Browse files Browse the repository at this point in the history
Release note: none.
Epic: none.
  • Loading branch information
dt committed Mar 8, 2024
1 parent 559994e commit 9f983a3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/drtprod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# drtprod is a wrapper for roachprod for use when managing the long-lived DRT
# clusters that ensures consistent use of the correct project-assignment vars
# and done some additional sanity check enforcement on some flags.

if [[ $1 == "start" ]]; then
if [[ "$*" != *"--secure"* ]]; then
echo "--secure is required when starting DRT clusters"
exit 1
fi
if [[ "$*" != *"--sql-port 26257"* ]]; then
# we don't use service discovery in our the drt project so use default port.
echo "--sql-port 26257 is required when starting DRT clusters"
exit 1
fi
fi

GCE_PROJECT=cockroach-drt ROACHPROD_DNS="drt.crdb.io" roachprod "$@"

0 comments on commit 9f983a3

Please sign in to comment.