diff --git a/README.md b/README.md index 91eff0e..6ff8c56 100644 --- a/README.md +++ b/README.md @@ -2,71 +2,6 @@ The Grouper Training Environment (gte) is a set of docker images that contain all the software components, configuration, and setup necessary to complete the -InCommon Grouper Training course. Each docker image tag coincides with a -particular course, exercise, step, and the overall gte version. For example, -the gte image tag for Grouper Basics 101 is 101.1.1-202006. The docker command -to run the image for the 101 course is: +InCommon Grouper Training course. -``` bash - -docker run -d -p 80:80 -p 389:389 -p 8443:443 -p 3306:3306 \ - --name 101.1.1 tier/gte:101.1.1-202006 - -``` - -This will start Grouper, a Shibboleth IdP, OpenLDAP, mySQL, and other components. It will take a little while for the container to be ready. You can watch the logs as the various components are coming up with this command: - -``` bash -docker logs -f 101.1.1 -``` - -Once the container is ready, browse to to access the Grouper UI and log in with one of the following: - -- Grouper Administrator - - username: `banderson`, password: `password` -- Normal User - - username: `jsmith`, password: `password` - -The container has a few other applications running. phpMyAdmin provides an admin interface to the Grouper mySQL database. phpLDAPadmin provides an admin interface to OpenLDAP. Finally, there is a sample application that displays subject attributes for the user that is logged in. - -- phpMyAdmin - - username: `root`, password: (blank) -- phpLDAPadmin - - username: `cn=root,dc=internet2,dc=edu`, password: `password` -- Shibboleth SP subject attributes - -All of the gte image tags are published to . To use a particular image tag, run: - -``` bash -docker run -d -p 80:80 -p 389:389 -p 8443:443 -p 3306:3306 \ - --name {coures}.{exercise}.{step} tier/gte:{VERSION_TAG} -``` - -Where {VERSION_TAG} takes the form of {course}.{exercise}.{step}-{version}. For example: - -``` bash -docker run -d -p 80:80 -p 389:389 -p 8443:443 -p 3306:3306 \ - --name 101.1.1 tier/gte:101.1.1-202006 -``` - -More information about Grouper Training can be found on the Internet2 wiki: -. - -## RabbitMQ for 401 exercises - -The 401 exercises require RabbitMQ. Before starting the 401 docker images, -start RabbitMQ and add queue named `grouper`. - -``` bash -docker run -d -p 15672:15672 --env RABBITMQ_NODENAME=docker-rabbit \ - --hostname rabbitmq --name=rabbitmq rabbitmq:management -``` - -Then browse to and login with `guest`/`guest`, and create a new queue named `grouper`. - -Finally, start the 401 series gte with this slightly modified command: - -``` bash -docker run -d -p 389:389 -p 8443:443 -p 3306:3306 \ - --link rabbitmq:rabbitmq --name {coures}.{exercise}.{step} tier/gte:{VERSION_TAG} -``` +Documentation diff --git a/base/container_files/httpd/rabbitmq.conf b/base/container_files/httpd/rabbitmq.conf new file mode 100644 index 0000000..66bb5b6 --- /dev/null +++ b/base/container_files/httpd/rabbitmq.conf @@ -0,0 +1,16 @@ + ProxyRequests Off + ProxyPreserveHost On + + + Order deny,allow + Allow from all + + + AllowEncodedSlashes NoDecode + ProxyPass /rabbitmq/ http://rabbitmq:15672/ nocanon + ProxyPassReverse /rabbitmq/ http://rabbitmq:15672/ + + + Order allow,deny + Allow from all + diff --git a/base/container_files/var-www-html/index.html b/base/container_files/var-www-html/index.html new file mode 100644 index 0000000..b1a37dc --- /dev/null +++ b/base/container_files/var-www-html/index.html @@ -0,0 +1,94 @@ + + + +GTE jump page + + + +

GTE jump page

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameLinkCredentialsDescription
Grouperhttps://localhost:8443/grouper/Admin: banderson / password
+ Civilian: jsmith / password
Grouper UI application
Database managerhttps://localhost:8443/phpmyadmin/root / <no password>Phpmyadmin Mysql database manager
LDAP managerhttps://localhost:8443/phpldapadmin/username: cn=root,dc=internet2,dc=edu
password: password
Phpldapadmin LDAP administration
Messaging managerhttps://localhost:8443/rabbitmq/username: guest
password: guest
Rabbitmq messaging administration
Shibboleth attributeshttps://localhost:8443/appSimple screen to show login state
Wikihttps://spaces.at.internet2.edu/display/Grouper/Grouper+Training+EnvironmentDocumentation and more links
SlidesLinked from slack "pin"
+ + \ No newline at end of file diff --git a/gte b/gte index cbe05b6..16f6d77 100755 --- a/gte +++ b/gte @@ -2,16 +2,28 @@ if [ -z "$1" ] then - docker images tier/gte - exit 0 + #docker images tier/gte + echo "Pass in which gte environment to spin up:" + 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) + i=${i::${#i}-7} + echo $i + done + exit 1 fi -docker stop rabbitmq 2> /dev/null -docker rm rabbitmq 2> /dev/null +# 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 + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" $DIR/start-rabbitmq.sh -docker stop "$1" 2> /dev/null -docker rm "$1" 2> /dev/null -docker run -d -p 80:80 -p 389:389 -p 8443:443 -p 3306:3306 \ - --link rabbitmq:rabbitmq --name $1 tier/gte:"$1"-202006 + +# lets see which + +#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 diff --git a/gte-gsh b/gte-gsh index b359970..36df7b6 100755 --- a/gte-gsh +++ b/gte-gsh @@ -1,9 +1,8 @@ #! /bin/bash -if [ -z "$1" ] +if [ ! -z "$1" ] then - docker ps --format "{{.Names}} {{.Image}} {{.Status}}" - exit 0 + echo "Do not pass in an argument: $1" fi - -docker exec -it -u tomcat "$1" /opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh 2> /dev/null +label=$( docker ps -a | grep 'tier/gte' | awk '{print $1}' ) +docker exec -it -u tomcat "$label" /opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh 2> /dev/null diff --git a/gte-logs b/gte-logs new file mode 100755 index 0000000..63ee0f3 --- /dev/null +++ b/gte-logs @@ -0,0 +1,9 @@ +#! /bin/bash + +if [ ! -z "$1" ] + then + echo "Do not pass in an argument: $1" +fi +label=$( docker ps -a | grep 'tier/gte' | awk '{print $1}' ) + +docker logs -f "$label" diff --git a/gte-shell b/gte-shell index 28d01c8..0ad8ad1 100755 --- a/gte-shell +++ b/gte-shell @@ -1,9 +1,9 @@ #! /bin/bash -if [ -z "$1" ] +if [ ! -z "$1" ] then - docker ps --format "{{.Names}} {{.Image}} {{.Status}}" - exit 0 + echo "Do not pass in an argument: $1" fi +label=$( docker ps -a | grep 'tier/gte' | awk '{print $1}' ) -docker exec -it "$1" /bin/bash 2> /dev/null +docker exec -it "$label" /bin/bash 2> /dev/null