Skip to content

Commit

Permalink
deployment: Update local deployment script to allow target-only deplo…
Browse files Browse the repository at this point in the history
…yment with defined primary host

Signed-off-by: Aaron Wilson <[email protected]>
  • Loading branch information
aaronnw committed Jul 28, 2023
1 parent 270cdf5 commit 3dffc19
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions deploy/dev/local/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ else
PORT_INTRA_DATA=${PORT_INTRA_DATA:-13080}
NEXT_TIER="_next"
fi
AIS_PRIMARY_URL="http://localhost:$PORT"
PRIMARY_HOST=${AIS_PRIMARY_HOST:-localhost}
AIS_PRIMARY_URL="http://$PRIMARY_HOST:$PORT"
if $AIS_USE_HTTPS; then
AIS_PRIMARY_URL="https://localhost:$PORT"
AIS_PRIMARY_URL="https://$PRIMARY_HOST:$PORT"
fi
LOG_ROOT="${LOG_ROOT:-/tmp/ais}${NEXT_TIER}"
#### Authentication setup #########
Expand Down Expand Up @@ -136,14 +137,14 @@ is_number ${TARGET_CNT}
echo "Enter number of proxies (gateways):"
read -r PROXY_CNT
is_number ${PROXY_CNT}
if [[ ${PROXY_CNT} -lt 1 ]] ; then
exit_error "${PROXY_CNT} must be at least 1"
if [[ ${PROXY_CNT} -lt 1 && -z "${AIS_PRIMARY_HOST}" ]] ; then
exit_error "Number of proxies must be at least 1 if no external primary proxy is specified with AIS_PRIMARY_HOST. Received "${PROXY_CNT}""
fi
if [[ ${PROXY_CNT} -gt 1 ]] ; then
AIS_DISCOVERY_PORT=$((PORT + 1))
AIS_DISCOVERY_URL="http://localhost:$AIS_DISCOVERY_PORT"
AIS_DISCOVERY_URL="http://$PRIMARY_HOST:$AIS_DISCOVERY_PORT"
if $AIS_USE_HTTPS; then
AIS_DISCOVERY_URL="https://localhost:$AIS_DISCOVERY_PORT"
AIS_DISCOVERY_URL="https://$PRIMARY_HOST:$AIS_DISCOVERY_PORT"
fi
fi

Expand Down

0 comments on commit 3dffc19

Please sign in to comment.