-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Docker files to run self-contained image for trying out Skosmos #962
Conversation
Codecov Report
@@ Coverage Diff @@
## master #962 +/- ##
=========================================
Coverage 67.91% 67.91%
Complexity 1583 1583
=========================================
Files 32 32
Lines 3890 3890
=========================================
Hits 2642 2642
Misses 1248 1248 Continue to review full report at Codecov.
|
Thanks @kinow, testing this now! |
Thanks @osma! There's further work that can be done on this. Just let me know which direction you think we should go, and anything that is missing or that needs fixing in the image :-) |
Thanks for the quick fix @kinow ! |
Got both the single image and the docker-compose variants running. I will do more detailed testing tomorrow and try to come up with answers to your questions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good in general and already works quite well. Some remarks:
I'm a bit concerned about the proliferation of Docker images. We already have the top-level Dockerfile that sets up a "shell" where the Skosmos code can be mounted. This PR adds the single-image and Compose variants. I wonder if it would be possible to simplify the situation and perhaps replace the current "shell" Dockerfile with this new variant - maybe with an option for mounting the Skosmos code within the container instead of copying.
Regarding the Composer variant, I think this is a good start but I'd like to see more:
- Setting up a jena-text index
- Putting the example vocabularies (STW and UNESCO) in place
Also I'm wondering whether it would make sense to add another container to the Compose file with a reverse HTTP cache - Varnish or nginx, probably - to speed up the Fuseki queries, as explained in the tutorial. But maybe we'll postpone that discussion.
Keep up the good work!
Hi @osma ! Thanks for the great feedback. And lots of good ideas, so +1 from me. Next updates here should have:
@osma these are the requirements I could think of from the reviews so far. What do you think? |
Sounds like a great plan @kinow!
Just to clarify: I think it would be great to have:
PS. I just had to test the new "convert to draft PR" button on this PR. Draft PRs are a great feature, but originally you had to mark PRs as drafts when you created them, which I often forgot, and it wasn't possible to change that later. |
Agreed on the Docker files. Should we move everything under
Today I learned. Didn't see any announcement of that feature. Thanks!! |
Yes, I think it's a good idea to reduce the clutter at the root level.
Me neither, I just noticed the link in the right hand column. |
Any news @kinow? We're just starting a new sprint next week (though focused on API issues). |
Not much progress, I have some local changes in the other repository I had for docker+skosmos from when I was testing building an image with parameters. Refreshing my memory and will update it soon. I just finished working on two other images (SLURM and another interesting one to run multiple versions of |
ae56788
to
8033ce7
Compare
Did a bit more of progress today, but had some issues with this item. I first tried using the Tried adding an extra container responsible only for loading the data. But the issue now was that I had to either include the two .ttl (~7MB total), or gzipped (<1MB). But then had to automate decompressing the files, loading into the volume, and stopping the container to free the lock to Fuseki in another container. It started to look a bit too convoluted this set up. I've downloaded both ttl from their vocabulary pages. Then loaded with curl -I -X POST -H Content-Type:text/turtle -T unescothes.ttl -G http://localhost:9030/skosmos/data --data-urlencode graph=http://skos.um.es/unescothes/
curl -I -X POST -H Content-Type:text/turtle -T stw.ttl -G http://localhost:9030/skosmos/data --data-urlencode graph=http://zbw.eu/stw/ Would it be all right if users had to start |
I think that makes sense, if the alternative is so complicated. |
Got it working with most of the new requirements. Will look at varnish this weekend, give it some more testing, check what docs need to be updated, then it should be ready for review again 👍 |
Great! Thanks for the update @kinow, I was just wondering about this PR |
… git inside the container
… STW and UNESCO vocabs
Docker Compose, links between sections, NOTE's about installation options, and new section for loading the vocab data.
(rebased, and included a new commit to document the |
SonarCloud Quality Gate failed.
|
Tested this once more, removed lines referring to Finto SPARQL endpoint from the config files (they were already commented out), and merged. 🎉 Great work @kinow! Now the wiki page for Docker use still needs to be updated. The README.md file included in this PR is already pretty extensive, so maybe it can mostly just be replaced with a link to that? @kinow do you want to do this or should I? |
🎉 thanks for the patience reviewing and testing it, and for the help along the way @osma, it was fun :-)
I did a quick change, but feel free to amend/edit it as necessary @osma : https://github.com/NatLibFi/Skosmos/wiki/Install-Skosmos-with-Fuseki-in-Docker |
Thanks! I edited it slightly. All good now! |
Closes #910
Initial Docker files to try out Skosmos 2.4. Uses the Ubuntu base image, and installs Apache2, PHP, composer, git. It is similar to the InstallTutorial, but there are still some steps missing. Some of the steps require trying to customize/parameterize the Jena image.
I am creating this PR now so that I can check what else needs to be done.
The
Dockerfile.ubuntu
is for the Skosmos 2.4 image, that at the moment is using YSO and YSA vocabularies from Finto dev server. I haven't done the extra step of the tutorial, to use different vocabularies as that would require Fuseki. I thought some users would prefer to be able to run just one container to try Skosmos first?There is also a
docker-compose.yml
that uses a different config.ttl, which points to the Jena Fuseki container. It is not loading any data at the moment, but I was starting to work on having 1 vocabulary only, then leave the commands to load the data to the user. Not sure what's the best way here, maybe thedocker-compose.yml
should try to do more, and also load the data (not sure if I can do that), and perhaps complete the rest of the tutorial?Cheers
Bruno