Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save solsson/9475d90c57f331983763e2c2ea5dc15a to your computer and use it in GitHub Desktop.
Save solsson/9475d90c57f331983763e2c2ea5dc15a to your computer and use it in GitHub Desktop.
+ ./xsl-transform keycloak/standalone/configuration/standalone-ha.xml cache-owners.xsl
--- /tmp/xsl-transform-target.org 2017-10-30 18:43:45.718824499 +0000
+++ keycloak/standalone/configuration/standalone-ha.xml 2017-10-30 18:43:46.340824050 +0000
@@ -265,10 +265,10 @@
<expiration max-idle="3600000"/>
</local-cache>
<replicated-cache name="work" mode="SYNC"/>
- <distributed-cache name="sessions" mode="SYNC" owners="1"/>
- <distributed-cache name="authenticationSessions" mode="SYNC" owners="1"/>
- <distributed-cache name="offlineSessions" mode="SYNC" owners="1"/>
- <distributed-cache name="loginFailures" mode="SYNC" owners="1"/>
+ <distributed-cache name="sessions" mode="SYNC" owners="${env.CACHE_OWNERS:1}"/>
+ <distributed-cache name="authenticationSessions" mode="SYNC" owners="${env.CACHE_OWNERS:1}"/>
+ <distributed-cache name="offlineSessions" mode="SYNC" owners="${env.CACHE_OWNERS:1}"/>
+ <distributed-cache name="loginFailures" mode="SYNC" owners="${env.CACHE_OWNERS:1}"/>
<distributed-cache name="actionTokens" mode="SYNC" owners="2">
<eviction strategy="NONE" max-entries="-1"/>
<expiration interval="300000" max-idle="-1"/>
Lines removed: 4
Lines added: 4
+ curl -o node-identifier.xsl -sLS https://raw.githubusercontent.com/Reposoft/keycloak-ha-kubernetes/keycloak3-ha-mysql/server-ha-mysql/node-identifier.xsl
+ sed -i 's|transactions:3.0|transactions:4.0|' node-identifier.xsl
+ ./xsl-transform keycloak/standalone/configuration/standalone-ha.xml node-identifier.xsl
--- /tmp/xsl-transform-target.org 2017-10-30 18:43:46.503823932 +0000
+++ keycloak/standalone/configuration/standalone-ha.xml 2017-10-30 18:43:47.165823455 +0000
@@ -559,7 +559,7 @@
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:transactions:4.0">
- <core-environment>
+ <core-environment node-identifier="${jboss.node.name}">
<process-id>
<uuid/>
</process-id>
Lines removed: 1
Lines added: 1
+ '[' tcp == tcp ']'
+ ./xsl-transform keycloak/standalone/configuration/standalone-ha.xml /keycloak-ha-dev/jgroups-stack-tcp.xsl
--- /tmp/xsl-transform-target.org 2017-10-30 18:43:47.191823437 +0000
+++ keycloak/standalone/configuration/standalone-ha.xml 2017-10-30 18:43:47.945822898 +0000
@@ -335,7 +335,7 @@
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
<subsystem xmlns="urn:jboss:domain:jgroups:5.0">
<channels default="ee">
- <channel name="ee" stack="udp" cluster="ejb"/>
+ <channel name="ee" stack="tcp" cluster="ejb"/>
</channels>
<stacks>
<stack name="udp">
Lines removed: 1
Lines added: 1
+ ./xsl-transform keycloak/standalone/configuration/standalone-ha.xml /keycloak-ha-dev/jgroups-jdbc.xsl
--- /tmp/xsl-transform-target.org 2017-10-30 18:43:47.972822879 +0000
+++ keycloak/standalone/configuration/standalone-ha.xml 2017-10-30 18:43:48.559822460 +0000
@@ -355,7 +355,9 @@
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
- <socket-protocol type="MPING" socket-binding="jgroups-mping"/>
+ <!-- MPING was removed in favor of JDBC_PING --><protocol type="JDBC_PING">
+ <property name="datasource_jndi_name">java:jboss/datasources/KeycloakDS</property>
+ </protocol>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK"/>
<protocol type="FD_ALL"/>
Lines removed: 1
Lines added: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment