psick
psick copied to clipboard
FreeBSD support for /bin/puppet_install.sh
BSD is currently "not supported" by the install script.
TL;DR: if you want FreeBSD support in a single script for all operating systems it must be made sh-compatibile, at least for the FreeBSD code path, or require a FreeBSD system where someone or something pre-installed bash
. You will also have to live with facter2 at least for some time or compile relevant packages from the port collections (on every node, or just on one node and distribute your own binary packages).
Here are some relevant info:
- on a fresh FreeBSD install there is no bash but you do get the Bourne Shell (in addition to tcsh and csh). Bourne Again Shell 4.4 is available through a package
- AFAIK there are no Puppet official packages for the open source edition on FreeBSD
- there is a FreeBSD package for puppet4 which is usually more ore less up to date with upstream releases
- caveat: the package depends on the facter2 package, a package for Facter 3.1 is available but will conflict with the former
- via FreeBSD Ports you could configure Puppet4 with Facter3 support, but that would require (automated) build from sources
- newer Facter versions are not currently supported, pending integration of the devel/leatherman port
An sh-compatibile unattended Puppet OpenSource installation on FreeBSD using its package system (with Facter2) boils down to this (the bootstrap
and update
phases are required if it is a fresh install where pkg
has not been used before):
#!/usr/bin/env sh
export ASSUME_ALWAYS_YES=YES
pkg bootstrap
pkg update
pkg install puppet4
This will install the agent and the master (configured to run in mongrel) with the appropriate rc scripts to start them at boot (disabled by default).
We are using a variant of that script to set up production FreeBSD-11-RELEASE systems and as far as I can tell they integrate without problems with a Puppet Collections 1 server running on linux, but we are also considering switching to building it through ports to get the newer facter3.
Thanks for the info, will remain as reference for who wants/needs to implement it via a PR (eventually using sh instead of bash, as long as nothing breaks). Or I will do it as when possible.