Skip to content

Commit

Permalink
2.5.28 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mchyzer committed May 13, 2020
1 parent 47e7171 commit 8990936
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 26 deletions.
7 changes: 4 additions & 3 deletions container_files/tier-support/test/grouperContainerUnitTest.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/bash

if [ "$#" -ne 3 ]; then
echo "You must enter exactly 3 command line arguments: container-name, image-name and container version, e.g. grouper-test my-grouper-2.5.27:latest 2.5.27"
if [ "$#" -ne 4 ]; then
echo "You must enter exactly 4 command line arguments: container-name, image-name, container version, and grouper version, e.g. grouper-test my-grouper-2.5.27:latest 2.5.27 2.5.27"
exit 1
fi

expectedSuccesses=521
expectedSuccesses=528

export containerName=$1
export imageName=$2
export containerVersion=$3
export grouperVersion=$4
export globalSleepSecondsAfterRun=5
export globalExitOnError=false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ testContainerDaemon() {
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /etc/httpd/conf.d/ssl-enabled.conf "Listen 443 https"
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf "__"
assertFileContains /etc/httpd/conf/httpd.conf "Listen 80"
assertFileNotContains /opt/tier-support/supervisord.conf "program:shibbolethsp"
assertFileContains /opt/tier-support/supervisord.conf "program:tomee"
assertFileNotContains /opt/tier-support/supervisord.conf "program:httpd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ testContainerQuickstart() {
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /etc/httpd/conf.d/ssl-enabled.conf "Listen 443 https"
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf "__"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ testContainerScim() {
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileNotExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /etc/httpd/conf.d/ssl-enabled.conf "Listen 443 https"
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf "__"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ testContainerUi() {
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /etc/httpd/conf.d/ssl-enabled.conf "Listen 443 https"
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf "__"
Expand All @@ -38,6 +38,8 @@ testContainerUi() {
assertFileContains /etc/httpd/conf.d/ssl-enabled.conf cachain.pem
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf /etc/pki/tls/certs/localhost.crt

assertFileContains /opt/tomee/conf/Catalina/localhost/grouper.xml 'cookies="true"'

assertFileContains /opt/grouper/grouperWebapp/WEB-INF/classes/log4j.properties "/tmp/logpipe"
assertFileContains /opt/grouper/grouperWebapp/WEB-INF/classes/log4j.properties "grouper-ui;"

Expand Down Expand Up @@ -88,6 +90,8 @@ testContainerUi() {
assertNotListeningOnPort 80
assertListeningOnPort 8009
assertNotListeningOnPort 9001
assertListeningOnPort 8080
#assertListeningOnPort 8005


}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ testContainerUiDifferentPorts() {
echo
echo '################'
echo Running container as ui with self signed cert with different ports
echo "docker run --detach --name $containerName --publish 443:443 -e GROUPER_APACHE_AJP_TIMEOUT_SECONDS=2999 -e GROUPER_SELF_SIGNED_CERT=true -e GROUPER_APACHE_SSL_PORT=444 -e GROUPER_APACHE_NONSSL_PORT=81 $imageName ui"
echo "docker run --detach --name $containerName --publish 443:443 -e GROUPER_APACHE_AJP_TIMEOUT_SECONDS=2999 -e GROUPER_SELF_SIGNED_CERT=true -e GROUPER_APACHE_SSL_PORT=444 -e GROUPER_APACHE_NONSSL_PORT=81 -e GROUPER_TOMCAT_HTTP_PORT=8600 -e GROUPER_TOMCAT_AJP_PORT=8601 -e GROUPER_TOMCAT_SHUTDOWN_PORT=8602 $imageName ui"
echo '################'
echo

docker run --detach --name $containerName --publish 443:443 -e GROUPER_APACHE_AJP_TIMEOUT_SECONDS=2999 -e GROUPER_SELF_SIGNED_CERT=true -e GROUPER_APACHE_SSL_PORT=444 -e GROUPER_APACHE_NONSSL_PORT=81 $imageName ui
docker run --detach --name $containerName --publish 443:443 -e GROUPER_APACHE_AJP_TIMEOUT_SECONDS=2999 -e GROUPER_SELF_SIGNED_CERT=true -e GROUPER_APACHE_SSL_PORT=444 -e GROUPER_APACHE_NONSSL_PORT=81 -e GROUPER_TOMCAT_HTTP_PORT=8600 -e GROUPER_TOMCAT_AJP_PORT=8601 -e GROUPER_TOMCAT_SHUTDOWN_PORT=8602 $imageName ui
sleep $globalSleepSecondsAfterRun

assertEnvVar GROUPER_APACHE_NONSSL_PORT "81"
assertEnvVar GROUPER_APACHE_SSL_PORT "444"
assertEnvVar GROUPER_APACHE_AJP_TIMEOUT_SECONDS "2999"

assertEnvVar GROUPER_TOMCAT_HTTP_PORT "8600"
assertEnvVar GROUPER_TOMCAT_AJP_PORT "8601"
assertEnvVar GROUPER_TOMCAT_SHUTDOWN_PORT "8602"

assertFileContains /etc/httpd/conf.d/grouper-www.conf "2999"
assertFileNotContains /etc/httpd/conf.d/grouper-www.conf "3600"
Expand All @@ -43,7 +46,9 @@ testContainerUiDifferentPorts() {
assertListeningOnPort 81
assertNotListeningOnPort 443
assertNotListeningOnPort 80
assertListeningOnPort 8009
assertListeningOnPort 8600
assertListeningOnPort 8601
#assertListeningOnPort 8602
assertNotListeningOnPort 9001


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ testContainerUiSubimage() {
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /etc/httpd/conf.d/ssl-enabled.conf "Listen 443 https"
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf "__"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ testContainerUiSubimageNonroot() {
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /opt/grouper/grouperWebapp/WEB-INF/classes/log4j.properties "/tmp/logpipe"
assertFileContains /opt/grouper/grouperWebapp/WEB-INF/classes/log4j.properties "grouper-ui;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ testContainerWs() {
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/lib/axis2-kernel-1.6.4.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libScim/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/stax-api-1.0-2.jar
assertFileNotExists /opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-2.5.27.jar
assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-2.5.27.jar
assertFileNotExists "/opt/grouper/grouperWebapp/WEB-INF/lib/grouper-messaging-activemq-$grouperVersion.jar"
assertFileExists "/opt/grouper/grouperWebapp/WEB-INF/libUiAndDaemon/grouper-messaging-activemq-$grouperVersion.jar"

assertFileContains /etc/httpd/conf.d/ssl-enabled.conf "Listen 443 https"
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf "__"
Expand All @@ -37,6 +37,8 @@ testContainerWs() {
assertFileNotContains /etc/httpd/conf.d/ssl-enabled.conf cachain.pem
assertFileContains /etc/httpd/conf.d/ssl-enabled.conf /etc/pki/tls/certs/localhost.crt

assertFileContains /opt/tomee/conf/Catalina/localhost/grouper-ws.xml 'cookies="false"'

assertFileContains /opt/grouper/grouperWebapp/WEB-INF/classes/log4j.properties "grouper-ws;"

assertFileContains /etc/httpd/conf.d/grouper-www.conf "3600"
Expand Down
2 changes: 1 addition & 1 deletion container_files/tomee/conf/Catalina/localhost/grouper.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Context docBase="/opt/grouper/grouperWebapp/" path="/__GROUPER_TOMCAT_CONTEXT__" reloadable="false" __GROUPER_CONTEXT_COOKIES__ > <!-- cookies="false" -->
<Context docBase="/opt/grouper/grouperWebapp/" path="/__GROUPER_TOMCAT_CONTEXT__" reloadable="false" cookies="__GROUPER_CONTEXT_COOKIES__" >
<Resources allowLinking="true" />
</Context>
7 changes: 6 additions & 1 deletion container_files/usr-local-bin/libraryPrep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ prep_finishBegin() {
if [ -z "$GROUPER_GSH_CHECK_USER" ] ; then export GROUPER_GSH_CHECK_USER=true; fi
if [ -z "$GROUPER_GSH_USER" ] ; then export GROUPER_GSH_USER=tomcat; fi

if [ -z "$GROUPER_RUN_TOMCAT_NOT_SUPERVISOR" ]; then export GROUPER_RUN_TOMCAT_NOT_SUPERVISOR=false; fi
if [ -z "$GROUPER_RUN_TOMCAT_NOT_SUPERVISOR" ]; then export GROUPER_RUN_TOMCAT_NOT_SUPERVISOR=false; fi

if [ -z "$GROUPER_TOMCAT_HTTP_PORT" ]; then export GROUPER_TOMCAT_HTTP_PORT=8080; fi
if [ -z "$GROUPER_TOMCAT_AJP_PORT" ]; then export GROUPER_TOMCAT_AJP_PORT=8009; fi
if [ -z "$GROUPER_TOMCAT_SHUTDOWN_PORT" ]; then export GROUPER_TOMCAT_SHUTDOWN_PORT=8005; fi

}

Expand All @@ -166,6 +170,7 @@ prep_finishEnd() {
if [ -z "$GROUPER_TOMCAT_CONTEXT" ] ; then export GROUPER_TOMCAT_CONTEXT=grouper; fi
if [ -z "$GROUPER_LOG_PREFIX" ]; then export GROUPER_LOG_PREFIX=grouper; fi
if [ -z "$GROUPER_MAX_MEMORY" ]; then export GROUPER_MAX_MEMORY=1500m; fi
if [ -z "$GROUPER_CONTEXT_COOKIES" ]; then export GROUPER_CONTEXT_COOKIES=true; fi

}

Expand Down
24 changes: 23 additions & 1 deletion container_files/usr-local-bin/librarySetupFilesTomcat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ setupFilesTomcat() {
setupFilesTomcat_supervisor
setupFilesTomcat_authn
setupFilesTomcat_context
setupFilesTomcat_ports
}

setupFilesTomcat_ports() {

if [ "$GROUPER_TOMCAT_HTTP_PORT" != "8080" ]; then
sed -i "s|8080|$GROUPER_TOMCAT_HTTP_PORT|g" /opt/tomee/conf/server.xml
fi

if [ "$GROUPER_TOMCAT_AJP_PORT" != "8009" ]; then
sed -i "s|8009|$GROUPER_TOMCAT_AJP_PORT|g" /opt/tomee/conf/server.xml
fi

if [ "$GROUPER_TOMCAT_SHUTDOWN_PORT" != "8005" ]; then
sed -i "s|8005|$GROUPER_TOMCAT_SHUTDOWN_PORT|g" /opt/tomee/conf/server.xml
fi
}

setupFilesTomcat_context() {
Expand All @@ -14,7 +30,7 @@ setupFilesTomcat_context() {
# ws only and scim only dont have cookies
if [ "$GROUPER_CONTEXT_COOKIES" = "false" ]
then
sed -i "s|__GROUPER_CONTEXT_COOKIES__|cookies="false"|g" /opt/tomee/conf/Catalina/localhost/grouper.xml
sed -i "s|__GROUPER_CONTEXT_COOKIES__|$GROUPER_CONTEXT_COOKIES|g" /opt/tomee/conf/Catalina/localhost/grouper.xml
else
sed -i "s|__GROUPER_CONTEXT_COOKIES__||g" /opt/tomee/conf/Catalina/localhost/grouper.xml
fi
Expand Down Expand Up @@ -42,6 +58,10 @@ setupFilesTomcat_context() {
sed -i "s|__GROUPER_PROXY_PASS__|$GROUPER_PROXY_PASS|g" /etc/httpd/conf.d/ssl-enabled.conf
sed -i "s|__GROUPERSCIM_PROXY_PASS__|$GROUPERSCIM_PROXY_PASS|g" /etc/httpd/conf.d/grouper-www.conf
sed -i "s|__GROUPERWS_PROXY_PASS__|$GROUPERWS_PROXY_PASS|g" /etc/httpd/conf.d/grouper-www.conf
if [ "$GROUPER_TOMCAT_AJP_PORT" != "8009" ]; then
sed -i "s|:8009/|:$GROUPER_TOMCAT_AJP_PORT/|g" /etc/httpd/conf.d/grouper-www.conf
fi

fi

}
Expand Down Expand Up @@ -81,6 +101,7 @@ setupFilesTomcat_unsetAll() {
unset -f setupFilesTomcat_authn
unset -f setupFilesTomcat_context
unset -f setupFilesTomcat_logging
unset -f setupFilesTomcat_ports
unset -f setupFilesTomcat_supervisor
unset -f setupFilesTomcat_unsetAll

Expand All @@ -92,6 +113,7 @@ setupFilesTomcat_exportAll() {
export -f setupFilesTomcat_authn
export -f setupFilesTomcat_context
export -f setupFilesTomcat_logging
export -f setupFilesTomcat_ports
export -f setupFilesTomcat_supervisor
export -f setupFilesTomcat_unsetAll

Expand Down

0 comments on commit 8990936

Please sign in to comment.