Open alejandroalffer opened 1 year ago
Extended example in order to clarify the need of managing the port and IP of ispn-jdbc config
After building locally a new docker image for the version 21.1.1 (using the proposed changes), I was unable to run the cluster using MySQL. I didn't try other databases.
Hello!
Thanks for the feedback. I have actually tested the proposed changes in an AWS environment with an Application Load Balancer and in a local development environment using Nginx.
In both cases, using MySQL as database.
I think the misunderstanding comes from the fact that one of the KC_DB_URL_DATABASE
environment variables was used by Keycloak for something different from what was indicated in the cache-ispn-jdbc-ping.xml
file.
The confusion in:
In other words, bin/kc.sh show-config
return this value for this environment variable:
kc.db-url = jdbc:mysql://db.my_host.com/my_KeycloakDb (KcEnvVarConfigSource)
kc.db-url-host = db.my_host.com (KcEnvVarConfigSource)
I beg you to try again.
Thank you!
Hi @alejandroalffer
I have taken the time to review your proposal. However, it seems to deviate slightly from my initial vision for this project and the Docker image.
My aim was to keep things as simple as possible, without being tied to any specific technology. In other words, anyone with Docker installed should be able to run the Keycloak Clustered locally on their machine. I have provided a step-by-step guide in the README file to assist with this.
Furthermore, the Dockerfile is designed to be straightforward, and all the necessary Keycloak environment variables are set automatically during the execution of the docker run
command.
Unfortunately, I cannot go ahead with this merge request because it would render the instructions in the README ineffective for individuals attempting to run the project locally.
Best regards,
The generated JDBC string is not correct using the definition from https://www.keycloak.org/server/all-config#category-database.
To generate a correct connection URL we need the name of the database (Schema). However, the variable that specifies the database type is being used.
As a consequence, the same variable is used: