From 10de85cce3ac70465079a69c42cf3ea5638bf361 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 25 Aug 2024 20:45:52 -0400 Subject: [PATCH] Allow API-only builds and deploy --- build-and-deploy.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build-and-deploy.sh b/build-and-deploy.sh index bdc201be..6f05a98c 100755 --- a/build-and-deploy.sh +++ b/build-and-deploy.sh @@ -13,6 +13,7 @@ else fi KEEP_ARTIFACTS="" +API_ONLY="" PRIMARY_NODE="" if [[ -n ${1} ]]; then for arg in ${@}; do @@ -21,6 +22,10 @@ if [[ -n ${1} ]]; then KEEP_ARTIFACTS="y" shift ;; + -a|--api-only) + API_ONLY="y" + shift + ;; -p=*|--become-primary=*) PRIMARY_NODE=$( awk -F'=' '{ print $NF }' <<<"${arg}" ) shift @@ -75,6 +80,7 @@ for HOST in ${HOSTS[@]}; do ssh $HOST $SUDO systemctl restart pvcapid &>/dev/null sleep 2 ssh $HOST $SUDO systemctl restart pvcworkerd &>/dev/null + if [[ -z ${API_ONLY} ]]; then sleep 2 ssh $HOST $SUDO systemctl restart pvchealthd &>/dev/null sleep 2 @@ -85,6 +91,7 @@ for HOST in ${HOSTS[@]}; do sleep 5 echo -n "." done + fi echo " done." if [[ -n ${PRIMARY_NODE} && ${PRIMARY_NODE} == ${HOST} ]]; then echo -n ">>> Setting node $HOST to primary coordinator state... "