[keycloak-user] Keycloak -- possible to configure connectionsJpa.migrationStrategy to "manual" via standalone.sh -D option?

Jan Lieskovsky jlieskov at redhat.com
Wed May 10 09:11:33 EDT 2017


Hello Keycloak users,

  in order to perform manual db upgrade, when upgrading Keycloak from older
versions current documentation:
  https://keycloak.gitbooks.io/documentation/server_admin/topics/MigrationFromOlderVersions.html
  (section Migrate database)

suggests to configure standalone.xml as follows:

  <spi name="connectionsJpa">
      <provider name="default" enabled="true">
          <properties>
              ...
              <property name="migrationStrategy" value="manual"/>
          </properties>
      </provider>
  </spi>

and possibly also set "initializeEmpty=false" and proper "migrationExport" file location [1].
As an alternative it is suggested to use CLI (also aware of exact form of the corresponding CLI query)
instead.

But suppose due some limitations it's not possible to perform neither of these two
actions (neither the standalone.xml update, nor the jboss-cli change).

Is there a way how to configure "migrationStrategy" to "manual" using the list
of correct options supplied on the CLI, when starting the standalone.sh server?

Something like [*]:
./standalone.sh -Dkeycloak.connectionsJpa.migrationStrategy=manual \
                -Dkeycloak.connectionsJpa.initializeEmpty=false    \
                -Dkeycloak.connectionsJpa.migrationExport=/tmp/kdb-update.sql?


E.g. it seems to be possible to use -Dkeycloak.connectionsJpa.{url,driver,user,password}
options at the very least (based on:
  http://lists.jboss.org/pipermail/keycloak-dev/2017-May/009286.html or
  https://github.com/keycloak/keycloak/blob/master/misc/DatabaseTesting.md )

Or the db export / import options (-Dkeycloak.migration.{action,provider} based on:
  https://keycloak.gitbooks.io/documentation/server_admin/topics/export-import.html)
  
But is the same way (via custom -D options) possible to configure "migrationStrategy" to manual?
If so, could you hopefully provide list / set / example of these options, how they should look like?


Thank you for your time.

Regards,
--
Jan iankko Lieskovsky

P.S.: If someone is wondering, /me not only asking, but actually tried the settings in [*],
      but they doesn't seem to be working for me. Thus actually wondering if I have issue
      in my setup or the "migrationStrategy" options are not expected to be working
      via -D options (yet)? (seeking for the developers confirmation this is actually the
      case in the latter case)

[1] https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.1/html/server_installation_and_configuration_guide/database#database_configuration


More information about the keycloak-user mailing list