Friday, May 1, 2015

Puppet Enterprise 3.8 Installation - steps and fixes

The new Puppet Enterprise Version 3.8 is out since a couple of days.
It now supports Puppet 4 officially.
On mailinglist people were telling about installation issues.
This is a summary with fixes for SLES 11 and 12, CentOS 6 and 7, Ubuntu 12.04 and 14.10, Debian 6 and 7.
Seems as if Debian 8 is still to new for PE 3.8.



Hi,

this is a summary of fresh PE 3.8.0 installation (no update) on SLES 11 and 12, Ubuntu 14 and 12, Debian 7 and CentOS 6 and 7

All machines were installed using standard installation disks without adding additional software or enabling other repositories.
All machines were deployed under VirtualBox on a MacBook running OS 10.9

SLES 12:

no problems.
Just make sure to set lang and LC_CTYPE to en_US.utf8
export LANG=en_US.utf8
export LANG=en_US.utf8

SLES 11:

Make sure to set LANG and LC_CTYPE to en_US.utf8
export LANG=en_US.utf8
export LC_CTYPE=en_US.utf8
When you see the following error message:
Problem: nothing provides db43 needed by pe-libaprutil-1.5.3-1.pe.sles11.x86_64
One has to enable SLES SDK repo or install the db43 package manually:


rpm -ihv sle*.rpm
or
rpm -ihv db43*.rpm

Then the installer fails with error:
** chkconfig pe-memcached on
** service pe-httpd start
Starting pe-httpd: pe-httpd.worker: apr_sockaddr_info_get() failed for linux-gd74
pe-httpd.worker: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address 127.0.0.1:4434
no listening sockets available, shutting down
Unable to open logs
..failed
/tmp/pe-installer-KzjtkqLH/install/puppet-enterprise-installer: line 243: [: 18446744073709551615: integer expression expected

 242         # Set kernel.shmmax if it's less than half the available memory size
 243         if [ "${t_postgres_shmmax_req?}" -gt ${t_postgres_shmmax_avail?} ]; then
 244             export t_manage_kernel_shmmax='y'
 245         fi

This is due to a bug in the installer. The following patch fixes this:

--- puppet-enterprise-installer.orig 2015-05-01 12:44:00.000000000 +0200
+++ puppet-enterprise-installer 2015-05-01 12:28:00.000000000 +0200
@@ -240,7 +240,7 @@
         t_postgres_shmmax_avail="$(/sbin/sysctl kernel.shmmax | awk '{ printf $3 }')"
         # Set kernel.shmmax if it's less than half the available memory size
-        if [ "${t_postgres_shmmax_req?}" -gt ${t_postgres_shmmax_avail?} ]; then
+        if [ ${t_postgres_shmmax_req?} -gt ${t_postgres_shmmax_avail?} ]; then
             export t_manage_kernel_shmmax='y'
         fi
     fi

Afterwards the installer runs fine.


Ubuntu 14.10:

Make sure to set LANG and LC_CTYPE to en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

Install packages which are not in PE installer dependency:
apt-get install zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
(Thanks to Kamil Keski for pointing to the missing packages)

If you do not install the above mentioned packages the installation fails:
** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s https://puppet:8140
** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s https://puppet:8140
========================================================================
** cp /opt/puppet/share/installer/install_log.lastrun.puppet.log /var/log/pe-installer
** sed "s/^\(q_.*password\)=.*/#\1=REDACTED/g" < "/tmp/pe-installer-H8P227I5/install/answers.lastrun.puppet" > "/var/log/pe-installer/answers.install"
!! ERROR: The puppet master service failed to start within 120
   seconds; unable to proceed

from puppetserver.log:
2015-05-01 10:37:09,665 ERROR [p.t.internal] shutdown-on-error triggered because of exception!
java.lang.IllegalStateException: There was a problem adding a JRubyPuppet instance to the pool.
...
Caused by: org.jruby.embed.EvalFailedException: (Error) Cannot determine basic system flavour

2015-05-01 10:37:09,674 ERROR [p.t.internal] Error during service init!!!
java.lang.IllegalStateException: Unable to borrow JRuby instance from pool

2015-05-01 10:37:09,680 INFO  [p.t.internal] Beginning shutdown sequence
2015-05-01 10:37:09,694 INFO  [p.t.s.w.jetty9-service] Shutting down web server(s).
2015-05-01 10:37:09,701 INFO  [p.t.internal] Finished shutdown sequence

after installing packages Kamil mentioned in his email  the pe-puppetserver process starts fine and the installer finished successfully.

Ubuntu 12.10:

not supported

Ubuntu 12.04:

Make sure to set LANG and LC_CTYPE to en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

apt-get update
When you get Hash Sum mismatch error:
rm -fr /var/lib/apt/lists/*
apt-get update
http://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error

Same issue as with Ubuntu 14.10:
apt-get install zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties

then PE installer works without errors.


Debian 6:

Make sure LANG and LC_CTYPE are set to en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

no problems with PE installer

Debian 7:

Make sure LANG and LC_CTYPE are set to en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

no problems with PE installer

CentOS 6:

Make sure LANG and LC_CTYPE are set to en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

no problems with PE installer


CentOS 7:

Make sure LANG and LC_CTYPE are set to en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
Disable Firewall or allow port 3000 (installation) and Puppet ports


no problems with PE installer