forked from vivo-project/Vitro
-
Notifications
You must be signed in to change notification settings - Fork 0
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
VIVO-1443: non destructive vivo home untarring #2
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Related to: https://jira.lyrasis.org/browse/VIVO-1943 Co-authored-by: Andrew Woods <awoods@duraspace.org>
ghost
marked this pull request as draft
January 27, 2021 23:52
ghost
marked this pull request as ready for review
January 28, 2021 00:23
digest.md5
|
awoods
requested changes
Jan 28, 2021
api/src/main/java/edu/cornell/mannlib/vitro/webapp/application/VitroHomeDirectory.java
Outdated
Show resolved
Hide resolved
api/src/main/java/edu/cornell/mannlib/vitro/webapp/application/VitroHomeDirectory.java
Outdated
Show resolved
Hide resolved
api/src/main/java/edu/cornell/mannlib/vitro/webapp/application/VitroHomeDirectory.java
Outdated
Show resolved
Hide resolved
api/src/main/java/edu/cornell/mannlib/vitro/webapp/application/VitroHomeDirectory.java
Outdated
Show resolved
Hide resolved
Applied changes requested. Will this be enough validation of the checksum file? |
ghost
requested a review
from awoods
January 28, 2021 04:24
awoods
approved these changes
Jan 28, 2021
awoods
added a commit
that referenced
this pull request
Feb 5, 2021
* Create vivo/home on application start-up - Add logic for untarring vivo-home Related to: https://jira.lyrasis.org/browse/VIVO-1443 * Require runtime.properties and applicationSetup.n3 be in 'config/' dir Related to: https://jira.lyrasis.org/browse/VIVO-1443 * Support loading config files with or without 'default' prefix * Prioritize without the prefix Related to: https://jira.lyrasis.org/browse/VIVO-1443 * Add leading slash to location of vivo-home.tar resource path * This allows for deployment in both Tomcat and Jetty Related to: https://jira.lyrasis.org/browse/VIVO-1443 * Ensure VIVO_HOME is populated whether it is empty or not Related to: https://jira.lyrasis.org/browse/VIVO-1443 * Require common properties to be in JNDI Properties include: - vitro/home - vitro/appName - vitro/rootUserAddress - vitro/defaultNamespace Related to: https://jira.lyrasis.org/browse/VIVO-1443 * VIVO-1443: non destructive vivo home untarring (#2) * Upgrade Jena version to 3.16.0 (vivo-project#196) Related to: https://jira.lyrasis.org/browse/VIVO-1943 * remove example-settings.xml * update home directory untar non-destructive * checksum digest to retain modified files * compare checksum from digest with existing file * overwrite files that have not changed * add command to manually generate checksum digest * simplify parsing checksum digest using pattern Co-authored-by: Andrew Woods <awoods@lyrasis.org> Co-authored-by: Andrew Woods <awoods@duraspace.org> * not overwrite existing file if same as tar entry (#3) * Upgrade Jena version to 3.16.0 (vivo-project#196) Related to: https://jira.lyrasis.org/browse/VIVO-1943 * remove example-settings.xml * update home directory untar non-destructive * checksum digest to retain modified files * compare checksum from digest with existing file * overwrite files that have not changed * add command to manually generate checksum digest * simplify parsing checksum digest using pattern * do not overwrite file if same as already exists Co-authored-by: Andrew Woods <awoods@lyrasis.org> Co-authored-by: Andrew Woods <awoods@duraspace.org> * Update log messages for clarity Co-authored-by: Andrew Woods <awoods@duraspace.org> Co-authored-by: William Welling <wwelling@library.tamu.edu> Co-authored-by: Gross, Benjamin <benjamin.gross@clarivate.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will afford to keep changes made to various VIVO home files if restarting tomcat or redeploying another build.
Approach:
During untar of packed VIVO home, a checksum digest is built from the files in the tar. After untar is complete a checksum digest file is written in VIVO home. The checksum digest is then read before untar and used to check if an existing file in the VIVO home directory has been modified. If the file has not been modified it will be replaced with the file from the tar file. A log will indicate if a file has been preserved to assist in redeploy.
For upgrade from previous versions and there is a desire to maintain the VIVO home directory we can provide a script or instructions on creating the md5 checksum.
If during development and you want all modified files overwritten, the checksum digest file can be deleted.
VIVO home checksum digest can manually be created.