Page MenuHomePhabricator

More Clear Documentation When Running Wikibase Release Pipeline Locally
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

Follow step-by-step instructions on how to run the WIkibase Release Pipeline locally. Currently there is this FAQ answer.

I have been able to run everything up to this point, but I'm not sure how to even begin interpreting the FAQ answer or how to implement it on my own device. I've showcased a bit of my confusion so far in this ticket.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  1. There are many etc/hosts files-- on the local machine and in the Docker containers. Which one (or ones) are being referred to?
  2. The WQS and QuickStatements don't seem to require any changes to /etc/hosts, only the Wikibase itself. Is there a reason this occurs? Should that be documented?
  3. Once you local the right etc/host file or files, what do you change? Are there any guides on how to do so? Can doing so in the wrong manner break components on your machine or in your containers?
  4. Is there a way to automate the changes to /etc/hosts for localhost, so that you don't have to manually edit things when testing?

Benefits (why should this be implemented?)

A number of users utilize local installs of Wikibase and making the process more clear would be extremely useful.

Event Timeline

Ok-- so nothing is needed at all with etc/hosts. You just have to change WIKIBASE_PUBLIC_HOST in .env to localhost. That's it! Closing this, but I still think the documentation should be updated to reflect this.

Hi @Superraptor123,

thanks a lot for reporting this and also sharing your use case.

At the moment, WBS Deploy is explicitly targeted to public production environments. There are rough edges to be expected when running locally without DNS set up. Still, this can be done and is worth a try ;)

I changed the deploy docs a bit in order to add some clarity for the situation you encountered: https://github.com/wmde/wikibase-release-pipeline/pull/762

It now reads:

Yes, WBS Deploy can be hosted locally for testing purposes by using the example domain names *.example.com from template.env in your .env file. Configure those domains in /etc/hosts on your host machine, so that your host machine browser can resolve *.example.com to 127.0.0.1 and access the local WBS Deploy instance.

I hope this clarifies a bit. Apparently there is a counterpart to this file on windows in System32\drivers\etc\hosts that does a similar thing. But please note that we are not testing on windows at all at the moment.

I would not recommend to just set the hostnames in .env to localhost because the reverse proxy on port 80/443 cannot distinguish between the services you target anymore, be it mediawiki, query service frontend or quickstatements.

One more note: Accessing the services via 8xxx port numbers in deploy is deprecated. Actually, it is a bug that it still works. This bug was fixed in https://github.com/wmde/wikibase-release-pipeline/commit/98434e4cad290c5f874cfb607902719474f53cdd and the 8xxx ports will be closed in the next deploy version. Please always access the services through the reverse proxy on ports 80/443 by using e.g. https://wikibase.example.com after defining wikibase.example.com as 127.0.0.1 in /etc/hosts.

Best,
Robert

roti_WMDE changed the task status from Open to In Progress.Sep 4 2024, 10:06 AM
roti_WMDE claimed this task.

Robert--

Thanks so much for the thoughtful and detailed response! I'm not very familiar with port forwarding/proxy handling and I'm dealing with another issue with importing (munge.sh is giving me some strange errors, I'll document that elsewhere).

Once I finish that process though I'll down my local server and retry with your instructions. Worst case I can maybe provide some documentation if other Windows users head this direction! (I'll post updates here when I have them!)

Best,

Clair

Attempting solution now-- added the following line to hosts in C:\Windows\System32\drivers\etc:

127.0.0.1 wikibase.example.com

Note: this requires opening the Notepad program as administrator-- otherwise, the document won't let you save. To be clear I am keeping the following line:

WIKIBASE_PUBLIC_HOST=wikibase.example.com

Following that, the URL https://wikibase.example.com/ resolves and displays the Wikibase as normal! (Granted, there is still the "unsafe" warning given on most browsers, but it's fine to proceed and this is well noted already in documentation.)

Thanks so much Robert! I learned something new and this worked like a charm!