[Lxc-users] LXC container templates
Matthew Franz
mdfranz at gmail.com
Wed Sep 5 22:48:55 UTC 2012
So even though I think creating role-specific templates is a flawed
approach new templates are not hard, just modify the existing lxc-ubuntu
script with whatever commands need to be run in your environment or
packages you need to install
For example this new template created containers that already had Salt
Stack installed
root at mfranz-x60s:/usr/lib/lxc/templates# diff lxc-ubuntu lxc-ubuntu-salt
1c1
< #!/bin/bash
---
> #!/bin/bash -vex
463d462
< chroot $rootfs apt-get install --force-yes -y
python-software-properties
509a509,514
>
> # Add Salt
> chroot $rootfs apt-get install --force-yes -y
python-software-properties
> chroot $rootfs add-apt-repository -y ppa:saltstack/salt
> chroot $rootfs apt-get update
> chroot $rootfs apt-get install -y salt-minion
Which would start with something like
# lxc-create -n salt8 -t ubuntu-salt
You really aren't creating tarballs (the way you do it with OpenVZ) but
modifying the shell script that creates the template and the package cache.
For what it is worth....
- mdf
On Wed, Sep 5, 2012 at 6:27 PM, Dan Kegel <dank at kegel.com> wrote:
> On Wed, Sep 5, 2012 at 3:12 PM, TuxRaiderPen
> <tuxraiderpen at wpascanner.com> wrote:
> > The issue boils down to in *my view* template = ready to rock and roll
> and
> > *NOT* something I need to tweak that much or at all or learn a bunch of
> other
> > programs to use.
>
> Seems like role packages would help here.
> Is there a metapackage one installs to get a working LAMP server?
>
>
> ------------------------------------------------------------------------------
> 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
>
--
--
Matthew Franz / @seclectech
mdfranz at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120905/dd41c6c6/attachment.html>
More information about the lxc-users
mailing list