[Devel] New vzpkg, templates and package caching daemon

Robert Nelson robertn at the-nelsons.org
Fri Sep 5 20:27:15 PDT 2008


I have a preliminary version of the new vzpkg utilities ready for testing.

These new tools support creating templates for 32 and 64 bit flavours of 
the following:
    Centos 4 and 5,
    Fedora 7, 8 and 9,
    Debian Sarge and Etch,
    Ubuntu Feisty, Gutsy and Hardy.

They are extensible and will eventually support OpenSUSE and Gentoo.

In addition, I've created pkg-cacher, a transparent caching proxy daemon 
optimized for Debian and RPM packages.  It is based on apt-cacher 
version 1.6.4 available with Debian.  This version has been modified to 
understand RedHat RPM repositiories.  It also adds support for the HTTP 
Range header and deals correctly with files which have the same name but 
different content on different distributions or in some cases different 
versions of the same distribution.

The pkg-cacher source is available on 
http://gforge.opensource-sw.net/projects/pkg_cacher.

The source for the new vzpkg and templates is available on 
git.opensource-sw.net.  You can browse the source using the url 
http://git.opensource-sw.net/.  In order to clone the updated source use 
the command "git clone http://git.opensource-sw.net/git/vzpkg".  The 
templates are available using "git clone 
http://git.opensource-sw.net/git/vztmpl".

In order to make installation easy I've setup repositories for 32 and 64 
bit versions of CentOS 4, 5 and Fedora 7, 8 and 9.  I'll be producing 
packages for Debian and Ubuntu as HN later.

Please let me know of any issues or suggestions.

Step by step installation instructions are below:

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 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/ossw_centos.repo -P /etc/yum.repos.d

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

yum install vzpkg2 vztmpl2-centos vztmpl2-fedora vztmpl2-debian 
vztmpl2-ubuntu
yum install pkg-cacher

Add the following to /etc/vz/vz.conf

#
# 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
#

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




More information about the Devel mailing list