Skip to content

Commit

Permalink
Basic build for 401.2.4-2401.2.9 completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Gasper committed Aug 30, 2018
1 parent 1124852 commit 843de43
Show file tree
Hide file tree
Showing 26 changed files with 204 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ex401/ex401.2.2/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ gs = GrouperSession.startRootSession();

addStem("app", "mfa", "mfa");
addGroup("app:mfa", "mfa_enabled", "mfa_enabled");
addGroup("app:mfa", "mfa_allow", "mfa_allow");
addGroup("app:mfa", "mfa_deny", "mfa_deny");
addComposite("app:mfa:mfa_enabled", CompositeType.COMPLEMENT, "app:mfa:mfa_allow", "app:mfa:mfa_deny");
addGroup("app:mfa", "mfa_enabled_allow", "mfa_enabled_allow");
addGroup("app:mfa", "mfa_enabled_deny", "mf_enabled_deny");
addComposite("app:mfa:mfa_enabled", CompositeType.COMPLEMENT, "app:mfa:mfa_enabled_allow", "app:mfa:mfa_enabled_deny");

addStem("app:mfa", "ref", "ref");
addGroup("app:mfa:ref", "pilot", "pilot");

addMember("app:mfa:mfa_allow", "app:mfa:ref:pilot");
addMember("app:mfa:mfa_enabled_allow", "app:mfa:ref:pilot");
26 changes: 26 additions & 0 deletions ex401/ex401.2.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM tier/grouper-training-env:ex401.2.4

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper Training" \
ImageName=$imagename \
ImageOS=centos7

ENV USERTOKEN=ex401.2.5

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

