Skip to content
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

3.x: how to update minor version #3396

Open
mnscholz opened this issue Apr 6, 2020 · 2 comments
Open

3.x: how to update minor version #3396

mnscholz opened this issue Apr 6, 2020 · 2 comments

Comments

@mnscholz
Copy link
Contributor

mnscholz commented Apr 6, 2020

Is there any documentation on how to do an update between two minor versions of Kitodo?
I think I once read a paragraph about that but I can't find it anymore and I may err.
All I found is the paragraph in the devel docs: https://kitodo-production.readthedocs.io/en/latest/developer/gettingstarted/development-version/
From the tutorial I infer that I should replace the war and the module jars.
But it also drops the database, which is not what I want.
How should I update the database, ie. run the maven flyway updates?

@matthias-ronge
Copy link
Collaborator

matthias-ronge commented Apr 7, 2020

As far as I know there is no description of the update procedure between 3.x intermediate releases. Basically it works like this:

You save the configuration from the webapps/kitodo/WEB-INF/classes directory without the mapping.json file. Then you delete the .war file from the Tomcat webapps directory. Stop the Tomcat. Also delete the modules .jars.

Update the database. Here's how: Go to releases, and for the release you have currently installed, left on the hexadecimal number above the text "Verified". On the next page, click on "Browse files" in the top left corner. Go to Kitodo-DataManagement » src » main » resources » db » migration and check which is the highest number (after V2) you can find there. Then go back to releases and there the version you want to install. There change again to the folder migration. Look which files that have been added numerically. Apply this content to your database in numerical order. (Note, if you right click and save the additional files, you will get HTML files. You have to open the page on GitHub, use the "Raw" button above, or copy and paste from that page.)

If the index has changed between the versions, you have to delete the index (I always do this: delete directory 0 from elasticsearch data directory while the service is down; on Linux, you need root permissions to find the directory at all), and then re-index. (I do index rebuilds every time, so I can't say how to tell if it's necessary.)

Unpack the modules from the new release into the module directory, insert the .war file into webapps. Then start the Tomcat and wait for deploy. Then stop the Tomcat and copy the saved configuration files back to WEB-INF/classes. Log in as a user with permission to index and recreate Elasticsearch index.

@mnscholz
Copy link
Contributor Author

mnscholz commented Apr 9, 2020

Thank you! I followed your guide and everything seems to work fine (no errors so far).

I wonder, however, that when manually applying the database updates, the table flyway_schema_history isn't updated as well. I have manually inserted the missing version entries, so that I can keep track if I want to install further updates.
For the future, I guess there should be some update procedure here.

stefanCCS pushed a commit to stefanCCS/kitodo-contrib that referenced this issue Jun 26, 2020
@solth solth removed the 3.x label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants