Repository navigation
Replies: 3 comments 5 replies
|
Something like this would have been needed for the description of #41002, but see the comments below as the preferred direction has moved towards refining the server startup behavior instead. The closest workaround we have to perform a migration, but not start the server are currently:
|
|
@arisDir - thank you for raising this topic. I agree that the pipeline you describe could benefit from an additional command. Still, I'd like to introduce you to the https://www.keycloak.org/server/update-compatibility This can be used to figure if out you should scale down your deployment to zero first, before starting a new instance, or if you can do a rolling update. Starting with release 26.6, rolling updates for patch releases will be supported. Let me know if this change of perspective helps you to have a pipeline that fits your needs. |
Uh oh!
There was an error while loading. Please reload this page.
The Architectural Gap
While integrating Keycloak into a high-availability environment, I identified a significant friction point in the official migration strategies.
Keycloak currently offers:
UPDATE: Automates execution but requires that the initial node experiences a significant delay while executing migration scripts.MANUAL: Generates scripts but requires external human or tool intervention to execute them, which is difficult to scale.The Problem: There is no native way to tell Keycloak: "Execute the pending migrations now, and exit successfully so my pipeline can proceed to the next stage."
The Conclusion: The Need for
MANUAL_UPDATETo resolve these issues, I concluded that a new migration strategy,
MANUAL_UPDATE, is necessary to support "migration-as-code" within containerized environments.This strategy would decouple the database migration phase from the application runtime phase.
Proposed Logic:
--spi-connections-jpa--quarkus--migration-strategy=manual_update).Technical Reflection
By proposing this change, I aim to move away from "workaround" scripts that are fragile and version-dependent.
The
MANUAL_UPDATEstrategy honors Keycloak’s internal Liquibase logic while providing the exit-code signals required by modern infrastructure-as-code practices.All reactions