I am trying to run concourse CI on systemd-nspawn container but I can't. I have been searching for this issue and I dont found anything helpful. I will try to explain what i do:
- First I make a .raw file that contains all I need (with mkosi).
I start a systemd container using this .raw file (sudo systemd-nspawn -bi concourse.raw --capability=all). concourse web and worker services starts without problems. I loggin into 127.0.0.1:8080 and add my first pipeline (HelloWorld). Then, when I run HelloWorld pipeline I get this error:
runc create: exit status 1: container_linux.go:264: starting container process caused "process_linux.go:261: applying cgroup configuration for process caused \"mkdir /sys/fs/cgroup/cpuset/8638cb95-bbbc-4719-4509-5a1789fb100a: read-only file system\""
Here is the journalctl log for this error: concourse_worker log
I add -bind option and try again (sudo systemd-nspawn -bi concourse.raw --capability=all --bind=/sys/fs/cgroup). I think that adding the --bind option I fixed the first error, because now concourse's container is able to pull docker image, but I get other error:
runc create: exit status 1: container_linux.go:264: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:69: creating device nodes caused \\"no such file or directory\\"\""
Here is the journalctl log for this error: concourse_worker log 2
My system:
$ cat /etc/issue
Ubuntu 16.04.2 LTS \n \l
$ uname -a
Linux nikoPC 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ systemctl --version
systemd 229 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN
Concourse container:
cat /etc/issue
Ubuntu Artful Aardvark (development branch) \n \l
systemctl --version
systemd 234 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN default-hierarchy=hybrid
I dont know how to solve this errors. It is possible to run concourse CI on systemd container?
Thanks.
Couldn't you just use a docker-container?
Ideally you use docker-compose as described here https://concourse-ci.org/docker-repository.html