I was having a discussion today with someone on IRC about the roles, relationships, and use-cases of MAAS and LXD when used with Juju and I thought it would be good to get feedback on my current understanding of where all the components stand with respect to each other and what the proper use-cases are for each. The discussion started in the context of managing Kubernetes with Juju (CDK) on top of their hardware resources and trying to come to terms with what the right tool would be for managing the hardware layer underneath Juju.
This is what I explained as my current understanding, and I’d appreciate corrections and clarifications on it:
MAAS is ideally suited for when you have a (possibly heterogeneous) set of hardware resources that you want to have a lot of control over divvying up how those resources are allocated. The downside there is that you are expected to make more decisions up-front and be more involved in the resource allocation. With Juju, you can use tag constraints to allocation specific applications to specific pools of machines or VMs, or even target specific units to specific machines, if necessary. Or you can use constraints in a more traditional way to have Juju and MAAS figure out the right placement based on resource needs defined by the charms.
LXD, especially with the newer clustering support, is ideally suited for when you have a more or less homogeneous set of hardware resources that you want to very easily divvy up very efficiently, without having to specifically allocate how those resources are allocated and used. The downside there is that you don’t have nearly as much control over the resource allocation. With Juju, there’s not much you can do with respect to constraints, but as long as your hardware has the resources, the applications will use it efficiently according to their run-time needs.
The newer pods feature of MAAS seems to bridge those two use-cases by providing a more dynamic trade-off between flexibility and control. (I don’t know as much about this feature or how to leverage it properly with Juju.)