Lpi 305 LXC
Nowaday you have different solutions for dealing with containerized environments, for instance, Docker, LXC, buildah, podman and many others. For this post we’re going to focus on understand the use of LXC.
Let’s get it on… :)
LXC stands for Linux Containers and it’s a userspace interface for the Linux kernel containment features. The project related to this technology is the linuxcontainers.org, which is also the responsable for the LXD, the next generation system container manager, and LXCFS which I don’t know much about, but is something that is going to work around some limitations fo the Linux Kernel or so the documentation said. Our focus here will be understand the technology and cover what LPIC-305 is expecting from a candidate.
So, the LPIC-305 topics for LXC are:
352.2 LXC (weight: 6) Weight: 6 Description: Candidates should be able to use system containers using LXC and LXD. The version of LXC covered is 3.0 or higher.
Key Knowledge Areas:
- Understand the architecture of LXC and LXD
- Manage LXC containers based on existing images using LXD, including networking and storage
- Configure LXC container properties
- Limit LXC container resource usage
- Use LXD profiles
- Understand LXC images
- Awareness of traditional LXC tools
Partial list of the used files, terms and utilities:
- lxd
- lxc (including relevant subcommands)
Architecture of LXC and LXD
Any container architeture will starts from the basics that you will not run a Hyperviro (Type 1 or 2) in your host machine, but instead you will use series of features for managing processes, cpu and memory resources and network isolation. Those features are know as cgroups and namespaces and we are going to talk about it in depht