Keycloak 19.0.3 quarkus - ha in azure - jgroup configuration azure_ping

Hi,

I have 3 virtual machines in azure and I want enable Keycloak latest version of Quarkus in HA.
I have readed the documentation of:

https://www.keycloak.org/server/caching
https://infinispan.org/docs/dev/titles/embedding/embedding.html#jgroups-cloud-discovery-protocols_cluster-transport

I have added in keycloak.conf

cache=ispn
cache-stack=azure
cache-config-file=cache-ispn-azure.xml

But I don’t understand how inject the configuration in cache-ispn-azure.xml.
Maybe something like this

<infinispan
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:infinispan:config:11.0 http://www.infinispan.org/schemas/infinispan-config-11.0.xsd"
        xmlns="urn:infinispan:config:11.0">


    <jgroups>
        <stack name="tcp_azure" extends="azure">
            <TCP     bind_port="7800" />
            <AZURE_PING initial_hosts="redhattest1[7800],redhattest2[7800]" port_range="0" max_dynamic_hosts="2"/>
        </stack>
    </jgroups>

    <cache-container name="keycloak">
        <transport cluster="mykeycloak" lock-timeout="60000"  stack="tcp_azure" node-name="redhattest1"/>

But I don’t know how inject the storage explained here:

https://github.com/jgroups-extras/jgroups-azure

Somebody know the correct configuration for this custom cache-ispn.xml for azure?

Somehow I have to be able to indicate that I am using the azure ping, the credentials of the azure resource for its implementation and the machines that I want to form the infinispan cluster…

I’m working with Quarkus distro and the documentation is more structured that wildfly version but very short in principal elements like distributed cache.

Thanks so much!!

Xavier.

I believe you shoud put them as parameters in this element, as in the docs:

<azure.AZURE_PING
	storage_account_name="storage_account_name"
	storage_access_key="storage_account_key"
	container="storage_account_container_name"
/>

Based on what I see in the AZURE_PING.java, I suppose initial_hosts, port_range and max_dynamic_hosts are ignored.

You shouldn’t set cache-stack. This config selects a preconfigured cache coming with keycloak out of the box, not a stack you defined in the cache-config-file.

We seem to be having the same issue with setting up Keycoak v19 with Azure Ping. Did you get this working, and can you share what options you ended up using in your kc build/run commands and what your cache config file entries ended up looking like. Thanks