Child pages
  • Grouper Training Environment - text to copy and paste - 311.2
Skip to end of metadata
Go to start of metadata

Remove current running container

docker ps -a
docker rm -f 101.1.1

Work in a directory that can be easily cleaned up

mkdir quickstart
cd quickstart

Start the quickstart

docker run --detach --name grouper-qs \
  --publish 8443:443 -e GROUPER_MORPHSTRING_ENCRYPT_KEY=abcdefg12345dontUseThis \
  -e GROUPERSYSTEM_QUICKSTART_PASS=pass i2incommon/grouper:2.5.35 quickstart

Stop the quick start (and remove the container)

docker rm -f grouper-qs

Copy WS client out of container

docker cp grouper-qs:/opt/grouper/grouperWebapp/WEB-INF/lib/grouperClient-2.5.35.jar .

Edit config file for WS client

nano grouper.client.properties

Contents of config file

############
grouperClient.webService.url = https://localhost:8443/grouper-ws/servicesRest
grouperClient.webService.login = GrouperSystem
grouperClient.webService.password = pass 
# turn off SSL until a real SSL certificate is installed
# NOTE, THIS IS NOT GOOD SECURITY AND IS FOR THE QUICK START ONLY!
grouperClient.https.customSocketFactory = edu.internet2.middleware.grouperClient.ssl.EasySslSocketFactory
############

Install Java and some components

sudo yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel wget mlocate
sudo updatedb
export JAVA_HOME=/usr/lib/jvm/java-1.8.0
export PATH=$JAVA_HOME/bin:$PATH
java -version

Get my IP address

ifconfig

Call WS

java -jar grouperClient-2.5.35.jar --operation=getSubjectsWs --subjectIds=GrouperSystem --debug=true

Verify image hash

docker image inspect i2incommon/grouper:2.5.35 | grep i2incommon/grouper@sha256

Make command line script

nano grouperQsDockerRun.sh

Command line script contents

#!/bin/bash
docker run --detach --name grouper-qs \
  --publish 8443:443 -e GROUPER_MORPHSTRING_ENCRYPT_KEY=abcdefg12345dontUseThis \
  -e GROUPERSYSTEM_QUICKSTART_PASS=pass i2incommon/grouper:2.5.35 quickstart

Make executable

chmod +x grouperQsDockerRun.sh

Mount database from host

mkdir hsqldb
chmod 777 hsqldb
pwd
vi grouperQsDockerRun.sh

Database mount docker snippet

nano grouperQsDockerRun.sh

--mount type=bind,src=[dir]/hsqldb,dst=/opt/hsqldb

This is what script should look like

#!/bin/bash
docker run --detach --name grouper-qs --mount type=bind,src=/home/student/quickstart/hsqldb,dst=/opt/hsqldb \
  --publish 8443:443 -e GROUPER_MORPHSTRING_ENCRYPT_KEY=abcdefg12345dontUseThis \
  -e GROUPERSYSTEM_QUICKSTART_PASS=pass i2incommon/grouper:2.5.35 quickstart

Cleanup

docker rm -f grouper-qs
cd
rm -rf quickstart 
  • No labels