From 784b724fe0b4ad52f3a3ebb7758fe97285dbd423 Mon Sep 17 00:00:00 2001 From: mposolda Date: Tue, 5 Apr 2016 11:36:48 +0200 Subject: [PATCH] Removed docker-cluster as integration-arquillian has support for clustering tests now --- .../org/keycloak/adapters/AdapterUtils.java | 11 - .../org/keycloak/example/AdminClient.java | 1 - testsuite/docker-cluster/README.md | 157 ----- testsuite/docker-cluster/as7-image/Dockerfile | 32 - testsuite/docker-cluster/as7/Dockerfile | 13 - .../as7/keycloak-as7-trigger.sh | 8 - testsuite/docker-cluster/assembly.xml | 66 --- .../docker-cluster/eap6-image/Dockerfile | 30 - testsuite/docker-cluster/eap6/Dockerfile | 18 - .../eap6/keycloak-eap6-trigger.sh | 8 - testsuite/docker-cluster/fig-as7.yml | 31 - testsuite/docker-cluster/fig-eap6.yml | 31 - testsuite/docker-cluster/fig.yml | 31 - testsuite/docker-cluster/httpd/Dockerfile | 16 - testsuite/docker-cluster/httpd/httpd-run | 8 - testsuite/docker-cluster/httpd/httpd.conf | 550 ------------------ testsuite/docker-cluster/pom.xml | 141 ----- .../shared-files/deploy-examples.sh | 50 -- .../shared-files/keycloak-base-prepare.sh | 24 - .../shared-files/keycloak-run-node.sh | 78 --- .../shared-files/mysql-module.xml | 29 - .../shared-files/standaloneXmlChanges.xsl | 100 ---- testsuite/docker-cluster/wildfly/Dockerfile | 25 - .../wildfly/keycloak-wildfly-trigger.sh | 8 - testsuite/pom.xml | 9 - 25 files changed, 1475 deletions(-) delete mode 100644 testsuite/docker-cluster/README.md delete mode 100644 testsuite/docker-cluster/as7-image/Dockerfile delete mode 100644 testsuite/docker-cluster/as7/Dockerfile delete mode 100644 testsuite/docker-cluster/as7/keycloak-as7-trigger.sh delete mode 100644 testsuite/docker-cluster/assembly.xml delete mode 100644 testsuite/docker-cluster/eap6-image/Dockerfile delete mode 100644 testsuite/docker-cluster/eap6/Dockerfile delete mode 100644 testsuite/docker-cluster/eap6/keycloak-eap6-trigger.sh delete mode 100644 testsuite/docker-cluster/fig-as7.yml delete mode 100644 testsuite/docker-cluster/fig-eap6.yml delete mode 100644 testsuite/docker-cluster/fig.yml delete mode 100644 testsuite/docker-cluster/httpd/Dockerfile delete mode 100644 testsuite/docker-cluster/httpd/httpd-run delete mode 100644 testsuite/docker-cluster/httpd/httpd.conf delete mode 100755 testsuite/docker-cluster/pom.xml delete mode 100644 testsuite/docker-cluster/shared-files/deploy-examples.sh delete mode 100644 testsuite/docker-cluster/shared-files/keycloak-base-prepare.sh delete mode 100644 testsuite/docker-cluster/shared-files/keycloak-run-node.sh delete mode 100644 testsuite/docker-cluster/shared-files/mysql-module.xml delete mode 100644 testsuite/docker-cluster/shared-files/standaloneXmlChanges.xsl delete mode 100644 testsuite/docker-cluster/wildfly/Dockerfile delete mode 100644 testsuite/docker-cluster/wildfly/keycloak-wildfly-trigger.sh diff --git a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/AdapterUtils.java b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/AdapterUtils.java index ca35970761..935a9fcc99 100755 --- a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/AdapterUtils.java +++ b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/AdapterUtils.java @@ -38,17 +38,6 @@ public class AdapterUtils { return UUID.randomUUID().toString(); } - /** - * Find origin for REST request calls from web UI application to REST application (assuming the REST application - * is deployed on same host like current UI application) - * - * @param browserRequestURL - * @return - */ - public static String getOriginForRestCalls(String browserRequestURL) { - return UriUtils.getOrigin(browserRequestURL); - } - public static Set getRolesFromSecurityContext(RefreshableKeycloakSecurityContext session) { Set roles = null; AccessToken accessToken = session.getToken(); diff --git a/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java b/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java index 681675194f..8f81ef5d1b 100755 --- a/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java +++ b/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java @@ -23,7 +23,6 @@ import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.AdapterUtils; import org.keycloak.common.util.UriUtils; import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.util.JsonSerialization; diff --git a/testsuite/docker-cluster/README.md b/testsuite/docker-cluster/README.md deleted file mode 100644 index 87ebc08ca4..0000000000 --- a/testsuite/docker-cluster/README.md +++ /dev/null @@ -1,157 +0,0 @@ -How to test Keycloak cluster with Docker -======================================== -Docker+Fig allows to easily setup and test the whole environment with: -* Apache HTTPD 2.4 + modcluster 1.3 as Load Balancer -* MySQL 5.6.1 as database -* Various number of Keycloak cluster nodes running on WildFly with "demo" examples deployed. (See below for EAP 6.4 and AS7) - -You don't need to setup Apache with modcluster + MySQL on your laptop as Docker will do it for you and all will run in Docker containers. - -Steps to setup --------------- -1) Download and install [Docker](https://docs.docker.com/installation) and [Fig](http://www.fig.sh/install.html) - -2) Build Keycloak including distribution. This will be used by Docker+Fig. The point is that you can test clustering stuff from latest Keycloak master: -```shell -$ cd $KEYCLOAK_HOME -$ mvn clean install -$ cd distribution -$ mvn clean install -```` - -3) Build docker-cluster module with maven to ensure that needed data will be accessible to Docker+Fig volumes: -```shell -$ cd $KEYCLOAK_HOME/testsuite/docker-cluster -$ mvn clean install -```` - -4) Build fig and run the whole env. By default it will run Apache + MySQL + 1 Keycloak node: -```shell -$ fig build -$ fig up -```` - -First build will take long time as it need to download bunch of stuff and install into Docker container. Next builds will be much faster due to Docker cache. -After some time, WildFly server is started - -Testing -------- - -Apache is running in separate container and have 2 ports exposed locally: 10001 and 8000. Port 10001 is for modCluster - you should -be able to access Apache modCluster status page: [http://localhost:10001/mod_cluster_manager](http://localhost:10001/mod_cluster_manager) and see one node -with deployed "auth-server.war" and few other WARs (keycloak demo). - -Also you can access Keycloak admin console via loadBalancer on [http://localhost:8000/auth/admin](http://localhost:8000/auth/admin) and similarly Account mgmt. - -MySQL can be directly accessed from your machine (if you have MySQL client installed): -```shell -$ mysql -h127.0.0.1 -P33306 -uroot -pmysecretpassword -```` -Used database is "keycloak_db" - -Remote debugging ----------------- - -With command: -```shell -$ docker ps -```` - -You can see running ports. For the Keycloak node you may see output similar to this: -```shell -0.0.0.0:49153->8080/tcp, 0.0.0.0:49154->8787/tcp, 0.0.0.0:49155->9990/tcp -```` - -This means that you can directly access Keycloak (bypass loadbalancer) by going to [http://localhost:49153/auth/admin](http://localhost:49153/auth/admin) . -Also it means that debugger is mapped From Docker port 8787 to local port 49154 . So in your IDE you can connect with settings similar to: -```shell --agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=49154 -```` - -Scale / more cluster nodes --------------------------- - -Run this in separate terminal to add more (in this case 2) cluster nodes: -```shell -$ fig scale wfnode=2 -```` - -Now it should be visible on mod_cluster_manager page that they are 2 nodes. - -Seeing logs ------------ -It's easiest to do: -```shell -$ fig logs -```` -to see output of MySql and Keycloak server consoles. - -To see Apache and debug logs of keycloak server: -```shell -$ fig run wfnode /bin/bash -```` - -Then you're in shell inside docker container, which has some mounted volumes with apache logs and keycloak nodes. Apache logs are at: -```shell -$ cd /apachelogs/ -```` - -Keycloak nodes are at (debug logging enabled by default for "org.keycloak"): -```shell -$ cd /keycloak-docker/shared -```` - -Restart whole environment -------------------------- - -Just run: -```shell -$ fig stop -$ fig start -```` - -This will restart apache + MySQL + all nodes, but won't clear data. - -Changing configuration and clear data -------------------------------------- -Changing configuration (for example UserSession provider from 'mem' to 'jpa') is possible in -```shell -$KEYCLOAK_HOME/testsuite/docker-cluster/target/keycloak-docker-cluster/deployments/auth-server.war/WEB-INF/classes/META-INF/keycloak-server.json -```` - -then whole environment needs to be stopped, containers removed (in order to update configuration in nodes) and started again: -```shell -$ fig stop -$ fig rm -$ fig up -```` - -Rebuilding after changed sources -------------------------------- -In this case you might need to stop and remove existing containers. Then start from step 2 (Rebuild Keycloak or at least -changed jars, then rebuild distribution and testsuite/docker-cluster -(or just copy changed JAR into $KEYCLOAK_HOME/testsuite/docker-cluster/target/keycloak-docker-cluster/deployments/auth-server.war/WEB-INF/lib if it's not adapter stuff. -But 'fig rm' is safer to call anyway) - -Test with Keycloak and examples on EAP 6.4 ------------------------------------------- -Steps are quite similar like for WildFly but we need to pass different file "fig-eap6.yml" instead of default "fig.yml" which is used for WildFly. -Also name of the node is "eapnode" instead of "wfnode". - -So your commands will look like -```shell -$ fig -f fig-eap6.yml build -$ fig -f fig-eap6.yml up -$ fig -f fig-eap6.yml scale eapnode=2 -```` -and viceversa. - -Test with Keycloak and examples on AS 7.1.1 -------------------------------------------- -Also arguments need to be passed with different fig file and node name: TODO: AS7 cluster setup doesn't work correctly yet - - ```shell -$ fig -f fig-as7.yml build -$ fig -f fig-as7.yml up -$ fig -f fig-as7.yml scale asnode=2 -```` \ No newline at end of file diff --git a/testsuite/docker-cluster/as7-image/Dockerfile b/testsuite/docker-cluster/as7-image/Dockerfile deleted file mode 100644 index 6c17097209..0000000000 --- a/testsuite/docker-cluster/as7-image/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM jboss/wildfly - -USER root - -# Update yum and install required programs -RUN yum install -y unzip && yum install -y wget && yum install -y mc && yum -y install nc -RUN yum clean all - -# Download mysql driver -RUN cd /tmp -RUN wget http://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar -RUN mv *.jar mysql-connector-java-5.1.32.jar - -# Drop wildfly -RUN rm -rf /opt/wildfly* - -ENV AS7_VERSION 7.1.1.Final - -# Download and unpack AS7 distribution -RUN cd /opt -RUN wget http://download.jboss.org/jbossas/7.1/jboss-as-$AS7_VERSION/jboss-as-$AS7_VERSION.zip -RUN sleep 3 -RUN unzip -q jboss-as-$AS7_VERSION.zip - -# Make sure the distribution is available from a well-known place -RUN mv jboss-as-$AS7_VERSION /opt/as7 - -RUN rm -rf jboss-as-$AS7_VERSION.zip - -EXPOSE 8787 - -CMD [ "/bin/bash" ] diff --git a/testsuite/docker-cluster/as7/Dockerfile b/testsuite/docker-cluster/as7/Dockerfile deleted file mode 100644 index f216f84e55..0000000000 --- a/testsuite/docker-cluster/as7/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM mposolda/as7 - -ADD keycloak-as7-trigger.sh /keycloak-as7-trigger.sh -RUN chmod u+x /keycloak-as7-trigger.sh - -ENV JBOSS_HOME /opt/as7 -ENV JBOSS_MODULES_HOME $JBOSS_HOME/modules -ENV JBOSS_TYPE as7 -ENV NODE_PREFIX as - -EXPOSE 8787 - -CMD [ "/keycloak-as7-trigger.sh" ] \ No newline at end of file diff --git a/testsuite/docker-cluster/as7/keycloak-as7-trigger.sh b/testsuite/docker-cluster/as7/keycloak-as7-trigger.sh deleted file mode 100644 index a59408ce37..0000000000 --- a/testsuite/docker-cluster/as7/keycloak-as7-trigger.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -chmod u+x /keycloak-docker-cluster/shared-files/keycloak-run-node.sh -chmod u+x /keycloak-docker-cluster/shared-files/keycloak-base-prepare.sh -chmod u+x /keycloak-docker-cluster/shared-files/deploy-examples.sh - -echo "Permissions changed. Triggering keycloak-run-node.sh" -/keycloak-docker-cluster/shared-files/keycloak-run-node.sh diff --git a/testsuite/docker-cluster/assembly.xml b/testsuite/docker-cluster/assembly.xml deleted file mode 100644 index 78c6bef337..0000000000 --- a/testsuite/docker-cluster/assembly.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - docker-cluster - - - dir - - false - - - - ../../examples/demo-template - examples - - **/target/*.war - **/testrealm.json - - - - target/deployments - deployments - - **/keycloak-ds.xml - - - - target/wildfly-adapter - wildfly-adapter - - - target/as7-adapter - as7-adapter - - - target/eap63-adapter - eap63-adapter - - - target/server-overlay - server-overlay - - **/standalone-keycloak.xml - - - - shared-files - shared-files - - - diff --git a/testsuite/docker-cluster/eap6-image/Dockerfile b/testsuite/docker-cluster/eap6-image/Dockerfile deleted file mode 100644 index e655baf543..0000000000 --- a/testsuite/docker-cluster/eap6-image/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM jboss/wildfly - -USER root - -# Update yum and install required programs -RUN yum install -y unzip && yum install -y wget && yum install -y mc && yum -y install nc -RUN yum clean all - -# Drop wildfly -RUN rm -rf /opt/jboss/wildfly* - -# Download mysql driver -RUN cd /tmp -RUN wget http://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar -RUN mv *.jar /mysql-connector-java-5.1.32.jar - -# Download and unpack EAP64 distribution TODO: Check if it's an issue for EAP 6.4 -RUN cd / -RUN wget https://dl.dropboxusercontent.com/u/5525920/jboss-eap-6.4.0.zip -RUN sleep 3 -RUN unzip -q jboss-eap-6.4.0.zip - -# Make sure the distribution is available from a well-known place -RUN mv jboss-eap-6.4 /opt/eap6 - -RUN rm -rf jboss-eap-6.4.0.zip - -EXPOSE 8787 - -CMD [ "/bin/bash" ] \ No newline at end of file diff --git a/testsuite/docker-cluster/eap6/Dockerfile b/testsuite/docker-cluster/eap6/Dockerfile deleted file mode 100644 index 9d7ad62675..0000000000 --- a/testsuite/docker-cluster/eap6/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM mposolda/eap64 - -ADD keycloak-eap6-trigger.sh /keycloak-eap6-trigger.sh -RUN chmod u+x /keycloak-eap6-trigger.sh - -# TODO: REmove as it's in base EAP64 image already -RUN cd /tmp -RUN wget http://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar -RUN mv mysql-connector-*.jar / - -ENV JBOSS_HOME /opt/eap6 -ENV JBOSS_MODULES_HOME $JBOSS_HOME/modules/system/layers/base -ENV JBOSS_TYPE eap6 -ENV NODE_PREFIX eap - -EXPOSE 8787 - -CMD [ "/keycloak-eap6-trigger.sh" ] \ No newline at end of file diff --git a/testsuite/docker-cluster/eap6/keycloak-eap6-trigger.sh b/testsuite/docker-cluster/eap6/keycloak-eap6-trigger.sh deleted file mode 100644 index a59408ce37..0000000000 --- a/testsuite/docker-cluster/eap6/keycloak-eap6-trigger.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -chmod u+x /keycloak-docker-cluster/shared-files/keycloak-run-node.sh -chmod u+x /keycloak-docker-cluster/shared-files/keycloak-base-prepare.sh -chmod u+x /keycloak-docker-cluster/shared-files/deploy-examples.sh - -echo "Permissions changed. Triggering keycloak-run-node.sh" -/keycloak-docker-cluster/shared-files/keycloak-run-node.sh diff --git a/testsuite/docker-cluster/fig-as7.yml b/testsuite/docker-cluster/fig-as7.yml deleted file mode 100644 index 9d11d6900c..0000000000 --- a/testsuite/docker-cluster/fig-as7.yml +++ /dev/null @@ -1,31 +0,0 @@ -httpd: - build: httpd - ports: - - "8000:80" - - "10001:10001" - volumes_from: - - mysql -mysql: - image: mysql:5.6.20 - environment: - - MYSQL_ROOT_PASSWORD=mysecretpassword - - MYSQL_DATABASE=keycloak_db - volumes: - - /keycloak-docker-shared - - /apachelogs - ports: - - "33306:3306" -asnode: - build: as7 - command: /keycloak-as7-trigger.sh - volumes: - - target/keycloak-docker-cluster:/keycloak-docker-cluster - volumes_from: - - mysql - links: - - httpd:httpd - - mysql:mysql - ports: - - "8787" - - "8080" - - "9990" \ No newline at end of file diff --git a/testsuite/docker-cluster/fig-eap6.yml b/testsuite/docker-cluster/fig-eap6.yml deleted file mode 100644 index b15cbb6310..0000000000 --- a/testsuite/docker-cluster/fig-eap6.yml +++ /dev/null @@ -1,31 +0,0 @@ -httpd: - build: httpd - ports: - - "8000:80" - - "10001:10001" - volumes_from: - - mysql -mysql: - image: mysql:5.6.20 - environment: - - MYSQL_ROOT_PASSWORD=mysecretpassword - - MYSQL_DATABASE=keycloak_db - volumes: - - /keycloak-docker-shared - - /apachelogs - ports: - - "33306:3306" -eapnode: - build: eap6 - command: /keycloak-eap6-trigger.sh - volumes: - - target/keycloak-docker-cluster:/keycloak-docker-cluster - volumes_from: - - mysql - links: - - httpd:httpd - - mysql:mysql - ports: - - "8787" - - "8080" - - "9990" \ No newline at end of file diff --git a/testsuite/docker-cluster/fig.yml b/testsuite/docker-cluster/fig.yml deleted file mode 100644 index e75c7c597f..0000000000 --- a/testsuite/docker-cluster/fig.yml +++ /dev/null @@ -1,31 +0,0 @@ -httpd: - build: httpd - ports: - - "8000:80" - - "10001:10001" - volumes_from: - - mysql -mysql: - image: mysql:5.6.20 - environment: - - MYSQL_ROOT_PASSWORD=mysecretpassword - - MYSQL_DATABASE=keycloak_db - volumes: - - /keycloak-docker-shared - - /apachelogs - ports: - - "33306:3306" -wfnode: - build: wildfly - command: /keycloak-wildfly-trigger.sh - volumes: - - target/keycloak-docker-cluster:/keycloak-docker-cluster - volumes_from: - - mysql - links: - - httpd:httpd - - mysql:mysql - ports: - - "8787" - - "8080" - - "9990" diff --git a/testsuite/docker-cluster/httpd/Dockerfile b/testsuite/docker-cluster/httpd/Dockerfile deleted file mode 100644 index 8a0d79a401..0000000000 --- a/testsuite/docker-cluster/httpd/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM fedora:20 - -RUN cd / -RUN yum -y install wget && yum -y install unzip -RUN yum clean all - -RUN wget https://dl.dropboxusercontent.com/u/5525920/apache24-modcluster131.zip -RUN unzip -q apache24-modcluster131.zip - -ADD httpd-run /bin/httpd-run -RUN chmod u+x /bin/httpd-run - -ADD httpd.conf /opt/jboss/httpd/httpd/conf/httpd.conf - -EXPOSE 80 10001 -CMD ["/bin/httpd-run"] diff --git a/testsuite/docker-cluster/httpd/httpd-run b/testsuite/docker-cluster/httpd/httpd-run deleted file mode 100644 index 26e8f70265..0000000000 --- a/testsuite/docker-cluster/httpd/httpd-run +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Make sure we're not confused by old, incompletely-shutdown httpd -# context after restarting the container. httpd won't start correctly -# if it thinks it is already running. -rm -rf /opt/jboss/httpd/httpd/logs/httpd.pid - -exec /opt/jboss/httpd/sbin/apachectl -D FOREGROUND diff --git a/testsuite/docker-cluster/httpd/httpd.conf b/testsuite/docker-cluster/httpd/httpd.conf deleted file mode 100644 index 8d3758ebdb..0000000000 --- a/testsuite/docker-cluster/httpd/httpd.conf +++ /dev/null @@ -1,550 +0,0 @@ -# -# This is the main Apache HTTP server configuration file. It contains the -# configuration directives that give the server its instructions. -# See for detailed information. -# In particular, see -# -# for a discussion of each configuration directive. -# -# Do NOT simply read the instructions in here without understanding -# what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. -# -# Configuration and logfile names: If the filenames you specify for many -# of the server's control files begin with "/" (or "drive:/" for Win32), the -# server will use that explicit path. If the filenames do *not* begin -# with "/", the value of ServerRoot is prepended -- so "logs/access_log" -# with ServerRoot set to "/usr/local/apache2" will be interpreted by the -# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" -# will be interpreted as '/logs/access_log'. - -# -# ServerRoot: The top of the directory tree under which the server's -# configuration, error, and log files are kept. -# -# Do not add a slash at the end of the directory path. If you point -# ServerRoot at a non-local disk, be sure to specify a local disk on the -# Mutex directive, if file-based mutexes are used. If you wish to share the -# same ServerRoot for multiple httpd daemons, you will need to change at -# least PidFile. -# -ServerRoot "/opt/jboss/httpd/httpd" - -# -# Mutex: Allows you to set the mutex mechanism and mutex file directory -# for individual mutexes, or change the global defaults -# -# Uncomment and change the directory if mutexes are file-based and the default -# mutex file directory is not on a local disk or is not appropriate for some -# other reason. -# -# Mutex default:logs - -# -# Listen: Allows you to bind Apache to specific IP addresses and/or -# ports, instead of the default. See also the -# directive. -# -# Change this to Listen on specific IP addresses as shown below to -# prevent Apache from glomming onto all bound IP addresses. -# -#Listen 12.34.56.78:80 -Listen 80 - -# -# Dynamic Shared Object (DSO) Support -# -# To be able to use the functionality of a module which was built as a DSO you -# have to place corresponding `LoadModule' lines at this location so the -# directives contained in it are actually available _before_ they are used. -# Statically compiled modules (those listed by `httpd -l') do not need -# to be loaded here. -# -# Example: -# LoadModule foo_module modules/mod_foo.so -# -LoadModule authn_file_module /opt/jboss/httpd/lib/httpd/modules/mod_authn_file.so -#LoadModule authn_dbm_module /opt/jboss/httpd/lib/httpd/modules/mod_authn_dbm.so -#LoadModule authn_anon_module /opt/jboss/httpd/lib/httpd/modules/mod_authn_anon.so -#LoadModule authn_dbd_module /opt/jboss/httpd/lib/httpd/modules/mod_authn_dbd.so -#LoadModule authn_socache_module /opt/jboss/httpd/lib/httpd/modules/mod_authn_socache.so -LoadModule authn_core_module /opt/jboss/httpd/lib/httpd/modules/mod_authn_core.so -LoadModule authz_host_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_host.so -LoadModule authz_groupfile_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_groupfile.so -LoadModule authz_user_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_user.so -#LoadModule authz_dbm_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_dbm.so -#LoadModule authz_owner_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_owner.so -#LoadModule authz_dbd_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_dbd.so -LoadModule authz_core_module /opt/jboss/httpd/lib/httpd/modules/mod_authz_core.so -LoadModule access_compat_module /opt/jboss/httpd/lib/httpd/modules/mod_access_compat.so -LoadModule auth_basic_module /opt/jboss/httpd/lib/httpd/modules/mod_auth_basic.so -#LoadModule auth_form_module /opt/jboss/httpd/lib/httpd/modules/mod_auth_form.so -#LoadModule auth_digest_module /opt/jboss/httpd/lib/httpd/modules/mod_auth_digest.so -#LoadModule allowmethods_module /opt/jboss/httpd/lib/httpd/modules/mod_allowmethods.so -LoadModule advertise_module /opt/jboss/httpd/lib/httpd/modules/mod_advertise.so -#LoadModule file_cache_module /opt/jboss/httpd/lib/httpd/modules/mod_file_cache.so -#LoadModule cache_module /opt/jboss/httpd/lib/httpd/modules/mod_cache.so -#LoadModule cache_disk_module /opt/jboss/httpd/lib/httpd/modules/mod_cache_disk.so -#LoadModule cache_socache_module /opt/jboss/httpd/lib/httpd/modules/mod_cache_socache.so -#LoadModule socache_shmcb_module /opt/jboss/httpd/lib/httpd/modules/mod_socache_shmcb.so -#LoadModule socache_dbm_module /opt/jboss/httpd/lib/httpd/modules/mod_socache_dbm.so -#LoadModule socache_memcache_module /opt/jboss/httpd/lib/httpd/modules/mod_socache_memcache.so -#LoadModule watchdog_module /opt/jboss/httpd/lib/httpd/modules/mod_watchdog.so -#LoadModule macro_module /opt/jboss/httpd/lib/httpd/modules/mod_macro.so -#LoadModule dbd_module /opt/jboss/httpd/lib/httpd/modules/mod_dbd.so -#LoadModule dumpio_module /opt/jboss/httpd/lib/httpd/modules/mod_dumpio.so -#LoadModule echo_module /opt/jboss/httpd/lib/httpd/modules/mod_echo.so -#LoadModule buffer_module /opt/jboss/httpd/lib/httpd/modules/mod_buffer.so -#LoadModule data_module /opt/jboss/httpd/lib/httpd/modules/mod_data.so -#LoadModule ratelimit_module /opt/jboss/httpd/lib/httpd/modules/mod_ratelimit.so -LoadModule reqtimeout_module /opt/jboss/httpd/lib/httpd/modules/mod_reqtimeout.so -#LoadModule ext_filter_module /opt/jboss/httpd/lib/httpd/modules/mod_ext_filter.so -#LoadModule request_module /opt/jboss/httpd/lib/httpd/modules/mod_request.so -#LoadModule include_module /opt/jboss/httpd/lib/httpd/modules/mod_include.so -LoadModule filter_module /opt/jboss/httpd/lib/httpd/modules/mod_filter.so -#LoadModule reflector_module /opt/jboss/httpd/lib/httpd/modules/mod_reflector.so -#LoadModule substitute_module /opt/jboss/httpd/lib/httpd/modules/mod_substitute.so -#LoadModule sed_module /opt/jboss/httpd/lib/httpd/modules/mod_sed.so -#LoadModule charset_lite_module /opt/jboss/httpd/lib/httpd/modules/mod_charset_lite.so -#LoadModule deflate_module /opt/jboss/httpd/lib/httpd/modules/mod_deflate.so -#LoadModule xml2enc_module /opt/jboss/httpd/lib/httpd/modules/mod_xml2enc.so -#LoadModule proxy_html_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_html.so -LoadModule mime_module /opt/jboss/httpd/lib/httpd/modules/mod_mime.so -LoadModule log_config_module /opt/jboss/httpd/lib/httpd/modules/mod_log_config.so -#LoadModule log_debug_module /opt/jboss/httpd/lib/httpd/modules/mod_log_debug.so -#LoadModule log_forensic_module /opt/jboss/httpd/lib/httpd/modules/mod_log_forensic.so -#LoadModule logio_module /opt/jboss/httpd/lib/httpd/modules/mod_logio.so -LoadModule env_module /opt/jboss/httpd/lib/httpd/modules/mod_env.so -#LoadModule mime_magic_module /opt/jboss/httpd/lib/httpd/modules/mod_mime_magic.so -#LoadModule expires_module /opt/jboss/httpd/lib/httpd/modules/mod_expires.so -LoadModule headers_module /opt/jboss/httpd/lib/httpd/modules/mod_headers.so -#LoadModule usertrack_module /opt/jboss/httpd/lib/httpd/modules/mod_usertrack.so -#LoadModule unique_id_module /opt/jboss/httpd/lib/httpd/modules/mod_unique_id.so -LoadModule setenvif_module /opt/jboss/httpd/lib/httpd/modules/mod_setenvif.so -LoadModule version_module /opt/jboss/httpd/lib/httpd/modules/mod_version.so -#LoadModule remoteip_module /opt/jboss/httpd/lib/httpd/modules/mod_remoteip.so -LoadModule proxy_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy.so -LoadModule proxy_connect_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_connect.so -LoadModule proxy_ftp_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_ftp.so -LoadModule proxy_http_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_http.so -LoadModule proxy_fcgi_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_fcgi.so -LoadModule proxy_scgi_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_scgi.so -#LoadModule proxy_fdpass_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_fdpass.so -LoadModule proxy_wstunnel_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_wstunnel.so -LoadModule proxy_ajp_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_ajp.so -LoadModule proxy_cluster_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_cluster.so -LoadModule proxy_express_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_express.so -#LoadModule session_module /opt/jboss/httpd/lib/httpd/modules/mod_session.so -#LoadModule session_cookie_module /opt/jboss/httpd/lib/httpd/modules/mod_session_cookie.so -#LoadModule session_dbd_module /opt/jboss/httpd/lib/httpd/modules/mod_session_dbd.so -#LoadModule slotmem_shm_module /opt/jboss/httpd/lib/httpd/modules/mod_slotmem_shm.so -#LoadModule slotmem_plain_module /opt/jboss/httpd/lib/httpd/modules/mod_slotmem_plain.so -#LoadModule ssl_module /opt/jboss/httpd/lib/httpd/modules/mod_ssl.so -#LoadModule dialup_module /opt/jboss/httpd/lib/httpd/modules/mod_dialup.so -LoadModule lbmethod_byrequests_module /opt/jboss/httpd/lib/httpd/modules/mod_lbmethod_byrequests.so -LoadModule lbmethod_bytraffic_module /opt/jboss/httpd/lib/httpd/modules/mod_lbmethod_bytraffic.so -LoadModule lbmethod_bybusyness_module /opt/jboss/httpd/lib/httpd/modules/mod_lbmethod_bybusyness.so -LoadModule lbmethod_heartbeat_module /opt/jboss/httpd/lib/httpd/modules/mod_lbmethod_heartbeat.so -LoadModule unixd_module /opt/jboss/httpd/lib/httpd/modules/mod_unixd.so -#LoadModule heartbeat_module /opt/jboss/httpd/lib/httpd/modules/mod_heartbeat.so -#LoadModule heartmonitor_module /opt/jboss/httpd/lib/httpd/modules/mod_heartmonitor.so -#LoadModule dav_module /opt/jboss/httpd/lib/httpd/modules/mod_dav.so -LoadModule status_module /opt/jboss/httpd/lib/httpd/modules/mod_status.so -LoadModule autoindex_module /opt/jboss/httpd/lib/httpd/modules/mod_autoindex.so -#LoadModule asis_module /opt/jboss/httpd/lib/httpd/modules/mod_asis.so -#LoadModule info_module /opt/jboss/httpd/lib/httpd/modules/mod_info.so -#LoadModule suexec_module /opt/jboss/httpd/lib/httpd/modules/mod_suexec.so -#LoadModule cgi_module /opt/jboss/httpd/lib/httpd/modules/mod_cgi.so -#LoadModule cgid_module /opt/jboss/httpd/lib/httpd/modules/mod_cgid.so -LoadModule cluster_slotmem_module /opt/jboss/httpd/lib/httpd/modules/mod_cluster_slotmem.so -LoadModule manager_module /opt/jboss/httpd/lib/httpd/modules/mod_manager.so -#LoadModule dav_fs_module /opt/jboss/httpd/lib/httpd/modules/mod_dav_fs.so -#LoadModule dav_lock_module /opt/jboss/httpd/lib/httpd/modules/mod_dav_lock.so -#LoadModule vhost_alias_module /opt/jboss/httpd/lib/httpd/modules/mod_vhost_alias.so -#LoadModule negotiation_module /opt/jboss/httpd/lib/httpd/modules/mod_negotiation.so -LoadModule dir_module /opt/jboss/httpd/lib/httpd/modules/mod_dir.so -#LoadModule actions_module /opt/jboss/httpd/lib/httpd/modules/mod_actions.so -#LoadModule speling_module /opt/jboss/httpd/lib/httpd/modules/mod_speling.so -#LoadModule userdir_module /opt/jboss/httpd/lib/httpd/modules/mod_userdir.so -LoadModule alias_module /opt/jboss/httpd/lib/httpd/modules/mod_alias.so -#LoadModule rewrite_module /opt/jboss/httpd/lib/httpd/modules/mod_rewrite.so - - -# -# If you wish httpd to run as a different user or group, you must run -# httpd as root initially and it will switch. -# -# User/Group: The name (or #number) of the user/group to run httpd as. -# It is usually good practice to create a dedicated user and group for -# running httpd, as with most system services. -# -User daemon -Group daemon - - - -# 'Main' server configuration -# -# The directives in this section set up the values used by the 'main' -# server, which responds to any requests that aren't handled by a -# definition. These values also provide defaults for -# any containers you may define later in the file. -# -# All of these directives may appear inside containers, -# in which case these default settings will be overridden for the -# virtual host being defined. -# - -# -# ServerAdmin: Your address, where problems with the server should be -# e-mailed. This address appears on some server-generated pages, such -# as error documents. e.g. admin@your-domain.com -# -ServerAdmin you@example.com - -# -# ServerName gives the name and port that the server uses to identify itself. -# This can often be determined automatically, but we recommend you specify -# it explicitly to prevent problems during startup. -# -# If your host doesn't have a registered DNS name, enter its IP address here. -# -#ServerName www.example.com:80 - -# -# Deny access to the entirety of your server's filesystem. You must -# explicitly permit access to web content directories in other -# blocks below. -# - - AllowOverride none - Require all denied - - -# -# Note that from this point forward you must specifically allow -# particular features to be enabled - so if something's not working as -# you might expect, make sure that you have specifically enabled it -# below. -# - -# -# DocumentRoot: The directory out of which you will serve your -# documents. By default, all requests are taken from this directory, but -# symbolic links and aliases may be used to point to other locations. -# -DocumentRoot "/opt/jboss/httpd/htdocs/htdocs" - - # - # Possible values for the Options directive are "None", "All", - # or any combination of: - # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews - # - # Note that "MultiViews" must be named *explicitly* --- "Options All" - # doesn't give it to you. - # - # The Options directive is both complicated and important. Please see - # http://httpd.apache.org/docs/2.4/mod/core.html#options - # for more information. - # - Options Indexes FollowSymLinks - - # - # AllowOverride controls what directives may be placed in .htaccess files. - # It can be "All", "None", or any combination of the keywords: - # AllowOverride FileInfo AuthConfig Limit - # - AllowOverride None - - # - # Controls who can get stuff from this server. - # - Require all granted - - -# -# DirectoryIndex: sets the file that Apache will serve if a directory -# is requested. -# - - DirectoryIndex index.html - - -# -# The following lines prevent .htaccess and .htpasswd files from being -# viewed by Web clients. -# - - Require all denied - - -# -# ErrorLog: The location of the error log file. -# If you do not specify an ErrorLog directive within a -# container, error messages relating to that virtual host will be -# logged here. If you *do* define an error logfile for a -# container, that host's errors will be logged there and not here. -# -# Note: Actually it's custom location mounted to docker volume -ErrorLog "/apachelogs/error_log" - -# -# LogLevel: Control the number of messages logged to the error_log. -# Possible values include: debug, info, notice, warn, error, crit, -# alert, emerg. -# -LogLevel info - - - # - # The following directives define some format nicknames for use with - # a CustomLog directive (see below). - # - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined - LogFormat "%h %l %u %t \"%r\" %>s %b" common - - - # You need to enable mod_logio.c to use %I and %O - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio - - - # - # The location and format of the access logfile (Common Logfile Format). - # If you do not define any access logfiles within a - # container, they will be logged here. Contrariwise, if you *do* - # define per- access logfiles, transactions will be - # logged therein and *not* in this file. - # - CustomLog "/apachelogs/access_log" common - - # - # If you prefer a logfile with access, agent, and referer information - # (Combined Logfile Format) you can use the following directive. - # - #CustomLog "logs/access_log" combined - - - - # - # Redirect: Allows you to tell clients about documents that used to - # exist in your server's namespace, but do not anymore. The client - # will make a new request for the document at its new location. - # Example: - # Redirect permanent /foo http://www.example.com/bar - - # - # Alias: Maps web paths into filesystem paths and is used to - # access content that does not live under the DocumentRoot. - # Example: - # Alias /webpath /full/filesystem/path - # - # If you include a trailing / on /webpath then the server will - # require it to be present in the URL. You will also likely - # need to provide a section to allow access to - # the filesystem path. - - # - # ScriptAlias: This controls which directories contain server scripts. - # ScriptAliases are essentially the same as Aliases, except that - # documents in the target directory are treated as applications and - # run by the server when requested rather than as documents sent to the - # client. The same rules about trailing "/" apply to ScriptAlias - # directives as to Alias. - # - ScriptAlias /cgi-bin/ "/opt/jboss/httpd/htdocs/cgi-bin/" - - - - - # - # ScriptSock: On threaded servers, designate the path to the UNIX - # socket used to communicate with the CGI daemon of mod_cgid. - # - #Scriptsock cgisock - - -# -# "/opt/jboss/httpd/htdocs/cgi-bin" should be changed to whatever your ScriptAliased -# CGI directory exists, if you have that configured. -# - - AllowOverride None - Options None - Require all granted - - - - # - # TypesConfig points to the file containing the list of mappings from - # filename extension to MIME-type. - # - TypesConfig conf/mime.types - - # - # AddType allows you to add to or override the MIME configuration - # file specified in TypesConfig for specific file types. - # - #AddType application/x-gzip .tgz - # - # AddEncoding allows you to have certain browsers uncompress - # information on the fly. Note: Not all browsers support this. - # - #AddEncoding x-compress .Z - #AddEncoding x-gzip .gz .tgz - # - # If the AddEncoding directives above are commented-out, then you - # probably should define those extensions to indicate media types: - # - AddType application/x-compress .Z - AddType application/x-gzip .gz .tgz - - # - # AddHandler allows you to map certain file extensions to "handlers": - # actions unrelated to filetype. These can be either built into the server - # or added with the Action directive (see below) - # - # To use CGI scripts outside of ScriptAliased directories: - # (You will also need to add "ExecCGI" to the "Options" directive.) - # - #AddHandler cgi-script .cgi - - # For type maps (negotiated resources): - #AddHandler type-map var - - # - # Filters allow you to process content before it is sent to the client. - # - # To parse .shtml files for server-side includes (SSI): - # (You will also need to add "Includes" to the "Options" directive.) - # - #AddType text/html .shtml - #AddOutputFilter INCLUDES .shtml - - -# -# The mod_mime_magic module allows the server to use various hints from the -# contents of the file itself to determine its type. The MIMEMagicFile -# directive tells the module where the hint definitions are located. -# -#MIMEMagicFile conf/magic - -# -# Customizable error responses come in three flavors: -# 1) plain text 2) local redirects 3) external redirects -# -# Some examples: -#ErrorDocument 500 "The server made a boo boo." -#ErrorDocument 404 /missing.html -#ErrorDocument 404 "/cgi-bin/missing_handler.pl" -#ErrorDocument 402 http://www.example.com/subscription_info.html -# - -# -# MaxRanges: Maximum number of Ranges in a request before -# returning the entire resource, or one of the special -# values 'default', 'none' or 'unlimited'. -# Default setting is to accept 200 Ranges. -#MaxRanges unlimited - -# -# EnableMMAP and EnableSendfile: On systems that support it, -# memory-mapping or the sendfile syscall may be used to deliver -# files. This usually improves server performance, but must -# be turned off when serving from networked-mounted -# filesystems or if support for these functions is otherwise -# broken on your system. -# Defaults: EnableMMAP On, EnableSendfile Off -# -#EnableMMAP off -#EnableSendfile on - -# Supplemental configuration -# -# The configuration files in the conf/extra/ directory can be -# included to add extra features or to modify the default configuration of -# the server, or you may simply copy their contents here and change as -# necessary. - -# Server-pool management (MPM specific) -#Include conf/extra/httpd-mpm.conf - -# Multi-language error messages -#Include conf/extra/httpd-multilang-errordoc.conf - -# Fancy directory listings -#Include conf/extra/httpd-autoindex.conf - -# Language settings -#Include conf/extra/httpd-languages.conf - -# User home directories -#Include conf/extra/httpd-userdir.conf - -# Real-time info on requests and configuration -#Include conf/extra/httpd-info.conf - -# Virtual hosts -#Include conf/extra/httpd-vhosts.conf - -# Local access to the Apache HTTP Server Manual -#Include conf/extra/httpd-manual.conf - -# Distributed authoring and versioning (WebDAV) -#Include conf/extra/httpd-dav.conf - -# Various default settings -#Include conf/extra/httpd-default.conf - -# Configure mod_proxy_html to understand HTML4/XHTML1 - -Include conf/extra/proxy-html.conf - - -# Secure (SSL/TLS) connections -#Include conf/extra/httpd-ssl.conf -# -# Note: The following must must be present to support -# starting without SSL on platforms with no /dev/random equivalent -# but a statically compiled-in mod_ssl. -# - -SSLRandomSeed startup builtin -SSLRandomSeed connect builtin - -# -# uncomment out the below to deal with user agents that deliberately -# violate open standards by misusing DNT (DNT *must* be a specific -# end-user choice) -# -# -#BrowserMatch "MSIE 10.0;" bad_DNT -# -# -#RequestHeader unset DNT env=bad_DNT -# - -# MOD_CLUSTER_ADDS -# Adjust to you hostname and subnet. - - Listen *:10001 - ManagerBalancerName mycluster - - - Require all granted - - - KeepAliveTimeout 300 - MaxKeepAliveRequests 0 - #ServerAdvertise on http://@IP@:6666 - AdvertiseFrequency 5 - #AdvertiseSecurityKey secret - #AdvertiseGroup @ADVIP@:23364 - EnableMCPMReceive - - - SetHandler mod_cluster-manager - Require all granted - - - - diff --git a/testsuite/docker-cluster/pom.xml b/testsuite/docker-cluster/pom.xml deleted file mode 100755 index 1f67e1234c..0000000000 --- a/testsuite/docker-cluster/pom.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - 4.0.0 - - keycloak-testsuite-pom - org.keycloak - 2.0.0.CR1-SNAPSHOT - ../pom.xml - - - keycloak-testsuite-docker-cluster - pom - Keycloak Docker Cluster - - - - - org.keycloak - keycloak-server-overlay - zip - - - org.keycloak - keycloak-wildfly-adapter-dist - zip - - - org.keycloak - keycloak-as7-adapter-dist - zip - - - org.keycloak - keycloak-eap6-adapter-dist - zip - - - - - keycloak-docker-cluster - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - unpack - prepare-package - - unpack - - - - - org.keycloak - keycloak-server-overlay - zip - ${project.version} - ${project.build.directory}/server-overlay - - - org.keycloak - keycloak-wildfly-adapter-dist - zip - ${project.version} - ${project.build.directory}/wildfly-adapter - - - org.keycloak - keycloak-as7-adapter-dist - zip - ${project.version} - ${project.build.directory}/as7-adapter - - - org.keycloak - keycloak-eap6-adapter-dist - zip - ${project.version} - ${project.build.directory}/eap63-adapter - - - - - - - - maven-assembly-plugin - 2.4 - - - assemble - package - - single - - - - assembly.xml - - - target - - - target/assembly/work - - false - - - - - - - - diff --git a/testsuite/docker-cluster/shared-files/deploy-examples.sh b/testsuite/docker-cluster/shared-files/deploy-examples.sh deleted file mode 100644 index 6f29e4a147..0000000000 --- a/testsuite/docker-cluster/shared-files/deploy-examples.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -## Deploy and configure all examples - -# Deploy examples -cd /keycloak-docker-cluster/examples -for I in $(find . | grep .war$); do cp $I $JBOSS_HOME/standalone/deployments/; done; - -# Explode wars -cd $JBOSS_HOME/standalone/deployments/ -for I in $(ls -d *.war | grep -v auth-server.war); do - echo "Configuring $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 - -# Enforce refreshing token for product-portal and customer-portal war -# sed -i -e 's/\"\/auth\",/&\n \"always-refresh-token\": true,/' customer-portal.war/WEB-INF/keycloak.json; -# sed -i -e 's/\"\/auth\",/&\n \"always-refresh-token\": true,/' product-portal.war/WEB-INF/keycloak.json; - -# Configure other examples -for I in *.war/WEB-INF/keycloak.json; do - sed -i -e 's/\"resource\".*: \".*\",/&\n \"auth-server-url-for-backend-requests\": \"http:\/\/\$\{jboss.host.name\}:8080\/auth\",\n \"register-node-at-startup\": true,\n \"register-node-period\": 150,/' $I; - sed -i -e 's/\"bearer-only\" : true,/&\n \"credentials\" : \{ \"secret\": \"password\" \},/' $I; -done; - -# Configure database.war -sed -i -e 's/\"auth-server-url\": \"\/auth\",/\"auth-server-url\": \"http:\/\/localhost:8000\/auth\",/' database.war/WEB-INF/keycloak.json; - -# Enable distributable for customer-portal -sed -i -e 's/<\/module-name>/&\n /' customer-portal.war/WEB-INF/web.xml - -# Configure testrealm.json - Enable adminUrl to access adapters on local machine, add jboss-logging listener and add secret for database-service application -TEST_REALM=/keycloak-docker-cluster/examples/testrealm.json -sed -i -e 's/\"adminUrl\": \"\/customer-portal/\"adminUrl\": \"http:\/\/\$\{jboss.host.name\}:8080\/customer-portal/' $TEST_REALM -sed -i -e 's/\"adminUrl\": \"\/product-portal/\"adminUrl\": \"http:\/\/\$\{application.session.host\}:8080\/product-portal/' $TEST_REALM -sed -i -e 's/\"adminUrl\": \"\/database/\"adminUrl\": \"http:\/\/\$\{jboss.host.name\}:8080\/database/' $TEST_REALM -sed -i -e 's/\"bearerOnly\": true/&,\n \"secret\": \"password\"/' $TEST_REALM -sed -i -e 's/\"sslRequired\": \"external\",/&\n \"eventsListeners\": \[ \"jboss-logging\" \],/' $TEST_REALM - - diff --git a/testsuite/docker-cluster/shared-files/keycloak-base-prepare.sh b/testsuite/docker-cluster/shared-files/keycloak-base-prepare.sh deleted file mode 100644 index e15d1cd555..0000000000 --- a/testsuite/docker-cluster/shared-files/keycloak-base-prepare.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Copy Overlay -cp -r /keycloak-docker-cluster/server-overlay/* $JBOSS_HOME/ - -# Deploy and configure examples -/keycloak-docker-cluster/shared-files/deploy-examples.sh - -# Copy MySQL driver -cd /tmp -mkdir -p mysql/main && mv /mysql-connector-java-5.1.32.jar mysql/main/ -cp /keycloak-docker-cluster/shared-files/mysql-module.xml mysql/main/module.xml -mv mysql $JBOSS_MODULES_HOME/com/ - -# Transform standalone-keycloak-ha.xml -java -jar /usr/share/java/saxon.jar -s:$JBOSS_HOME/standalone/configuration/standalone-keycloak-ha.xml -xsl:/keycloak-docker-cluster/shared-files/standaloneXmlChanges.xsl -o:$JBOSS_HOME/standalone/configuration/standalone-keycloak-ha.xml - -sed -i "s|#JAVA_OPTS=\"\$JAVA_OPTS -agentlib:jdwp=transport=dt_socket|JAVA_OPTS=\"\$JAVA_OPTS -agentlib:jdwp=transport=dt_socket|" $JBOSS_HOME/bin/standalone.conf - -cp /keycloak-docker-cluster/shared-files/mysql-keycloak-ds.xml $JBOSS_HOME/standalone/deployments/ - -# Enable Infinispan provider -#sed -i "s|\"provider\".*: \"mem\"|\"provider\": \"infinispan\"|" $JBOSS_HOME/standalone/configuration/keycloak-server.json -#sed -i -e "s/\"connectionsJpa\"/\n \"connectionsInfinispan\": \{\n \"default\" : \{\n \"cacheContainer\" : \"java:jboss\/infinispan\/Keycloak\"\n \}\n \},\n &/" $JBOSS_HOME/standalone/configuration/keycloak-server.json diff --git a/testsuite/docker-cluster/shared-files/keycloak-run-node.sh b/testsuite/docker-cluster/shared-files/keycloak-run-node.sh deleted file mode 100644 index 1b0eca6a88..0000000000 --- a/testsuite/docker-cluster/shared-files/keycloak-run-node.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -export MYHOST="$NODE_PREFIX"node$(echo $MYSQL_NAME | awk -F"/dockercluster[^0-9]*|\/mysql" '{print $2 }'); -echo "MYHOST is $MYHOST. MYSQL_NAME is $MYSQL_NAME"; - -function prepareHost -{ - if [ -d /keycloak-docker-shared/keycloak-$JBOSS_TYPE-$MYHOST ]; then - echo "Node $MYHOST already prepared. Skiping"; - return; - fi - - echo "Creating keycloak-$JBOSS_TYPE-$MYHOST"; - - /keycloak-docker-cluster/shared-files/keycloak-base-prepare.sh - - echo "Base prepare finished"; - - # Deploy to volume - rm -rf /keycloak-docker-shared/keycloak-$JBOSS_TYPE-$MYHOST - cp -r $JBOSS_HOME /keycloak-docker-shared/keycloak-$JBOSS_TYPE-$MYHOST - chmod -R 777 /keycloak-docker-shared/keycloak-$JBOSS_TYPE-$MYHOST - echo "keycloak-$JBOSS_TYPE-$MYHOST prepared and copyied to volume"; -} - -function waitForPreviousNodeStart -{ - myHostNumber=$(echo $MYHOST | awk -F"node" '{ print $2 }'); - if [ $myHostNumber -eq 1 ]; then - echo "Our host is $MYHOST. No need to wait for previous server"; - else - previous="$NODE_PREFIX"node$(($myHostNumber-1)); - echo "Waiting for host $previous to start"; - - for I in $(seq 1 10); do - cat /keycloak-docker-shared/keycloak-$JBOSS_TYPE-$previous/standalone/log/server.log | grep "\(INFO\|ERROR\).*\(WildFly\|JBoss AS\|JBoss EAP\).*started"; - if [ 0 -eq $? ]; then - echo "Host $previous started. Going to start $MYHOST"; - return; - fi; - - echo "Host $previous not started yet. Still waiting..."; - sleep 5; - done; - - echo "Host $previous not started yet within timeout."; - fi; -} - -function waitForMySQLStart -{ - for I in $(seq 1 10); do - nc $MYSQL_PORT_3306_TCP_ADDR 3306 < /dev/null; - mysqlRunning=$(echo $?); - if [ $mysqlRunning -eq 0 ]; then - echo "MySQL is running. Starting our server"; - return; - else - echo "MySQL not yet available. Still waiting..."; - sleep 5; - fi; - done; -} - -prepareHost; - -waitForPreviousNodeStart; -waitForMySQLStart; - -echo "Running keycloak node $MYHOST. Additional arguments: $@"; -cd /keycloak-docker-shared -export JBOSS_HOME=/keycloak-docker-shared/keycloak-$JBOSS_TYPE-$MYHOST; - -cd $JBOSS_HOME/bin/ - -./standalone.sh -c standalone-keycloak-ha.xml -Djboss.node.name=$MYHOST -b `hostname -i` -Djboss.mod_cluster.jvmRoute=$MYHOST \ --Dmysql.host=$MYSQL_PORT_3306_TCP_ADDR -Dhttpd.proxyHost=$HTTPD_1_PORT_10001_TCP_ADDR -Dhttpd.proxyPort=$HTTPD_PORT_10001_TCP_PORT \ --Dkeycloak.import=/keycloak-docker-cluster/examples/testrealm.json "$@" diff --git a/testsuite/docker-cluster/shared-files/mysql-module.xml b/testsuite/docker-cluster/shared-files/mysql-module.xml deleted file mode 100644 index 9aa8378a7b..0000000000 --- a/testsuite/docker-cluster/shared-files/mysql-module.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - diff --git a/testsuite/docker-cluster/shared-files/standaloneXmlChanges.xsl b/testsuite/docker-cluster/shared-files/standaloneXmlChanges.xsl deleted file mode 100644 index 0ffa59e766..0000000000 --- a/testsuite/docker-cluster/shared-files/standaloneXmlChanges.xsl +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - jdbc:mysql://${mysql.host}/keycloak_db - mysql - - root - mysecretpassword - - - - - - - - - com.mysql.jdbc.jdbc2.optional.MysqlXADataSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/docker-cluster/wildfly/Dockerfile b/testsuite/docker-cluster/wildfly/Dockerfile deleted file mode 100644 index 2f5850003e..0000000000 --- a/testsuite/docker-cluster/wildfly/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM jboss/wildfly:9.0.1.Final - -USER root - -# Update yum and install required programs -RUN yum install -y unzip && yum install -y wget && yum install -y mc && yum -y install nc -RUN yum clean all - -# Download mysql driver -RUN cd /tmp -RUN wget http://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar -RUN mv *.jar /mysql-connector-java-5.1.32.jar - -ADD keycloak-wildfly-trigger.sh /keycloak-wildfly-trigger.sh -RUN chmod u+x /keycloak-wildfly-trigger.sh - -ENV JBOSS_HOME /opt/jboss/wildfly -ENV JBOSS_MODULES_HOME $JBOSS_HOME/modules/system/layers/base -ENV JBOSS_TYPE wildfly -ENV NODE_PREFIX wf - -EXPOSE 8787 - -CMD [ "/keycloak-wildfly-trigger.sh" ] - diff --git a/testsuite/docker-cluster/wildfly/keycloak-wildfly-trigger.sh b/testsuite/docker-cluster/wildfly/keycloak-wildfly-trigger.sh deleted file mode 100644 index a59408ce37..0000000000 --- a/testsuite/docker-cluster/wildfly/keycloak-wildfly-trigger.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -chmod u+x /keycloak-docker-cluster/shared-files/keycloak-run-node.sh -chmod u+x /keycloak-docker-cluster/shared-files/keycloak-base-prepare.sh -chmod u+x /keycloak-docker-cluster/shared-files/deploy-examples.sh - -echo "Permissions changed. Triggering keycloak-run-node.sh" -/keycloak-docker-cluster/shared-files/keycloak-run-node.sh diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 4e8d2f5eaf..83eaa8579d 100755 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -60,14 +60,5 @@ stress integration-arquillian - - - - jboss-release - - docker-cluster - - -