News for hackers. Stuff that matters.
Re:Alpine Linux is reducing dependencies on Busybox by rahen on Wednesday August 03, 2022 @05:17PM (#32336755)
For the trivia, this is pushed by Laurent Bercot (skarnet), creator of s6, execline and many others. He's also working on implementing s6 as Alpine init and rc systems.

https://skarnet.org/software/s6/

https://skarnet.com/projects/service-manager.html

Re:Alpine Linux is reducing dependencies on Busybox by 1vuio0pswjnm7 on Wednesday August 03, 2022 @06:16PM (#32337209)
Further trivia: Going one level up from busybox, the maintainer of dash is the creator of runit. Both runit and s6 are "inspired by" djb's daemontools. In truth, neither [wc]ould have been created if not for daemontools.
Re:Alpine Linux is reducing dependencies on Busybox by wpietri on Wednesday August 03, 2022 @10:29PM (#32338656)
Oh, interesting! Anybody used s6? I like the theory, but for me what matters is mainly the practice.
Re:Alpine Linux is reducing dependencies on Busybox by nisa on Thursday August 04, 2022 @02:44AM (#32339919)
Used s6-overlay[1] to start a lot daemons in a docker-image for demo purposes - postgres, tomcat, mysql, php-fpm, apache (don't ask why ;) - s6 worked really well and was reliable and stable - I enjoyed it very much. It was also possible to reliable pass SIGTERM to the daemons in the image for clean shutdown and it was easily possible to configure logging to stdout with a prefix. Modelling dependencies (waiting on database before starting app etc.pp) is possible via shell-scripts. It's super flexible but out of the box it's more like a collection of powerful tools not a complete package - but that's good. It's in the tradition of djb daemontools and is very unix - as in doesn't talk a lot and you better know how each part works but - and that's really cool - it's modular and simple and once you get a grip on it you can easily reason about it. systemd takes a completely different approach and also solves a kind of differnt problem - this is like small pieces of lego that compose well instead of one big chunk of glib/dbus/glibc only c-code.

1: https://github.com/just-containers/s6-overlay

Re:Alpine Linux is reducing dependencies on Busybox by bruce_one on Wednesday August 03, 2022 @11:56PM (#32339189)
We do - and have found it very reliable and I really like it :-)

One of the members of our team finds it more complex when it comes to diagnosing why things aren't running/starting as expected, but that's also down to the complexity we have around s6 with other setup scripts (we use it to manage the full suite of processes in our product).

Hence, they're not the biggest fan of it (and would talk negatively about it), but I _think_ s6 isn't really the culprit and instead the other complexity is.

Although, when things go wrong it can be a little bit harder to chase down than it was with our former manual "start this process" type scripts... But, you can just `./run` the run script which may tell you enough :-)

Re:Alpine Linux is reducing dependencies on Busybox by wpietri on Saturday August 06, 2022 @03:14PM (#32370754)
Thanks! That makes sense to me. Personally, I usually like tools and practices that can feel rough when there's too much complexity. When there are problems, I think it's generally good that people feel like there are problems.
Re:Alpine Linux is reducing dependencies on Busybox by ajnin on Thursday August 04, 2022 @09:28AM (#32342598)
linuxserver.io uses s6-overlay for all their images, which are very popular in the self-hosting community.
Re:Alpine Linux is reducing dependencies on Busybox by jart on Wednesday August 03, 2022 @05:58PM (#32337065)
They're really still going through with that? I didn't expect I'd have to find another distro so soon.
Re:Alpine Linux is reducing dependencies on Busybox by stock_toaster on Wednesday August 03, 2022 @07:46PM (#32337739)
Based on my reading of [1] and [2] it sounds a bit more nuanced than "just incorporate s6 into alpine".

[1]: https://ariadne.space/2021/03/25/lets-build-a-new-service-ma...

[2]: https://skarnet.com/projects/service-manager.html

Re:Alpine Linux is reducing dependencies on Busybox by CharlesW on Wednesday August 03, 2022 @06:14PM (#32337184)
Can you elaborate on why this is relationship-ending for you? https://skarnet.org/software/s6/why.html makes it seem like a reasonable direction.
Re:Alpine Linux is reducing dependencies on Busybox by pronoiac on Wednesday August 03, 2022 @07:29PM (#32337648)
I'm not the OP, but a past employer used it on some legacy systems. It makes some choices, like avoiding spinning up new processes, that feel like it's been optimized for embedded systems. It uses a new-to-me language, that we never invested time in. So doing things like "send polite shutdown signals, wait 30 seconds, send harsher shutdown signals" became a matter of separate scripts or documentation. In short, you'd need more context for working with it than with other systems.
Re:Alpine Linux is reducing dependencies on Busybox by skarnet on Friday August 05, 2022 @06:59AM (#32354350)
Your information is incorrect.

"Avoiding spinning up new processes" is incorrect characterization of s6. Processes are not a scarce resource; spawning a process is not a costly operation in the context of process supervision, even on embedded systems. s6 focuses on optimizing some metrics that are indeed important to embedded systems, like RAM use and code path length, but "spinning up new processes" isn't one of these metrics.

It is not, and has never been, necessary to learn execline, the scripting language you're speaking of, in order to use s6. execline is used _internally_, and you can also use it in your own scripts if you so choose, but it is not a requirement.

"Sending a polite shutdown signal, waiting for some time, and sending a harsher shutdown signal" is a matter of exactly one command: s6-svc -d. That is precisely one of the benefits of s6 over other daemontools-style supervisors: it handles this sequence natively.

I welcome fact-based criticism of s6. I do not welcome FUD-based criticism.

Re:Alpine Linux is reducing dependencies on Busybox by rahen on Wednesday August 03, 2022 @06:25PM (#32337271)
It will only be an option, you can keep sysvinit + openrc if you prefer it this way.
Re:Alpine Linux is reducing dependencies on Busybox by dannyobrien on Wednesday August 03, 2022 @06:08PM (#32337139)
what's the objection?
Re:Alpine Linux is reducing dependencies on Busybox by silon42 on Thursday August 04, 2022 @02:15AM (#32339744)
How about alpine-systemd?
Re:Alpine Linux is reducing dependencies on Busybox by nine_k on Thursday August 04, 2022 @02:31AM (#32339835)
Why would Alpine need systemd? Why would you need it in a container?
Re:Alpine Linux is reducing dependencies on Busybox by Deukhoofd on Thursday August 04, 2022 @03:53AM (#32340323)
Why would you assume Alpine is only used for containers? I use it for my own local home server, as it's very lightweight and easy to tweak to how I want it.
Re:Alpine Linux is reducing dependencies on Busybox by Arnavion on Thursday August 04, 2022 @04:02AM (#32340407)
Not to mention every postmarketOS-running phone and tablet.
Re:Alpine Linux is reducing dependencies on Busybox by matthews2 on Thursday August 04, 2022 @04:38AM (#32340610)
I don't think there are many of those...
Re:Alpine Linux is reducing dependencies on Busybox by rahen on Thursday August 04, 2022 @03:11AM (#32340090)
I'm not a fan of using Alpine in containers.

Use it baremetal for your servers and desktops, then use Debian/CentOS containers on top when something is missing.

Re:Alpine Linux is reducing dependencies on Busybox by mkesper on Thursday August 04, 2022 @08:26AM (#32341918)
Sadly when playing the CVE game, Debian containers are no contest to alpine. For CentOS in a container I can see absolutely no reasons except if the SW is only tested against it.
Re:Alpine Linux is reducing dependencies on Busybox by josteink on Thursday August 04, 2022 @02:48AM (#32339940)
To make sure that once services are up and running, they keep running and are restarted automatically? To have good, centralized logging? To manage in-container services the same way you do on the container host?

There's plenty of good reasons for one to want to do so.

Re:Alpine Linux is reducing dependencies on Busybox by spockz on Thursday August 04, 2022 @03:03AM (#32340044)
I think it is counter to best practices to run multiple services in a single container. Although maybe you just need to with some proprietary software.
Re:Alpine Linux is reducing dependencies on Busybox by strzibny on Thursday August 04, 2022 @03:20AM (#32340140)
No, it's just another way how to do things.
Re:Alpine Linux is reducing dependencies on Busybox by raverbashing on Thursday August 04, 2022 @03:15AM (#32340117)
None of those things are actually needed in a container.

If you're actually doing those things inside one, you're literally doing it wrong

Yes you might have some special cases where some of this is needed but I'd use anything besides systemd

Re:Alpine Linux is reducing dependencies on Busybox by btbuilder on Thursday August 04, 2022 @03:30AM (#32340197)
Some use-cases do require an init-providing process of some sort but you likely want to use tini.

See for more details: https://github.com/krallin/tini/issues/8#issuecomment-146135...

Re:Alpine Linux is reducing dependencies on Busybox by otabdeveloper4 on Thursday August 04, 2022 @06:43AM (#32341321)
a) Starting all your services and shims and mocks inside a CI/CD tests container is not "doing it wrong"; in fact, it's the only correct way to do it.

b) systemd is the only thing that can start services cleanly and correctly. Every other solution is in various states of brokenness.

Re:Alpine Linux is reducing dependencies on Busybox by megous on Thursday August 04, 2022 @05:00AM (#32340730)
All of the cheap Linux container hosting services are doing it wrong, I guess.
Re:Alpine Linux is reducing dependencies on Busybox by nine_k on Thursday August 04, 2022 @06:53AM (#32341365)
Many of them offer k8s out of the box.

I still think that orchestration should live outside containers, whether within one box or several. BTW systemd has some vestiges of container orchestration built in.

OTOH there are other approaches; say, LXD directly assumes an ecosystem of processes within a container, more akin to a VM than to a single chroot-ed / jailed service process.

Re:Alpine Linux is reducing dependencies on Busybox by megous on Thursday August 04, 2022 @12:58PM (#32345411)
> OTOH there are other approaches; say, LXD directly assumes an ecosystem of processes within a container, more akin to a VM than to a single chroot-ed / jailed service process.

Those are what I had in mind. Basically cheaper VPS like service but built on Linux container tech instead of full virtualization. Maybe they are less of a rage these days, when fully virtualized KVM/Vmware VPS are so cheap. But about 5 years ago I did run my email server, webserver and database on such a container for $1-1.5$/mo. When I was able to switch to full virtualization at similar price point, I did. But there's nothing weird about runing multiple different processes in a "container" :)