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

Update Fuseki Docker #1415

Closed
nichtich opened this issue Mar 1, 2023 · 13 comments · Fixed by #1477
Closed

Update Fuseki Docker #1415

nichtich opened this issue Mar 1, 2023 · 13 comments · Fixed by #1477
Labels
Milestone

Comments

@nichtich
Copy link
Contributor

nichtich commented Mar 1, 2023

The version of Fuseki used in Docker is 2 years old. There are official Fuseki Docker files at https://jena.apache.org/documentation/fuseki2/fuseki-docker instead.

@nichtich
Copy link
Contributor Author

nichtich commented Mar 2, 2023

Well, the official Fuseki docker file does not contain UI so better create your own Dockerfile instead. Meanwhile I created a Fuseki Debian package instead.

@nichtich nichtich changed the title Use official Fuseki Docker files Update Fuseki Docker Mar 10, 2023
@osma
Copy link
Member

osma commented Mar 10, 2023

Thanks for opening the issue.

I agree that we should switch to a more recent version (obviously). Using the official image seems like a good idea to me. I'm not sure if the UI is absolutely required - thoughts?

@MikkoAleksanteri MikkoAleksanteri added the size-medium 2 hours to 2 days label Apr 6, 2023
@kinow
Copy link
Collaborator

kinow commented May 21, 2023

I think the plan in Jena is to further modularize the project so that there is an UI with the admin, without the admin, etc. And at some point maybe there could be a UI added in the Docker Compose recipe -- but probably not for now.

The Apache Jena Dockerfile referenced here has the disadvantage of not being published to Docker Hub, Quay, GH, etc. So I think one possibility would be to somehow update our docker-compose to, instead of using stain/jena-fuseki, use the Apache Jena Dockerfile directly.

Then, later, we can try to add an extra service with the UI + an HTTP Server (tricky part will be handling CORS, and proxying the requests, but doable IMO).

WDYT?

@osma
Copy link
Member

osma commented May 23, 2023

@kinow Sounds good to me, although I don't know how to use docker-compose with the Jena Dockerfile. But good if you can make it work!

It's a pity Apache Jena doesn't publish Docker images.

@kinow
Copy link
Collaborator

kinow commented May 23, 2023

Great! I will give it a try and see if I can make it work GUI-less for now.

It's a pity Apache Jena doesn't publish Docker images.

I will check with Andy to see if it's on the todo list, or if there was a reason for not doing that.

Thanks!

@kinow
Copy link
Collaborator

kinow commented May 23, 2023

Asked in a comment in the ticket where the Dockerfile was added (there was a comment about DockerHub): https://issues.apache.org/jira/browse/JENA-1949

@kinow
Copy link
Collaborator

kinow commented May 27, 2023

Did a few tests today: https://github.com/kinow/Skosmos/tree/fuseki-docker/dockerfiles/jena-fuseki2-docker

The idea was to get a copy of Jena's Docker image. The first issue I had was that it was not only a Dockerfile, but also a few other files used within the Dockerfile 😥

Then, once I managed to build it, it got a bit complicated to automate everything. stain/jena is able to load a dataset automatically when you create a container with the image.

But from what I undestood, for the Jena image you need to create a folder (mkdir), use tdbloader, and then execute docker-compose. I think it should work if we do the same, but I guess it would be preferable to be able to just run docker-compose up?

@osma
Copy link
Member

osma commented May 29, 2023

Is the tdbloader step really necessary? Sounds like it's creating a TDB(2) database so that Fuseki can be used for serving it. But normally Fuseki can also be started without any databases, and new ones can be created at runtime either via the web UI or using the administration protocol API. The latter is covered in the Skosmos InstallTutorial section Creating the database from the command line. I think that would be the preferred method because it allows adding new datasets later and of course also updating the data with s-put, s-post etc.

@kinow
Copy link
Collaborator

kinow commented May 29, 2023

Ah, I forgot to test the curl calls! Let me test that.

@kinow
Copy link
Collaborator

kinow commented May 29, 2023

All right! It works @osma ! I I modified a little bit the Dockerfile to run it without root and also use gid & uid 1000, so the files creates by the container can be edited by the host-user (in most cases, as the UID/GID will be 1000, but that can be changed by the user building it).

I believe this change can be quickly merged back into Jena, so I will send a pull request this week.

@osma, would you like me to try adding the UI to this docker setup too? Or do you prefer to use this new image first for Cypress tests?

@osma
Copy link
Member

osma commented May 30, 2023

@kinow that's great news!

I think we can live without the Fuseki UI. It can always be added later if it turns out we need it.

@kinow
Copy link
Collaborator

kinow commented May 30, 2023

PR to Jena: apache/jena#1890

@kinow
Copy link
Collaborator

kinow commented Jun 1, 2023

PR to Jena: apache/jena#1890

Merged, and tested again with Skosmos. Now just need some time to update the docs and one final test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

4 participants