You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Thumbor/Runbook: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Legoktm
imported>Krinkle
No edit summary
 
Line 1: Line 1:
__TOC__
{{Navigation Wikimedia infrastructure|expand=media}}
== Testing a specific thumbnail ==
== Testing a specific thumbnail ==
Given a URL like https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/NASA_logo.svg/574px-NASA_logo.svg.png
Given a URL like https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/NASA_logo.svg/574px-NASA_logo.svg.png
Line 37: Line 37:
* Add the server to the memcached/nutcracker pool in hiera. If you are going to remove another server, it is recommended to replace that server (and keep the old shard label) so the hashing stays the same.
* Add the server to the memcached/nutcracker pool in hiera. If you are going to remove another server, it is recommended to replace that server (and keep the old shard label) so the hashing stays the same.
*Add to conftool and pool with confctl.
*Add to conftool and pool with confctl.
[[Category:Runbooks]]

Latest revision as of 14:49, 11 August 2022

Testing a specific thumbnail

Given a URL like https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/NASA_logo.svg/574px-NASA_logo.svg.png

legoktm@thumbor1005:~$ curl -I 'localhost:8801/wikipedia/commons/thumb/e/e5/NASA_logo.svg/574px-NASA_logo.svg.png'
HTTP/1.1 200 OK
Thumbor-Memcache-Get-Time: 251
Thumbor-Wikimedia-Original-Path: e/e5/NASA_logo.svg
Thumbor-Request-Date: Tue, 16 Nov 2021 00:34:52 GMT
Thumbor-Swift-Thumbnail-Success-Time: 139
Content-Disposition: inline;filename*=UTF-8''NASA_logo.svg.png
Content-Length: 44339
Thumbor-Wikimedia-Thumbnail-Path: e/e5/NASA_logo.svg/574px-NASA_logo.svg.png
Thumbor-Wikimedia-Original-Container: wikipedia-commons-local-public.e5
Server: Thumbor/6.3.2
Thumbor-Wikimedia-Thumbnail-Container: wikipedia-commons-local-thumb.e5
Etag: "89706a805df1d0fe06ea71d1ac491e088e11dc23"
Thumbor-Parameters: {"width": "574", "image": "https://ms-fe.svc.eqiad.wmnet/v1/AUTH_mw/wikipedia-commons-local-public.e5/e/e5/NASA_logo.svg", "filters": "format(png)"}
Thumbor-Poolcounter-Time: 5
Date: Tue, 16 Nov 2021 00:34:52 GMT
Xkey: File:NASA_logo.svg
Proxy-Request-Date: None
Content-Type: image/png

Pooling a new server

  • Enable the thumbor::mediawiki Puppet role and run puppet until it exits cleanly.
    • If you have issues with scap, it's probably T197470, in which case just edit the git server manually in /srv/deployment/3d2png/deploy-cache/.config.
  • Reboot the server so new boot parameters take effect
  • Test that basic thumbnails work:
legoktm@cumin1001:~$ httpbb --hosts thumbor1005.eqiad.wmnet --http_port 8800 /srv/deployment/httpbb-tests/thumbor/test_thumbor.yaml
Sending to thumbor1005.eqiad.wmnet...
PASS: 5 requests sent to thumbor1005.eqiad.wmnet. All assertions passed.
  • Add the server to the memcached/nutcracker pool in hiera. If you are going to remove another server, it is recommended to replace that server (and keep the old shard label) so the hashing stays the same.
  • Add to conftool and pool with confctl.