RUN . /usr/local/bin/library.sh \
&& prepConf; \
(/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
(mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 3; done; \
cd /opt/grouper/grouper.apiBinary \
&& ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \
&& mysql grouper < /seed-data/sisData.sql \
&& bin/gsh /seed-data/bootstrap.gsh \
&& pkill -HUP slapd \
&& while curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to stop; sleep 1; done; \
pkill -u mysql mysqld \
&& while curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to stop; sleep 1; done
10 changes: 10 additions & 0 deletions ex401/ex401.2.5/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
gs = GrouperSession.startRootSession();

addStem("ref", "dept", "dept");
addGroup("ref:dept", "its", "its");

addGroup("app:mfa:ref", "mfa_bypass", "mfa_bypass");
addGroup("app:mfa:ref", "athletics", "athletics");

addMember("app:mfa:mfa_enabled_deny", "app:mfa:ref:mfa_bypass");
addMember("app:mfa:mfa_enabled_allow", "app:mfa:ref:athletics");
Empty file.
Empty file.
26 changes: 26 additions & 0 deletions ex401/ex401.2.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM tier/grouper-training-env:ex401.2.5

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper Training" \
ImageName=$imagename \
ImageOS=centos7

ENV USERTOKEN=ex401.2.6

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

RUN . /usr/local/bin/library.sh \
&& prepConf; \
(/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
(mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 3; done; \
cd /opt/grouper/grouper.apiBinary \
&& ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \
&& mysql grouper < /seed-data/sisData.sql \
&& bin/gsh /seed-data/bootstrap.gsh \
&& pkill -HUP slapd \
&& while curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to stop; sleep 1; done; \
pkill -u mysql mysqld \
&& while curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to stop; sleep 1; done
2 changes: 2 additions & 0 deletions ex401/ex401.2.6/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gs = GrouperSession.startRootSession();

Empty file.
Empty file.
26 changes: 26 additions & 0 deletions ex401/ex401.2.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM tier/grouper-training-env:ex401.2.6

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper Training" \
ImageName=$imagename \
ImageOS=centos7

ENV USERTOKEN=ex401.2.7

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

RUN . /usr/local/bin/library.sh \
&& prepConf; \
(/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
(mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 3; done; \
cd /opt/grouper/grouper.apiBinary \
&& ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \
&& mysql grouper < /seed-data/sisData.sql \
&& bin/gsh /seed-data/bootstrap.gsh \
&& pkill -HUP slapd \
&& while curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to stop; sleep 1; done; \
pkill -u mysql mysqld \
&& while curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to stop; sleep 1; done
3 changes: 3 additions & 0 deletions ex401/ex401.2.7/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gs = GrouperSession.startRootSession();

addGroup("app:mfa:ref", "BannerUsersMinusFaculty", "BannerUsersMinusFaculty");
Empty file.
Empty file.
26 changes: 26 additions & 0 deletions ex401/ex401.2.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM tier/grouper-training-env:ex401.2.7

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper Training" \
ImageName=$imagename \
ImageOS=centos7

ENV USERTOKEN=ex401.2.8

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

RUN . /usr/local/bin/library.sh \
&& prepConf; \
(/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
(mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 3; done; \
cd /opt/grouper/grouper.apiBinary \
&& ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \
&& mysql grouper < /seed-data/sisData.sql \
&& bin/gsh /seed-data/bootstrap.gsh \
&& pkill -HUP slapd \
&& while curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to stop; sleep 1; done; \
pkill -u mysql mysqld \
&& while curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to stop; sleep 1; done
20 changes: 20 additions & 0 deletions ex401/ex401.2.8/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
gs = GrouperSession.startRootSession();

addGroup("app:mfa", "mfa_required", "mfa_required");
addGroup("app:mfa:ref", "mfa_opt_in", "mfa_opt_in");
addMember("app:mfa:mfa_enabled_allow", "app:mfa:ref:mfa_opt_in");

addGroup("app:mfa:ref", "mfa_opt_in_access", "mfa_opt_in_access");
addGroup("app:mfa:ref", "mfa_opt_in_access_allow", "mfa_opt_in_access_allow");
addGroup("app:mfa:ref", "mfa_opt_in_access_deny", "mfa_opt_in_access_deny");

addComposite("app:mfa:ref:mfa_opt_in_access", CompositeType.COMPLEMENT, "app:mfa:ref:mfa_opt_in_access_allow", "app:mfa:ref:mfa_opt_in_access_deny");

addMember("app:mfa:ref:mfa_opt_in_access_allow", "ref:faculty");
addMember("app:mfa:ref:mfa_opt_in_access_allow", "ref:staff");
addMember("app:mfa:ref:mfa_opt_in_access_allow", "ref:student");

addMember("app:mfa:ref:mfa_opt_in_access_deny", "app:mfa:mfa_required");

grantPriv("app:mfa:ref:mfa_opt_in", "app:mfa:ref:mfa_opt_in_access", AccessPrivilege.OPTIN);
grantPriv("app:mfa:ref:mfa_opt_in", "app:mfa:ref:mfa_opt_in_access", AccessPrivilege.OPTOUT);
Empty file.
Empty file.
26 changes: 26 additions & 0 deletions ex401/ex401.2.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM tier/grouper-training-env:ex401.2.8

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper Training" \
ImageName=$imagename \
ImageOS=centos7

ENV USERTOKEN=ex401.2.9

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

RUN . /usr/local/bin/library.sh \
&& prepConf; \
(/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
(mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 3; done; \
cd /opt/grouper/grouper.apiBinary \
&& ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \
&& mysql grouper < /seed-data/sisData.sql \
&& bin/gsh /seed-data/bootstrap.gsh \
&& pkill -HUP slapd \
&& while curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to stop; sleep 1; done; \
pkill -u mysql mysqld \
&& while curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to stop; sleep 1; done
1 change: 1 addition & 0 deletions ex401/ex401.2.9/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs = GrouperSession.startRootSession();
Empty file.
Empty file.
26 changes: 26 additions & 0 deletions ex401/ex401.2.end/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM tier/grouper-training-env:ex401.2.9

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper Training" \
ImageName=$imagename \
ImageOS=centos7

ENV USERTOKEN=ex401.2.end

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

RUN . /usr/local/bin/library.sh \
&& prepConf; \
(/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
(mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 3; done; \
cd /opt/grouper/grouper.apiBinary \
&& ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \
&& mysql grouper < /seed-data/sisData.sql \
&& bin/gsh /seed-data/bootstrap.gsh \
&& pkill -HUP slapd \
&& while curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to stop; sleep 1; done; \
pkill -u mysql mysqld \
&& while curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to stop; sleep 1; done
1 change: 1 addition & 0 deletions ex401/ex401.2.end/container_files/seed-data/bootstrap.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs = GrouperSession.startRootSession();
Empty file.
Empty file.
8 changes: 7 additions & 1 deletion manualBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ docker build --pull --tag=tier/grouper-training-env:base base/ \
&& docker build --tag=tier/grouper-training-env:ex401.2.1 ex401/ex401.2.1 \
&& docker build --tag=tier/grouper-training-env:ex401.2.2 ex401/ex401.2.2 \
&& docker build --tag=tier/grouper-training-env:ex401.2.3 ex401/ex401.2.3 \
&& docker build --tag=tier/grouper-training-env:ex401.2.4 ex401/ex401.2.4
&& docker build --tag=tier/grouper-training-env:ex401.2.4 ex401/ex401.2.4 \
&& docker build --tag=tier/grouper-training-env:ex401.2.5 ex401/ex401.2.5 \
&& docker build --tag=tier/grouper-training-env:ex401.2.6 ex401/ex401.2.6 \
&& docker build --tag=tier/grouper-training-env:ex401.2.7 ex401/ex401.2.7 \
&& docker build --tag=tier/grouper-training-env:ex401.2.8 ex401/ex401.2.8 \
&& docker build --tag=tier/grouper-training-env:ex401.2.9 ex401/ex401.2.9 \
&& docker build --tag=tier/grouper-training-env:ex401.2.end ex401/ex401.2.end

if [[ "$OSTYPE" == "darwin"* ]]; then
say build complete
Expand Down

0 comments on commit 843de43

Please sign in to comment.