Skip to content

Commit

Permalink
drtprod: export vars instead of passing every time
Browse files Browse the repository at this point in the history
Release note: none.
Epic: none.
  • Loading branch information
dt committed Mar 12, 2024
1 parent f99066e commit ad11b2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/drtprod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# clusters that ensures consistent use of the correct project-assignment vars
# and done some additional sanity check enforcement on some flags.

export GCE_PROJECT=cockroach-drt
export ROACHPROD_DNS="drt.crdb.io"

case $1 in
"start")
if [[ "$*" != *"--secure"* ]]; then
Expand All @@ -27,7 +30,7 @@ case $1 in
shift
cluster=$1
set -euo pipefail
GCE_PROJECT=cockroach-drt roachprod adminurl $cluster --ips |
roachprod adminurl $cluster --ips |
awk '{printf "%04d\t%s\n", NR, $0}' | # prepend the padded node IDs.
sed -e 's,http://\(.*\):26258/,\1,g' | # remove the HTTP part.
while read node ip; do
Expand All @@ -39,4 +42,4 @@ case $1 in
esac


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

0 comments on commit ad11b2c

Please sign in to comment.