From 9f983a3039d7503e3e594c541957b7614d056210 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 7 Mar 2024 15:46:57 +0000 Subject: [PATCH] scripts: add wrapper for managing drt clusters Release note: none. Epic: none. --- scripts/drtprod | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/drtprod diff --git a/scripts/drtprod b/scripts/drtprod new file mode 100755 index 000000000000..bcc70098ac5a --- /dev/null +++ b/scripts/drtprod @@ -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 "$@"