Skip to content

201911 #25

Merged
merged 104 commits into from Jan 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
52dd6e1
Update Jenkinsfile
chubing Apr 19, 2019
67961e2
Update common.bash
chubing Apr 19, 2019
f323fbf
Update Jenkinsfile
chubing Apr 19, 2019
9497c39
Update manualBuild.sh
chubing Apr 19, 2019
7729514
Update Dockerfile
chubing Apr 19, 2019
39aef68
Update Jenkinsfile
chubing Apr 19, 2019
97305d6
Update Jenkinsfile
chubing Apr 19, 2019
a442729
Update manualBuild.sh
chubing Apr 19, 2019
97fc4a9
fixed context for oddball builds. paths will stay the same.
wgthom Apr 20, 2019
2dc9ad8
added gte tag to base
wgthom Apr 20, 2019
22f216b
fixed tagging scheme for image builds
wgthom Apr 20, 2019
d53ec91
fixed typo
wgthom Apr 20, 2019
dc720ba
added version tag
wgthom Apr 20, 2019
acd82d5
added version tag
wgthom Apr 20, 2019
4fbf26a
Update Dockerfile
wgthom Apr 20, 2019
2d75fc1
Create buildVersion.sh
wgthom Apr 20, 2019
41162de
updated 101 build to use VERSION_TAG
wgthom Apr 20, 2019
26b8dde
updated to use VERSION_TAG
wgthom Apr 20, 2019
6076c4d
updated to use VERSION_TAG
wgthom Apr 20, 2019
14cdb62
updated to use VERSION_TAG
wgthom Apr 20, 2019
d06a8ed
added VERSION_TAG to jenkins build
wgthom Apr 20, 2019
05e30ea
Update manualBuild.sh
wgthom Apr 20, 2019
1c99a6c
Update Jenkinsfile
wgthom Apr 20, 2019
dd934df
add VERSION_TAG to rest of build
wgthom Apr 20, 2019
40d0ec6
Update Jenkinsfile
wgthom Apr 20, 2019
9326941
Update buildVersion.sh
wgthom Apr 20, 2019
f0a55ed
Update Jenkinsfile
wgthom Apr 23, 2019
d463a7d
updated USERTOKEN
wgthom Apr 23, 2019
d8d92ac
Update README
dima767 Apr 23, 2019
bcb35c2
Update to tier shib-idp 3.4 immage wip
dima767 Apr 23, 2019
3820f6d
polishing
dima767 Apr 24, 2019
7e1c4f2
Merge pull request #13 from docker/201906-shib-upgrade
wgthom Apr 26, 2019
4957de7
Reworked readme
wgthom Apr 26, 2019
387d0e0
markdown updates
wgthom Apr 26, 2019
3e3c897
minor updates
wgthom Apr 26, 2019
91d1ffa
polish
wgthom Apr 26, 2019
83a5bd3
minor update
wgthom Apr 26, 2019
bd00217
minor update
wgthom Apr 27, 2019
f41a015
ignore spell check
wgthom Apr 27, 2019
38bcfc9
spelling
wgthom Apr 27, 2019
4bd952c
minor update
wgthom Apr 27, 2019
b188372
disable docker HEALTHCHECK
wgthom Apr 27, 2019
9a9ba2d
Merge branch '201906' of https://github.internet2.edu/docker/grouper_…
wgthom Apr 27, 2019
d9c6ad7
ignore .vscode
wgthom Apr 27, 2019
eb28c50
updated pspng config to match new app template
wgthom May 23, 2019
e355a46
initial docs import
wgthom May 29, 2019
2622d85
ignore build
wgthom May 29, 2019
5ec39bf
Merge branch '201906' of https://github.internet2.edu/docker/grouper_…
wgthom May 29, 2019
3cbe7e5
content added to index.rst
wgthom May 29, 2019
7b7bb06
moved ref and basis groups up to 201.1.1
wgthom May 30, 2019
2893834
rabbitmq start script
wgthom May 30, 2019
cb58886
content updates for 201
wgthom May 30, 2019
f1e39d8
gte command
wgthom May 30, 2019
d74239e
Merge pull request #16 from docker/201906-201-updates
wgthom May 30, 2019
03f891f
fixed docker image tag
wgthom May 30, 2019
0a5206b
added ref and basis tags to class groups
wgthom May 30, 2019
698c393
typo fix
wgthom May 30, 2019
82a7cb3
updated content for 2.1.2
wgthom May 31, 2019
6b9c6d9
updated gte for 201.2
wgthom May 31, 2019
58e9a1f
Merge branch '201906-201-updates' of https://github.internet2.edu/doc…
wgthom May 31, 2019
14448df
added gte version folders
wgthom May 31, 2019
ef92a1f
content update for 201.3
wgthom May 31, 2019
9ef07c2
added gte version folder
wgthom May 31, 2019
7bb5970
gte update for 201.3
wgthom May 31, 2019
0535d6c
Merge pull request #17 from docker/201906-201-updates
wgthom May 31, 2019
15eadaa
update headings
wgthom Jun 1, 2019
b2a62bf
content and gte updates for 201.4
wgthom Jun 1, 2019
1b6e586
Merge pull request #18 from docker/201906-201-updates
wgthom Jun 1, 2019
a934c58
content and gte updates for 201.5
wgthom Jun 2, 2019
df4b2b5
Merge pull request #19 from docker/201906-201-updates
wgthom Jun 2, 2019
604dde4
401.1 updates WIP
wgthom Jun 3, 2019
686644c
401 updates
wgthom Jun 6, 2019
8c80828
updates for 401 gte
wgthom Jun 6, 2019
db80bcc
Merge pull request #20 from docker/201906-201-updates
wgthom Jun 6, 2019
5b7d16c
content and gte updates for 401.2
wgthom Jun 7, 2019
6241645
Merge pull request #21 from docker/201906-201-updates
wgthom Jun 7, 2019
95c7d3b
401.3 content and gte updates
wgthom Jun 8, 2019
cd4cb48
401.5.7 updates
wgthom Jun 8, 2019
6cefbad
updates for 401.3
wgthom Jun 8, 2019
2adc619
updates for 401.3
wgthom Jun 8, 2019
59f9271
Merge pull request #22 from docker/201906-201-updates
wgthom Jun 8, 2019
01335e7
gte and content updates for 401.4
wgthom Jun 8, 2019
42680ba
Merge pull request #23 from docker/201906-201-updates
wgthom Jun 8, 2019
6a86074
gte helper scripts
wgthom Jun 9, 2019
fdf8fec
shib idp branding
wgthom Jun 9, 2019
3df83f2
updates for 201.1 and 201.2
wgthom Jun 10, 2019
fa3e0d9
updates for 201.3
wgthom Jun 10, 2019
2538c22
updates for 201.4
wgthom Jun 10, 2019
88437a0
201.5 updates
wgthom Jun 10, 2019
cb1ff40
404.4 update
wgthom Jun 10, 2019
2b188dd
Merge pull request #24 from docker/201906-201-updates
wgthom Jun 10, 2019
caf0648
cleaned up readme a bit
wgthom Jun 10, 2019
a98f774
readme fix
wgthom Jun 10, 2019
dc80644
added gdg folders, groups, and subjects to 101.1.1
wgthom Jun 10, 2019
31e9d88
added gdg folders, ref/basis groups, subjects
wgthom Jun 10, 2019
7eb4a39
grouper version at 2.4.0-a47-u25-w5-p6-20190611
wgthom Jun 12, 2019
a5c7fdb
grouper 2.4a64 101/201 updates
wgthom Jun 13, 2019
9c33823
updates for 401
wgthom Jun 13, 2019
7d70be3
only build setup and end for each module
wgthom Jun 13, 2019
80b9a9f
update for 201911 build
wgthom Oct 5, 2019
aa25e9e
updates for 201911 build
wgthom Oct 5, 2019
7f58304
update to grouper:latest and fix mysql install
wgthom Oct 9, 2019
2741016
enable config in ui for any IP address
wgthom Oct 29, 2019
9314d1f
grouper build for temple
wgthom Nov 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
@@ -1,3 +1,7 @@
localManualBuild.sh
runContainer.sh
tmp
tmp
.vscode/spellright.dict
.vscode/settings.json
.DS_Store
_build
73 changes: 34 additions & 39 deletions Jenkinsfile
Expand Up @@ -9,15 +9,15 @@


