Scap

Scap is the deployment script used by Wikimedia Foundation to publish code and configuration on production web servers.

Running tests

Scap comes with an automated suite invoked via scripts/check. It requires the various dependencies of Scap to be installed, via Debian packages. They're not installed by the check script, and testing is done directly on the host, not in virtual environments, to match what happens in production. tox and pip are not used.

For a list of packages needed, see debian/control or .pipeline/blubber.yaml, which should have matching lists of Debian packages.

To generate a Docker container and run tests in that, run the following command:

blubber .pipeline/blubber.yaml test > Dockerfile.tests docker build -f Dockerfile.tests --iidfile id . docker run --rm "$(cat id)"

Building a .deb

Run this command to build a scap.deb package under Docker, for your own use (not for SRE to install on production hosts):

./build-deb-in-docker ~/tmp/scap-deb

The directory given as an argument must exist. The resulting package files will be put into that directory.

GitHub

https://github.com/wikimedia/scap