Page MenuHomePhabricator

Deploy a SPARQL instance for Projekt_Pressearchiv
Open, Needs TriagePublic

Description

Per IRC conversation with @Jneubert , the Wikiproject "Projekt Pressearchiv" is requesting

...a SPARQL endpoint [hosting] the project's data (uncompressed ca. 270 MB .nq file), and open it to federated queries from WDQS.

There is an existing WMCS account associated with Projekt_Pressearchiv , so I propose the following:

  • Add @bking (me) to Projekt_Pressearchiv project
  • Attempt to set up a SPARQL instance in a way that works best for @Jneubert and Projekt_Pressearchiv . I suggest deploying a Debian VM and running the endpoint with a qlever docker image, but the owners of the service should choose whatever they think they can most easily support.
  • Make adjustments as needed (ask for larger VMs, bigger quota, etc)
  • When the endpoint is ready, submit a federation request to the Wikidata Platform team.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

A debian VM, where the qlever .deb package can be installed, sounds very good! In my test installation, qlever-0.5.48 package installed docker seamlessly, and worked without hassles. scp file transfer and data loading shouldn't be too difficult. Probably, debian version should be 13 (trixie) - I don't know if and for how long debian 12 (bookworm) is supported by qlever.

r/o acess from the internet could be provided by an accompanying toolforge project (e.g., pm20-sparql) with a reverse proxy - or what do you think?

@bking : I'd be happy if you enlisted for https://de.wikipedia.org/wiki/Wikipedia:Projekt_Pressearchiv . However, perhaps you meant some background project with formal permissions?

Hi @bking: Is there something I could/should do? (I'm not familiar with the processes - sorry for this).

@Jneubert sorry for the confusion, I'm not too familiar with Wikiprojects, Toolforge or WMCS ;(. Answers inline

r/o acess from the internet could be provided by an accompanying toolforge project (e.g., pm20-sparql) with a reverse proxy - or what do you think?

I think we can use the existing WMCS account I linked earlier. If you're familiar enough with Toolforge to know that we do need a separate project, then I'll take your word for it. If you're not sure, check around in #wikimedia-cloud IRC.

However, perhaps you meant some background project with formal permissions?

I meant the existing Openstack project pm20database. You can add me by navigating to https://horizon.wikimedia.org/project/member/ .

Make sure your project is selected, then click "Add User" , Username "Bking" and shell name "bking". If you want me to be able to create the VM (and related resources such as load balancers, storage, etc) , check "add as project member who can create/delete." If you're not comfortable with that (and I completely understand if so), you can leave it unchecked and I'll still be able to login to the servers.

OK, pm20database is it - fine. I have added you as a member with create/delete privileges.

Great that you can create the VM. I suppose that this VM will be separate from the (only internally used) Postgres database - is that correct?

The SPARQL endpoint would be accessible publicly, but restricted to read-only operations. In the past, in an Fuseki/Apache environment, the easiest way to achieve this was a separate reverse proxy, which mapped only a selection of URLs to the SPARQL backend. If a separate toolforge web project would make sense here, I can add it myself.

I don't expect lots of traffic, so probably no need for a load balancer. Re. storage, requirements will be modest (in Fuseki, less than 10 GB).

@Jneubert thanks! Per internal conversations with the Wikidata Platform team, there is already a wikiqlever project running on WMCS . It's possible we could borrow their approach, or get some advice at least.

Tagging @Infrastruktur @Daniel_Mietchen @Fnielsen @Physikerwelt (members of the wikiqlever project). Do y'all have any advice, example code, etc you'd be willing to share with regards to running qlever in WMCS and exposing it publically? Thanks for taking a look, you can find me in #wikidata-cloud IRC (inflatador) if you need a quicker response.

@Jneubert Since we haven't heard back from the wikiqlever folks, I'll go ahead and get started on the qlever build in the pm20database project.

I suppose that this VM will be separate from the (only internally used) Postgres database - is that correct?

Confirmed, I won't be touching existing infrastructure, only creating new resources (VM and possibly block storage and Load Balancer, if a load balancer is a requirement for exposing the traffic publicly).

In the past, in an Fuseki/Apache environment, the easiest way to achieve this was a separate reverse proxy, which mapped only a selection of URLs to the SPARQL backend. If a separate toolforge web project would make sense here, I can add it myself.

Again, I don't know enough about Toolforge to say for sure, but my guess is we can use the same account. I'll ask in #wikimedia-cloud IRC and get back to you.

Upon further review, it looks like the pm20database account has a quota of zero for instances. I can't build a VM until that's taken care of, so I have requested a quota increase using the procedure here , which took me to https://cloudvps-quota.toolforge.org/ . Although the wizard said it created a Phabricator task, I actually don't see it on the Cloud-VPS (Quota-requests) board. .

Just in case we need to ask for a quota increase again, I requested 4 instances (VMs) and 64 GB of RAM. qlever is RAM-hungry, so I think we should ask for a high number and then lower our quota later if we are able to get by with 32 GB or less. We might need a slight bump in vCPUs, other than that I think that's more than enough to get started.

As far as external access for the SparQL endpoint, @taavi pointed me to this page ; it sounds like we can enable access by following this tutorial.

This all sounds very reasonable. I'm happy that there are already standard procedures to set up a proxy. I had expected this would be manual work via a toolforge instance - please forget everything I said about this.

For the name, I'd suggest "pm20-sparql". I've no preferences re. the domain and am happy with whatever default.

Thank you for pushing this forward. Currently, I'm my summer holidays hiking through remote mountains, so I may have no internet connection for some days.

@bking Currently, I'm in between of to voyages, and will be offline again up to Sept 18. After that, I'll dive into the task again. Thanks to everybody involved!