/** Each class has a set of modules with a set of steps.
* For examples, ex101.1.1, ex101.1.2, ex101.1.3, ex101.2.1, ex101.2.2, etc.
* Each step is an image.
* The exceriseSets has the class name and an array of the number of steps for module.
* For examples, 101.1.1, 101.1.2, 101.1.3, 101.2.1, 101.2.2, etc.
* Each step is an associated docker image.
* exceriseSets has the class name and an array of the number of steps for module.
**/
exceriseSets = [
// 'ex101' : [3, 2],
'ex201' : [1, 1, 1, 1, 1],
// 'ex301' : [2, 2, 5, 6], manually built with a single image
'ex401' : [6, 9, 7, 1]
// '101' : [3, 2],
'201' : [1, 1, 1, 1, 1],
// '301' : [2, 2, 5, 6], manually built with a single image
'401' : [1, 1, 1, 1]
]

pipeline {
Expand All @@ -33,22 +33,21 @@ pipeline {
script {
maintainer = maintain()
imagename = imagename()
/* if(env.BRANCH_NAME == "master") {
if(env.BRANCH_NAME == "master") {
tag = "latest"
} else {
tag = env.BRANCH_NAME
}
*/

if(!imagename){
echo "You must define an imagename in common.bash"
currentBuild.result = 'FAILURE'
}
sh 'mkdir -p bin'
sh 'mkdir -p tmp'
sh 'mkdir -p tmp && mkdir -p bin'
dir('tmp'){
git([ url: "https://github.internet2.edu/docker/util.git", credentialsId: "jenkins-github-access-token" ])
sh 'ls'
sh 'mv bin/* ../bin/.'
sh 'rm -rf ../bin/*'
sh 'mv ./bin/* ../bin/.'
}
}
}
Expand All @@ -71,8 +70,8 @@ pipeline {
steps {
script {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-${maintainer}") {
def baseImg = docker.build("${maintainer}/${imagename}:base", "--no-cache --pull base")
baseImg.push("base")
def baseImg = docker.build("${maintainer}/${imagename}:base-${tag}", "--no-cache --pull base")
baseImg.push("base-${tag}")
}
}
}
Expand All @@ -84,37 +83,33 @@ pipeline {
def tagSet = generateTagSet()
def builds = build(tagSet)

if(env.BRANCH_NAME == "master") {
if(env.BRANCH_NAME == "201911") {
//builds.each{ k, v -> echo ("push ${k}") } //for local testing
builds.each{ k, v -> v.push(k) }

def build = docker.build("${maintainer}/${imagename}:101.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex101/ex101.1.1")
build.push("101.1.1-${tag}")

} else {
echo 'skipping push, since the SCM branch is not master'
}
}
}
}
}
stage('Build Oddballs') {
steps {
script {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-${maintainer}") {
def baseImg = docker.build("${maintainer}/${imagename}:ex101.1.1", "--no-cache --pull ex101/ex101.1.1")
baseImg.push("ex101.1.1")
build = docker.build("${maintainer}/${imagename}:211.1.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex211/ex211.1.1")
build.push("211.1.1-${tag}")

baseImg = docker.build("${maintainer}/${imagename}:ex211.1.1", "--no-cache --pull ex211/ex211.1.1")
baseImg.push("ex211.1.1")
build = docker.build("${maintainer}/${imagename}:301.4.1-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} ex301/ex301.4.1")
build.push("301.4.1-${tag}")

build = docker.build("${maintainer}/${imagename}:full_demo-${tag}", "--no-cache --pull --build-arg VERSION_TAG=${tag} full-demo")
build.push("full_demo-${tag}")

baseImg = docker.build("${maintainer}/${imagename}:ex301.4.1", "--no-cache --pull ex301/ex301.4.1")
baseImg.push("ex301.4.1")
} else {
echo 'not building images, since the SCM branch is not 201911'
}
}
}
}
}
stage('Notify') {
steps{
echo "$maintainer"
slackSend color: 'good', message: "${maintainer}/${imagename} set pushed to DockerHub"
slackSend color: 'good', message: "${maintainer}/${imagename} version ${tag} pushed to DockerHub"
}
}
}
Expand All @@ -124,7 +119,7 @@ pipeline {
}
failure {
// slackSend color: 'good', message: "Build failed"
handleError("BUILD ERROR: There was a problem building ${maintainer}/${imagename}:${tag}.")
handleError("BUILD ERROR: There was a problem building ${maintainer}/${imagename} version ${tag}.")
}
}
}
Expand Down Expand Up @@ -159,10 +154,10 @@ def generateTagSet() {
def build(tagSet) {
def builds = [:]

for (String tag : tagSet) {
def baseImg = docker.build("${maintainer}/${imagename}:${tag}", "--no-cache ${tag.tokenize('.')[0]}/${tag}")
echo "built ${tag}; adding to the push queue"
builds.put(tag, baseImg);
for (String tags : tagSet) {
def baseImg = docker.build("${maintainer}/${imagename}:${tags}-${tag}", "--no-cache --build-arg VERSION_TAG=${tag} ex${tags.tokenize('.')[0]}/ex${tags}")
echo "built ${tags}-${tag}; adding to the push queue"
builds.put("${tags}-${tag}", baseImg);
}

builds
Expand Down
131 changes: 53 additions & 78 deletions README.md
@@ -1,97 +1,72 @@
# grouper_training
A set of Grouper images that are used during I2/TIER training.
# Grouper Training Environment

# Images
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-201906. The docker command
to run the image for the 101 course is:

## Full Demo
``` 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-201906

```
docker run -d -p 389:389 -p 8443:443 -p 3306:3306 \
--name grouper-demo tier/grouper-training-env:full_demo

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
```

Browse to `https://localhost/grouper`
Once the container is ready, browse to <https://localhost:8443/grouper> to access the Grouper UI and log in with one of the following:

## Exercises
- 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 gte tier/grouper-training-env:exXXX
--name {coures}.{exercise}.{step} tier/gte:{VERSION_TAG}
```

Current tags:
- ex101.1.1
- ex201.1.1
- ex201.1.end
- ex201.2.1
- ex201.2.end
- ex201.3.1
- ex201.3.end
- ex201.4.1
- ex201.4.end
- ex201.5.1
- ex201.5.end
- ex211.1.1
- ex301.4.1
- ex401.1.1
- ex401.1.2
- ex401.1.3
- ex401.1.4
- ex401.1.5
- ex401.1.6
- ex401.1.end
- ex401.2.1
- ex401.2.2
- ex401.2.3
- ex401.2.4
- ex401.2.5
- ex401.2.6
- ex401.2.7
- ex401.2.8
- ex401.2.9
- ex401.2.end
- ex401.3.1
- ex401.3.2
- ex401.3.3
- ex401.3.4
- ex401.3.5
- ex401.3.6
- ex401.3.7
- ex401.3.end
- ex401.4.1
- ex401.4.end

Browse to `https://localhost:8443/grouper` for Grouper. There is also an app that dumps the SP user attributes at `https://localhost:8443/app`.

# Users
- `banderson`/`password`: Grouper Administrator
- `jsmith`/`password`: standard user
- additional users can be found in <https://github.internet2.edu/docker/grouper_training/blob/master/base/container_files/seed-data/users.ldif#L56>

# Help apps

- phpMyAdmin - https://localhost:8443/phpmyadmin/ - username: `root`, password: (blank)
- phpLDAPadmin - https://localhost:8443/phpldapadmin/ - username: `cn=root,dc=internet2,dc=edu`, password: `password`


# Course specific notes

## Notes for the exercises in 401

Before connecting to your SSH server, be sure to port forward a local port to the server's port `15672` as well.

These exercises require Rabbit MQ to be started. Before starting the ex401 Grouper container, run:
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-201906
```
docker run -d -p 15672:15672 --env RABBITMQ_NODENAME=docker-rabbit --hostname rabbitmq --name=rabbitmq rabbitmq:management

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 a queue named `grouper`.

``` bash
docker run -d -p 15672:15672 --env RABBITMQ_NODENAME=docker-rabbit \
--hostname rabbitmq --name=rabbitmq rabbitmq:management
```

Now browse to http://localhost:15672/ and login with `guest`/`guest`, and create a new queue named `grouper`.
Then browse to <http://localhost:15672/> and login with `guest`/`guest`, and create a new queue named `grouper`.

Now start the ex401 Grouper with this slightly modified command:
Finally, start the 401 series gte with this slightly modified command:

```bash
``` bash
docker run -d -p 389:389 -p 8443:443 -p 3306:3306 \
--link rabbitmq:rabbitmq --name gte tier/grouper-training-env:exXXX

--link rabbitmq:rabbitmq --name {coures}.{exercise}.{step} tier/gte:{VERSION_TAG}
```
17 changes: 11 additions & 6 deletions base/Dockerfile
@@ -1,6 +1,10 @@
FROM unicon/shibboleth-idp:3.3.3 as idp
FROM tier/shib-idp:3.4.3_20190201 as idp

FROM tier/grouper:2.4.0-a2-u0-w0-p0-test
# Grouper version for the entire GTE
FROM tier/grouper:2.4.0-a80-u51-w10-p11-20191031-rc1

# Disable docker HEALTHCHECK inherited from tier/shib-sp
HEALTHCHECK NONE

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
Expand All @@ -9,15 +13,15 @@ LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
ImageOS=centos7

ENV ENV=training \
USERTOKEN=3.2.0_base
USERTOKEN=gte-base

RUN yum install -y epel-release \
&& yum install -y emacs mariadb mariadb-server nano openldap openldap-clients openldap-servers phpMyAdmin phpldapadmin \
&& yum clean all

COPY container_files/seed-data/ /seed-data/

RUN mysql_install_db \
RUN mysql_install_db --force \
&& chown -R mysql:mysql /var/lib/mysql/ \
&& sed -i 's/^\(bind-address\s.*\)/# \1/' /etc/my.cnf \
&& sed -i 's/^\(log_error\s.*\)/# \1/' /etc/my.cnf \
Expand Down Expand Up @@ -79,8 +83,9 @@ COPY container_files/var-www-html/ /var/www/html/
RUN cp /opt/tier-support/grouper.xml /opt/tier-support/grouper-ws.xml /opt/tomcat/conf/Catalina/localhost/ \
&& chown -R tomcat /opt/shibboleth-idp/ \
&& chmod -R 700 /opt/shibboleth-idp/ \
&& chmod +rx /var/www/html/app/index.py
&& chmod +rx /var/www/html/app/index.py \
&& /opt/shibboleth-idp/bin/build.sh

EXPOSE 389 3306 4443

CMD ["grouper"]
CMD ["grouper"]
5 changes: 5 additions & 0 deletions base/container_files/conf/grouper-ui.properties
@@ -0,0 +1,5 @@
# The configuration editor in grouper is very sensitive. If you can only allow certain source IP addresses
# it will add another layer of security. Otherwise allow 0.0.0.0/0 and all will be allowed
# If this configuration item is not filled in, then none are allowed
# you can configure multiple CIDR addresses or networks comma separated, e.g. 1.2.3.4/32, 2.3.4.5/24
grouperUi.configurationEditor.sourceIpAddresses = 0.0.0.0/0
30 changes: 30 additions & 0 deletions base/container_files/conf/grouper.properties
Expand Up @@ -23,3 +23,33 @@ groups.wheel.group = etc:sysadmingroup
# Used to allow Include Exclude groups
grouperIncludeExclude.use = true
grouperIncludeExclude.requireGroups.use = true

##################################
## Lockout groups. Could be used for other things, but used for policy group templates at least
## if there is no allowed group, then anyone could use it
##################################

# group name of a lockout group
# {valueType: "group", regex: "^grouper\\.lockoutGroup\\.name\\.\\d+$"}
grouper.lockoutGroup.name.0 = ref:iam:global_deny

# allowed to use this lockout group. If not configured, anyone could use
# {valueType: "group", regex: "^grouper\\.lockoutGroup\\.allowedToUse\\.\\d+$"}
# grouper.lockoutGroup.allowedToUse.0 = ref:lockoutCanUse

##################################
## Require groups. Could be used for other things, but used for policy group templates at least
## if there is no allowed group, then anyone could use it
##################################

# group name of a require group
# {valueType: "group", regex: "^grouper\\.requireGroup\\.name\\.\\d+$"}
grouper.requireGroup.name.0 = ref:iam:active

# group name of a require group
# {valueType: "group", regex: "^grouper\\.requireGroup\\.name\\.\\d+$"}
grouper.requireGroup.name.0 = ref:employee:fac_staff

# allowed to use this require group. If not configured, anyone could use
# {valueType: "group", regex: "^grouper\\.lockoutGroup\\.requireGroup\\.\\d+$"}
# grouper.requireGroup.allowedToUse.0 = ref:activeCanUse
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,6 @@
# You can define message properties here to override messages defined in
# system/messages/ or to add your own messages.
idp.title = InCommon Trusted Access Platform - Grouper Training Environment
idp.logo = /images/Grouper_204px.png
idp.logo.alt-text = Grouper
idp.footer = InCommon Trusted Access Platform - Grouper Training Environment
@@ -1,4 +1,4 @@
<Context docBase="/opt/shibboleth-idp/webapp"
<Context docBase="/opt/shibboleth-idp/war/idp.war"
privileged="true"
antiResourceLocking="false"
path="/idp">
Expand Down