Bootstrapping config on first deployment #5361
Labels
Component: Code Infrastructure
formerly "Feature: Code Infrastructure"
Component: Containers
Anything related to cloudy Dataverse, shipped in containers.
Feature: None
No user-facing feature in particular
User Role: Sysadmin
Installs, upgrades, and configures the system, connects via ssh
This is a story for #5292 and it depends on introduction of Flyway in #5344 / #5349.
While installing Dataverse, you need to create a few database entries regarding admin user, root dataverse, roles, metadata blocks and more. Details can be found in
setup-all.sh
andreference_data.sql
.This is currently done by the install script. This story is about a proposal to change this. Positive sideffect: this could be a first step towards a web based installer as @pdurbin would love to see.
Load initial data after migrations happened
As soon as the database has been created by JPA and Flyway, we can hook a bootstrap loader into the
BaseFlywayCallback.afterMigration()
routine. ExampleAfter checking that the database has no root dataverse present, it could load the data currently loaded via REST API with internal calls to the appropriate services, based on the same data structures (mostly JSON files).
A switch offers skipping bootstraping from code. It has to be enabled to let bootstrapping happen for maximum backward compatibility.
Benefits from this and things to keep in mind
false
system property allows skipping, so the installer as it is now can stay as is.As always: I would really appreciate comments and input.
The text was updated successfully, but these errors were encountered: