Foreman on Wheezy (not!)

December 2012


Table of Contents

Using the installer
Build Foreman packages for Wheezy
Install Foreman
Configure Foreman

I tried, but failed, to install Foreman on Wheezy. The Foreman site provides .deb packages for Squeeze, but not Wheezy. Foreman as of this writing doesn't support Puppet 3. And I am completely new to Ruby. So it was a long shot.

Had I succeeded, the lasting impression Foreman left on me might have been of the killer features for remote, hands off systems maintenance. Or of its coolly factual web interface. As it is, I mostly remember the messy feel of all those Ruby gems pulled from who knows where into my otherwise clean system, and how sensitive Foreman is to just the right version of all those 'gems'.

I'm not a developer, and I admire both the courage to set this thing up and how far it got already. But Foreman as I've seen it breaks on so many unforeseen circumstances, I don't have enough trust in it to want it on my systems yet. Anyways, below is how far I got.

Having failed to bluntly install the Squeeze stable Foreman package on Wheezy, I tried the installer from Git. It broke. I installed through apt some gems I suspected would help it further. It got further, then broke again. And again, and again.

The currently 'stable' Foreman package suffers from a bug (sorry, the link went dead). Let's try the install from Git.

apprentice@puppet:~$ sudo apt-get remove --purge $(dpkg -l \*foreman\*|grep ^ii|awk '{print $2}')
apprentice@puppet:~$ sudo apt-get remove bundler
apprentice@puppet:~$ sudo rm -rf /usr/share/foreman*
apprentice@puppet:~$ sudo apt-get autoremove
apprentice@puppet:~$ cd ~
apprentice@puppet:~$ git clone --recursive git://github.com/theforeman/foreman-installer.git
apprentice@puppet:~$ export MODULE_PATH="/etc/puppet/modules/common"
apprentice@puppet:~$ mkdir -p $MODULE_PATH
apprentice@puppet:~$ sudo mkdir -p $MODULE_PATH
apprentice@puppet:~$ for mod in apache foreman foreman_proxy git passenger puppet tftp xinetd; do sudo mkdir -p $MODULE_PATH/$mod ; wget http://github.com/theforeman/puppet-$mod/tarball/master -O - | sudo tar xzvf - -C $MODULE_PATH/$mod --strip-components=1 ; done
echo include puppet, foreman, foreman_proxy | sudo puppet apply --modulepath $MODULE_PATH
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install foreman-sqlite3' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package foreman-sqlite3
<snip>

One of the reasons why it doesn't work is that apparently, the smart software detects that it is running on wheezy, and so puts in /etc/apt/sources.list.d/foreman.list:

deb http://deb.theforeman.org/ wheezy stable
      

... only to find out that deb.foreman.org doesn't offer a wheezy distribution.

This is easily resolved with another my-foreman.list, but then we break on:

apprentice@puppet:~$  echo include puppet, foreman, foreman_proxy | sudo puppet apply --modulepath $MODULE_PATH
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
/Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Dependency Augeas[sudo-foreman-proxy] has failures: true
Warning: /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Skipping because of failed dependencies
Error: Could not find a suitable provider for augeas
Finished catalog run in 1.15 seconds

... which I find nontrivial to solve.

Since augeas was actually installed, I gave up at this point. A couple of days later, I retried, and got different error messages.

-->