From 55a62f6616b882729b057c2cf06d1d86c219d2a3 Mon Sep 17 00:00:00 2001 From: Peter Palaga Date: Wed, 27 May 2015 14:50:33 +0200 Subject: [PATCH] HAWKULAR-258 Add integration tests WildFly profile --- dist/assembly.xml | 7 -- dist/pom.xml | 28 +++++- .../resources/wildfly/bin/standalone.conf | 90 ------------------- .../resources/wildfly/bin/standalone.conf.bat | 87 ------------------ .../resources/wildfly/patches/standalone.xsl | 27 +++++- 5 files changed, 51 insertions(+), 188 deletions(-) delete mode 100644 dist/src/main/resources/wildfly/bin/standalone.conf delete mode 100644 dist/src/main/resources/wildfly/bin/standalone.conf.bat diff --git a/dist/assembly.xml b/dist/assembly.xml index ce8fb42f..1b9c64b7 100644 --- a/dist/assembly.xml +++ b/dist/assembly.xml @@ -41,13 +41,6 @@ false 0644 0755 - - - src/main/resources/wildfly/bin - ${wildfly.dist.zip.root.dir}/bin - false - 0744 - 0755 diff --git a/dist/pom.xml b/dist/pom.xml index 5449fcf8..c27fd273 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -262,6 +262,7 @@ + ${project.build.directory}/wildfly/${wildfly.dist.zip.root.dir}/standalone/configuration src/main/resources/wildfly/patches/standalone.xsl @@ -272,7 +273,32 @@ kettle.build.type - ${kettle.build.type} + production + + + uuid.hawkular.accounts.backend + ${uuid.hawkular.accounts.backend} + + + + + + ${project.build.directory}/wildfly/${wildfly.dist.zip.root.dir}/standalone/configuration + src/main/resources/wildfly/patches/standalone.xsl + + + \.xml$ + -itest.xml + + + + standalone.xml + + ${assembly.dir}/${wildfly.dist.zip.root.dir}/standalone/configuration + + + kettle.build.type + dev uuid.hawkular.accounts.backend diff --git a/dist/src/main/resources/wildfly/bin/standalone.conf b/dist/src/main/resources/wildfly/bin/standalone.conf deleted file mode 100644 index 01ad7809..00000000 --- a/dist/src/main/resources/wildfly/bin/standalone.conf +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright 2015 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -## -*- shell-script -*- ###################################################### -## ## -## JBoss Bootstrap Script Configuration ## -## ## -############################################################################## - -# -# This file is optional; it may be removed if not needed. -# - -# -# Specify the maximum file descriptor limit, use "max" or "maximum" to use -# the default, as queried by the system. -# -# Defaults to "maximum" -# -#MAX_FD="maximum" - -# -# Specify the profiler configuration file to load. -# -# Default is to not load profiler configuration file. -# -#PROFILER="" - -# -# Specify the location of the Java home directory. If set then $JAVA will -# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java". -# -#JAVA_HOME="/opt/java/jdk" - -# -# Specify the exact Java VM executable to use. -# -#JAVA="" - -if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then - JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman" -fi - -# Uncomment the following line to prevent manipulation of JVM options -# by shell scripts. -# -#PRESERVE_JAVA_OPTS=true - -# -# Specify options to pass to the Java VM. -# -if [ "x$JAVA_OPTS" = "x" ]; then - JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true" - JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true" -else - echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS" -fi - -# Sample JPDA settings for remote socket debugging -#JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n" - -# Sample JPDA settings for shared memory debugging -#JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_shmem,server=y,suspend=n,address=jboss" - -# Uncomment to not use JBoss Modules lockless mode -#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false" - -# Uncomment to gather JBoss Modules metrics -#JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true" - -# Uncomment this in order to be able to run WildFly on FreeBSD -# when you get "epoll_create function not implemented" message in dmesg output -#JAVA_OPTS="$JAVA_OPTS -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider" - -# Import our realm into Keycloak -JAVA_OPTS="$JAVA_OPTS -Dkeycloak.import=${JBOSS_HOME}/standalone/configuration/hawkular-realm.json" \ No newline at end of file diff --git a/dist/src/main/resources/wildfly/bin/standalone.conf.bat b/dist/src/main/resources/wildfly/bin/standalone.conf.bat deleted file mode 100644 index 1584f117..00000000 --- a/dist/src/main/resources/wildfly/bin/standalone.conf.bat +++ /dev/null @@ -1,87 +0,0 @@ -@REM -@REM Copyright 2015 Red Hat, Inc. and/or its affiliates -@REM and other contributors as indicated by the @author tags. -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM - -rem ### -*- batch file -*- ###################################################### -rem # ## -rem # JBoss Bootstrap Script Configuration ## -rem # ## -rem ############################################################################# - -rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z dimitris@jboss.org $ - -rem # -rem # This batch file is executed by run.bat to initialize the environment -rem # variables that run.bat uses. It is recommended to use this file to -rem # configure these variables, rather than modifying run.bat itself. -rem # - -rem Uncomment the following line to disable manipulation of JAVA_OPTS (JVM parameters) -rem set PRESERVE_JAVA_OPTS=true - -if not "x%JAVA_OPTS%" == "x" ( - echo "JAVA_OPTS already set in environment; overriding default settings with values: %JAVA_OPTS%" - goto JAVA_OPTS_SET -) - -rem # -rem # Specify the JBoss Profiler configuration file to load. -rem # -rem # Default is to not load a JBoss Profiler configuration file. -rem # -rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties" - -rem # -rem # Specify the location of the Java home directory (it is recommended that -rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as -rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below). -rem # -rem set "JAVA_HOME=C:\opt\jdk1.6.0_23" - -rem # -rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is -rem # not set. Default is "java". -rem # -rem set "JAVA=C:\opt\jdk1.6.0_23\bin\java" - -rem # -rem # Specify options to pass to the Java VM. Note, there are some additional -rem # options that are always passed by run.bat. -rem # - -rem # JVM memory allocation pool parameters - modify as appropriate. -set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M" - -rem # Prefer IPv4 -set "JAVA_OPTS=%JAVA_OPTS% -Djava.net.preferIPv4Stack=true" - -rem # Make Byteman classes visible in all module loaders -rem # This is necessary to inject Byteman rules into AS7 deployments -set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman" - -rem # Sample JPDA settings for remote socket debugging -rem set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n" - -rem # Sample JPDA settings for shared memory debugging -rem set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_shmem,address=jboss,server=y,suspend=n" - -rem # Use JBoss Modules lockless mode -rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.lockless=true" - -rem # Import our realm into Keycloak -set "JAVA_OPTS=%JAVA_OPTS% -Dkeycloak.import=%JBOSS_HOME%\standalone\configuration\hawkular-realm.json" - -:JAVA_OPTS_SET diff --git a/dist/src/main/resources/wildfly/patches/standalone.xsl b/dist/src/main/resources/wildfly/patches/standalone.xsl index 76ee45a9..2a46962d 100644 --- a/dist/src/main/resources/wildfly/patches/standalone.xsl +++ b/dist/src/main/resources/wildfly/patches/standalone.xsl @@ -210,9 +210,30 @@ - - <property name="hawkular-metrics.backend" value="${hawkular-metrics.backend:embedded_cass}" /> - + + hawkular-metrics.backend + ${hawkular-metrics.backend:embedded_cass} + + + + + + keycloak.import + ${jboss.home.dir}/standalone/configuration/hawkular-realm-for-dev.json + + + + + keycloak.import + ${jboss.home.dir}/standalone/configuration/hawkular-realm.json + + + + + Unexpected value of $kettle.build.type: '$kettle.build.type'. Expected 'dev' or 'production' + + +