Add configuration info

This commit is contained in:
Michael Vines
2020-07-22 11:59:20 -07:00
parent 6e0353965a
commit 98cca1e774
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
#
# Configures a BigTable instance with the expected tables
#
set -e
instance=solana-ledger
cbt=(
cbt
-instance
"$instance"
)
if [[ -n $BIGTABLE_EMULATOR_HOST ]]; then
cbt+=(-project emulator)
fi
for table in blocks tx tx-by-addr; do
(
set -x
"${cbt[@]}" createtable $table
"${cbt[@]}" createfamily $table x
"${cbt[@]}" setgcpolicy $table x maxversions=1
"${cbt[@]}" setgcpolicy $table x maxage=360d
)
done