HomePhabricator

Run background runner as Kubernetes deployment
32d9dbbca9bcUnpublished

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

Run background runner as Kubernetes deployment

The runner uses a separate container, based on a Python 3.5 image (which
is already available on the Toolforge docker registry, but not yet as a
webservice backend), with the source code and the database credentials
bind-mounted into it read-only. It uses its own virtual environment that
is set up each time the container is started, to avoid conflicts with
the webservice venv which still has to support Python 3.4.

The deployment.yaml file is based on Stashbot’s [1], with some commands
mentioned in the README based on its stashbot.sh script [2]. The
commands to set up the runner’s virtual environment are based on the
webservice-python-bootstrap script [3] and encoded into the YAML file
using a trick from a StackOverflow answer [4].

[1]: https://phabricator.wikimedia.org/diffusion/LTST/browse/master/etc/deployment.yaml
[2]: https://phabricator.wikimedia.org/diffusion/LTST/browse/master/bin/stashbot.sh
[3]: https://phabricator.wikimedia.org/diffusion/ODIT/browse/master/python35/web/webservice-python-bootstrap
[4]: https://stackoverflow.com/a/49801587/1420237

Details

Provenance
LucasWerkmeisterAuthored on Apr 7 2019, 4:15 PM
Parents
R2494:3ced2c62cd02: Run Travis CI on Python 3.5 as well
Branches
Unknown
Tags
Unknown
ChangeId
None