[Lxc-users] LXC container templates

Serge Hallyn serge.hallyn at canonical.com
Wed Sep 5 15:36:38 UTC 2012


Quoting TuxRaiderPen (tuxraiderpen at wpascanner.com):
> On Tuesday, September 04, 2012 13:15:59 Dan Kegel wrote:
> 
> > How about using a vanilla (jeos-like) template, but then running
> > a small shell script for the role in question?
> > 
> > Here's what I do at the moment (later I might rip out the home
> > directory sharing):
> 
> Thanks... but I guess the problem boils down to *me*......
> 
> I am obviously expecting way too much of these templates or I just don't get 
> the concept, or I am just not on the same page, all of the above, and more... 
> or something...
> 
> So I just took my plain basic test container I setup, cloned it... then... 
> connected to the container....
> 
> sudo apt-get install tasksel
> 
> Selected LAMP server and away we goooooooooooooooo!
> 
> It seems to me like this is a template that others would want to use and get 
> going quickly, but again see above...
> 
> So I tweaked this all up for things like remote MySQL etc...  just have to 
> install phpmyadmin and Webmin, Exim, SA, and a ftp server...
> 
> One little glitch I seem to have is MySQL SSL.. more on that later....
> 
> Again I guess in my theory the templates are there to save me time, but not in 
> the way I guess others or at least the developers and/or others envision it.

Right.

The package manager is there to do the setup like you want once you've logged
in.  You want the templates to basically do the same thing at a per-vm (well,
per-container) level.  You could achieve something similar with kvm or physical
machines by preseeding tasksel.

The next layer above what you want, service orchestration, is where juju falls
in.  Instead of saying "I want a container to do mysql", you would say "I want
a set of containers which will work together to export a wordpress instance",
and then "now I want to add a second mysql instance to that set."

juju bootstrap
juju deploy mysql
juju deploy wordpress
juju add-relation wordpress mysql
# (... time passes, now you want a second mysql instance)
juju add-unit mysql

But  - you want something in between :) You could also use the ubuntu-cloud
template and pass a userdata file which specifies a script to execute on the
first boot to configure it as you like.  That might give you what you want...

> Thanks for the input, and again I guess my view and take on this is just not 
> the same as others, which is normally the case...
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> 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