Swift/Deploy Plan - Thumbnails

From Wikitech
Jump to: navigation, search
This project is active.
Swift
RT: 1384
Due: 2011-12-31

Contents

order

  1. before user-visible deploy (pre-work)
    1. verify that LVS is working correctly
    2. mediawiki deploy (purge requests start flowing to swift)
    3. purge deleted objects
  2. on deploy (this triggers user-visible changes)
    1. swift cluster changes
    2. squid changes (end user thumbnail requests start flowing to swift)
  3. post-deploy
    1. Smoke tests

verify LVS

LVS should be answering to ms-fe.pmtpa.wmnet (10.2.1.27) on port 80 and passing it through to ms-fe1 and ms-fe2. Verify this is working as intended. [done]

mediawiki deploy

  • Backport LocalFilePurgeThumbnails hook and deploy it [done]
  • Set swift config in PrivateSettings.php [done]
  • Set 'swiftThumb' MW udp logger [done]
  • Create purgeDeletedFiles.php script [done]
  • SVN up and sync SwiftCloudfiles MediaWiki extension [done]
  • Enable and deploy SwiftCloudfiles [done]
  • Copy swift.php to wmf-config and sync it [done]
  • Include swift.php in CommonSettings.php and sync [done]
  • Verify that purge requests are deleting the thumbnails from swift [done]
    • upload an image, generate thumbnails, confirm they exist on swift, delete the image, confirm the thumbnails are deleted on swift

purge deleted objects

  • Run "mwscriptwikiset purgeDeletedFiles.php all.dblist --starttime=20120126000000" on hume. [done]

swift cluster changes

  • stop the thumbnail filler script (screen -x listen on fenari/~ben) done
  • change thumbhost in /etc/swift/proxy-server.conf from upload.wikimedia.org to ms5.pmtpa.wmnet done
  • restart the proxy-server processes: for i in 1 2 ; do ssh ms-fe$i.pmtpa.wmnet swift-init proxy restart; done done

squid changes

  • add the following to squid.conf done
## acls to send thumbnails to swift, from .4% to 100%                                                                                    
# send only one shard (0.39%)to swift                                                                                                    
acl swift1_thumbs  url_regex ^http://upload\.wikimedia\.org(/+)[^/][^/]*/[^/][^/]*/thumb/a/a2                                            
# send 12.5% of shards to swift                                                                                                          
acl swift2_thumbs  url_regex ^http://upload\.wikimedia\.org(/+)[^/][^/]*/[^/][^/]*/thumb/[ab]/                                           
# send 25% of shards to swift                                                                                                            
acl swift3_thumbs  url_regex ^http://upload\.wikimedia\.org(/+)[^/][^/]*/[^/][^/]*/thumb/[abcd]/                                         
# send 50% of shards to swift                                                                                                            
acl swift4_thumbs  url_regex ^http://upload\.wikimedia\.org(/+)[^/][^/]*/[^/][^/]*/thumb/[abcdef01]/                                     
# send 75% of shards to swift                                                                                                            
acl swift5_thumbs  url_regex ^http://upload\.wikimedia\.org(/+)[^/][^/]*/[^/][^/]*/thumb/[abcdef012345]/                                 
# send 100% of shards to swift                                                                                                           
acl swift_thumbs  url_regex ^http://upload\.wikimedia\.org(/+)[^/][^/]*/[^/][^/]*/thumb/                                                 
 # swift - one shard
 cache_peer        10.2.1.27    parent 80 3130 originserver no-query no-digest connect-timeout=5 max-conn=200 login=PASS
 cache_peer_access 10.2.1.27    allow swift1_thumbs
 cache_peer_access 10.2.1.27    deny all
  • on subsequent days, change the cache_peer_access from allow swift1_thumbs to </code>allow swift2_thumbs</code> and so on.

gradual rollout schedule

As indicated by the squid configs above, we've got rules for 0.4%, 12.5%, 50%, and 100%. These will be deployed Monday through Thursday.

  • Monday: /a/a2/ done
  • Tuesday: /a/* and /b/* done then /a-d/* done
  • Wednesday: /a-f/* and /0/* and /1/* (not done) then /a-f/* and /0-5/* (not done)
  • Thursday: all
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox