Page MenuHomePhabricator

Setup domain "app.wikilovesmonuments.it" to host the WLM-it frontend
Closed, ResolvedPublic2 Estimated Story Points

Description

A "frontend website" was designed for Wiki Loves Monuments in Italy.

It seems the backend API is already hosted in Wikimedia Cloud:

https://wlm-it-visual.wmcloud.org/

https://wikitech.wikimedia.org/wiki/Nova_Resource:Wlm-it-visual

So, maybe it would be nice to host the frontend website in Wikimedia Cloud as well.

The problem is, the supposed domain should be:

https://app.wikilovesmonuments.it

But Wikimedia Cloud does not support such custom domains.

As workaround, we can host the frontend in the server wmit-intreccio, but only if it's really lightweight, because of T340191.

Or, WMIT can handle that domain, redirecting the traffic to Wikimedia Cloud.

Actionable things

So, it seems:

  • if we want to serve https://app.wikilovesmonuments.it directly from server wmit-intreccio
  • or if we want to create a redirect from https://app.wikilovesmonuments.it to Wikimedia Cloud from server wmit-intreccio

In any case we should setup the domain record to point on server wmit-intreccio.

Request stub:

https://wiki.wikimedia.it/wiki/Server_DNS

From: persona che sappia cosa sia un server DNS
To: tech      chiocciola wikimedia.it
CC: direttivo chiocciola wikimedia.it
CC: Email personale di M/

Gentilissimi frequentatori della lista Tech,
in particolare al gentilissimo volontario M/ (attuale manutentore zone DNS),
Gentili membri del Direttivo in copia (per tradizione),

Con la presente, si richiede ad M/ (senza fretta) di salvare le seguenti modifiche nella zona DNS di

wikilovesmonuments.it:

   app  IN CNAME intreccio.wikimedia.it.

L'intenzione è quella di servire un sito frontend, oppure, creare un redirect a Wikimedia Cloud (ancora da decidere).

Qui altri dettagli a riguardo:

https://phabricator.wikimedia.org/T344676

Grazie in anticipo!

- NOME (RUOLO)

Shopping list

  • understanding if the project is > 100MB: done. It should be ~20MB
  • deciding whenever to host on server wmit-intreccio or on server wmf-wlm-it-visual (probably the second): we are just using Wikimedia Cloud, so, intreccio acts as a simple redirect - so we respect Wikimedia Cloud terms of services, and developers are more independent (they do not need access in WMIT servers)
    • setup Apache2 stuff in server intreccio
    • create DNS records: done by volunteer M/

Event Timeline

valerio.bozzolan created this task.

Hi Mauro, if you can read:

In your opinion, can you create a GitLab CI configuration that - as last step - runs a simple "rsync" command, to push static files somewhere? That would allow to use a WMIT server and have https://app.wikilovesmonuments.it as the "final destination", instead of having that URL as a simple redirect to Wikimedia Toolforge.

@valerio.bozzolan
Yes, it's ok for me. As first step, I could rsync manually from my local machine.
Can you provide me the access to the destination filesystem?

Thanks Mauro, can you try connecting here (no more than 1 attempt please)?

ssh wlm-it-visual-frontend@intreccio.wikimedia.it

If you can't, please copy-paste your SSH key(s) in this position on the server wlm-it-visual in Wikimedia Cloud, and I will grant you:

/home/maurobianchi/id_rsa.pub

Hi Valerio,

ssh wlm-it-visual-frontend@intreccio.wikimedia.it

is asking me a password.

my public key is now on the file you asked on the wlm-it-visual server

Nice, try again

ssh wlm-it-visual-frontend@intreccio.wikimedia.it

Files should be placed here:

/var/www/wlm-it-app/webroot

After you concluded we can change the VirtualHost of app.wikilovesmonuments.it to serve that document root

Login succeded and files copied to

> /var/www/wlm-it-app/webroot

If you want we can test if the app is responding.

Done also that \o/

Editing this file

/etc/apache2/sites-available/org-wmcloud-wlm-it-app.conf

Great!

@Valerio

so i can tear down the docker container that was serving the frontend on t https://wlm-it-app.wmcloud.org/, right?

@Valerio

we have a problem about client side routing,
for example, this page

http://app.wikilovesmonuments.it/it/profilo

is not working

the problem is that we should redirect all frontend urls to "index.html"
something along the lines of

https://gist.github.com/rambabusaravanan/578df6d2486a32c3e7dc50a4201adca4

let me know, if you want we can setup a quick call to adress this

Great! i also tested the login to commons and it works fine.
thanks!

valerio.bozzolan set the point value for this task to 2.