Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
index page and commands
  • Loading branch information
mchyzer committed May 25, 2020
1 parent f2d3246 commit fffaf11
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 84 deletions.
69 changes: 2 additions & 67 deletions README.md
Expand Up @@ -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 <https://localhost:8443/grouper> 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 <https://localhost:8443/phpmyadmin/>
- username: `root`, password: (blank)
- phpLDAPadmin <https://localhost:8443/phpldapadmin/>
- username: `cn=root,dc=internet2,dc=edu`, password: `password`
- Shibboleth SP subject attributes <https://localhost:8443/app>

All of the gte image tags are published to <https://hub.docker.com/r/tier/gte>. 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:
<https://spaces.at.internet2.edu/display/Grouper/Grouper+Training+Environment>.

## 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 <http://localhost:15672/> 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 <https://spaces.at.internet2.edu/display/Grouper/Grouper+Training+Environment>
16 changes: 16 additions & 0 deletions base/container_files/httpd/rabbitmq.conf
@@ -0,0 +1,16 @@
ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

AllowEncodedSlashes NoDecode
ProxyPass /rabbitmq/ http://rabbitmq:15672/ nocanon
ProxyPassReverse /rabbitmq/ http://rabbitmq:15672/

<Location /rabbitmq/>
Order allow,deny
Allow from all
</Location>
94 changes: 94 additions & 0 deletions base/container_files/var-www-html/index.html
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<title>GTE jump page</title>
<style>
#myTable {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}

#myTable td, #myTable th {
border: 1px solid #ddd;
padding: 8px;
}

#myTable tr:nth-child(even){background-color: #f2f2f2;}

#myTable tr:hover {background-color: #ddd;}

#myTable th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
</head>
<body>
<h1>GTE jump page</h1>
<br /><br />
<table id="myTable">
<tr>
<th>Name</th>
<th>Link</th>
<th>Credentials</th>
<th>Description</th>
</tr>
<tr>
<td><a href="/grouper/">Grouper</a></td>
<td>https://localhost:8443/grouper/</td>
<td>Admin: banderson / password<br/>
Civilian: jsmith / password</td>
<td>Grouper UI application</td>
</tr>
<tr>
<td><a href="/phpmyadmin/">Database manager</a></td>
<td>https://localhost:8443/phpmyadmin/</td>
<td>root / &lt;no password&gt;</td>
<td>Phpmyadmin Mysql database manager</td>
</tr>
<tr>
<td><a href="/phpldapadmin/">LDAP manager</a></td>
<td>https://localhost:8443/phpldapadmin/</td>
<td>username: cn=root,dc=internet2,dc=edu<br />password: password</td>
<td>Phpldapadmin LDAP administration</td>
</tr>
<tr>
<td><a href="/rabbitmq/">Messaging manager</a></td>
<td>https://localhost:8443/rabbitmq/</td>
<td>username: guest<br />password: guest</td>
<td>Rabbitmq messaging administration</td>
</tr>
<tr>
<td><a href="/app">Shibboleth attributes</a></td>
<td>https://localhost:8443/app</td>
<td></td>
<td>Simple screen to show login state</td>
</tr>
<tr>
<td><a href="https://spaces.at.internet2.edu/display/Grouper/Grouper+Training+Environment">Wiki</a></td>
<td>https://spaces.at.internet2.edu/display/Grouper/Grouper+Training+Environment</td>
<td></td>
<td>Documentation and more links</td>
</tr>
<tr>
<td>Slides</td>
<td>Linked from slack "pin"</td>
<td></td>
<td></td>
</tr>

<!--
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
-->
</table>
</body>
</html>
28 changes: 20 additions & 8 deletions gte
Expand Up @@ -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

9 changes: 4 additions & 5 deletions 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
9 changes: 9 additions & 0 deletions 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"
8 changes: 4 additions & 4 deletions 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

0 comments on commit fffaf11

Please sign in to comment.