Ask Your Question
0

Setting up a buildfarm with chroot

asked 2019-08-09 02:08:59 -0500

max-krichenbauer gravatar image

Hello everyone!

As far as I understand, it's currently not supported to run all roles (master, agent, repo) of a build farm on the same machine.

I thought it might be possible by giving each of them a different chroot environment.

I provide the required folders (/proc, /bin, /usr, ...) in the chroot environment, but /etc is only a copy to avoid conflicts.

When I go into the chroot and run ./reconfigure.bash repo, everything seems to work (the console output is the same as outside the chroot), but the result seems to be nothing. No /etc/apache2/sites-available/10-repos.conf is created, no server running.

Is there something that makes it inherently impossible to run the setup in a chroot?

And is using chroot even a viable choice when trying to run all three roles in the same environment?

Thanks in advance!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-08-09 03:28:36 -0500

tfoote gravatar image

I'd have to dig in deeper on whether I'd expect chroot's to be enough isolation. There are likely going to be issues with port numbers once you start trying to run things even if the files don't overlap.

I don't think that there's anything inherently impossible, but I'd suggest using VMs instead to get full isolation. The chroot's will be a lot more work as it's something that's never been tested and likely will have corner cases that will need to be figured out.

edit flag offensive delete link more

Comments

Thank you!

max-krichenbauer gravatar imagemax-krichenbauer ( 2019-08-21 01:31:53 -0500 )edit
1

answered 2019-08-09 16:14:22 -0500

nuclearsandwich gravatar image

Different virtual machines is definitely going to be the more reliable way to run all three build farm roles on one hardware system. I'm pretty sure that chroots alone won't be sufficient unless you're also doing process and network isolation.

I haven't tried to run docker within an lxc/lxd container but if you set up your container permissions sufficiently to allow that you might be able to use lxc/lxd. I'd recommend that over docker containers because docker containers generally don't run a full system complete with init and process supervision, which the buildfarm_deployment expects and essentially requires.

edit flag offensive delete link more

Comments

Thank you!

max-krichenbauer gravatar imagemax-krichenbauer ( 2019-08-21 01:31:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-08-09 02:08:59 -0500

Seen: 37 times

Last updated: Aug 09