Starforge: Build Galaxy things in virtualization
Things you can do with Starforge:
- Build Galaxy Tool Shed dependencies
- Build Python Wheels (e.g. for the Galaxy Wheels Server)
- Rebuild Debian or Ubuntu source packages (for modifications)
These things will be built in Docker. Additionally, wheels can be built in QEMU/KVM virtualized systems.
Documentation can be found at starforge.readthedocs.org
For all types of builds, begin by installing Docker.
Tool Shed Dependencies¶
There are two scripts that can be used, depending on the package recipes available:
$ ./build.sh <package> $ python build.py <package> --version 1.0
build.sh is the older format, and simply uses a single
<package>build.sh file, like Atlas. build.py is the newer format, and
uses yaml metadata in
The base image for Galaxy packages is Debian Squeeze. This will hopefully produce binaries usable on Galaxy’s targeted platforms (at time of writing: CentOS 6+, Debian 6.0+, Ubuntu 12.04+).
$ ./build galaxy <package> $ python build.py <package>
To build packages against a different OS, you can use the –image flag, e.g.:
$ ./build <dist>[:tag] <package> $ python build.py <package> --image <dist>[:tag]
$ ./build ubuntu:trusty nginx $ python build.py nginx --image debian:squeeze
Building all the things:
There’s a separate
build-all.sh which allows you to build all of the
packages using their preferred build mechanism
Notes on the two build scripts¶
<version> option is optional, and defaults to the string
which is useful for recipes that don’t have version specific changes (E.g.
bcftools 1.0 builds identically to 1.2)
Starforge can build both pure Python and C-extension Python modules into wheels
for Linux under Docker and for Mac OS X under QEMU/KVM. To do this, you’ll want
to install Starforge (preferably in a Python virtualenv) using
starforge (to install from PyPI) or
python setup.py install to install
from the source.
Docker (and QEMU) images to use are specified in starforge/config/default.yml.
To modify this file, copy it to
$XDG_CONFIG_HOME is, by
~/.config). The sample file wheels/build/wheels.yml is used to
determine what wheels can be built and their rules for building. To use this
file, use the
--wheels-config argument to
starforge wheel or copy
Wheels can be built using
starforge wheel <package>, e.g.:
$ starforge wheel pycrypto $ starforge wheel --no-qemu pysam # only build on docker
See the output of
starforge --help for help using the Starforge command-line interface.
Pull Request wheel builder¶
Pull requests to the Starforge repository on Github that modify wheels/build/wheels.yml can automatically be built for all specified platforms on a dedicated Starforge build server by the Galaxy Jenkins service. To utilize, modify wheels.yml as appropriate and create a pull request. Any member of the Galaxy Committers group can then authorize Jenkins to initiate the build. If it fails, you can modify the pull request and further builds can be triggered.
Notes on images¶
Images used to build wheels are uploaded to the Starforge Docker Hub repo and will be pulled as necessary. Typically you will only use the manylinux1-wheel and manylinux1-32-wheel images, which are manylinux CentOS 5-based images that will usually produce wheels usable on all Galaxy-supported platforms.
You can also produce “platform-specific” wheels by using the
imageset. This is useful if you want to link to distribution-specific system
versions of non-standard libraries without bundling them in to the wheel.
Mac OS X
Mac OS X images are not provided due to legal reasons. Consult the Building on Mac OS X under QEMU/KVM documentation for details.