[Lxc-users] lxc-execute fails to exec lxc-init
Serge Hallyn
serge.hallyn at canonical.com
Tue Mar 27 14:08:34 UTC 2012
Quoting Peter Gillard-Moss (pgillard at thoughtworks.com):
> On 27 March 2012 12:42, Fajar A. Nugraha <list at fajar.net> wrote:
>
> > IMHO lxc-execute should come with a BIG warning "DON'T USE UNLESS YOU
> > REALLY KNOW WHAT YOU'RE DOING!" :P
> >
>
> I know this is digression but I wondered if you could expand on this?
>
> Perhaps if I explained our use case and tell me if I'm doing the right
> thing?
>
> 1. We create a new container
> 2. We want to bootstrap it with a puppet script (apt-get install puppet
> && puppet apply script.pp)
>
> We see two options for this:
>
> 1. lxc-execute
> 2. issue a remote ssh command.
>
> To do 2) in an automated fashion we have to automatically authorize the
> hosts private key (we do that by simply copying it to
> /var/lib/lxc/$host/root/.ssh/authorized_keys).
Another option would be to copy an upstart or sysvinit script into
/var/lib/lxc/$host/root/etc/init{,.d}/ which does your bootstrapping
and removes itself when done. Then just lxc-start the container.
More information about the lxc-users
mailing list