News for hackers. Stuff that matters.
Re:LXD – next generation system container manager release 4.3 by kstenerud on Tuesday July 14, 2020 @03:11AM (#23829335)
LXD is actually a cool technology. It's not like Docker/k8s in terms of each "node" usually running only one thing. It's more along the lines of a "VPS in a box", where you can launch virtual servers using a simple command line interface.

I use it to run all of the virtual server machines in my home LAN (mostly virtual desktops) with each machine exposed on the real LAN's DHCP server (so I can move them to a different box if needed), and to launch ephemeral "server boxes" to run some tests or builds or whatever on without polluting my dev environment (think virtualenv, but for anything).

I also used it as the base for my virtual system builder scripts ("container" VMs with LXD, "VM" VMs with libvirt since LXD didn't support VMs back then): https://github.com/kstenerud/virtual-builders

Re:LXD – next generation system container manager release 4.3 by cpsaltis on Tuesday July 14, 2020 @05:41AM (#23830061)
LXD is indeed nice, but it still isn't very widely adopted. I believe this comes down to 3 main issues:

1) It's strongly connected to Canonical and Ubuntu. This is mostly a matter of perception and it is an actual community project. However, I can understand people not feeling comfortable with "snap install lxd".

2) It sits somewhere in between k8s and docker engine. Over time, it will probably get more k8s-like features but still it is a weird position to be in.

3) It lacks a reach ecosystem of tools supporting it and a web UI. This makes it hard for newcomers to adopt. We're working on a web UI ourselves as part of our open source cloud management platform (https://github.com/mistio/mist-ce) and love to hear your thoughts.

