Page MenuHomePhabricator

Deploy a testing Wikimini
Closed, ResolvedPublic8 Estimated Story Points

Description

Actually Wikimini lives only in production.

This Task is about the deployment of a testing environment to break everything and then rollback, without downtime.

This will allow to develop new features and fixes without explosions.

Intervention

  • migrated picture_of_the_day and images outside production
  • duplicated databases
  • duplicated filesystem structure

Event Timeline

valerio.bozzolan triaged this task as Medium priority.

For the records the domain choosen for this was fr.test.wikimini.org and only works with a local DNS poison, associating that domain to the IPv4 89.207.237.59.

I cannot deploy a real DNS since I have not access to the DNS zone at the moment, and it's probably not a priority to have real-world visitors there. So if you want to test:

/etc/hosts
89.207.237.59 fr.test.wikimini.org

This is not completed. The testing databases are not adopted by the test wiki.

Also, the credentials are now in the application files

/var/www/wikimini.org/www.testing/wiki/WikiminiSettings/LocalSettings/LocalSettings-ar.php

Instead ideally they should stay in LocalSettings-private.php file, so, potentially the only file that changes between production and testing at the moment.

ValerioBoz-WMCH raised the priority of this task from Medium to High.Jan 31 2024, 8:18 PM

Some progress here.

Deployed MediaWiki 1.35.14 in /var/www/wikimini.org/www.testing (T278033)

Executed /var/www/wikimini.org/scripts/pull-production-in-testing.sh that wipes demo databases and pull production databases in demo, on the fly (now this is possible since T308969 improved the situation a lot)

↑ This took ~ 1 hour

So now we have a 1:1 test environment \o/

MariaDB [(none)]> SHOW DATABASES;
+--------------------------+
| Database                 |
+--------------------------+
| information_schema       |
| minipedia                |
| mysql                    |
| performance_schema       |
| wikimini_arwiki          |
| wikimini_arwiki2         |
| wikimini_beta_arwiki     |
| wikimini_beta_arwiki2    |
| wikimini_beta_arwikiwiki |
| wikimini_beta_enwiki     |
| wikimini_beta_eswiki     |
| wikimini_beta_frwiki     |
| wikimini_beta_itwiki     |
| wikimini_beta_labwiki    |
| wikimini_beta_stockwiki  |
| wikimini_beta_svwiki     |
| wikimini_beta_testwiki   |
| wikimini_enwiki          |
| wikimini_eswiki          |
| wikimini_frwiki          |
| wikimini_itwiki          |
| wikimini_labwiki         |
| wikimini_stockwiki       |
| wikimini_svwiki          |
| wikimini_testwiki        |
+--------------------------+
25 rows in set (0.001 sec)

TODO:

deploy new skin, etc.

I've created this curtesy wildcard domain record to test things in Wikimini:

*.demo.wikimini.gitpull.it IN CNAME wikimini.org.

Created some demo VirtualHosts:

https://gitlab.wikimedia.org/repos/wikimedia-ch/wmch-infrastructure/-/tree/main/servers/demo/conf/apache2/sites-available?ref_type=heads

Enabled plaintext versions (-txt.conf):

a2ensite demo-wikimini-ar000-txt.conf
a2ensite demo-wikimini-en000-ssl.conf
a2ensite demo-wikimini-es000-txt.conf
a2ensite demo-wikimini-fr000-txt.conf
a2ensite demo-wikimini-it000-txt.conf
a2ensite demo-wikimini-lab00-txt.conf
a2ensite demo-wikimini-stock-txt.conf
a2ensite demo-wikimini-sv000-txt.conf
apache2ctl graceful

Deploying Let's Encrypt certificates:

certbot certonly --webroot --webroot-path=/var/www/html -d ar.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d en.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d es.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d fr.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d it.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d lab.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d stock.demo.wikimini.gitpull.it
certbot certonly --webroot --webroot-path=/var/www/html -d sv.demo.wikimini.gitpull.it

Enabled SSL versions (-ssl.conf):

a2ensite demo-wikimini-ar000-ssl.conf
a2ensite demo-wikimini-en000-ssl.conf
a2ensite demo-wikimini-es000-ssl.conf
a2ensite demo-wikimini-fr000-ssl.conf
a2ensite demo-wikimini-it000-ssl.conf
a2ensite demo-wikimini-lab00-ssl.conf
a2ensite demo-wikimini-stock-ssl.conf
a2ensite demo-wikimini-sv000-ssl.conf
apache2ctl graceful

Here all curtesy URLs:

These URLs will not be indexed by spiders. Example robot:

https://ar.demo.wikimini.gitpull.it/robots.txt

/var/www/wikimini.org/www.testing/robots.txt
User-agent: *
Disallow: /

So we are ready to test everything.

ValerioBoz-WMCH set the point value for this task to 8.