As I want to spin multiple Virtual machines, LXD seems to a valid choice
But as docker, LXD seems to have less buzz around,
Initial thoughts, I have used LXC to create start a test container, and installed the mongodb Database , atleast data in the mongodb is persistent after restarting the container. (I may be wrong here) and interacting with the lxc-containers is as simple as you login into physical server.
Can anyone mention the good, bad and painful points of LXD, similar to
like this article which mentions the personal experience of using
docker ?
Preferred questions to answer
- How many LXD containers I can run on 12GB Of RAM and Quad core processor ?
- Is LXD matured enough to be run on production ?
- Can I create LXD images with my application, database, and just run on production server ?
- Current limitations of LXD containers ?
- It is developed and maintained by Canonical, (not sure this project will the dropped like unity 8), or will be continued ?
While this answer isn't as extensive as the Docker article, I'll go over your preferred questions:
How many LXD containers I can run on 12GB Of RAM and Quad core processor ?
- There really isn't a set maximum of containers based on your hardware requirements, and it isn't something that can be answered directly either. The containers take up a very small footprint, so in terms of RAM and processing power, they don't really use resources until the container actually does something. Don't think of LXD as a hypervisor where resources are reserved, but rather they sit and wait for the container to do something before the requests bubble up to the host OS for hardware access. That being said, you can set resource caps per container, so they don't go over a certain limit, but the answer to your question is entirely up to what the containers are going to be doing. You could run hundreds of containers on that setup, but only if they're not doing anything. Once they start consuming resources, you'll have a better idea of how many you can run.
Is LXD matured enough to be run on production ?
- Yes, we've been running LXD for over a year now for our production servers, and are very happy with the uptime. LXD is mature for our needs, but it's important that you assess your business requirements first.
Can I create LXD images with my application, database, and just run on production server ?
- Yes, it has built in commands for that. You can use their base image, build your application, make an image of it, and then replicate it across other hardware and then simply point your load balancer as needed. But beware of your database. If you're replicating your application, I would suggest you have a separate LXD container for your database, and you can shard that and image out as needed too. I've done some tests on some containers, and we have 50gb containers for our DBs and to replicate the image, push offsite for backup, and then pull to the new server takes less than 2 minutes typically. So if you've got small containers, you'll have blazing fast response time. We've attempted to cause database corruption during these images writes as well by bombarding the DB with queries during the imaging process, and it handles it very gracefully without a single corruption, but don't rely on it. Always run your own backups too.
Current limitations of LXD containers ?
- In regards to limitations, what I've found that sucks is the base networking setup. However, that is being addressed right now in development, and it's a lot better. Our beta servers are connecting via DHCP now rather than bridging and it's making it a lot faster and easier to roll out. I find that the tools out there are lacking, so if you're not much for command line, you may struggle initially.
It is developed and maintained by Canonical, (not sure this project will the dropped like unity 8), or will be continued ?
- As far as I can see, the development is very active, and the head of this project Stéphane Graber is here to stay. He's active in the community, and I've seen him answer questions on Stackexchange too. I would be very surprised if it was dropped, considering LXD is a major expansion of LXC as well.