Skip to content

Commit

Permalink
doc: update flyway and liquibase/mongo docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Dec 2, 2022
1 parent ab7f46d commit 347a01e
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
24 changes: 24 additions & 0 deletions docs/src/main/asciidoc/flyway.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,27 @@ public class MigrationService {
When using Flyway together with Hibernate ORM, you can use the Dev UI to generate the initial schema creation script.

You can find more information about this feature in the xref:hibernate-orm.adoc#flyway[Hibernate ORM guide].

== Flyway on Kubernetes

Sometimes, it's helpful not to execute Flyway initialization on each application startup. One such example is when deploying
on Kubernetes, where it doesn't make sense to execute Flyway on every single replica. Instead it's desirable to execute it
once and then start the actual application without Flyway. To support this use case, when the Flyway extension is used along
with the Kubernetes (that automatically generated deployment manifests), the generated manifests contain a kubernetes `Job`
that performs initialization and the actual `Pod``, will starts once the `Job` is succesfully completed.

The feature is enabled by default and can be globally disabled, using:

[source,properties]
----
quarkus.kubernetes.externalize-init=false
----

or on Openshift:

[source,properties]
----
quarkus.openshift.externalize-init=false
----

**Note**: In this context globally means `for all extensions that support init task externalization`.
27 changes: 26 additions & 1 deletion docs/src/main/asciidoc/liquibase-mongodb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,31 @@ public class MigrationService {
<2> Use the Liquibase instance directly
<3> List of applied or not applied liquibase ChangeSets

== Liquibase Mongodb on Kubernetes

Sometimes, it's helpful not to execute Liquibase initialization on each application startup. One such example is when deploying
on Kubernetes, where it doesn't make sense to execute Liquibase on every single replica. Instead it's desirable to execute it
once and then start the actual application without Liquibase. To support this use case, when the Liquibase extension is used along
with the Kubernetes (that automatically generated deployment manifests), the generated manifests contain a kubernetes `Job`
that performs initialization and the actual `Pod``, will starts once the `Job` is succesfully completed.

The feature is enabled by default and can be globally disabled, using:

[source,properties]
----
quarkus.kubernetes.externalize-init=false
----

or on Openshift:

[source,properties]
----
quarkus.openshift.externalize-init=false
----

**Note**: In this context globally means `for all extensions that support init task externalization`.


== Configuration Reference

include::{generated-dir}/config/quarkus-liquibase-mongodb.adoc[opts=optional, leveloffset=+2]
include::{generated-dir}/config/quarkus-liquibase-mongodb.adoc[opts=optional, leveloffset=+2]
24 changes: 24 additions & 0 deletions docs/src/main/asciidoc/liquibase.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,30 @@ public class MigrationService {
<4> Use the Liquibase instance directly
<5> List of applied or not applied liquibase ChangeSets

== Liquibase on Kubernetes

Sometimes, it's helpful not to execute Liquibase initialization on each application startup. One such example is when deploying
on Kubernetes, where it doesn't make sense to execute Liquibase on every single replica. Instead it's desirable to execute it
once and then start the actual application without Liquibase. To support this use case, when the Liquibase extension is used along
with the Kubernetes (that automatically generated deployment manifests), the generated manifests contain a kubernetes `Job`
that performs initialization and the actual `Pod``, will starts once the `Job` is succesfully completed.

The feature is enabled by default and can be globally disabled, using:

[source,properties]
----
quarkus.kubernetes.externalize-init=false
----

or on Openshift:

[source,properties]
----
quarkus.openshift.externalize-init=false
----

**Note**: In this context globally means `for all extensions that support init task externalization`.

== Configuration Reference

include::{generated-dir}/config/quarkus-liquibase.adoc[opts=optional, leveloffset=+2]

0 comments on commit 347a01e

Please sign in to comment.