2016-08-27 01:03:56 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-03-29 22:47:37 +03:00
|
|
|
# this script runs in the context of env vars imported inside of a
|
|
|
|
# Docker run env, thus disable ref but not assigned shellcheck warnings.
|
|
|
|
# shellcheck disable=SC2154
|
|
|
|
|
2016-08-27 01:03:56 +03:00
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
2017-09-30 00:59:15 +03:00
|
|
|
# login to registry servers (do not specify -e as creds have been decrypted)
|
|
|
|
./registry_login.sh
|
2017-10-22 23:59:00 +03:00
|
|
|
# singularity registries will be imported via env
|
2017-09-30 00:59:15 +03:00
|
|
|
|
2016-08-27 01:03:56 +03:00
|
|
|
# ensure we're in the proper directory
|
|
|
|
cd /opt/batch-shipyard
|
|
|
|
|
|
|
|
# add timing markers
|
2016-10-21 07:18:31 +03:00
|
|
|
if [ ! -z ${SHIPYARD_TIMING+x} ]; then
|
2016-09-03 01:02:07 +03:00
|
|
|
# backfill node prep start
|
2018-05-02 20:00:15 +03:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
python3 perf.py nodeprep start ${prefix} --ts "$npstart" --message "offer=$offer,sku=$sku"
|
2017-09-30 00:59:15 +03:00
|
|
|
# backfill docker run pull start
|
2018-05-02 20:00:15 +03:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
python3 perf.py shipyard pull-start ${prefix} --ts "$drpstart"
|
2016-08-27 01:03:56 +03:00
|
|
|
# mark docker run pull end
|
2018-05-02 20:00:15 +03:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
python3 perf.py shipyard pull-end ${prefix}
|
2016-09-03 01:02:07 +03:00
|
|
|
# mark node prep finished
|
2018-05-02 20:00:15 +03:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
python3 perf.py nodeprep end ${prefix}
|
2016-08-27 01:03:56 +03:00
|
|
|
# mark cascade start time
|
2018-05-02 20:00:15 +03:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
python3 perf.py cascade start ${prefix}
|
2016-08-27 01:03:56 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
# execute cascade
|
2018-05-02 20:00:15 +03:00
|
|
|
# shellcheck disable=SC2086
|
|
|
|
python3 cascade.py "$p2p" --ipaddress "$ipaddress" ${prefix}
|