Reputation: 1013
I would like to set up a continuous delivery cycle for my open source application. It is based on Linux's Filesystem in Userspace (FUSE). I tried to set it up on CloudBees' Jenkins, which provided decent free accounts, but I did not have root access, which is problematic as my project has many dependencies. I went on to use Travis CI, which works great for testing internal APIs, since I have root access to install dependencies. But it does not support FUSE, so I cannot run tests on the filesystem directly. According to my experience with Travis CI, a Continuous Delivery approach would likely prevent many bugs from being released and could help to identify problems more quickly.
Is there a service similar to Travis CI, which integrates with Github, allows root access, and supports FUSE?
[EDIT]
Vi. suggests to run User Mode Linux on a Travis-ci machine, to emulate FUSE. To summarize the progress achieved with Vi.s help:
For setting up UML with more memory, network access and access to the file system execute:
/usr/bin/linux.uml init=script_to_run.sh rootfstype=hostfs rw eth0=slirp mem=2G
Inside the user script, call:
# Enable fuse module.
insmod /usr/lib/uml/modules/`uname -r`/kernel/fs/fuse/fuse.ko
# Set up TCP/UDP network access.
ifconfig lo up
ifconfig eth0 10.0.2.15
ip route add default via 10.0.2.1
If you work with gcc, set your PATH variable:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
If you need procfs, execute this inside UML:
mount none /proc -t hppfs
For Python, you should activate the virtual environment inside UML:
source /home/travis/virtualenv/python2.6.9/bin/activate
The path to activate
can be found by issuing the following command before starting UML:
echo "Path to Python executable: "$(which python)
Still I cannot run FUSE:
In short:
`fuse' likely not compiled with -mcmodel=kernel
insmod: error inserting '/usr/lib/uml/modules/3.2.2/kernel/fs/fuse/fuse.ko': -1 Invalid module format
modprobe: FATAL: Could not load /lib/modules/3.2.2/modules.dep: No such file or directory
modprobe: FATAL: Could not load /lib/modules/3.2.2/modules.dep: No such file or directory
[...]
fuse: device not found, try 'modprobe fuse' first
Upvotes: 3
Views: 491
Reputation: 38752
Travis-CI allows installing system packages, including UML (User Mode Linux).
You can start your application inside UML (with a helper script). Example: https://travis-ci.org/vi/execfuse/builds/47789978
Here is the helper script:
#!/bin/bash
CURDIR="`pwd`"
cat > umltest.inner.sh <<EOF
#!/bin/sh
(
export PATH="$PATH"
set -e
set -x
insmod /usr/lib/uml/modules/\`uname -r\`/kernel/fs/fuse/fuse.ko
cd "$CURDIR"
./tests.sh
echo Success
)
echo "\$?" > "$CURDIR"/umltest.status
halt -f
EOF
chmod +x umltest.inner.sh
/usr/bin/linux.uml init=`pwd`/umltest.inner.sh rootfstype=hostfs rw
exit $(<umltest.status)
Supplementary commands in .travis.yml
:
- sudo apt-get install -qq libfuse-dev pkg-config fuse user-mode-linux
- sudo mknod /dev/fuse c 10 229
- sudo chmod 666 /dev/fuse
Upvotes: 3