1

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

Henk
  • 1,331
  • 11
  • 24
  • It turned out after some experimenting that using (Debian's) preseed is far better for bootstrapping Ubuntu (virtual) machines. The PPA repos can be configured within the seed-file and GPG-signing can be ingnored for the time being. – Henk Aug 03 '11 at 19:08

2 Answers2

1

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.

Joshua Hoblitt
  • 675
  • 4
  • 11
  • Thanks! "Why are you installing the base puppet package at all?" Without a local repo (yet) I need Puppet to bootstrap the system, right? – Henk Aug 23 '11 at 10:39
  • You should be able to install any package during to the kickstart processes as you would after the fact. If you can't find the package you need in an external ppa, just install it as a one liner in the %post section. In this case, it sounds like you can just include the ppa and list puppet in %packages. – Joshua Hoblitt Aug 23 '11 at 15:31
  • OK. But like said in the comment on my own post: I've swapped Kickstart for preseeding, since it's mostly Ubuntu we use (don't ask...). – Henk Aug 24 '11 at 06:43
  • Your question is specifically on kickstart thus you got kickstart answers. :) Maybe you should ask a new question... – Joshua Hoblitt Aug 24 '11 at 18:38
0

If you set up your networking as static, then in my personal opinion it should work. If you use DHCP to assign addresses, then you don't have a sensible /etc/resolv.conf at the time %post scripts are executed (unless Ubuntu, which I don't know, has Anaconda wildly different to what RHEL, which I know, has), so apt-get should fail.

If the installation fails even with fully configured networking, then a quick-and-dirty solution would be to copy the required files to the installation server, then wget them over to the machine being deployed and install them from a local filesystem.

Paweł Brodacki
  • 6,511
  • 20
  • 23
  • Thanks Pawel. Since the packages are in a apt-cacher-ng repository, I can copy them to the WWW-root and indeed wget and install them instead of the default packages. This however leaves me with unconfigured packages, so manually intervention is still needed... Other option(s) I'm thinking about are: puppet upgrading itself; using Debian / Ubuntu preseeding. – Henk Jul 29 '11 at 07:45
  • Why would it have to be staticly configured to work? If he's having name resolution problems, which isn't obviously the problem here, than the DHCP server configuration should be fixed. – Joshua Hoblitt Aug 22 '11 at 09:09