opencast / opencast-docker

Dockerfiles for Opencast

Home Page:https://quay.io/organization/opencast/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker image with annotation-tool is missing

hpawe01 opened this issue · comments

Are there any plans to create a docker image that includes the annotation tool (like allinone-plus-annotation)?

Otherwise I will try to modify the allinone Dockerfile to include the annotation-tool installation (as described in https://github.com/opencast/annotation-tool/blob/master/documentation/opencast-installation.md#installing-the-annotation-tool) and use it locally.

An easy way to do this is to write a Dockerfile based on the allinone image and include the annotation tool JARs into the /opencast/deploy folder. Opencast will init all JARs during startup so you don't need to deal with Karaf.

Thanks for your answer - this is exactly what I did (see opencast/annotation-tool#433): I build the annotation tool and store the JARs in the /opencast/deploy folder. This is the content of the folder:

-rw-r--r-- 1 opencast opencast   10797 Jan 12 19:25 annotation-tool-api-0-SNAPSHOT.jar
-rw-r--r-- 1 opencast opencast    1987 Jan 12 19:25 annotation-tool-frontend-0-SNAPSHOT.jar
-rw-r--r-- 1 opencast opencast 1423001 Jan 12 19:25 annotation-tool-frontend-delivery-0-SNAPSHOT.jar
-rw-r--r-- 1 opencast opencast  252812 Jan 12 19:25 annotation-tool-impl-0-SNAPSHOT.jar

But as described in the other issue I get the following error on startup:

...
opencast_1  | Run opencast_main_start
opencast_1  | 2021-01-12T19:28:05,467 | WARN  | (PaxLoggingServiceImpl$1ManagedPaxLoggingService:398) - Error while starting bundle: file:/opencast/deploy/annotation-tool-api-0-SNAPSHOT.jar
opencast_1  | org.osgi.framework.BundleException: Unable to resolve annotation-tool-api [10](R 10.0): missing requirement [annotation-tool-api [10](R 10.0)] osgi.wiring.package; (&(osgi.wiring.package=org.opencastproject.mediapackage)(version>=8.10.0)) Unresolved requirements: [[annotation-tool-api [10](R 10.0)] osgi.wiring.package; (&(osgi.wiring.package=org.opencastproject.mediapackage)(version>=8.10.0))]
opencast_1  |   at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
opencast_1  |   at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
opencast_1  |   at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
...

Next steps would be testing if the package in the error log has really the wrong version and if an earlier version of opencast (8.6) works.

This is "normal". Since Opencast (more specific Apache Karaf) does not know the correct loading order for files in the deploy directory, there is basically a race if all the necessary dependencies for the annotation-tool are loaded. The most effective way to mitigate this error is to postpone the loading of the additional files by increasing felix.fileinstall.poll in org.apache.felix.fileinstall-deploy.cfg, e.g.:

felix.fileinstall.dir           = ${karaf.base}/deploy
felix.fileinstall.tmpdir        = ${karaf.data}/generated-bundles
felix.fileinstall.poll          = 30000
felix.fileinstall.start.level   = 80
felix.fileinstall.active.level  = 80
felix.fileinstall.log.level     = 3

Thank you @mtneug, this did the trick! And when I checked where to find or create this file, I saw that this issue isn't new: opencast/annotation-tool#226, https://groups.google.com/a/opencast.org/g/dev/c/-MYXY9BFcyQ?pli=1 but I don't know, why I didn't saw it beforehand.

Next steps would be adding the configuration for the annotation tool into my Dockerfile and than I will share the full version.

Glad that it is working now. I would not add an additional Docker image for allinone/presentation + annotation-tool since the annotation tool is not part of the main code base of Opencast, but having documentation + an example Dockerfile would certainly be helpful for others.

I finally got a working version and prepared a shareable Dockerfile that works with the standard allinone docker-compose files (only v8.x). What would be the best way to add this Dockerfile? As a closing comment to this issue?

Since people who want to use OAT probably look through the OAT documentation first, maybe we could add a new article there? @JulianKniephoff does this make sense? Basically, a new markdown file describing this setup.

I'm glad to accept any kind of improvement to the docs over at opencast/annotation-tool. 🙂

Alright, see opencast/annotation-tool#439. This pull request documents how to use the Annotation Tool with Docker, so I will close this comment.