[Users] OpenVZ templates

Sergey Bronnikov sergeyb at openvz.org
Tue Jun 30 07:35:54 PDT 2015


inline

On 13:40 Tue 30 Jun , Pavel Odintsov wrote:
> Scott, my users use about ~25 different templates just because they
> can. And I have so much tasks which not related with OpenVZ and
> templates and I can't spent my time for rebuilding templates every
> day.
> 
> I have completely automatic Cloud Management System builded on top of
> OpenVZ. And we host dozens of thousands VE's without any human help.
> 
> Indeed!
> 
> And I want to build my templates with already stable and reliable
> system which offer Odint in source code.
> 
> It's much times more reliable and stable than "yet another hand made
> script". They have really awesome system and I use it in Commercial
> OpenVZ with pleasure.
> 
> And I just ask to help from Community and Odin to do templates better!
> :) Actually, I could offer free servers and grant they to Community
> for reproducibly template rebuild for OpenVZ.

We use EZ templates from PCS 6 to create OVZ templates.
Step by step:
- install RPM for EZ template
- cache all templates
- resolve all problems with caching
- extract cache from ploop images (because PCS 6 tools create OS template cache
inside ploop image by default)
- create tarball with cache, publish on download.openvz.org,
send announce to announce@ and update wiki page.
That's it.

Compute resources is not a problem. The main problem is in unreliable caching.
You can't do it in full automated mode due to network problems,
problems with temporarily unavailable mirrors and other troubles.
We always do it in manually.

I'll recall the main reason of that thread - software in OpenVZ OS template
caches may contain security problems or outdated software. Possible solution is
replace OpenVZ OS template caches by EZ templates and cache them on user side,
before using appropriate template.

> Thats my contribution.
> 
> On Tue, Jun 30, 2015 at 1:30 PM, Scott Dowdle <dowdle at montanalinux.org> wrote:
> > Greetings,
> >
> > ----- Original Message -----
> >> I have nice idea. What about "week of templates" for OpenVZ? I really
> >> want to setup my own server for building Debian-8 templates. But
> >> there are no docs.
> >>
> >> Actually we have HUGE experience with PCS templates system and could
> >> share this experience.
> >>
> >> But we need help from OpenVZ folks with some information "how you are
> >> building templates for OpenVZ". Then we could offer good docs :)
> >
> > The place to start is:
> >
> > http://wiki.openvz.org/Category:Templates
> >
> > You may have already looked through some of that... but yeah... most all of that was contributed by community folks... and the bulk of it is outdated and not well maintained.  That is mostly the fault of the community.  The instructions for contributing an OS Template say to create a forum thread with details on how it was done... but no one has really followed those documentation instructions for a while now... and I'm guilty of that myself.
> >
> > The gist of it is that you can use a distro's regular package management tools to install a base / minimal system in a separate directory... and once done... just tar.gz|xz it up.  The official OS Templates from the OpenVZ Project tend to add a few vz-sourced stub packages to replace some bulky and/or unneeded packages (like a kernel package for example) but those really are not required.  Feel free to take a look at an example of my contributed Fedora OS Templates.
> >
> > http://download.openvz.org/template/precreated/contrib/fedora-21-x86_64-20150323.tar.xz
> >
> > In particular, notice the two files I've included within it to generate the regular and minimal flavors:
> >
> > /root/create-fedora21-ostemplate.sh
> > /root/create-fedora21minimal-ostemplate.sh
> >
> > Basically whenever I want to update my contributed OS Templates, I just create a container from the current OS Template and then run those scripts within... as they basically just download the latest packages for everything, install them in a temporary directory, make a few minor changes to the install tree... and then tar.xz it up.
> >
> > I did make an attempt to build a Debian 8 OS Template because someone requested one in IRC prior to the release of the beta and later official OS Template by the OpenVZ Project.  Unfortunately I didn't include the little build script I cooked up for that within it like I do with the Fedora ones... and that was an oversight on my part.  It was basically the same thing though only substituting the apt-get commands for the yum/dnf ones.  I'd love to be more helpful... but I'm not that advanced of a Debian user. :(
> >
> > Hopefully that's enough to get you started.
> >
> > How does the newer vztt OS Template build system do what it does?  I don't know yet... but I'm guessing there is no magic... that it uses the native packaging tools... downloads a minimal set of packages from a distro's official repos... extracts them to a temporary directory... does some rudimentary clean up and optimization (turning off undesired / unworking-in-a-container services, etc)... and then just tar.gz's it up.  It probably put some effort into abstracting how to specify repo URLs and package lists... but other than that... that fancy stuff is just icing.
> >
> > TYL,
> > --
> > Scott Dowdle
> > 704 Church Street
> > Belgrade, MT 59714
> > (406)388-0827 [home]
> > (406)994-3931 [work]
> > _______________________________________________
> > Users mailing list
> > Users at openvz.org
> > https://lists.openvz.org/mailman/listinfo/users
> 
> 
> 
> -- 
> Sincerely yours, Pavel Odintsov
> 
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://lists.openvz.org/mailman/listinfo/users

-- 
https://openvz.org/Contribute


More information about the Users mailing list