Skip to content

Decouple installation and deployment#479

Merged
chenejac merged 7 commits intovivo-project:mainfrom
litvinovg:decouple-install-deploy
Jan 10, 2025
Merged

Decouple installation and deployment#479
chenejac merged 7 commits intovivo-project:mainfrom
litvinovg:decouple-install-deploy

Conversation

@litvinovg
Copy link
Member

@litvinovg litvinovg commented Oct 23, 2024

VIVO GitHub issue
VIVO PR

What does this pull request do?

Decoupled deployment and installation processes
Changed delivery of home directory: package it's contents as part of war artifact, update default files on home directory except rdf subdirectory on startup.
In case tomcat directory is not provided artifact will not be copied into tomcat webapps directory

What's new?

Changed deployment: war artifact is copied into webapp directory, not unpacked
Home directory contents are copied into war artifact
On startup path to home directory is being created if not already exists.
RDFFilesLoader and FileGraphSetup were adjusted to read home/rdf files from tomcat webapp application directory

How should this be tested?

Test update of already installed instance and installation of new instance.

  • Verify that mvn install -s example-settings.xml work as before
  • Remove tomcat directory from xml file, copy created war file manually to tomcat webapp directory, that should result in deployment of application.

Additional Notes:

This change require documentation to be updated

Interested parties

@VIVO-project/vivo-committers

Reviewers' expertise

Candidates for reviewing this PR should have some of the following expertises:

  1. Java
  2. Maven

Reviewers' report template

Please update the following template which should be used by reviewers.

General comment

A reviewer should provide here comments and suggestions for requested changes if any.

Testing

A reviewer should briefly describe here how it was tested

Code reviewing

A reviewer should briefly describe here which part was code reviewed

Copy link
Contributor

@chenejac chenejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@litvinovg works well. I have only one comment for discussion about the code. Please check my comment.

@litvinovg
Copy link
Member Author

@chenejac I checked contents of the war file in case tomcat-dir variable is not provided.
War file located in ./installer/webapp/target/ contains home directory source files.

chenejac
chenejac previously approved these changes Dec 9, 2024
Copy link
Contributor

@chenejac chenejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@litvinovg it works well. I have tested with and without tomcat-dir property.

@chenejac chenejac requested a review from tamu-sad-iii December 9, 2024 08:59
Copy link
Contributor

@tamu-sad-iii tamu-sad-iii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide unit tests for added code.

@litvinovg litvinovg force-pushed the decouple-install-deploy branch from 9f2a455 to e441cb8 Compare December 13, 2024 12:00
@litvinovg
Copy link
Member Author

Found and fixed issues in UpdateKnowledgeBase and FauxPropertiesUpdater.
Refactored and improved code in VitroHomeDirectory.
Added tests.

tamu-sad-iii
tamu-sad-iii previously approved these changes Dec 15, 2024
Copy link
Contributor

@chenejac chenejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for improvements.

@chenejac chenejac merged commit 53ca1d8 into vivo-project:main Jan 10, 2025
ivanmrsulja pushed a commit to ivanmrsulja/Vitro that referenced this pull request Apr 1, 2025
* removed home directory modifications by maven

* fixed war file deployment

included vitro home into installer webapp

* Updated home directory on startup, fixed rdf file loading

* create home directory path if not exists

* Refactored code, fixed UpdateKnowledgeBase and FauxPropertiesUpdater. Added tests.

* Reduced nesting, used more specific exception.

* Fixed idents and other code style in VitroHomeDirectory. Removed VitroHomeDirectory from checkstyle suppressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerized VIVO update doesn't lead to update of home/rdf directory VIVO-1443: Decouple VIVO build from installation

3 participants