[Lxc-users] Using templates based on bash or creating templates with a favorite progamming language. Which is better?

Tony Su tonysu at su-networking.com
Mon Nov 11 19:17:22 UTC 2013


 About a month+ ago I raised a topic related to templates and was
directed to posting on the Dev mailing list instead of this one. I
recommend you might do the same.

Although I'm not deeply involved with others,
1. Only as an aside, I also mentioned the use of another language but
instead recommended a cross-platform language like ruby or nodejs if
considered. But, in general I wouldn't recommend that just because it
introduces dependency requirements just to access and run what should
easily work using a universal scripting language.

2. I have started, but not been able to spend much time recently on
improving available "create" scripts. In particular, I found
a. Typically "create" scripts mainly worked only creating a Container
with the same distro as the Host.
b. After studying some scripts, I selected and proposed a standardized
architecture which would be flexible and accommodate the many ways
that Containers are launched on different distros, and the many ways
Container source are invoked (eg as bootstrap images, by main or
special repos, various network protocols, package management, etc)
But, I haven't been able to devote the required to time to actually
build working solutions. In all likelihood I find I might need to
deploy each supported distro and actually inspect how they create
Containers, then revise the existing process to conform with the
universal standardized process I provided. Not especially difficult
but time-consuming.

The standardized template script I proposed would almost certainly
make all supported distros deployable as Containers on any *NIX.

HTH,
Tony

On Tue, Oct 29, 2013 at 3:59 PM, Fatih Arslan <ftharsln at gmail.com> wrote:
> Hi,
>
> I just started to play around with some testing containers. And the
> first thing that hits me was using templates when using 'lxc-create.
> Here are several templates:
> https://github.com/lxc/lxc/tree/master/templates  that can be for
> example installed on ubuntu with 'apt-get install lxc-templates'.
>
> And all these templates are basically bash scripts. I thought maybe
> using a scripting language like Pyton, Ruby, etc.. and creating them
> manually would be better (instead of using those bash scripts). I have
> several questions:
>
> 1. Why are the templates based on bash script, and not using some internal api?
> 2. Is the preferred way to create an lxc with templates these bash
> scripts?, or it's better when I create them manually (for example with
> a custom Python script).
> 3. Is investing time on creating a template with bash the time worth
> when I can use my favorite language to create them?
>
> I'm trying to find some answers about templates and any answer or
> experiences on this would be helpful.
>
> Thanks in advance
>
> Regards
>
> --
> Fatih Arslan
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list