User:GDubuc (WMF)/Notes

These are just some development-related notes. Things that are useful and which I can't ever remember on the top of my head.

Servers

Update limn data: stat1003.wikimedia.org

Check beta uploads: deployment-upload.eqiad.wmflabs

eval.php etc.: terbium.eqiad.wmnet

Beta logs:deployment-fluorine.eqiad.wmflabs /srv/mw-log

Production logs: fluorine.eqiad.wmnet /a/mw-log

Testwiki: mw1017.eqiad.wmnet

Image scaler: mw1153.eqiad.wmnet

Beta Varnish: deployment-cache-upload04.eqiad.wmflabs

Templates

in an image description to request its deletion on enwiki

Extensions

Nuke lets one remove content from a wiki without having to manually delete or recreate the VM

Analytics

fab multimedia deploy.only_data --user gilles

Raw eventlogging

stat1002:/a/eventlogging/archive

Exiftool

ICC profile name: exiftool -DeviceModelDesc -S -T 1.jpg

Assign new ICC profile: exiftool "-icc_profile<=tinyrgb.icc" 5.jpg

Delete empty directories

find. -type d -empty -exec rmdir {} \;

ImageMagick from source

Dependencies: apt-get install libmagickwand-dev

Creating new repo

ssh -p 29418 gerrit.wikimedia.org gerrit create-project --require-change-id --owner=performance --parent=thumbor --description='"Foo"' thumbor/bar

Create a new cowbuilder image

sudo cowbuilder --create

Backporting a package

dpkg-source -x foo.dsc

dch --bpo

pdebuild --pbuilder cowbuilder

debuild -b -uc -us

dpkg-buildpackage -us -uc -F

Builing a package with pybuild

dh $@ --with python2,python3 --buildsystem=pybuild

Pybuild options

export PYBUILD_NAME=statsd

export PYBUILD_TEST_PYTEST=1

export PYBUILD_BEFORE_TEST=cp -R {dir}/partd/tests {build_dir}/partd/

export PYBUILD_AFTER_TEST=rm -fR {build_dir}/partd/tests

export PYBUILD_TEST_ARGS=partd

export PYBUILD_TEST_NOSE=1

export PYBUILD_TEST_ARGS=--with-doctest

Grab the watch file to use here

http://pypi.debian.net/should_dsl/watch

Check that the debian/watch file is fine

uscan --no-download --verbose

Run this twice to check that the clean rules are correct

DIST=sid dpkg-buildpackage -us -uc -F

Build in isolation for sid

sudo DIST=sid pbuilder build *.dsc

Deliverables end up here

/var/cache/pbuilder/sid-amd64/result/

Adding a package to the chroot

sudo DIST=sid pbuilder update --extrapackages apt-utils --override-config

sudo DIST=sid pdebuild --pbuilder cowbuilder update --extrapackages apt-utils

Thumbor in prod

sudo systemctl restart thumbor@*.service