garage/script/dev-configure.sh

24 lines
464 B
Bash
Raw Permalink Normal View History

2020-11-20 19:50:43 +00:00
#!/bin/bash
set -ex
2020-11-20 19:50:43 +00:00
SCRIPT_FOLDER="`dirname \"$0\"`"
REPO_FOLDER="${SCRIPT_FOLDER}/../"
GARAGE_DEBUG="${REPO_FOLDER}/target/debug/"
GARAGE_RELEASE="${REPO_FOLDER}/target/release/"
PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:$PATH"
sleep 5
2020-11-29 16:03:08 +00:00
until garage status 2>&1|grep -q Healthy ; do
echo "cluster starting..."
sleep 1
done
2020-11-20 19:50:43 +00:00
garage status \
| grep UNCONFIGURED \
| grep -Po '^[0-9a-f]+' \
| while read id; do
2021-03-10 13:52:03 +00:00
garage node configure -d dc1 -c 1 $id
2020-11-20 19:50:43 +00:00
done