Would it be practical to create LXD containers on different servers and in the container use Ubuntu and juju? If it is, could juju see LXD containers as different machines?

share|improve this question

LXD containers

There is a LXD provider in the works for Juju. It was demoed recently: https://www.youtube.com/watch?v=QyXLRDN0ERo You can see the blueprints and test it by building from the feature branch. afaik, it currently doesn't have support for creating LXD containers on multiple machines.

LXC containers

What you currently can do, however, is create LXC containers on multiple machines. To deploy wordpress to a new lxc container on machine 1 you run juju deploy wordpress --to lxc:1. This will create a new lxc container on machine 1 and deploy wordpress into it.

How the container is networked depends on the type of environment. Maas will set up networking for you. In manual provider, the container is on a private network with the host machine (so containers on machines other than 0 will not be accessible by Juju). However, in manual provider you can hack around this by letting the containers dhcp to the host network. I made a Charm that bridges the network of lxc containers to the host network.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.