-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mchyzer
committed
May 10, 2020
1 parent
2a06368
commit 7c0eefd
Showing
42 changed files
with
2,182 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,21 @@ | ||
|
|
||
| Timeout 2400 | ||
| ProxyTimeout 2400 | ||
| Timeout __GROUPER_APACHE_AJP_TIMEOUT_SECONDS__ | ||
| ProxyTimeout __GROUPER_APACHE_AJP_TIMEOUT_SECONDS__ | ||
| ProxyBadHeader Ignore | ||
|
|
||
| # the variable for __THE _ AJP _ URL__ (no spaces) will be replaced with something like: ajp://localhost:8009/grouper on startup | ||
| # the variable for __GROUPER _ PROXY _ PASS__ (no spaces) will be replaced with comment or blank on startup if running grouper url | ||
| # the variable for __GROUPERWS _ PROXY _ PASS__ (no spaces) will be replaced with comment or blank on startup if running grouper-ws url | ||
| # the variable for __GROUPERSCIM _ PROXY _ PASS__ (no spaces) will be replaced with comment of blank on startup if running grouper-ws-scim url | ||
| __GROUPER_PROXY_PASS__ProxyPass /grouper __THE_AJP_URL__ timeout=2400 | ||
| __GROUPERWS_PROXY_PASS__ProxyPass /grouper-ws __THE_AJP_URL__ timeout=2400 | ||
| __GROUPERSCIM_PROXY_PASS__ProxyPass /grouper-ws-scim __THE_AJP_URL__ timeout=2400 | ||
| # the variable for _ _GROUPER_APACHE_AJP_TIMEOUT_SECONDS_ _ will be replaced to default for one hour on startup env var $GROUPER_APACHE_AJP_TIMEOUT_SECONDS | ||
| # the variable for _ _THE_AJP_URL_ _ (no spaces) will be replaced with something like: ajp://localhost:port/grouper on startup | ||
| # the variable for _ _GROUPER_PROXY_PASS_ _ (no spaces) will be replaced with comment or blank on startup if running grouper url | ||
| # the variable for _ _GROUPERWS_PROXY_PASS_ _ (no spaces) will be replaced with comment or blank on startup if running grouper-ws url | ||
| # the variable for _ _GROUPERSCIM_PROXY_PASS_ _ (no spaces) will be replaced with comment of blank on startup if running grouper-ws-scim url | ||
| # the variable for _ _GROUPER_TOMCAT_CONTEXT_ _ (no spaces) will be replaced with the env var $GROUPER_TOMCAT_CONTEXT | ||
| # the variable for _ _GROUPER_URL_CONTEXT_ _ (no spaces) will be replaced with the env var $GROUPER_URL_CONTEXT | ||
| # the variable for _ _GROUPERWS_URL_CONTEXT_ _ (no spaces) will be replaced with the env var $GROUPERWS_URL_CONTEXT | ||
| # the variable for _ _GROUPERSCIM_URL_CONTEXT_ _ (no spaces) will be replaced with the env var $GROUPERSCIM_URL_CONTEXT | ||
| __GROUPER_PROXY_PASS__ProxyPass /__GROUPER_URL_CONTEXT__ ajp://localhost:8009/__GROUPER_TOMCAT_CONTEXT__ timeout=__GROUPER_APACHE_AJP_TIMEOUT_SECONDS__ | ||
| __GROUPERWS_PROXY_PASS__ProxyPass /__GROUPERWS_URL_CONTEXT__ ajp://localhost:8009/__GROUPER_TOMCAT_CONTEXT__ timeout=__GROUPER_APACHE_AJP_TIMEOUT_SECONDS__ | ||
| __GROUPERSCIM_PROXY_PASS__ProxyPass /__GROUPERSCIM_URL_CONTEXT__ ajp://localhost:8009/__GROUPER_TOMCAT_CONTEXT__ timeout=__GROUPER_APACHE_AJP_TIMEOUT_SECONDS__ | ||
|
|
||
| __GROUPER_PROXY_PASS__RewriteEngine on | ||
| __GROUPER_PROXY_PASS__RewriteRule "^/$" "/grouper/" [R] | ||
| __GROUPER_PROXY_PASS__RewriteRule "^/$" "/__GROUPER_URL_CONTEXT__/" [R] | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
container_files/tier-support/test/grouperContainerUnitTest.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| #!/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" | ||
| exit 1 | ||
| fi | ||
|
|
||
| expectedSuccesses=412 | ||
|
|
||
| export containerName=$1 | ||
| export imageName=$2 | ||
| export containerVersion=$3 | ||
| export globalSleepSecondsAfterRun=5 | ||
| export globalExitOnError=false | ||
|
|
||
| export successCount=0 | ||
| export failureCount=0 | ||
|
|
||
| . ./grouperContainerUnitTestLibrary.sh | ||
|
|
||
| . ./grouperContainerUnitTestDaemon.sh | ||
| . ./grouperContainerUnitTestUi.sh | ||
| . ./grouperContainerUnitTestUiNoSsl.sh | ||
| . ./grouperContainerUnitTestUiDifferentPorts.sh | ||
| . ./grouperContainerUnitTestSlashRoot.sh | ||
| . ./grouperContainerUnitTestSelfSigned.sh | ||
| . ./grouperContainerUnitTestScim.sh | ||
| . ./grouperContainerUnitTestWs.sh | ||
| . ./grouperContainerUnitTestQuickstart.sh | ||
|
|
||
|
|
||
| testContainerUi | ||
| testContainerUiNoSsl | ||
| testContainerSlashRoot | ||
| testContainerSelfSigned | ||
| testContainerUiDifferentPorts | ||
| testContainerScim | ||
| testContainerWs | ||
| testContainerQuickstart | ||
| testContainerDaemon | ||
|
|
||
| dockerRemoveContainer | ||
| echo "" | ||
| echo "$successCount successes, $failureCount failures" | ||
| if [ "$successCount" = "$expectedSuccesses" ] && [ "$failureCount" = "0" ] ; then | ||
| success=true | ||
| echo "SUCCESS!" | ||
| else | ||
| success=false | ||
| echo "ERROR, expected $expectedSuccesses successes and 0 failures" | ||
| fi | ||
| echo "" | ||
| unset -f containerName | ||
| unset -f imageName | ||
| unset -f containerVersion | ||
| unset -f globalSleepSecondsAfterRun | ||
| unset -f testContainerQuickstart | ||
| unset -f testContainerDaemon | ||
| unset -f testContainerUi | ||
| unset -f testContainerUiNoSsl | ||
| unset -f testContainerUiDifferentPorts | ||
| unset -f testContainerSlashRoot | ||
| unset -f testContainerSelfSigned | ||
| unset -f testContainerScim | ||
| unset -f testContainerWs | ||
| unset -f successCount | ||
| unset -f failureCount | ||
| grouperContainerUnitTestLibrary_unsetAll | ||
|
|
||
| if [ "$success" = "true" ]; then | ||
| exit 0 | ||
| else | ||
| exit 1 | ||
| fi |
86 changes: 86 additions & 0 deletions
86
container_files/tier-support/test/grouperContainerUnitTestDaemon.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| #!/bin/bash | ||
|
|
||
| testContainerDaemon() { | ||
|
|
||
| if [ "$#" -ne 0 ]; then | ||
| echo "You must enter exactly 0 command line arguments" | ||
| exit 1 | ||
| fi | ||
|
|
||
| dockerRemoveContainer | ||
|
|
||
| echo | ||
| echo '################' | ||
| echo Running container as daemon | ||
| echo "docker run --detach --name $containerName --publish 443:443 $imageName daemon" | ||
| echo '################' | ||
| echo | ||
|
|
||
| docker run --detach --name $containerName --publish 443:443 $imageName daemon | ||
| sleep $globalSleepSecondsAfterRun | ||
|
|
||
| assertFileExists /opt/grouper/grouperWebapp/WEB-INF/libWs/axis2-kernel-1.6.4.jar | ||
| 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 | ||
|
|
||
| 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" | ||
| assertFileNotContains /opt/tier-support/supervisord.conf "program:hsqldb" | ||
| assertFileNotContains /opt/tier-support/supervisord.conf "user=shibd" | ||
| assertFileNotContains /opt/tier-support/supervisord.conf "__" | ||
|
|
||
| assertFileContains /etc/httpd/conf.d/grouper-www.conf "3600" | ||
| assertFileNotContains /etc/httpd/conf.d/grouper-www.conf "__" | ||
|
|
||
| assertEnvVar GROUPERSCIM_PROXY_PASS "#" | ||
| assertEnvVar GROUPERSCIM_URL_CONTEXT "grouper-ws-scim" | ||
| assertEnvVar GROUPERWS_PROXY_PASS "#" | ||
| assertEnvVar GROUPERWS_URL_CONTEXT "grouper-ws" | ||
| assertEnvVar GROUPER_APACHE_AJP_TIMEOUT_SECONDS "3600" | ||
| assertEnvVar GROUPER_APACHE_NONSSL_PORT "80" | ||
| assertEnvVar GROUPER_APACHE_SSL_PORT "443" | ||
| assertEnvVar GROUPER_CHOWN_DIRS "true" | ||
| assertEnvVar GROUPER_CONTAINER_VERSION "$containerVersion" | ||
| assertEnvVar GROUPER_DAEMON "true" | ||
| assertEnvVar GROUPER_GSH_CHECK_USER "true" | ||
| assertEnvVar GROUPER_GSH_USER "tomcat" | ||
| assertEnvVar GROUPER_HOME "/opt/grouper/grouperWebapp/WEB-INF" | ||
| assertEnvVar GROUPER_LOG_PREFIX "grouper-daemon" | ||
| assertEnvVar GROUPER_MAX_MEMORY "1500m" | ||
| assertEnvVar GROUPER_PROXY_PASS "#" | ||
| assertEnvVarNot GROUPER_RUN_APACHE "true" | ||
| assertEnvVar GROUPER_RUN_PROCESSES_AS_USERS "true" | ||
| assertEnvVarNot GROUPER_RUN_SHIB_SP "true" | ||
| assertEnvVar GROUPER_RUN_TOMEE "true" | ||
| assertEnvVar GROUPER_SCIM "false" | ||
| assertEnvVar GROUPER_SCIM_GROUPER_AUTH "false" | ||
| assertEnvVar GROUPER_TOMCAT_CONTEXT "grouper" | ||
| assertEnvVar GROUPER_UI "false" | ||
| assertEnvVar GROUPER_UI_CONFIGURATION_EDITOR_SOURCEIPADDRESSES "127.0.0.1/32" | ||
| assertEnvVar GROUPER_UI_GROUPER_AUTH "false" | ||
| assertEnvVarNot GROUPER_UI_ONLY "true" | ||
| assertEnvVar GROUPER_URL_CONTEXT "grouper" | ||
| assertEnvVar GROUPER_USE_SSL "true" | ||
| assertEnvVar GROUPER_WS "false" | ||
| assertEnvVar GROUPER_WS_GROUPER_AUTH "false" | ||
|
|
||
| # one for hsqldb | ||
| assertNumberOfTomcatProcesses 1 | ||
| # bad cert apache wont start | ||
| assertNumberOfApacheProcesses 0 | ||
| assertNumberOfShibProcesses 0 | ||
|
|
||
| assertNotListeningOnPort 443 | ||
| assertNotListeningOnPort 80 | ||
| assertListeningOnPort 8009 | ||
| assertNotListeningOnPort 9001 | ||
|
|
||
| } | ||
| export -f testContainerDaemon |
Oops, something went wrong.