The mkosi OS generation tool
Posted Jun 28, 2017 18:57 UTC (Wed) by jgg (guest, #55211) [Link]
https://github.com/linux-rdma/rdma-core/blob/master/build...
Which was inspired by other tools and customised to run smoothly with the source tree it is embedded in.
mkosi is basically the same idea but for systemd. It doesn't really do anything particularly special, expect that it exports the container into a unique disk image format. Other tools like rkt can already do this, but their images are for running in kvm, not bare metal.
The last time I tried to use mkosi (232) it just failed. The main trouble seems to be that it does a lot of work in the host, so it is quiet sensitive to the host configuration, which to my mind, largely defeats the entire purpose.. It was also bonkers slow, but maybe I didn't get far enough to have the caching turn on, or that version didn't have sane caching yet.. Plus it wanted to run as root on the host and do all sorts of strange things - again not the kind of safety I want from a containerised build tool.
The mkosi OS generation tool
Posted Jun 28, 2017 19:24 UTC (Wed) by mezcalero (subscriber, #45103) [Link]
"unique disk image format"? Do you mean the raw GPT disk images mkosi can generate with that? I don't find that particularly "unique", it's probably one of the most universally understood disk format these days, as any Windows, any ChromeOS and pretty much everything recent uses GPT.
And to clarify, after the initial packages have been extracted (i.e. right after the initial debootstrap or dnf --rootinstall), everything relevant we run runs inside an nspawn container.
mkosi is currently at version number 3, hence I don't think you can have tested mkosi 232 ;-). "232" sounds more like a systemd release version.
Lennart
The mkosi OS generation tool
Posted Jun 28, 2017 21:05 UTC (Wed) by jgg (guest, #55211) [Link]
In the mainstream container world the popular way to run a container under kvm is with 9pfs (eg in rkt), this is what I mean by 'unique'. This is actually where I ended up after trying mkosi for systemd. Instead, I built systemd using a building container (with a script similar to the one I linked), then 'make installed' it into a temporary running container and directly ran kvm and 9pfs exporting the containers / as rootfs to run the build. Much faster than building an image, and I get more trivial points to customise things I need, like using my own kernel build or modifying the FS before booting to test the stuff I needed..
For mkosi it was the initial package extracting/install that failed for me, and it didn't cache the download step before that, so the entire thing was a PITA to debug. It also seemed like it wanted to run various loop devices and other things on the host when it was building the image, which I'd honestly rather it do inside a privileged container.. I also gave up trying to build a Fedora boot image from my Ubuntu box (again, needs too many host dependencies).
IMHO, the thing about docker, is it has one really good idea - dockerfile, with the overlayfs based caching layers and downloadable seed - and a bunch of not so good, out dated execution around that good idea. systemd has good execution in systemd-nspawnd, rkt provides most of the orchestration piece on top of that, but that entire world lacks a refined equivalent to dockerfile to make the images in the first place..
You are right, I used something between v1-v2 (dec 16 github TOT) in an attempt to do some work with systemd 232.
The mkosi OS generation tool
Posted Jun 29, 2017 13:16 UTC (Thu) by gdamjan (subscriber, #33634) [Link]
The docker file itself, is just awful. It's like a worse shell script
The mkosi OS generation tool
Posted Jun 29, 2017 17:05 UTC (Thu) by zlynx (subscriber, #2285) [Link]
The mkosi OS generation tool
Posted Jun 30, 2017 8:30 UTC (Fri) by gdamjan (subscriber, #33634) [Link]
The mkosi OS generation tool
Posted Jul 2, 2017 1:33 UTC (Sun) by sbaugh (subscriber, #103291) [Link]
The mkosi OS generation tool
Posted Jul 5, 2017 23:23 UTC (Wed) by nix (subscriber, #2304) [Link]
The mkosi OS generation tool
Posted Jun 29, 2017 1:29 UTC (Thu) by pabs (subscriber, #43278) [Link]
The mkosi OS generation tool
Posted Jun 29, 2017 2:11 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link]
The mkosi OS generation tool
Posted Jun 29, 2017 17:37 UTC (Thu) by iainn (subscriber, #64312) [Link]
I wanted an easy way of spinning up another distro. My first thought was to check if LXD were suitable, but to use LXD on Fedora you have to disable SELinux. My second thought was Docker, but it wasn't suitable because I wanted to persist state changes.
I found mkosi + systemd-nspawn slightly easier, and hopefully provide better isolation, than setting up a chroot.
The mkosi OS generation tool
Posted Jun 30, 2017 16:57 UTC (Fri) by stgraber (subscriber, #57367) [Link]
sudo dnf install snapd
sudo snap install lxd
sudo lxd init
lxd on Fedora
Posted Jul 3, 2017 9:41 UTC (Mon) by iainn (subscriber, #64312) [Link]
But thanks, that's good to know. I hadn't considered a Snap package. Nor had I seen the recent news that snaps work on Fedora with SELinux.
The mkosi OS generation tool
Posted Jul 2, 2017 3:39 UTC (Sun) by mrdocs (subscriber, #21409) [Link]
Seems to me another NIH here by RH.
The mkosi OS generation tool
Posted Jul 2, 2017 15:02 UTC (Sun) by rahulsundaram (subscriber, #21946) [Link]
What makes you think Red Hat is deciding this?
The mkosi OS generation tool
Posted Jul 2, 2017 21:15 UTC (Sun) by jospoortvliet (subscriber, #33164) [Link]
The mkosi OS generation tool
Posted Jul 2, 2017 21:46 UTC (Sun) by rahulsundaram (subscriber, #21946) [Link]
That is a really weak rationale to think that this is done under some organizational direction. systemd itself was written by Lennart on his own time originally.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds