[Devel] New versions of pkg-cacher, vzpkg and templates

Robert Nelson robertn at the-nelsons.org
Wed Sep 10 00:54:43 PDT 2008


I completed a new version of the package tools and templates.  These new 
versions fully support both RedHat (RHEL, CentOS, Fedora) and Debian 
(Debian, Ubuntu) HNs.  The major change is splitting the building of the 
add-ons from the templates.

The source can be browsed on http://git.opensource-sw.net.  Vzpkg can be 
cloned from http://git.opensource-sw.net/vzpkg and the templates from 
http://git.opensource-sw.net/vztmpl.

There are RedHat and Debian repositories at 
http://repo.opensource-sw.net.  All RPMs and the Debian repository are 
signed now.

If you've used previous releases of my versions then you should be able 
to just do "yum update" or "apt-get update; apt-get upgrade".

If you haven't, here are step by step instructions:

Centos or Fedora HN
   Existing install)
      Backup your existing /vz/template directory
      Uninstall vzpkg and any vztmpl-* packages.

   New install)
      wget http://download.openvz.org/openvz.repo -P /etc/yum.repos.d
      Enable and install appropriate OpenVZ kernel

      yum install vzctl
      service vz start

      echo -n 1 > /proc/sys/net/ipv4/ip_forward

   For CentOS:
      wget http://repo.opensource-sw.net/centos/ossw.repo -P 
/etc/yum.repos.d

   For Fedora:
      wget http://repo.opensource-sw.net/fedora/ossw.repo -P 
/etc/yum.repos.d

   yum install pkg-cacher vzpkg2


Debian HN
   Existing Install)
      Backup your existing /var/lib/vz/template directory

   New install)
      echo -e "\ndeb http://download.openvz.org/debian etch openvz" > 
/etc/apt/sources.list.d/openvz.list
      wget http://download.openvz.org/debian/archive.key -O- | apt-get add -

      Install appropriate kernel.  I don't recommend the fza kernels, I 
kept getting errors about files
      changing when tarring up the cache files.

   wget http://repo.opensource-sw.net/debian/ossw_etch.list -P 
/etc/apt/sources.list.d
   wget http://repo.opensource-sw.net/debian/Debian-Key-ossw.asc -O- | 
apt-get add -

   apt-get update
   apt-get install pkg-cacher vzpkg2

cd /etc/vz/dists
cp fedora-8.conf fedora-9.conf

Add the following to /etc/vz/vz.conf and adjust to match your network

#
# Replace hostname with the IP address or name of the server running 
pkg-cacher.
# Don't use localhost, it must be a name resolvable from within the 
container.
VZPKG_CACHE_HOST=hostname:3142
#
# Network information for updating templates for Debian, Ubuntu
# and other distributions that need network access.
#
# Adjust these to suit your network.
#
# Temporary static IP address used by the container while updating the
# cached template.
VZPKG_IPADDR=192.168.1.100
#
# Default domain suffix to append to host names that aren't fully qualified.
VZPKG_SEARCH=example.com
#
# List of DNS servers
VZPKG_DNS=192.168.1.2,192.168.1.3
#

There are 4 sets of templates, one each for CentOS, Fedora, Debian and 
Ubuntu.

The corresponding package names are vztmpl2-centos, vztmpl2-fedora, 
vztmpl2-debian and vztmpl2-ubuntu.

You can install them individually or use the vztmpl2-all package to 
install all of them.

At this point you should be able to create the template cache files 
normally.

There is more information available on installation on 
http://wiki.openvz.org.




More information about the Devel mailing list