Skip to content

Commit

Permalink
#3 Find which of the nodes that are currently fallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
baardl committed Oct 11, 2020
1 parent fea1cdc commit e025a2d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/isFallbackGreenOrBlue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
BLUE_PORT=${1:-5050}
GREEN_PORT=${2:-5051}
blueResponse=$(curl -s "http://localhost:$BLUE_PORT/blueGreenService/health")
greenResponse=$(curl -s "http://localhost:$GREEN_PORT/blueGreenService/health")
if [[ $blueResponse == *'FALLBACK'* ]]; then
echo blue
elif [[ $greenResponse == *'FALLBACK'* ]]; then
echo green
else
echo none
fi

0 comments on commit e025a2d

Please sign in to comment.