[lxc-devel] [PATCH v2] Add Oracle Linux template

Dwight Engen dwight.engen at oracle.com
Mon Oct 1 19:06:49 UTC 2012


On Mon, 1 Oct 2012 12:27:16 -0500
Serge Hallyn <serge.hallyn at canonical.com> wrote:

> Quoting Dwight Engen (dwight.engen at oracle.com):
> > 
> > This is a new template to create containers based on an Oracle Linux
> > rootfs image. The path to the rootfs must be given to the template,
> > and if it resides on a btrfs will be snapshoted rather than copied.
> > 
> > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> 
> Hi,
> 
> maybe it's in here and I'm missing it, but where is the
> $template_rootfs to come from?  Is there a repository online where
> they can be fetched? If so, can auto-wget'ing be added to the
> template?
> 
> -serge

$template_rootfs is a required template argument, so you have to give
-- -t /path/to/templaterootfs to lxc-create. The idea is that you have a
rootfs already created/extracted into a btrfs subvolume that then gets
snapshoted into the container instance each time you do an lxc-create.
I think this is similar to the ubuntu-cloud template, but the
template doesn't do the fetching and setup of the template rootfs.

I can look into setting up the template rootfs from rpms, or an image
if that is required, but I think its useful also for the template
rootfs to be user specifiable as well. How do you handle for example if
you want one template rootfs to be a webserver, and another one for a
database? Do you intend for that to be done post lxc-create with some
configuration management (ala puppet) tool? It seems like this would
work, but would make bigger differences per container instance to the
template, so if you plan to instantiate many container instances it
could add up.





More information about the lxc-devel mailing list