Docunext


A GNU Debian LXC Puppet

May 22nd, 2011

As a continuation to my post on setting up Rails 3 apps via RVM, CentOS on OpenVZ, Mastered by Puppet, this is an entry about doing something similar with LXC.

I will first mention that the networking configuration I'm using is sub-optimal. I've setup lxc on my notebook which uses wireless, and bridging doesn't like it (in fact, it surprisingly appears that recent updates to the linux kernel do not support bridging with wireless devices). See the Docunext wiki page about LXC for more information about my LXC networking configuration, as well as building the container itself.

After installing RVM in the container and using it to download, configure, compile, and install Ruby 1.9.2, I then proceeded to use apt-get to install Puppet.

apt-get install puppet

That went fine, but when I tried to check syslog for details, I realized I don't have a syslogger installed yet. Right - lxc-create installs a minimal debian system. I try to install rsyslog:

apt-get install rsyslog
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cron exim4 exim4-base exim4-config exim4-daemon-light heirloom-mailx liblockfile1 libpcre3 lockfile-progs logrotate
Suggested packages:
  anacron checksecurity mail-reader eximon4 exim4-doc-html exim4-doc-info spf-tools-perl swaks rsyslog-mysql rsyslog-pgsql rsyslog-doc rsyslog-gnutls rsyslog-gssapi
  rsyslog-relp
Recommended packages:
  mailx
The following NEW packages will be installed:
  cron exim4 exim4-base exim4-config exim4-daemon-light heirloom-mailx liblockfile1 libpcre3 lockfile-progs logrotate rsyslog
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 3031 kB of archives.
After this operation, 6713 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

Argh. It wants to install exim4. For this container I'd like to use nullmailer:

apt-get install nullmailer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  klogd sysklogd
The following NEW packages will be installed:
  klogd nullmailer sysklogd
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 196 kB of archives.
After this operation, 762 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

Wait! That wants to install klogd. Ugh. OK, let's try again:

apt-get install nullmailer rsyslog
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cron heirloom-mailx liblockfile1 lockfile-progs logrotate
Suggested packages:
  anacron checksecurity rsyslog-mysql rsyslog-pgsql rsyslog-doc rsyslog-gnutls rsyslog-gssapi rsyslog-relp
Recommended packages:
  exim4 postfix mail-transport-agent mailx sysklogd system-log-daemon
The following NEW packages will be installed:
  cron heirloom-mailx liblockfile1 lockfile-progs logrotate nullmailer rsyslog
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 861 kB of archives.
After this operation, 2478 kB of additional disk space will be used.
Do you want to continue [Y/n]?

YES! I am so glad that apt has super cow powers, aren't you?

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022