[Labs-l] swift available from within labs

Ben Hartshorne bhartshorne at wikimedia.org
Wed Mar 28 00:07:50 UTC 2012


Hi everyone,

Swift (running in labs) is now available to all labs projects to use for
integration testing with mediawiki.  It is only available from within labs;
it does not have a public IP address.

You can reach swift at swift-fe1.pmtpa.wmflabs.  Just as in production, it
will respond to requests sent its way using the same URL format as
upload.wikimedia.org.  For example:
curl -o /tmp/from-swift.jpg -v
http://swift-fe1.pmtpa.wmflabs/wikipedia/commons/thumb/a/a2/Little_kitten_.jpg/45px-Little_kitten_.jpg
and
curl -o /tmp/from-upload.jpg -v
http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Little_kitten_.jpg/45px-Little_kitten_.jpg
will return files with the same content.

Swift in labs treats upload.wikimedia.org as its back end, so if you
request an image that doesn't exist in swift (but does exist in upload), it
will use the 404 handler and fetch the real data.  Because of this it will
appear to have all the data you need, though will respond slowly at first.

I have only created the commons container, so right now it will only fetch
images that exist in commons.  It will return 401 or 500 for all other
wikis.  If there is a short list of wikis for which you would like it to
work, let me know and I will create them for you.  Alternately, you can
join the 'swift' project and follow the
documentation<http://wikitech.wikimedia.org/view/Swift/Setup_New_Swift_Cluster>and
make them yourself!  :)

Access credentials for mediawiki to interact with swift (1.19 purges images
from swift using the swift API, etc.) are:
account:user - mw:thumbnail
password - userpassword

These credentials would be secret in any real deploy, but are currently
public in labs.  (you can see all the configs in puppet)

For more information about mediawiki integration, talk to Aaron Schulz.  :)

Enjoy,

-ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/labs-l/attachments/20120327/8f7af640/attachment.html>


More information about the Labs-l mailing list