From 9af7bfe1dbb727402e92c1094d3efdb3606a70fc Mon Sep 17 00:00:00 2001 From: mchyzer Date: Sun, 17 May 2020 10:47:16 -0400 Subject: [PATCH] 2.5 upgrade tasks --- .../conf/grouper.hibernate.properties | 1 + .../container_files/conf/morphString.properties | 11 +++++++++++ docs/401/401.1.rst | 4 ++-- ex101/ex101.1.1/Dockerfile | 7 +++++-- .../container_files/morphString.properties | 11 +++++++++++ ex201/ex201.1.1/Dockerfile | 13 ++++++++----- .../container_files/morphString.properties | 11 +++++++++++ ex201/ex201.1.end/Dockerfile | 9 ++++++--- ex201/ex201.2.1/Dockerfile | 9 ++++++--- ex201/ex201.2.end/Dockerfile | 9 ++++++--- ex201/ex201.3.1/Dockerfile | 9 ++++++--- ex201/ex201.3.end/Dockerfile | 9 ++++++--- ex201/ex201.4.1/Dockerfile | 9 ++++++--- ex201/ex201.4.end/Dockerfile | 9 ++++++--- ex201/ex201.5.1/Dockerfile | 9 ++++++--- ex201/ex201.5.end/Dockerfile | 9 ++++++--- ex211/ex211.1.1/Dockerfile | 10 +++++++--- ex301/ex301.4.1/Dockerfile | 10 +++++++--- ex401/ex401.1.1/Dockerfile | 17 +++++++++++------ .../container_files/morphString.properties | 11 +++++++++++ ex401/ex401.1.2/Dockerfile | 9 ++++++--- ex401/ex401.1.3/Dockerfile | 9 ++++++--- ex401/ex401.1.4/Dockerfile | 7 ++++--- ex401/ex401.1.5/Dockerfile | 9 ++++++--- ex401/ex401.1.end/Dockerfile | 9 ++++++--- ex401/ex401.2.1/Dockerfile | 9 ++++++--- ex401/ex401.2.2/Dockerfile | 9 ++++++--- ex401/ex401.2.3/Dockerfile | 7 ++++--- ex401/ex401.2.4/Dockerfile | 7 ++++--- ex401/ex401.2.5/Dockerfile | 7 ++++--- ex401/ex401.2.6/Dockerfile | 7 ++++--- ex401/ex401.2.7/Dockerfile | 7 ++++--- ex401/ex401.2.8/Dockerfile | 7 ++++--- ex401/ex401.2.9/Dockerfile | 7 ++++--- ex401/ex401.2.end/Dockerfile | 7 ++++--- ex401/ex401.3.1/Dockerfile | 7 ++++--- ex401/ex401.3.2/Dockerfile | 7 ++++--- ex401/ex401.3.3/Dockerfile | 7 ++++--- ex401/ex401.3.4/Dockerfile | 7 ++++--- ex401/ex401.3.5/Dockerfile | 7 ++++--- ex401/ex401.3.6/Dockerfile | 7 ++++--- ex401/ex401.3.7/Dockerfile | 7 ++++--- ex401/ex401.3.end/Dockerfile | 7 ++++--- ex401/ex401.4.1/Dockerfile | 7 ++++--- ex401/ex401.4.end/Dockerfile | 7 ++++--- full-demo/Dockerfile | 10 +++++----- gte-gsh | 2 +- 47 files changed, 257 insertions(+), 129 deletions(-) create mode 100644 base/container_files/conf/morphString.properties create mode 100644 ex101/ex101.1.1/container_files/morphString.properties create mode 100644 ex201/ex201.1.1/container_files/morphString.properties create mode 100644 ex401/ex401.1.1/container_files/morphString.properties diff --git a/base/container_files/conf/grouper.hibernate.properties b/base/container_files/conf/grouper.hibernate.properties index 9a45eb9..c9167e9 100644 --- a/base/container_files/conf/grouper.hibernate.properties +++ b/base/container_files/conf/grouper.hibernate.properties @@ -28,3 +28,4 @@ hibernate.connection.username = root # Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122 hibernate.connection.password = +registry.auto.ddl.upToVersion = 2.5.* diff --git a/base/container_files/conf/morphString.properties b/base/container_files/conf/morphString.properties new file mode 100644 index 0000000..b5f298b --- /dev/null +++ b/base/container_files/conf/morphString.properties @@ -0,0 +1,11 @@ + +######################################## +## Encryption configuration +######################################## + +# Put a random alphanumeric string (Case sensitive) for the password encryption. e.g. fh43IRJ4Nf5jn4Qp9k2 +# or put a filename where the random alphanumeric string is. e.g. c:/whatever/key.txt +# use encrypt.key.elConfig instead if the config has an expression language scriptlet +#encrypt.key = /Users/mchyzer/git/grouper_v2_5/grouper/temp/morphTestFromFile.txt + +encrypt.key = yh30aSMnC1SZ3 diff --git a/docs/401/401.1.rst b/docs/401/401.1.rst index 04cc817..21b72d7 100644 --- a/docs/401/401.1.rst +++ b/docs/401/401.1.rst @@ -166,7 +166,7 @@ Exercise 401.1.3 Export `vpn_authorized` to OpenLDAP .. literalinclude:: examples/401.1.3-pspng-config.properties :language: properties :lines: 72- - :caption: /opt/grouper/grouper.apiBinary/conf/grouper-loader.properties + :caption: /opt/grouper/grouperWebapp/WEB-INF/classes/grouper-loader.properties :name: 401.1.3-pspng-groupofnames :linenos: @@ -292,7 +292,7 @@ approach. #. Run `./gte-shell 401.1.1` to get a command prompt. -#. Run `./bin/gsh` to start the Grouper shell +#. Run `./bin/gsh.sh` as user tomcat to start the Grouper shell #. Paste in the following gsh script: diff --git a/ex101/ex101.1.1/Dockerfile b/ex101/ex101.1.1/Dockerfile index 29a625d..31dfed1 100644 --- a/ex101/ex101.1.1/Dockerfile +++ b/ex101/ex101.1.1/Dockerfile @@ -12,9 +12,10 @@ ENV USERTOKEN=gte-101.1.1 COPY container_files/seed-data/ /seed-data/ COPY container_files/grouper-loader.properties /opt/grouper/grouperWebapp/WEB-INF/classes/ COPY container_files/subject.properties /opt/grouper/grouperWebapp/WEB-INF/classes/ +COPY container_files/morphString.properties /opt/grouper/grouperWebapp/WEB-INF/classes/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 & ) \ @@ -22,7 +23,9 @@ RUN . /usr/local/bin/library.sh \ cd /opt/grouper/grouperWebapp/WEB-INF/bin \ && ldapadd -x -D cn=root,dc=internet2,dc=edu -w password -f /seed-data/users.ldif \ && mysql grouper < /seed-data/sisData.sql \ - && ./gsh.sh /seed-data/bootstrap.gsh \ + && cp -r /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/* /opt/grouper/grouperWebapp/WEB-INF/lib/ \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat ./gsh.sh /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 \ diff --git a/ex101/ex101.1.1/container_files/morphString.properties b/ex101/ex101.1.1/container_files/morphString.properties new file mode 100644 index 0000000..b5f298b --- /dev/null +++ b/ex101/ex101.1.1/container_files/morphString.properties @@ -0,0 +1,11 @@ + +######################################## +## Encryption configuration +######################################## + +# Put a random alphanumeric string (Case sensitive) for the password encryption. e.g. fh43IRJ4Nf5jn4Qp9k2 +# or put a filename where the random alphanumeric string is. e.g. c:/whatever/key.txt +# use encrypt.key.elConfig instead if the config has an expression language scriptlet +#encrypt.key = /Users/mchyzer/git/grouper_v2_5/grouper/temp/morphTestFromFile.txt + +encrypt.key = yh30aSMnC1SZ3 diff --git a/ex201/ex201.1.1/Dockerfile b/ex201/ex201.1.1/Dockerfile index d85c1b1..7cd1f94 100644 --- a/ex201/ex201.1.1/Dockerfile +++ b/ex201/ex201.1.1/Dockerfile @@ -10,19 +10,22 @@ LABEL author="tier-packaging@internet2.edu " \ ENV USERTOKEN=gte-201.1.1 COPY container_files/seed-data/ /seed-data/ -COPY container_files/grouper-loader.properties /opt/grouper/conf/ -COPY container_files/subject.properties /opt/grouper/conf/ +COPY container_files/grouper-loader.properties /opt/grouper/grouperWebapp/WEB-INF/classes +COPY container_files/subject.properties /opt/grouper/grouperWebapp/WEB-INF/classes +COPY container_files/morphString.properties /opt/grouper/grouperWebapp/WEB-INF/classes/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && cp -r /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/* /opt/grouper/grouperWebapp/WEB-INF/lib/ \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.1.1/container_files/morphString.properties b/ex201/ex201.1.1/container_files/morphString.properties new file mode 100644 index 0000000..b5f298b --- /dev/null +++ b/ex201/ex201.1.1/container_files/morphString.properties @@ -0,0 +1,11 @@ + +######################################## +## Encryption configuration +######################################## + +# Put a random alphanumeric string (Case sensitive) for the password encryption. e.g. fh43IRJ4Nf5jn4Qp9k2 +# or put a filename where the random alphanumeric string is. e.g. c:/whatever/key.txt +# use encrypt.key.elConfig instead if the config has an expression language scriptlet +#encrypt.key = /Users/mchyzer/git/grouper_v2_5/grouper/temp/morphTestFromFile.txt + +encrypt.key = yh30aSMnC1SZ3 diff --git a/ex201/ex201.1.end/Dockerfile b/ex201/ex201.1.end/Dockerfile index 3f3171a..3649b2a 100644 --- a/ex201/ex201.1.end/Dockerfile +++ b/ex201/ex201.1.end/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.1.end COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.2.1/Dockerfile b/ex201/ex201.2.1/Dockerfile index d1c46a0..39010d6 100644 --- a/ex201/ex201.2.1/Dockerfile +++ b/ex201/ex201.2.1/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.2.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.2.end/Dockerfile b/ex201/ex201.2.end/Dockerfile index 083f5d0..90dc23a 100644 --- a/ex201/ex201.2.end/Dockerfile +++ b/ex201/ex201.2.end/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.2.end COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.3.1/Dockerfile b/ex201/ex201.3.1/Dockerfile index 341d55f..8c05de3 100644 --- a/ex201/ex201.3.1/Dockerfile +++ b/ex201/ex201.3.1/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.3.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.3.end/Dockerfile b/ex201/ex201.3.end/Dockerfile index 7b21b5d..50ed169 100644 --- a/ex201/ex201.3.end/Dockerfile +++ b/ex201/ex201.3.end/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.3.end COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.4.1/Dockerfile b/ex201/ex201.4.1/Dockerfile index 3273608..8478ec2 100644 --- a/ex201/ex201.4.1/Dockerfile +++ b/ex201/ex201.4.1/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.4.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.4.end/Dockerfile b/ex201/ex201.4.end/Dockerfile index dba0619..f7e6659 100644 --- a/ex201/ex201.4.end/Dockerfile +++ b/ex201/ex201.4.end/Dockerfile @@ -12,14 +12,17 @@ ENV USERTOKEN=gte-201.4.end COPY container_files/seed-data/ /seed-data/ COPY container_files/attribute-filter.xml /opt/shibboleth-idp/conf/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.5.1/Dockerfile b/ex201/ex201.5.1/Dockerfile index 442c14a..3e89181 100644 --- a/ex201/ex201.5.1/Dockerfile +++ b/ex201/ex201.5.1/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.5.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex201/ex201.5.end/Dockerfile b/ex201/ex201.5.end/Dockerfile index 94cefb9..b4451c9 100644 --- a/ex201/ex201.5.end/Dockerfile +++ b/ex201/ex201.5.end/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-201.5.end COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex211/ex211.1.1/Dockerfile b/ex211/ex211.1.1/Dockerfile index fb49083..bcc7b45 100644 --- a/ex211/ex211.1.1/Dockerfile +++ b/ex211/ex211.1.1/Dockerfile @@ -11,14 +11,18 @@ ENV USERTOKEN=gte-211.1.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && cp -r /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/* /opt/grouper/grouperWebapp/WEB-INF/lib/ \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex301/ex301.4.1/Dockerfile b/ex301/ex301.4.1/Dockerfile index 7d98536..5636931 100644 --- a/ex301/ex301.4.1/Dockerfile +++ b/ex301/ex301.4.1/Dockerfile @@ -11,14 +11,18 @@ ENV USERTOKEN=gte-301.4.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && cp -r /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/* /opt/grouper/grouperWebapp/WEB-INF/lib/ \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.1.1/Dockerfile b/ex401/ex401.1.1/Dockerfile index 2bf3858..5e31702 100644 --- a/ex401/ex401.1.1/Dockerfile +++ b/ex401/ex401.1.1/Dockerfile @@ -10,18 +10,23 @@ LABEL author="tier-packaging@internet2.edu " \ ENV USERTOKEN=gte-401.1.1 COPY container_files/seed-data/ /seed-data/ -COPY container_files/grouper-loader.properties /opt/grouper/conf/ -COPY container_files/grouper.client.properties /opt/grouper/conf/ -COPY container_files/subject.properties /opt/grouper/conf/ +COPY container_files/grouper-loader.properties /opt/grouper/grouperWebapp/WEB-INF/classes +COPY container_files/grouper.client.properties /opt/grouper/grouperWebapp/WEB-INF/classes +COPY container_files/subject.properties /opt/grouper/grouperWebapp/WEB-INF/classes +COPY container_files/morphString.properties /opt/grouper/grouperWebapp/WEB-INF/classes -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && cp -r /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/* /opt/grouper/grouperWebapp/WEB-INF/lib/ \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.1.1/container_files/morphString.properties b/ex401/ex401.1.1/container_files/morphString.properties new file mode 100644 index 0000000..b5f298b --- /dev/null +++ b/ex401/ex401.1.1/container_files/morphString.properties @@ -0,0 +1,11 @@ + +######################################## +## Encryption configuration +######################################## + +# Put a random alphanumeric string (Case sensitive) for the password encryption. e.g. fh43IRJ4Nf5jn4Qp9k2 +# or put a filename where the random alphanumeric string is. e.g. c:/whatever/key.txt +# use encrypt.key.elConfig instead if the config has an expression language scriptlet +#encrypt.key = /Users/mchyzer/git/grouper_v2_5/grouper/temp/morphTestFromFile.txt + +encrypt.key = yh30aSMnC1SZ3 diff --git a/ex401/ex401.1.2/Dockerfile b/ex401/ex401.1.2/Dockerfile index b16e365..aaea51b 100644 --- a/ex401/ex401.1.2/Dockerfile +++ b/ex401/ex401.1.2/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-401.1.2 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.1.3/Dockerfile b/ex401/ex401.1.3/Dockerfile index 8effe32..d70238b 100644 --- a/ex401/ex401.1.3/Dockerfile +++ b/ex401/ex401.1.3/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-401.1.3 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.1.4/Dockerfile b/ex401/ex401.1.4/Dockerfile index 4212501..ba01a46 100644 --- a/ex401/ex401.1.4/Dockerfile +++ b/ex401/ex401.1.4/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.1.4 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.1.5/Dockerfile b/ex401/ex401.1.5/Dockerfile index 06f5ce5..8f777aa 100644 --- a/ex401/ex401.1.5/Dockerfile +++ b/ex401/ex401.1.5/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-401.1.5 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.1.end/Dockerfile b/ex401/ex401.1.end/Dockerfile index bbaa2e9..955d983 100644 --- a/ex401/ex401.1.end/Dockerfile +++ b/ex401/ex401.1.end/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-401.1.end COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.1/Dockerfile b/ex401/ex401.2.1/Dockerfile index e54a99b..991b01f 100644 --- a/ex401/ex401.2.1/Dockerfile +++ b/ex401/ex401.2.1/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-401.2.1 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.2/Dockerfile b/ex401/ex401.2.2/Dockerfile index bc87442..e135f23 100644 --- a/ex401/ex401.2.2/Dockerfile +++ b/ex401/ex401.2.2/Dockerfile @@ -11,14 +11,17 @@ ENV USERTOKEN=gte-401.2.2 COPY container_files/seed-data/ /seed-data/ -RUN (/usr/sbin/slapd -h "ldap:/// ldaps:/// ldapi:///" -u ldap &) \ +RUN . /usr/local/bin/library.sh \ + && prep_conf && prep_finish && setupFiles; \ + (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.3/Dockerfile b/ex401/ex401.2.3/Dockerfile index a43ecce..b755eb2 100644 --- a/ex401/ex401.2.3/Dockerfile +++ b/ex401/ex401.2.3/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.3 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.4/Dockerfile b/ex401/ex401.2.4/Dockerfile index fc0680b..1cebcbb 100644 --- a/ex401/ex401.2.4/Dockerfile +++ b/ex401/ex401.2.4/Dockerfile @@ -13,15 +13,16 @@ COPY container_files/seed-data/ /seed-data/ COPY container_files/idp/ /opt/shibboleth-idp/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.5/Dockerfile b/ex401/ex401.2.5/Dockerfile index 472222f..f3b671e 100644 --- a/ex401/ex401.2.5/Dockerfile +++ b/ex401/ex401.2.5/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.5 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.6/Dockerfile b/ex401/ex401.2.6/Dockerfile index 9a07ea7..fdd807e 100644 --- a/ex401/ex401.2.6/Dockerfile +++ b/ex401/ex401.2.6/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.6 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.7/Dockerfile b/ex401/ex401.2.7/Dockerfile index d4a8cc9..4afbe9d 100644 --- a/ex401/ex401.2.7/Dockerfile +++ b/ex401/ex401.2.7/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.7 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.8/Dockerfile b/ex401/ex401.2.8/Dockerfile index b74f154..a0e1192 100644 --- a/ex401/ex401.2.8/Dockerfile +++ b/ex401/ex401.2.8/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.8 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.9/Dockerfile b/ex401/ex401.2.9/Dockerfile index 36fd360..3491f2c 100644 --- a/ex401/ex401.2.9/Dockerfile +++ b/ex401/ex401.2.9/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.9 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.2.end/Dockerfile b/ex401/ex401.2.end/Dockerfile index 095c492..4937628 100644 --- a/ex401/ex401.2.end/Dockerfile +++ b/ex401/ex401.2.end/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.2.end COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.1/Dockerfile b/ex401/ex401.3.1/Dockerfile index d8facc7..9d188b1 100644 --- a/ex401/ex401.3.1/Dockerfile +++ b/ex401/ex401.3.1/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.1 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.2/Dockerfile b/ex401/ex401.3.2/Dockerfile index 28f443b..b0c3f3a 100644 --- a/ex401/ex401.3.2/Dockerfile +++ b/ex401/ex401.3.2/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.2 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.3/Dockerfile b/ex401/ex401.3.3/Dockerfile index d1b2073..789bc0e 100644 --- a/ex401/ex401.3.3/Dockerfile +++ b/ex401/ex401.3.3/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.3 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.4/Dockerfile b/ex401/ex401.3.4/Dockerfile index 385b83b..4aa4b61 100644 --- a/ex401/ex401.3.4/Dockerfile +++ b/ex401/ex401.3.4/Dockerfile @@ -13,15 +13,16 @@ COPY container_files/seed-data/ /seed-data/ COPY container_files/attribute-filter.xml /opt/shibboleth-idp/conf/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.5/Dockerfile b/ex401/ex401.3.5/Dockerfile index 2c02b32..23b1443 100644 --- a/ex401/ex401.3.5/Dockerfile +++ b/ex401/ex401.3.5/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.5 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.6/Dockerfile b/ex401/ex401.3.6/Dockerfile index bf22bf6..fe1d689 100644 --- a/ex401/ex401.3.6/Dockerfile +++ b/ex401/ex401.3.6/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.6 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.7/Dockerfile b/ex401/ex401.3.7/Dockerfile index 8ef72f9..1d7312a 100644 --- a/ex401/ex401.3.7/Dockerfile +++ b/ex401/ex401.3.7/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.7 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.3.end/Dockerfile b/ex401/ex401.3.end/Dockerfile index 40ad125..fc12e59 100644 --- a/ex401/ex401.3.end/Dockerfile +++ b/ex401/ex401.3.end/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.3.end COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.4.1/Dockerfile b/ex401/ex401.4.1/Dockerfile index 0b811aa..5380247 100644 --- a/ex401/ex401.4.1/Dockerfile +++ b/ex401/ex401.4.1/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.4.1 COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/ex401/ex401.4.end/Dockerfile b/ex401/ex401.4.end/Dockerfile index 03e812d..dee6522 100644 --- a/ex401/ex401.4.end/Dockerfile +++ b/ex401/ex401.4.end/Dockerfile @@ -12,15 +12,16 @@ ENV USERTOKEN=gte-401.4.end COPY container_files/seed-data/ /seed-data/ RUN . /usr/local/bin/library.sh \ - && prepConf; \ + && prep_conf && prep_finish && setupFiles; \ (/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 \ + cd /opt/grouper/grouperWebapp/WEB-INF \ && 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 \ + && if [ ! -f /usr/local/bin/java ]; then ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /usr/local/bin/java; fi \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /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 \ diff --git a/full-demo/Dockerfile b/full-demo/Dockerfile index 41a42ae..ea793ce 100644 --- a/full-demo/Dockerfile +++ b/full-demo/Dockerfile @@ -10,17 +10,17 @@ LABEL author="tier-packaging@internet2.edu " \ ENV USERTOKEN=gte-full-demo COPY container_files/demo.gsh /seed-data/ -COPY container_files/grouper-loader.properties /opt/grouper/conf/ -COPY container_files/subject.properties /opt/grouper/conf/ +COPY container_files/grouper-loader.properties /opt/grouper/grouperWebapp/WEB-INF/classes +COPY container_files/subject.properties /opt/grouper/grouperWebapp/WEB-INF/classes 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; \ . /usr/local/bin/library.sh \ - && prepConf \ - && cd /opt/grouper/grouper.apiBinary \ - && bin/gsh /seed-data/demo.gsh \ + && prep_conf && prep_finish && setupFiles \ + && cd /opt/grouper/grouperWebapp/WEB-INF \ + && sudo --preserve-env=PATH -u tomcat bin/gsh.sh /seed-data/demo.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 \ diff --git a/gte-gsh b/gte-gsh index 46cad26..b359970 100755 --- a/gte-gsh +++ b/gte-gsh @@ -6,4 +6,4 @@ if [ -z "$1" ] exit 0 fi -docker exec -it "$1" /opt/grouper/grouper.apiBinary/bin/gsh 2> /dev/null +docker exec -it -u tomcat "$1" /opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh 2> /dev/null