Skip to content

Commit

Permalink
fix index page and remove error when starting gte when no containers
Browse files Browse the repository at this point in the history
there
  • Loading branch information
mchyzer committed Sep 22, 2020
1 parent c42d4e3 commit e66c65a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
18 changes: 18 additions & 0 deletions base/container_files/usr-local-bin/grouperScriptHooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

### DO NOT EDIT OR OVERLAY THIS FILE
# These definitions are here to define the functions.
# You can overlay the grouperScriptHooks.sh file with any definitions of these functions


# called after the setupFiles functions is called, almost before the process starts
grouperScriptHooks_setupFilesPost() {
echo "trainingContainer; INFO: (grouperScriptHooks.sh-grouperScriptHooks_setupFilesPost) starting..."
sed -i "s|Rewrite|#Rewrite|g" /etc/httpd/conf.d/ssl-enabled.conf
echo "trainingContainer; INFO: (grouperScriptHooks.sh-grouperScriptHooks_setupFilesPost) sed -i 's|Rewrite|#Rewrite|g' /etc/httpd/conf.d/ssl-enabled.conf , result=$?"
}

export -f grouperScriptHooks_setupFilesPost

echo "trainingContainer; INFO: (grouperScriptHooks.sh-body) export -f grouperScriptHooks_setupFilesPost, result=$?"

2 changes: 1 addition & 1 deletion ex101/run.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -d -p 389:389 -p 8443:443 -p 3306:3306 --name grouper-demo tier/gte:101.1.1-202006
docker run -d -p 389:389 -p 8443:443 -p 3306:3306 --name grouper-demo tier/gte:101.1.1-202010
12 changes: 9 additions & 3 deletions gte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ -z "$1" ]
my_array=( $( docker images | grep 'tier/gte' | grep -v base | awk '{print $2}' | sort ) )
for i in "${my_array[@]}"
do
# strip last 7 chars (-202006)
# strip last 7 chars (-202010)
i=${i::${#i}-7}
echo $i
done
Expand All @@ -16,7 +16,13 @@ fi

# remove rabbitmq and all gte containers
docker rm -f rabbitmq 2> /dev/null
docker ps -a | grep 'tier/gte' | awk '{print $1}' | xargs docker rm -f

# see if there is a container
CONTAINER="$( docker ps -a | grep 'tier/gte' | awk '{print $1}' )"
# if so, then rm it
if [ ! -z "$CONTAINER" ]; then
docker ps -a | grep 'tier/gte' | awk '{print $1}' | xargs docker rm -f
fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
$DIR/start-rabbitmq.sh
Expand All @@ -25,5 +31,5 @@ $DIR/start-rabbitmq.sh

#docker stop "$1" 2> /dev/null
#docker rm "$1" 2> /dev/null
docker run -d -p 8443:443 --link rabbitmq:rabbitmq --name $1 tier/gte:"$1"-202006
docker run -d -p 8443:443 --link rabbitmq:rabbitmq --name $1 tier/gte:"$1"-202010

2 changes: 1 addition & 1 deletion internal/createNew.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ storage 30gig
security group: gte-training
tag env training

user data script from https://github.internet2.edu/docker/grouper_training/raw/202006-post/internal/userdata.sh
user data script from https://github.internet2.edu/docker/grouper_training/raw/202010-post/internal/userdata.sh

ssh -i gte-training-master.pem ec2-user@3.136.154.33

Expand Down

0 comments on commit e66c65a

Please sign in to comment.