diff --git a/testsuite/docker-cluster/wildfly/Dockerfile b/testsuite/docker-cluster/wildfly/Dockerfile index 3727d5bd69..3fde5bc2df 100644 --- a/testsuite/docker-cluster/wildfly/Dockerfile +++ b/testsuite/docker-cluster/wildfly/Dockerfile @@ -29,6 +29,8 @@ RUN sed -i "s|#JAVA_OPTS=\"\$JAVA_OPTS -agentlib:jdwp=transport=dt_socket|JAVA_O ADD mysql-keycloak-ds.xml /opt/wildfly/standalone/deployments/ ADD keycloak-run-node.sh /keycloak-run-node.sh RUN chmod u+x /keycloak-run-node.sh +ADD deploy-examples.sh /deploy-examples.sh +RUN chmod u+x /deploy-examples.sh EXPOSE 8787 diff --git a/testsuite/docker-cluster/wildfly/deploy-examples.sh b/testsuite/docker-cluster/wildfly/deploy-examples.sh new file mode 100644 index 0000000000..d102dc235b --- /dev/null +++ b/testsuite/docker-cluster/wildfly/deploy-examples.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Deploy and configure all examples + +# Deploy examples +cd /keycloak-docker-cluster/examples +for I in $(find . | grep .war$); do cp $I /opt/wildfly/standalone/deployments/; done; + +# Explode wars +cd /opt/wildfly/standalone/deployments/ +for I in $(ls -d *.war | grep -v auth-server.war); do + echo "Explode dir $I"; + mkdir $I.tmp; + cd $I.tmp; + unzip -q ../$I; + cd .. + rm $I; + mv $I.tmp $I; + touch $I.dodeploy; +done; + + +# Configure admin-access.war +sed -i -e 's/false/true/' admin-access.war/WEB-INF/web.xml + +# Configure other examples +for I in *.war/WEB-INF/keycloak.json; do + echo "Configuring $I"; + sed -i -e 's/\"use-hostname-for-local-requests\": false/\"use-hostname-for-local-requests\": true/' $I; +done; + + diff --git a/testsuite/docker-cluster/wildfly/keycloak-run-node.sh b/testsuite/docker-cluster/wildfly/keycloak-run-node.sh index b9af405439..40603f9d86 100644 --- a/testsuite/docker-cluster/wildfly/keycloak-run-node.sh +++ b/testsuite/docker-cluster/wildfly/keycloak-run-node.sh @@ -50,9 +50,8 @@ cp -r /keycloak-docker-cluster/modules ./ # Deploy keycloak cp -r /keycloak-docker-cluster/deployments/* /opt/wildfly/standalone/deployments/ -# Deploy examples -cd /keycloak-docker-cluster/examples -for I in $(find . | grep .war$); do cp $I /opt/wildfly/standalone/deployments/; done; +# Deploy and configure examples +/deploy-examples.sh # Deploy to volume rm -rf /keycloak-docker-shared/keycloak-wildfly-$MYHOST