Linux – Upgrade the Ubuntu puppet package within kickstart process

automationkickstartlinuxpuppetUbuntu

My Ubuntu based kickstart-host is almost working like it should, serving Ubuntu 10.04 (both i386 & amd64) and CentOS 5.6 to new (VMware-)hosts.

One of the things that bothers me is that Ubuntu 10.04 LTS comes with Puppet 0.25.4, but I want to use the newer Puppet 2.6.3 from Mathias Gug's backports.

The link to the PPA-repository is in a file in /etc/apt/sources.list.d/, the corresponding GPG-key is in the apt-keys too: both being successfully downloaded in the %post part of kickstart.

The original puppet & puppet-common are installed from the %packages part in the ks.cfg.

So far I am unable to upgrade the default Puppet packages to the new ones automagically in kickstart.

apt-get update && apt-get dist-upgrade works after the first reboot and login, but when I use these two apt-commands within the ks.cfg %post part, things start to fail…

So anyway,

  • what is the best way to upgrade packages from an Ubuntu PPA during the kickstart process and not (manually) thereafter?
  • is this even possible with kickstart / on Ubuntu?
  • if not (and as a possible alternative), can Cobbler handle this instead?

UPDATE

Found an Ubuntu PPA with newer Puppet-packages (2.7.1) here: https://launchpad.net/~aroth/+archive/ppa

Best Answer

I've never kickstarted ubuntu but I use it for centos/rhel. Why are you installing the base puppet package at all? I add my local yum repo for puppet (and epel) to the install process as part of the main kickstart script. Eg.

repo --name=local --baseurl=http://...

I then have the %post section launch puppet, which handles configuring all the yum repos I'd like to use by installing the proper rpms for them (eg., epel-release).

I have also had kickstart just install the old epel version (0.25.x) and then have puppet-client module manage upgrading the client to 2.6.x.