From 31e9d88a027993fa7955dab0ee2a9298ae38c5fa Mon Sep 17 00:00:00 2001 From: "William G. Thompson, Jr" Date: Mon, 10 Jun 2019 19:46:35 -0400 Subject: [PATCH] added gdg folders, ref/basis groups, subjects --- ex211/ex211.1.1/Dockerfile | 18 +++++++++++++++--- .../container_files/seed-data/bootstrap.gsh | 3 +++ .../container_files/seed-data/sisData.sql | 0 .../container_files/seed-data/users.ldif | 0 ex301/ex301.4.1/Dockerfile | 17 +++++++++++++++-- .../container_files/seed-data/bootstrap.gsh | 3 +++ .../container_files/seed-data/sisData.sql | 0 .../container_files/seed-data/users.ldif | 0 8 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 ex211/ex211.1.1/container_files/seed-data/bootstrap.gsh create mode 100644 ex211/ex211.1.1/container_files/seed-data/sisData.sql create mode 100644 ex211/ex211.1.1/container_files/seed-data/users.ldif create mode 100644 ex301/ex301.4.1/container_files/seed-data/bootstrap.gsh create mode 100644 ex301/ex301.4.1/container_files/seed-data/sisData.sql create mode 100644 ex301/ex301.4.1/container_files/seed-data/users.ldif diff --git a/ex211/ex211.1.1/Dockerfile b/ex211/ex211.1.1/Dockerfile index b71bc6f..fb49083 100644 --- a/ex211/ex211.1.1/Dockerfile +++ b/ex211/ex211.1.1/Dockerfile @@ -1,6 +1,5 @@ ARG VERSION_TAG -FROM tier/gte:base-$VERSION_TAG - +FROM tier/gte:101.1.1-$VERSION_TAG LABEL author="tier-packaging@internet2.edu " \ Vendor="TIER" \ @@ -10,4 +9,17 @@ LABEL author="tier-packaging@internet2.edu " \ ENV USERTOKEN=gte-211.1.1 -# Nothing else needed for this exercise. Start empty and end empty +COPY container_files/seed-data/ /seed-data/ + +RUN (/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 diff --git a/ex211/ex211.1.1/container_files/seed-data/bootstrap.gsh b/ex211/ex211.1.1/container_files/seed-data/bootstrap.gsh new file mode 100644 index 0000000..631b36d --- /dev/null +++ b/ex211/ex211.1.1/container_files/seed-data/bootstrap.gsh @@ -0,0 +1,3 @@ +gs = GrouperSession.startRootSession(); +delStem("101.1.1") +addRootStem("211.1.1", "211.1.1") diff --git a/ex211/ex211.1.1/container_files/seed-data/sisData.sql b/ex211/ex211.1.1/container_files/seed-data/sisData.sql new file mode 100644 index 0000000..e69de29 diff --git a/ex211/ex211.1.1/container_files/seed-data/users.ldif b/ex211/ex211.1.1/container_files/seed-data/users.ldif new file mode 100644 index 0000000..e69de29 diff --git a/ex301/ex301.4.1/Dockerfile b/ex301/ex301.4.1/Dockerfile index 6e0ec04..7d98536 100644 --- a/ex301/ex301.4.1/Dockerfile +++ b/ex301/ex301.4.1/Dockerfile @@ -1,5 +1,5 @@ ARG VERSION_TAG -FROM tier/gte:base-$VERSION_TAG +FROM tier/gte:101.1.1-$VERSION_TAG LABEL author="tier-packaging@internet2.edu " \ Vendor="TIER" \ @@ -9,4 +9,17 @@ LABEL author="tier-packaging@internet2.edu " \ ENV USERTOKEN=gte-301.4.1 -# Nothing else needed for this exercise. Start empty and end empty +COPY container_files/seed-data/ /seed-data/ + +RUN (/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 diff --git a/ex301/ex301.4.1/container_files/seed-data/bootstrap.gsh b/ex301/ex301.4.1/container_files/seed-data/bootstrap.gsh new file mode 100644 index 0000000..5ecfa42 --- /dev/null +++ b/ex301/ex301.4.1/container_files/seed-data/bootstrap.gsh @@ -0,0 +1,3 @@ +gs = GrouperSession.startRootSession(); +delStem("101.1.1") +addRootStem("301.4.1", "301.4.1") diff --git a/ex301/ex301.4.1/container_files/seed-data/sisData.sql b/ex301/ex301.4.1/container_files/seed-data/sisData.sql new file mode 100644 index 0000000..e69de29 diff --git a/ex301/ex301.4.1/container_files/seed-data/users.ldif b/ex301/ex301.4.1/container_files/seed-data/users.ldif new file mode 100644 index 0000000..e69de29