-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move db bootstrapping out of server startup #1897
Comments
Could this be simplified to just bootstrap an embedded derby database? (With just minimal ENVVARs to enable it.) Then all other database bootstrapping is done via the schema-tool cli. That lets the user give it a quick try via just docker run, but any "real" usage must use the schema tool to set up the DB first. |
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
to be replaced by script-based bootstrapping Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* Remove all references to the fhir-server-config bootstrap properties * Replace documentation about derby bootstrapping with a reference to setting DB_BOOTSTRAP on the docker image Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
* Remove all references to the fhir-server-config bootstrap properties * Replace documentation about derby bootstrapping with a reference to setting DB_BOOTSTRAP on the docker image Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
issue #1897 - remove bootstrapping code from fhir-server
issue #1897 - remove bootstrapping code from fhir-server
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
* issue #1897 - remove bootstrapping code from fhir-server to be replaced by script-based bootstrapping Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * issue #1897 - update user's guide and datasource.xml * Remove all references to the fhir-server-config bootstrap properties * Replace documentation about derby bootstrapping with a reference to setting DB_BOOTSTRAP on the docker image Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * Issue #1897 - Optionally bootstrap derby database Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com> * issue #1408 - move advanced bootstrapping into CI Given the decision to only support bootstrapping of the default tenant's default datasource, we needed to manually bootstrap the tenant1 datasources for our multi-tenant integration tests. Additionally, I updated the fhir-persistence-schema Main class to ensure that the derby schema name is always APP (and that the pool-size is always 1). Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * issue #819 - add undocumented 'resourceTypes' property to fhir-persistence-schema We were thinking of adding something like this under #819 anyway, but for now I'm just trying to reduce the resource burden to pass our CI. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * issue #819 - add undocumented 'resourceTypes' property to fhir-persistence-schema We were thinking of adding something like this under #819 anyway, but for now I'm just trying to reduce the resource burden to pass our CI. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * Update fhir-server/liberty-config/configDropins/defaults/datasource.xml Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com> * Issue #1408 - Copy config override for Windows CI test Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com> * Issue #1408 - Copy config override for Windows CI test Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com> * Issue #1408 - Copy config override for Windows CI test Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com> * Issue #1408 - Copy config override for Windows CI test Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com> Co-authored-by: Troy Biesterfeld <tbieste@us.ibm.com>
Did the following on my Mac machine:
Once fhir server was up and running, confirmed derby database usage:
|
Is your feature request related to a problem? Please describe.
We've had a few issues where users report that the default docker container is failing to start due to a timeout that occurs during bootstrapping of the derby databases. See #1554 and #1888
The problem is that the bootstrapping code inherits the global transaction timeout (120s by default) that we use for serving user requests. At the very least, the bootstrapping should have a different transaction timeout.
We've made it easy(ish) to get past the issue by setting the default transaction timeout via an env var (#1666).
However, the only reason we have the bootstrapping code to begin with is to make it dead simple to get our server up and running, so this kind of defeats the purpose.
Describe the solution you'd like
Initially we can just focus on derby, but I think it would make sense to extend that behavior to Db2 and PostgreSQL as well.
Describe alternatives you've considered
Either:
A. never perform bootstrapping during image startup; or
B. keep bootstrapping scoped to derby and force the use of the schema-tool cli and/or image for the 'real' dbs.
Acceptance Criteria
At least one acceptance criteria is included.
GIVEN a global transaction timeout of 60s
AND derby bootstrapping enabled
WHEN a user runs
docker run -p9443:9443 ibmcom/ibm-fhir-server
THEN the server starts successfully
AND has a functional embedded derby database
To confirm it:
mvn clean install -f fhir-parent -DskipTests
docker build fhir-install -t ibmcom/ibm-fhir-server
docker run -e BOOTSTRAP_DB=true -e FHIR_TRANSACTION_MANAGER_TIMEOUT=60s ibmcom/ibm-fhir-server
Additional context
The text was updated successfully, but these errors were encountered: