keycloak-clustered icon indicating copy to clipboard operation
keycloak-clustered copied to clipboard

JGROUPS_DISCOVERY_EXTERNAL_IP to be set dynamically

Open michimau opened this issue 2 years ago • 1 comments

@ivangfr, i took inspiration from your valuable work.

I work with an orchestrator, and I cannot manually set the JGROUPS_DISCOVERY_EXTERNAL_IP, as I do not know the ip address of the container nor on which host it will land during the orchestrations.

The simple modification sets up JGROUPS_DISCOVERY_EXTERNAL_IP upon the output provided by the command "hostname -i".

Best /michimau

michimau avatar May 05 '22 15:05 michimau

Please, consider follow the documentation https://infinispan.org/docs/stable/titles/server/server.html in order to understand the services needed for infinispan:

  • Al first, you need that each node has a static IP to bind the port. Keep in mind that using 127.0.0.1 will NOT expose the service to other nodes and you should use the IP LAN.
  • Notice that you also need two open ports to keep the active-active cluster: tcp/57800 and tcp/7800. In case your nodes run in the same network segment, you can use a udp-autodiscover function

The first node in the startup process will be the master. This startup process provides all the information you need in case of troubles.

alejandroalffer avatar Jun 14 '23 15:06 alejandroalffer