added restore

This commit is contained in:
pokeeffe-molecula 2022-02-22 13:50:47 -06:00
parent 9bc7839dcb
commit b0ea69d2f4

View file

@ -8,7 +8,7 @@ echo "using INGESTNODE0 ${INGESTNODE0}"
DATANODE0=$(cat ./qa/tf/perf/able/outputs.json | jq -r '[.data_node_ips][0]["value"][0]')
echo "using DATANODE0 ${DATANODE0}"
# leaving this here because K6 is timing out and need to work out why
# ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "wget https://github.com/grafana/k6/releases/download/v0.36.0/k6-v0.36.0-linux-arm64.tar.gz"
# ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "tar -xvf k6-v0.36.0-linux-arm64.tar.gz"
# ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "mkdir bin"
@ -23,11 +23,26 @@ then
fi
# copy restore data to ingest node
echo "Copying restore data from S3"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "aws s3 cp s3://molecula-perf-storage/able/perf-able-seg.tar.xz /data/perf-able-seg.tar.xz"
if (( $? != 0 ))
then
echo "Copy failed"
exit 1
fi
# run the restore
# untar and restore data data
echo "Untarring and restoring data"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "cd /data; tar -xf perf-able-seg.tar.xz; featurebase restore --host http://${DATANODE0}:10101 -s /data/backup"
if (( $? != 0 ))
then
echo "Untarring and restoring failed"
exit 1
fi
# run smoke test
# run test
echo "Running perf test..."
# leaving this here because K6 is timing out and need to work out why
#ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "/home/ec2-user/bin/k6 run -e DATANODE0=test.k6.io /data/highcardinalitygroupby.js"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "curl ${DATANODE0}:10101/index/seg/query -X POST -o /data/response.json -d 'GroupBy(Rows(education_level), Rows(gender), Rows(political_party), Rows(domain))'"
ABLETESTRESULT=$?