Skip to content

Commit

Permalink
fix(script): better update of stage / prod servers ... git reset, etc...
Browse files Browse the repository at this point in the history
  • Loading branch information
fpurcell committed Mar 19, 2021
1 parent e486536 commit dd257a8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/bolt/bolt-base.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
BDIR=`dirname $0`

. $BDIR/servers.sh

if [[ $1 == 'ALL' ]]
then
. $BDIR/servers.sh
MACHINES=$SERVERS
elif [[ $1 == 'PROD' ]]
then
. $BDIR/servers.sh
MACHINES="$BLUES_PD $GREENS_PD"
elif [[ $1 == 'STAG' ]]
then
. $BDIR/servers.sh
MACHINES="$BLUES_ST $GREENS_ST"
else
MPD=`$BDIR/getBlueGreenOpposites.sh`
Expand Down
13 changes: 13 additions & 0 deletions scripts/bolt/clear-cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
##
## will copy the gl/data (mbtiles junk) over to servers
##
BDIR=`dirname $0`
. $BDIR/bolt-base.sh

echo "clear the cache..."
for m in $CACHE_SERVERS
do
cmd="bolt command run \"./scripts/purge_disk_cache\" --targets $CACHE_USER@$m"
echo $cmd
eval $cmd
done
15 changes: 15 additions & 0 deletions scripts/bolt/echo_servers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
##
## will copy the gl/data (mbtiles junk) over to servers
##
BDIR=`dirname $0`
. $BDIR/bolt-base.sh

echo "these are the target servers:"
for m in $MACHINES
do
echo " $m"
done

echo
echo "and these are the http/apache/cache servers: $CACHE_SERVERS"
echo
4 changes: 4 additions & 0 deletions scripts/bolt/servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ BLUES="$BLUES_ST $BLUES_PD"
GREENS="$GREENS_ST $GREENS_PD"

SERVERS="$BLUES $GREENS"

CACHE_USER="web_tiles-trimet-org"
CACHE_SERVERS="rj-st-mapweb01 rj-pd-mapweb01 cs-pd-mapweb01"
CACHE_SERVERS="rj-st-mapweb01"

0 comments on commit dd257a8

Please sign in to comment.