Re:LXD – next generation system container manager release 4.3 by davb on Tuesday July 14, 2020 @06:10AM (#23830193)
Indeed, we have major issues with snap (doesn't work with $HOME on nfs, and auto updates with very few controls are a terrible idea on servers) so avoid anything dependent on it. Otherwise, I really like the concept.
Re:LXD – next generation system container manager release 4.3 by kwk1 on Tuesday July 14, 2020 @07:35AM (#23830682)
It's unfortunate that the effort to get LXD packaged natively in Debian [1] seem to have stalled as this is definitely one of the last remaining drawbacks for me.

For example, when LXD was still available as a .deb from upstream, it was possible to run LXD inside a container and do nesting, but with the snap, that isn't possible anymore. (However it is now with the --vm flag, though that's really a different mechanism.)

As I understand it the big remaining difficulty is dqlite.

[1] https://wiki.debian.org/LXD

Re:LXD – next generation system container manager release 4.3 by Foxboron on Tuesday July 14, 2020 @07:44AM (#23830735)
I did write a bit about my experience packaging LXD for Arch Linux a while back.

I got a ping from a Debian dev telling me the Debian dev working on LXD enjoyed the article, and has been trying to pick up on the work again. The linked wiki page is the outdated one.

https://linderud.dev/blog/packaging-lxd-for-arch-linux/

Re:LXD – next generation system container manager release 4.3 by alicemaz on Tuesday July 14, 2020 @12:32PM (#23834050)
it's packaged for void, though I'm not sure what that entails. will say it works well enough I didn't find out about the snap mess until I tried to install it on another distro later
Re:LXD – next generation system container manager release 4.3 by Foxboron on Tuesday July 14, 2020 @12:43PM (#23834238)
Debian has stricter rules regarding packaging and vendoring dependencies. Void and Arch packages LXD in a similar fashion by separating all the C dependencies. However, none of us actually separate out the different Go dependencies, they are all vendored inside the LXD package.

Debian separates out all of these into own packages.

Re:LXD – next generation system container manager release 4.3 by dobin on Tuesday July 14, 2020 @08:40AM (#23831143)
I made a GUI too, but dont actively develop it anymore. https://github.com/dobin/lxd-webgui
Re:LXD – next generation system container manager release 4.3 by dragonsh on Tuesday July 14, 2020 @06:20AM (#23830260)
As it requires docker probably difficult for us to try. Do you have any instructions on how to install it on bare metal? Using them can convert them to LXD container images to run, can reverse engineer Dockerfile to create LXD containers but try to avoid environment variables for configuring and running services as they are kind of security vulnerabilities.
Re:LXD – next generation system container manager release 4.3 by cpsaltis on Tuesday July 14, 2020 @08:43AM (#23831174)
Unfortunately we currently don't. We do have the option to install it on k8s with a helm chart though https://github.com/mistio/mist-ce/tree/master/chart/mist
Re:LXD – next generation system container manager release 4.3 by gnufx on Tuesday July 14, 2020 @03:12PM (#23836355)
I wonder how does Mist compare with OpenNebula, which seems to be in the same area? From a quick glance it looks more complex. (OpenNebula supports LXD directly.)
Re:LXD – next generation system container manager release 4.3 by cpsaltis on Wednesday July 15, 2020 @08:17AM (#23844110)
At a high level, Mist is a more "general purpose" platform which supports more providers (20) and more workflows. This increases the perceptual complexity, however it isn't more complicated to use than your average public cloud console. In fact, we strive to keep things as simple and as agnostic as possible. I'd be happy to arrange a demo if you like to see it in action. You can reach us on Github or from our website at https://mist.io.
Re:LXD – next generation system container manager release 4.3 by gnufx on Wednesday July 15, 2020 @03:29PM (#23850425)
OpenNebula definitely needs to revive the libcloud interface, or similar; I was thinking of complexity in operation more than using it. I ask mainly for general interest, as I can't think a free software management system would end up expensive enough for an institution which is too broke to retain staff. I might have a play sometime, and thanks for the response. I haven't found anyone with experience to compare these sort of systems in operation after seeing the need a while back.
Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @06:15AM (#23830219)
> 1) It's strongly connected to Canonical and Ubuntu. This is mostly a matter of perception and it is an actual community project. However, I can understand people not feeling comfortable with "snap install lxd".

Last time I tried it on Fedora it did not work (less than 6 months ago).

Also it offers nothing I want over podman with --rootfs

Re:LXD – next generation system container manager release 4.3 by djeiasbsbo on Tuesday July 14, 2020 @10:14AM (#23832188)
I've tried both podman and lxd with success but I'm curious, what do you use a tool like that for, mostly?

Not to seem like a hypeman for Kubernetes and similar tools, but I actually seem to only ever use containers combined with something like Kubernetes or Docker Swarm. What do you do that you want to do specifically on one machine? Hosting something? Automation à la CI/CD?

Again, I am actually asking for good use cases without orchestration platforms, I am just curious.

Re:LXD – next generation system container manager release 4.3 by pak9rabid on Tuesday July 14, 2020 @10:24AM (#23832307)
I use it as a replacement for situations where I used to use KVM for Linux VMs. For example, my tvheadend and Zoneminder servers are both running inside LXD containers so that I don't pollute my host machine's environment. It's also a nice way to try out another distro other than what the host machine runs with close-to-metal performance.
Re:LXD – next generation system container manager release 4.3 by gnufx on Tuesday July 14, 2020 @03:16PM (#23836407)
One thing podman is used for is bootstrapping environments for package building under mock, which at least affects people doing Fedora maintenance.
Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @10:31AM (#23832399)
> I've tried both podman and lxd with success but I'm curious, what do you use a tool like that for, mostly?

I use podman for dev and test environments, CI and CD workers and testing OCI containers that I eventually deploy in K8S. No production use cases. Hoping to soon see K3S working inside podman though, and then I would use it for deploying K3S :)

Re:LXD – next generation system container manager release 4.3 by hda111 on Tuesday July 14, 2020 @07:28AM (#23830638)
That isn’t a good comparison. While podman can run systemd inside a container, it isn’t widely adopted in the images in docker hub and elsewhere. There is probably just fedora supporting this. Whereas in LXD it’s normal to run a full systemd inside a container.
Re:LXD – next generation system container manager release 4.3 by yjftsjthsd-h on Tuesday July 14, 2020 @11:08AM (#23832807)
> There is probably just fedora supporting this.

How do you mean? I've used podman on Void Linux, openSUSE, GitLab CI, and I think some others that I'm forgetting (I distro hop a lot) and it's worked great.

Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @07:53AM (#23830791)
> While podman can run systemd inside a container, it isn’t widely adopted in the images in docker hub and elsewhere.

With podman and rootfs it's also normal to run a full systemd inside a container and you don't need special considerations from OCI images for rootfs to work just fine.

> There is probably just fedora supporting this.

RHEL is behind podman and I will take RHEL support over Canonical every day.

Podman is also available on most major distros and easy to port to new ones without requiring someone to use some proprietary crapware solution like snappy.

Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @03:59AM (#23829569)
> LXD is actually a cool technology.

It is a pretty nifty idea but like all things made by Canonical it is basically digitized garbage.

I tried to get LXC running on fedora some months, wondering why there are no official packages and then I very quickly noticed why. LXD uses the old Ubuntu trick of calling sysv style init scripts from systemd unit files without so much as a "|| exit 1" [1][2] - and I don't have time for that bullshit.

If you want vastly superior quality try podman with --rootfs or virt-install. At least those are not made by people with a disdain for error checking.

[1]: https://github.com/lxc/lxc/blob/master/config/init/systemd/l... [2]: https://github.com/lxc/lxc/blob/master/config/init/common/lx...

Re:LXD – next generation system container manager release 4.3 by niemeyer on Tuesday July 14, 2020 @01:03PM (#23834555)
> It is a pretty nifty idea but like all things made by Canonical it is basically digitized garbage.

> At least those are not made by people with a disdain for error checking.

Every single time there's a topic about Ubuntu or Canonical you seem to go straight into offensive mode. I can tell you use Fedora, but that's not typical of Fedora users and developers and no excuse.

I'm an open source developer and believer, but this kind of behavior slowly burns my soul, even more when it seems accepted. I've worked on enough projects in my life that it's absolutely certain that you use my code regularly. It's inside Go, Python, APT, and RPM by the way (hello Jeff Johnson, wherever you are), and in key libraries that you surely depend on as well. And I never heard you complaining about any of that with such anger here.

I'm also Canonical's CTO, and I was one of the key designers and developers that started snaps, and juju, and other key projects from Canonical. I usually hear such blind hate in silence, but sometimes it's just too much. I don't understand why do we do that to ourselves, as a Linux community. Why is it okay to openly offend unknown people that we almost certainly depend upon? What is it that we came here to do, again?

Re:LXD – next generation system container manager release 4.3 by rlpb on Tuesday July 14, 2020 @10:23AM (#23832292)
You're confusing LXC with LXD.

LXC is legacy and is mostly left as-is for existing users who are happy [and don't want the LXD paradigm shift]. Think of it as 1.0. You're complaining about stuff that is effectively a maintenance branch. At least your links point to LXC, not LXD.

LXD is the new thing. Think of it as 2.0 and onwards.

Re:LXD – next generation system container manager release 4.3 by CameronNemo on Tuesday July 14, 2020 @12:27PM (#23833956)
I'm not sure if that is a good description. LXC is a library and set of command line utilities to run containers. LXD is a clustered service that makes use of the LXC library.
Re:LXD – next generation system container manager release 4.3 by rlpb on Tuesday July 14, 2020 @12:47PM (#23834331)
I admit it is confusing. LXC typically means the lxc-* commands like lxc-start and so on. That's the daemon-less "old way". The links the grandparent provided was to this, and their complaint is about that stuff that is in maintenance mode and not actively developed any more.

LXD is a complete rewrite. There is now a server daemon called "lxd", and the client for that is "lxc".

Re:LXD – next generation system container manager release 4.3 by unixhero on Tuesday July 14, 2020 @04:33AM (#23829726)
Also superior Proxmox
Re:LXD – next generation system container manager release 4.3 by nix23 on Tuesday July 14, 2020 @09:43AM (#23831837)
Proxmox is an absolute great product, in production at 7 clients since over 8 years, some with ZFS some with Ceph, some with lxd some kvm, it's rock-solid and the support is great!
Re:LXD – next generation system container manager release 4.3 by znpy on Tuesday July 14, 2020 @04:48AM (#23829796)
Yup. I discovered LXC container with proxmox, now i have many of them running in my network.
Re:LXD – next generation system container manager release 4.3 by thejosh on Tuesday July 14, 2020 @08:16AM (#23830956)
Yeah, been playing with proxmox on my homelab, put it on an AMD Ryzen 5 3600 (6 cores, 12 threads), with 32gb of RAM and it's been running great with containers for when I want to fool around. Fantastic piece of software that has matured well.
Re:LXD – next generation system container manager release 4.3 by kstenerud on Tuesday July 14, 2020 @04:17AM (#23829654)
Thanks! That's good to know because I've been having troubles with Ubuntu 20 and have been considering switching back to redhat.

Then the only remaining part would be figuring out how to do zfs on root in redhat. I do it with a chroot bash script for Ubuntu server atm, but hopefully there's a debootstrap kind of thing on redhat that I can use as a base.

Re:LXD – next generation system container manager release 4.3 by josteink on Tuesday July 14, 2020 @04:30AM (#23829708)
> I do it with a chroot bash script for Ubuntu server atm

I’ve been using ZFS root on Ubuntu without any such nonsense for years, but I had to debootstrap it manually.

See guides here: https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubu...

With Ubuntu 20.04 the standard installer should support setting up a ZFS root without all that manual work, but I haven’t tested it myself.

Re:LXD – next generation system container manager release 4.3 by kstenerud on Tuesday July 14, 2020 @04:35AM (#23829733)
Yes, that's what I meant. The script does the partitioning, zfs init, chroot, debootstrap, and apt install. You just run it from a live cd.

https://github.com/kstenerud/ubuntu-server-zfs

Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @04:43AM (#23829776)
> I do it with a chroot bash script for Ubuntu server atm, but hopefully there's a debootstrap kind of thing on redhat that I can use as a base.

There are ways to do chroot installs on RHEL but sadly not well documented.

Some resources on this:

- https://glacion.com/2019/06/16/Fedora.html

- https://github.com/glacion/fedora-chroot-installation

- https://web.archive.org/web/20150912004438/https://wiki.cent...

Most of that will work for RHEL with some minor modifications.

Pity it is not better documented.

Re:LXD – next generation system container manager release 4.3 by Conan_Kudo on Tuesday July 14, 2020 @04:58AM (#23829848)
YUM/DNF has bootstrap-in-chroot functionality built-in.

Just set up your disk layout the way you want on a disk device or a loopback disk backed by an image, and do something like:

$ sudo dnf --installroot=/path/to/mounted/target group install @core @hardware-support

And you're good to go. You can see the list of groups available to include by using "dnf group list --ids".

Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @05:16AM (#23829940)
> And you're good to go.

If you opened the first link I shared you would see more is needed than this, which is why I linked to something explaining both this and the additional steps needed.

Re:LXD – next generation system container manager release 4.3 by znpy on Tuesday July 14, 2020 @04:50AM (#23829805)
In fairness, distros seems to make this kind of "joke" one another.

About six months ago I tried running SystemTap on Ubuntu...

Re:LXD – next generation system container manager release 4.3 by jaekash on Tuesday July 14, 2020 @04:54AM (#23829829)
Calling sysv style init scripts with no error checking from systemd unit files is a joke on Canonical, not any other distro.