github.com/pachyderm/pachyderm@v1.13.4/etc/testing/migration/v1_11/deploy.sh (about) 1 #!/bin/bash 2 # deploy.sh deploys a pachyderm 1.11.9 cluster (the first release with auth extract/restore) 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_11" ]]; then 13 curl -Ls https://github.com/pachyderm/pachyderm/releases/download/v1.11.9/pachctl_1.11.9_linux_amd64.tar.gz \ 14 | tar -xz pachctl_1.11.9_linux_amd64/pachctl -O >"${GOBIN}/pachctl_1_11" 15 chmod +x "${GOBIN}/pachctl_1_11" 16 fi 17 18 # (If 1.11 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.11.9" ]]; 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.11 cluster 30 pachctl_1_11 deploy local 31 32 # Wait for pachyderm to come up 33 HERE="$(dirname "${0}")" 34 until timeout 1s "${HERE}/../../../kube/check_ready.sh" app=pachd; do sleep 1; done 35 fi