forked from Deuxfleurs/garage
Everything works, actually!
This commit is contained in:
parent
a8ae78af0a
commit
12190efd41
3 changed files with 8 additions and 6 deletions
|
@ -67,7 +67,7 @@ fi
|
||||||
done
|
done
|
||||||
# >>>>>>>>>>>>>>>> END FOR LOOP ON NODES
|
# >>>>>>>>>>>>>>>> END FOR LOOP ON NODES
|
||||||
|
|
||||||
sleep 5
|
sleep 3
|
||||||
# Establish connections between nodes
|
# Establish connections between nodes
|
||||||
for count in $(seq 1 3); do
|
for count in $(seq 1 3); do
|
||||||
NODE=$(garage -c /tmp/config.$count.toml node-id -q)
|
NODE=$(garage -c /tmp/config.$count.toml node-id -q)
|
||||||
|
|
|
@ -17,6 +17,7 @@ SKIP_DUCK=1
|
||||||
echo "⏳ Setup"
|
echo "⏳ Setup"
|
||||||
${SCRIPT_FOLDER}/dev-clean.sh
|
${SCRIPT_FOLDER}/dev-clean.sh
|
||||||
${SCRIPT_FOLDER}/dev-cluster.sh > /tmp/garage.log 2>&1 &
|
${SCRIPT_FOLDER}/dev-cluster.sh > /tmp/garage.log 2>&1 &
|
||||||
|
sleep 6
|
||||||
${SCRIPT_FOLDER}/dev-configure.sh
|
${SCRIPT_FOLDER}/dev-configure.sh
|
||||||
${SCRIPT_FOLDER}/dev-bucket.sh
|
${SCRIPT_FOLDER}/dev-bucket.sh
|
||||||
|
|
||||||
|
@ -116,9 +117,9 @@ if [ -z "$SKIP_AWS" ]; then
|
||||||
echo "<h1>hello world</h1>" > /tmp/garage-index.html
|
echo "<h1>hello world</h1>" > /tmp/garage-index.html
|
||||||
aws s3 cp /tmp/garage-index.html s3://eprouvette/index.html
|
aws s3 cp /tmp/garage-index.html s3://eprouvette/index.html
|
||||||
[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 404 ]
|
[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 404 ]
|
||||||
garage bucket website --allow eprouvette
|
garage -c /tmp/config.1.toml bucket website --allow eprouvette
|
||||||
[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 200 ]
|
[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 200 ]
|
||||||
garage bucket website --deny eprouvette
|
garage -c /tmp/config.1.toml bucket website --deny eprouvette
|
||||||
[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 404 ]
|
[ `curl -s -o /dev/null -w "%{http_code}" --header "Host: eprouvette.garage.tld" http://127.0.0.1:3923/ ` == 404 ]
|
||||||
aws s3 rm s3://eprouvette/index.html
|
aws s3 rm s3://eprouvette/index.html
|
||||||
rm /tmp/garage-index.html
|
rm /tmp/garage-index.html
|
||||||
|
@ -127,8 +128,8 @@ fi
|
||||||
echo "🏁 Teardown"
|
echo "🏁 Teardown"
|
||||||
AWS_ACCESS_KEY_ID=`cat /tmp/garage.s3 |cut -d' ' -f1`
|
AWS_ACCESS_KEY_ID=`cat /tmp/garage.s3 |cut -d' ' -f1`
|
||||||
AWS_SECRET_ACCESS_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2`
|
AWS_SECRET_ACCESS_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2`
|
||||||
garage bucket deny --read --write eprouvette --key $AWS_ACCESS_KEY_ID
|
garage -c /tmp/config.1.toml bucket deny --read --write eprouvette --key $AWS_ACCESS_KEY_ID
|
||||||
garage bucket delete --yes eprouvette
|
garage -c /tmp/config.1.toml bucket delete --yes eprouvette
|
||||||
garage key delete --yes $AWS_ACCESS_KEY_ID
|
garage -c /tmp/config.1.toml key delete --yes $AWS_ACCESS_KEY_ID
|
||||||
|
|
||||||
echo "✅ Success"
|
echo "✅ Success"
|
||||||
|
|
|
@ -67,6 +67,7 @@ async fn main() {
|
||||||
|
|
||||||
if let Err(e) = res {
|
if let Err(e) = res {
|
||||||
error!("{}", e);
|
error!("{}", e);
|
||||||
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue