[lxc-users] Juju use of lxd

Tycho Andersen tycho.andersen at canonical.com
Fri May 15 05:03:12 UTC 2015


On Fri, May 15, 2015 at 04:03:41PM +1200, Tim Penhey wrote:
> Me again,
> 
> Juju uses lxc by default for the local provider. I'm intending to drive
> a piece of work along with a few other core developers to write a lxd
> provider.
> 
> To get things started, I need to work out how to do the following:
> 
> 1) Create a template container as the basis for the juju machines.
>    This needs to pass a cloud-init file in.

Although we vaguely mention userdata in the spec, it doesn't look like
there is any actual API for setting it (and no backend that actually
puts it in the right place). I've filed
https://github.com/lxc/lxd/issues/665 to track it.

> 2) Create a clone of the template passing in another cloud-init file.

We have a templating mechanism described here, that could do something
like this:

https://github.com/lxc/lxd/blob/master/specs/image-handling.md

...although I think it too is not yet implemented.

> We'd like to use the Go library that wraps the REST api already.
> 
> 
> With the old local provider, we were able to catch the output during the
> creation of the template container in order to make sure the container
> creation finished successfully (we added a simple upstart script to
> shutdown the container at the end of cloud init) as the container had to
> be stopped in order for the clone that follows to work.
> 
> Q) is this possible in user space?  Ideally we want to avoid asking the
> user for their password to create the containers as root (as we
> currently do).

Yes, LXD runs as root so when you talk to the daemon as a user, LXD
itself can do root things.

Tycho

> Thanks in advance for suggestions or pointers.
> 
> Tim
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list