KEYCLOAK-8632 Configuration of keycloak server in performance testsuite fails
This commit is contained in:
parent
f6943296c7
commit
f5425f916a
12 changed files with 78 additions and 74 deletions
|
@ -25,7 +25,7 @@ This script will:
|
|||
|
||||
Parameterized by environment variables:
|
||||
- `MARIADB_HA_MODE` See: [MariaDB HA parameters](https://mariadb.com/kb/en/library/failover-and-high-availability-with-mariadb-connector-j/#failover-high-availability-parameters)
|
||||
Defaults to `replication`.
|
||||
Defaults to `replication:`.
|
||||
- `MARIADB_OPTIONS` See: [MariaDB HA options](https://mariadb.com/kb/en/library/failover-and-high-availability-with-mariadb-connector-j/#failover-high-availability-options).
|
||||
Use format: `?option1=value1[&option2=value2]...`. Default is an empty string.
|
||||
- `START_KEYCLOAK` Default is `false`. Use `export START_KEYCLOAK=true` to enable.
|
||||
|
|
|
@ -76,7 +76,7 @@ services:
|
|||
networks:
|
||||
- keycloak
|
||||
environment:
|
||||
MARIADB_HA_MODE: ${MARIADB_HA_MODE:-replication}
|
||||
MARIADB_HA_MODE: ${MARIADB_HA_MODE:-replication:}
|
||||
MARIADB_HOSTS: ${MARIADB_HOSTS:-mariadb_1:3306,mariadb_2:3306}
|
||||
MARIADB_OPTIONS: ${MARIADB_OPTIONS}
|
||||
MARIADB_DATABASE: keycloak
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
<project name="keycloak-server-configuration" basedir="." >
|
||||
<project name="infinispan" basedir="." >
|
||||
|
||||
<target name="check-configuration-state">
|
||||
<target name="download-infinispan">
|
||||
<property environment="env"/>
|
||||
<property name="infinispan.zip.filename" value="infinispan-server-${infinispan.version}.zip"/>
|
||||
<property name="infinispan.zip.src" value="https://downloads.jboss.org/infinispan/${infinispan.version}"/>
|
||||
<property name="infinispan.zip.dir" value="${env.HOME}/.m2/repository/org/infinispan/server/infinispan-server/${infinispan.version}"/>
|
||||
<mkdir dir="${infinispan.zip.dir}"/>
|
||||
<get
|
||||
src="${infinispan.zip.src}/${infinispan.zip.filename}"
|
||||
dest="${infinispan.zip.dir}/"
|
||||
usetimestamp="true"
|
||||
verbose="true"
|
||||
/>
|
||||
<echo file="${infinispan.zip.dir}/info.txt" append="false">This artifact was downloaded from: ${infinispan.zip.src}/${infinispan.zip.filename}</echo>
|
||||
<unzip
|
||||
src="${infinispan.zip.dir}/${infinispan.zip.filename}" dest="${project.build.directory}"
|
||||
overwrite="false"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<target name="check-configuration-state" >
|
||||
<available property="configured" file="${infinispan.unpacked.home}/../configured"/>
|
||||
<available property="management.configured" file="${infinispan.unpacked.home}/../management-configured"/>
|
||||
<echo>configured: ${configured}</echo>
|
|
@ -51,34 +51,22 @@
|
|||
<build>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-infinispan-servers</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${infinispan.groupId}</groupId>
|
||||
<artifactId>${infinispan.artifactId}</artifactId>
|
||||
<version>${infinispan.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>download-infinispan</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<ant antfile="infinispan.xml" target="download-infinispan" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>configure-infinispan</id>
|
||||
<phase>process-resources</phase>
|
||||
|
@ -87,7 +75,7 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<ant antfile="configure.xml" target="configure-infinispan" />
|
||||
<ant antfile="infinispan.xml" target="configure-infinispan" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -100,7 +88,7 @@
|
|||
<configuration>
|
||||
<skip>${skip.add.management.user}</skip>
|
||||
<target>
|
||||
<ant antfile="configure.xml" target="add-management-user" />
|
||||
<ant antfile="infinispan.xml" target="add-management-user" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -113,7 +101,7 @@
|
|||
<configuration>
|
||||
<skip>${skip.docker.config}</skip>
|
||||
<target>
|
||||
<ant antfile="configure.xml" target="prepare-docker-config" />
|
||||
<ant antfile="infinispan.xml" target="prepare-docker-config" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
embed-server --server-config=clustered.xml
|
||||
|
||||
# ADD PRIVATE NETWORK INTERFATCE for cross-DC communication
|
||||
echo *** Adding private network interface for cross-DC communication
|
||||
|
||||
/interface=private:add(inet-address=${jboss.bind.address.private:127.0.0.1})
|
||||
|
||||
|
||||
# ADD PRIVATE JGROUPS SOCKET BINDINGS
|
||||
echo *** Adding jgroups socket bindings for private network interface
|
||||
|
||||
cd /socket-binding-group=standard-sockets
|
||||
|
||||
./socket-binding=jgroups-mping-private:add( interface=private, port=0, multicast-address="${jboss.private.multicast.address:234.99.54.14}", multicast-port="45700")
|
||||
./socket-binding=jgroups-tcp-private:add( interface=private, port=7600)
|
||||
./socket-binding=jgroups-tcp-fd-private:add(interface=private, port=57600)
|
||||
|
@ -16,27 +15,19 @@ cd /socket-binding-group=standard-sockets
|
|||
./socket-binding=jgroups-udp-fd-private:add(interface=private, port=54200)
|
||||
|
||||
|
||||
# ADD PRIVATE TCP STACK
|
||||
|
||||
cd /subsystem=datagrid-jgroups
|
||||
|
||||
./stack=tcp-private:add(transport={type=TCP, socket-binding=jgroups-tcp-private})
|
||||
cd stack=tcp-private
|
||||
|
||||
:add-protocol(type=MPING, socket-binding=jgroups-mping-private)
|
||||
:add-protocol(type=MERGE3)
|
||||
:add-protocol(type=FD_SOCK, socket-binding=jgroups-tcp-fd-private)
|
||||
:add-protocol(type=FD_ALL)
|
||||
:add-protocol(type=VERIFY_SUSPECT)
|
||||
:add-protocol(type=pbcast.NAKACK2, properties={"use_mcast_xmit" => "false"})
|
||||
:add-protocol(type=UNICAST3)
|
||||
:add-protocol(type=pbcast.STABLE)
|
||||
:add-protocol(type=pbcast.GMS)
|
||||
:add-protocol(type=MFC)
|
||||
# ISPN 8
|
||||
:add-protocol(type=FRAG2)
|
||||
## ISPN 9
|
||||
#:add-protocol(type=FRAG3)
|
||||
cd ..
|
||||
|
||||
echo *** Adding TCP protocol stack for private network interface
|
||||
|
||||
/subsystem=datagrid-jgroups/stack=tcp-private:add(transport={type=TCP, socket-binding=jgroups-tcp-private}, protocols=[ \
|
||||
{type=MPING, socket-binding=jgroups-mping-private}, \
|
||||
{type=MERGE3}, \
|
||||
{type=FD_SOCK, socket-binding=jgroups-tcp-fd-private}, \
|
||||
{type=FD_ALL}, \
|
||||
{type=VERIFY_SUSPECT}, \
|
||||
{type=pbcast.NAKACK2, properties={"use_mcast_xmit" => "false"}}, \
|
||||
{type=UNICAST3}, \
|
||||
{type=pbcast.STABLE}, \
|
||||
{type=pbcast.GMS}, \
|
||||
{type=MFC_NB}, \
|
||||
{type=FRAG3} \
|
||||
])
|
||||
# Note: for Infinispan 8.x change the above FRAG3 to FRAG2
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
<arg value="--file=undertow.cli"/>
|
||||
<env key="JBOSS_HOME" value="${server.unpacked.home}"/>
|
||||
</exec>
|
||||
<exec executable="./${jboss.cli.script}" dir="${server.unpacked.home}/bin" failonerror="true">
|
||||
<arg value="--file=modcluster-simple-load-provider.cli"/>
|
||||
<env key="JBOSS_HOME" value="${server.unpacked.home}"/>
|
||||
</exec>
|
||||
<exec executable="./${jboss.cli.script}" dir="${server.unpacked.home}/bin" failonerror="true">
|
||||
<arg value="--file=io-worker-threads.cli"/>
|
||||
<env key="JBOSS_HOME" value="${server.unpacked.home}"/>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<jdbc.driver.groupId>org.mariadb.jdbc</jdbc.driver.groupId>
|
||||
<jdbc.driver.artifactId>mariadb-java-client</jdbc.driver.artifactId>
|
||||
<jdbc.driver.version>2.0.3</jdbc.driver.version>
|
||||
<jdbc.driver.version>2.2.4</jdbc.driver.version>
|
||||
<jdbc.driver.module.path>org/mariadb/jdbc</jdbc.driver.module.path>
|
||||
|
||||
<script.extension>sh</script.extension>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
||||
-->
|
||||
<module xmlns="urn:jboss:module:1.0" name="@MODULE_NAME@">
|
||||
<module xmlns="urn:jboss:module:1.5" name="@MODULE_NAME@">
|
||||
<resources>
|
||||
<resource-root path="@RESOURCE_ROOT_PATH@"/>
|
||||
</resources>
|
||||
|
|
|
@ -7,14 +7,20 @@ cd /subsystem=infinispan/cache-container=keycloak
|
|||
|
||||
:write-attribute(name=module, value=org.keycloak.keycloak-model-infinispan)
|
||||
|
||||
./replicated-cache=work/store=remote:add(cache=work, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
./replicated-cache=work/store=remote:add(cache=work, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
./distributed-cache=sessions/store=remote:add(cache=sessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
./distributed-cache=offlineSessions/store=remote:add(cache=offlineSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
./distributed-cache=clientSessions/store=remote:add(cache=clientSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
./distributed-cache=offlineClientSessions/store=remote:add(cache=offlineClientSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
./distributed-cache=loginFailures/store=remote:add(cache=loginFailures, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
./distributed-cache=actionTokens/store=remote:add(cache=actionTokens, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
|
||||
|
||||
./distributed-cache=sessions/store=remote:add(cache=sessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
./distributed-cache=offlineSessions/store=remote:add(cache=offlineSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
./distributed-cache=clientSessions/store=remote:add(cache=clientSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
./distributed-cache=offlineClientSessions/store=remote:add(cache=offlineClientSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
./distributed-cache=loginFailures/store=remote:add(cache=loginFailures, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
|
||||
./distributed-cache=actionTokens/store=remote:add(cache=actionTokens, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
|
||||
./distributed-cache=actionTokens/memory-object:add(size=-1)
|
||||
./distributed-cache=actionTokens/expiration=EXPIRATION:add(max-idle=-1,interval=300000)
|
||||
./replicated-cache=work:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
./distributed-cache=sessions:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
./distributed-cache=offlineSessions:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
./distributed-cache=clientSessions:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
./distributed-cache=offlineClientSessions:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
./distributed-cache=loginFailures:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
./distributed-cache=actionTokens:write-attribute (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb, driver-module-name=org.mariadb.jdbc, driver-xa-datasource-class-name=org.mariadb.jdbc.Driver)
|
||||
/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb, driver-module-name=org.mariadb.jdbc, driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource)
|
||||
|
||||
cd /subsystem=datasources/data-source=KeycloakDS
|
||||
|
||||
:write-attribute(name=connection-url, value=jdbc:mariadb:${env.MARIADB_HA_MODE:}://${env.MARIADB_HOSTS:mariadb:3306}/${env.MARIADB_DATABASE:keycloak}${env.MARIADB_OPTIONS:})
|
||||
:write-attribute(name=connection-url, value=jdbc:mariadb:${env.MARIADB_HA_MODE:}//${env.MARIADB_HOSTS:mariadb:3306}/${env.MARIADB_DATABASE:keycloak}${env.MARIADB_OPTIONS:})
|
||||
:write-attribute(name=driver-name, value=mariadb)
|
||||
:write-attribute(name=user-name, value=${env.MARIADB_USER:keycloak})
|
||||
:write-attribute(name=password, value=${env.MARIADB_PASSWORD:keycloak})
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
|
||||
INFINISPAN_HOST: infinispan_dc1
|
||||
SITE: dc1
|
||||
HOTROD_VERSION: 2.8
|
||||
CACHE_STATISTICS: "true"
|
||||
|
||||
JAVA_OPTS: ${KEYCLOAK_JVM_MEMORY:--Xms64m -Xmx2g -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m} -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
|
||||
HTTP_MAX_CONNECTIONS: ${KEYCLOAK_HTTP_MAX_CONNECTIONS:-50000}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
MARIADB_PASSWORD: keycloak
|
||||
INFINISPAN_HOST: infinispan_dc2
|
||||
SITE: dc2
|
||||
HOTROD_VERSION: 2.8
|
||||
CACHE_STATISTICS: "true"
|
||||
|
||||
JAVA_OPTS: ${KEYCLOAK_JVM_MEMORY:--Xms64m -Xmx2g -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m} -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
|
||||
HTTP_MAX_CONNECTIONS: ${KEYCLOAK_HTTP_MAX_CONNECTIONS:-50000}
|
||||
|
|
Loading…
Reference in a new issue