#!/usr/bin/env bash # Roll back spark-server on ECS to the image tagged spark-server:rollback (stamped before last deploy). # Does not reverse MySQL migrations — only the app container. See deploy/docker/README.md. set -euo pipefail DIR="$(cd "$(dirname "$0")" && pwd)" # shellcheck source=lib.sh source "$DIR/lib.sh" deploy_lib_init deploy_lib_need_tools echo "==> rollback on $HOST (app only, no migrate)" if ! deploy_lib_remote_rollback "$DATA"; then echo "rollback failed" >&2 exit 1 fi if ! deploy_lib_remote_health 12 5; then echo "rollback container unhealthy" >&2 deploy_lib_remote_ps exit 1 fi deploy_lib_remote_write_manifest "$DATA" "rollback" "(rollback-tag)" "rolled_back" deploy_lib_remote_ps echo "==> health OK after rollback" "${SSH[@]}" "curl -fsS http://127.0.0.1:18080/healthz && echo && curl -fsS http://127.0.0.1:18080/readyz && echo"