8 ms·
A Quick Introduction to LXD
- worklogin 11y ago>Image based (no more distribution templates, only good, trusted images) - the LXD website So instead of "lxc create -t ubuntu -n container1", I'll load a container from an image (just a monolithic template of sorts)?
- otoburb 11y agoIsn't that the same approach that Docker originally took with the Docker Hub Registry, where you can pull down pre-packaged monolithic images (albeit small ones if needed) via "docker pull ..."?[1] I think this was important quote from the article: "LXD is more like an “OS container” while Docker and rkt are more like “application containers.”" [1] https://docs.docker.com/userguide/dockerimages/ https://docs.docker.com/userguide/dockerimages/
- lukaslalinsky 11y agoYou can use pre-built images even with plain LXC: lxc-create -t download -n container1 -- -d ubuntu -r trusty -a amd64 LXD just takes it a little further, so on the UI level you are dealing just with images through the whole life-span of the container, not just when you are creating it. That makes it possible to wrap it all in a nice API and automatize the environment.
- stephen-mw 11y agoSomeone here on HN encouraged others to check out LXD in a previous thread a week ago. I did it and was really blown away. It really did feel like I was running virtual machines from an extremely fast hypervisor. What mattered to me most was getting away from "1 process per container" mentality. Phusion realized right away that this was an unnecessary constraint and built their base image[0] to help others. With LXD you really get the best of both worlds. You can containerize your applications without having to re-write your entire stack because it also requires cron or a few other processes. Ain't nobody got time for that. 0: https://github.com/phusion/baseimage-docker https://github.com/phusion/baseimage-docker
- notsony 11y agoSo should I use LXD or Docker? I just want to package up an app with dependencies and make it easy for others to use/test.
- stephen-mw 11y agoWithout a doubt use Docker. It has the ecosystem, which is extremely important. It also has the support and community. For devops engineers looking to build an entire enterprise around containers, LXD will be a great option when it reaches maturity and its ecosystem matures. It's not there yet, and probably won't be for a few years. Another great company that's doing extremely cool things with LXC minus Docker is Flockport[0] [0] http://www.flockport.com/ http://www.flockport.com/
- notsony 11y agoSo flockport is a competitor to Docker? Seems to do what Docker does. So many choices. CoreOS too . Docker has the momentum and VC$. Hard to really know what the "right" choice is.
- jaytaylor 11y agoYou could also write an Ansible role for your app which automates the setup and installation. Then installing your app becomes as simple as a single Ansible command without additional dependencies.
- ossreality 11y agoNo, no, no.
- notsony 11y agoIs this open-source or do I have to pay? Not clear from the web-site. If I have to coordinate multiple apps (three apps in this system, have to speak with each other over ports) and I want to run each app in its own container, on the same server, or distributed, can Ansible help me? Thanks.
- tobbyb 11y agoLXC is really quite simple and makes a lot of sense when you need a lightweight VM, that behaves like a VM. Docker takes a very specific view of containers with layers, a modified container OS template and init that limits the container to running a single app. This may be great for deployment or PAAS specific use cases but adds needless complexity for more general use cases. There is more to containers than running a single app. Their potential as lightweight, efficient and portable alternatives to VMs is immense. We have tons of resources on LXC at Flockport, including ready to use containers [1] VM workloads can transition seamlessly to LXC containers. And the large ecosystem of Linux tools and apps that work on VMs and systems work perfectly in LXC. And you do not need to find a container specific way to do things. Take networking, overlay networks or clustering that works in VMs work as well in containers. We have a largish number of tutorials on multi host container networking over both layer 2 and 3 with GRE, L2TP, VxLAN, IPSEC, tinc and more [2] A lot of Docker specific tools use these under the hood but they are easy enough to use on their own. The LXC team are trying to move the needle with LXD. It uses unprivileged containers by default (non root users can run containers, this is not capabilities drop) multi host management with a REST api so you can query the LXD daemon for container orchestration across hosts and live migration. These are big steps forward and they really do need the support of the community. They have been doing this for 7 years and is thanks to then containers exist. [1] http://www.flockport.com/containers http://www.flockport.com/containers [2] http://www.flockport.com/news http://www.flockport.com/news
- stephen-mw 11y agoI think Flockport is doing some amazing things. When I read the pagerduty bug-hunt post and saw that they were using ipsec between "hosts", I wondered if perhaps they used LXD with some of your services.
- tribaal 11y ago> The LXC team are trying to move the needle with LXD. It uses unprivileged containers by default (non root users can run containers, this is not capabilities drop) multi host management with a REST api so you can query the LXD daemon for container orchestration across hosts and live migration. These are big steps forward and they really do need the support of the community. They have been doing this for 7 years and is thanks to then containers exist. I'm always surprised when people omit to point out that "the LXC team" is basically Canonical, the corporate sponsor behind Ubuntu (including the kernel bits). People love to bash on the company, it'd be nice to acknowledge the achievements as well :) Full disclaimer: I'm a Canonical employee. I hope that doesn't come out as a corporate shill, I genuinely love LXD.
- grumblestumble 11y agoLook, man, you just can't have a technology called LXD and ask people to refer to it as "lex-dee". That's just not right.
- contingencies 11y agoSeconded: Steve Jobs just rolled over in his grave.
- andmalc 11y agoI'm surprised no one's mentioned systemd-nspawn which is also for os-virtualization so more like LXC than Docker. https://www.youtube.com/watch?v=d4SwL2t5Yh4 https://www.youtube.com/watch?v=d4SwL2t5Yh4 Poettering discusses LXC/LXD later in this video.