I love OpenVZ, but I was unfortunately never able to successfully install Chef Server in a container; I’ve always had to try it out on KVM or Xen instead. The culprit was the procps package, which refused to install as a dependency.
After looking into it, it turns out that a sysctl setting conflicted with procps, causing that error. OpenVZ doesn’t even use sysctl (or any other kernel-level settings) since it’s effectively a chroot, and inherits all settings from the host.
The solution, found here, was to delete the following (Ubuntu 12.04 here):
/etc/sysctl.d/10-kernel-hardening.conf
This corresponds to the setting kernel.kptr_restrict = 1 . On other distros, simply grep out that setting in sysctl.conf or sysctl.d, and remove it.
Once that’s done, you should be good to go with the install.
On Ubuntu 12.04, using the traditional OpenVZ templates, I do:
1 2 3 4 5 6 |
apt-get update apt-get purge apache2* sendmail* cups* samba* # remove unnecessary packages rm -v /etc/sysctl.d/10-kernel-hardening.conf wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.11-1.ubuntu.12.04_amd64.deb dpkg -i chef-server_11.0.11-1.ubuntu.12.04_amd64.deb chef-server-ctl reconfigure |
That’s all, folks!
Leave a Reply