github.com/pachyderm/pachyderm@v1.13.4/etc/testing/migration/v1_7/deploy.sh (about) 1 #!/bin/bash 2 # deploy.sh deploys a pachyderm 1.7 cluster 3 4 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 5 # shellcheck source=./../../../govars.sh 6 source "${SCRIPT_DIR}/../../../govars.sh" 7 8 set -x 9 10 11 # Install old version of pachctl, for migration tests 12 if [[ ! -f "${GOBIN}/pachctl_1_7" ]]; then 13 curl -Ls https://github.com/pachyderm/pachyderm/releases/download/v1.7.11/pachctl_1.7.11_linux_amd64.tar.gz \ 14 | tar -xz pachctl_1.7.11_linux_amd64/pachctl -O >"${GOBIN}/pachctl_1_7" 15 chmod +x "${GOBIN}/pachctl_1_7" 16 fi 17 18 # (If 1.7 is already deployed, we're done. Otherwise, undeploy + deploy) 19 if ! grep . <( kubectl get po -l suite=pachyderm 2>/dev/null ) \ 20 || [[ "$(pachctl version | grep pachd | awk '{print $2}' )" != "1.7.11" ]]; then 21 # Clear any existing pachyderm cluster 22 if pachctl version --timeout=2s &>/dev/null; then 23 ( (yes | pachctl delete-all) && pachctl undeploy) || { 24 echo "Error: could not clear existing Pachyderm cluster. Giving up..." 25 exit 1 26 } 27 fi 28 29 # Deploy Pachyderm 1.7 cluster 30 pachctl_1_7 deploy local 31 32 # Wait for pachyderm to come up 33 set +x 34 HERE="$(dirname "${0}")" 35 PACHCTL=pachctl_1_7 "${HERE}/../../../kube/wait_for_startup.sh" 36 set -x 37 fi