2018-08-23 16:48:03 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
|
|
ids="$(
|
2018-09-05 21:40:47 +01:00
|
|
|
for cid in $(docker ps -a | awk '/storagenode/{print $1}'); do
|
2018-08-23 16:48:03 +01:00
|
|
|
ip="$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $cid)"
|
2018-09-12 16:02:53 +01:00
|
|
|
id="$(docker logs $cid 2>&1 | awk '/started/{print $4; exit}')"
|
2018-08-23 16:48:03 +01:00
|
|
|
echo $id:$ip:7777
|
|
|
|
done | tr '\n' ','
|
|
|
|
)"
|
2018-09-07 20:46:08 +01:00
|
|
|
sed -i'' -e "s/NODES=.*$/NODES=${ids%,}/" docker-compose.yaml
|