Fix a bug in deploy_garage

This commit is contained in:
Quentin 2021-11-25 11:16:13 +01:00
parent 226fc57c30
commit c8acb37b14
Signed by: quentin
GPG Key ID: A98E9B769E4FF428
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ python3 main.py
## Example
```bash
sudo rm -rf /tmp/garage-testnet/ # always start by deleting previous run
sudo python3 main.py create ./config.yml
sudo python3 main.py run-all example/deploy_garage.sh
sudo python3 main.py run dc1:dc1s1 garage -c /tmp/garage-testnet/dc1/dc1s1/garage.toml status

View File

@ -46,11 +46,14 @@ EOF
RUST_LOG=garage=debug ${GARAGE_PATH} server 2>> ${NODE_STORAGE_PATH}/logs & disown
sleep 2
CONFIG_NODE_FPATH=(${STORAGE_PATH}/*{,/*}/garage.toml)
CONFIG_NODE_FPATH=($(find /tmp/garage-testnet/ -maxdepth 3 -name garage.toml))
SELF_ID=$(${GARAGE_PATH} node id 2>/dev/null)
SHORT_ID=$(echo ${SELF_ID} | cut -c-64)
echo ===DEBUG===
echo $CONFIG_NODE_FPATH
echo ${CONFIG_NODE_FPATH[0]}
${GARAGE_PATH} -c ${CONFIG_NODE_FPATH[0]} node connect ${SELF_ID}
${GARAGE_PATH} -c ${CONFIG_NODE_FPATH[0]} layout assign ${SHORT_ID} -z ${ZONE:-unzonned-${HOST}} -c 1 -t ${HOST}