Foreman OS support Supported platforms in the quickstart documentation: CentOS, Scientific Linux or Oracle Linux 6 or 7, x86_64 Debian 8 (Jessie), i386/amd64/armhf Debian 7 (Wheezy), i386/amd64 Fedora 19, x86_64 Red Hat Enterprise Linux 6 or 7, x86_64 Ubuntu 14.04 (Trusty), i386/amd64/armhf Ubuntu 12.04 (Precise), i386/amd64 Wait, there’s more? Other operating systems will need to use alternative installation methods (see the manual). 2 / 26
Foreman Building Blocks Foreman provisioning support (RoR and ERB templates) Foreman core (Ruby On Rails + a ton of gems) Foreman proxy (Ruby + very few gems) Foreman installer (Ruby + Puppet + a few gems) Puppet modules (Puppet) Hammer (Ruby + a few gems) Plugins Foreman Packaging (RPM and DEB) for peeking 4 / 26
FreeBSD and Foreman 2013-11-28 FreeBSD provisioning support merged 2014-01-29 foreman-proxy packaged 2014-03-13 hammer packaged 2014-09-27 smart_proxy plugins packaged 2015-09-19 all Puppet modules support FreeBSD 2016-01-15 foreman-installer packaged Only FreeBSD? Having all these changes is making it easier in the future to support other operating systems or Linux distributions. Having Windows support in theforeman-puppet also made it easier to add FreeBSD support. 6 / 26
Ruby Gems What is a Ruby Gem? RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a ”gem”). A ”package” for Ruby bundler is used to define sets of Gems Having gems packaged to OS packages seems logical manual transformation (former way to RPMs) Debian: gem2deb Gems framework e.g. in FreeBSD ports 7 / 26
Hammer Start with something easy. It’s Hammer time! Package all gem dependencies Package the hammer_cli gem Copy the configuration file to the correct place You’re done! Repeat for hammer plugins (e.g. hammer_cli_foreman) 9 / 26
Proxy Package all gem dependencies Check how packaging is done for RPM and DEB Package the proxy There is a configuration migration script Copy the config files around Check paths in config files Check symlinks You should be all set! 12 / 26
Proxy Plugins bundler_ext is used for proxy plugins Therefore, proxy plugins are gems A file in bundler.d is needed to load the plugin Copy config file Check paths in config file Package gem dependencies Handle other dependencies like salt-master or chef-server You should be all set! 14 / 26
Puppet Foreman-installer is based on Puppet, so... make sure Puppet (3.x) is working really good on your platform, also when planning to use another configuration management system with Foreman. you will be using puppet apply a lot before even being able to target the installer itself. 16 / 26
Puppet Modules Foreman modules theforeman-* Best to start with theforeman-puppet Modules are designed to also work outside the installer Classical Puppet module development, you’ll see the usual patterns Puppet Labs modules Apache Concat MySQL PostgreSQL Sometimes OS packages have to get modified to be more Puppet friendly locations.ini for mod_passenger on FreeBSD 17 / 26
kafo kafo is a Ruby gem, taking Puppet modules and generating shiny installers kafo_parsers gem loads Puppet directly, thus not working with Puppet Labs AIO packages currently 18 / 26
Installer Once the proxy is packaged and the needed Puppet modules are ready for your OS, foreman-installer can be targeted. There’s no need to wait for a Foreman core package on your OS. kafo generated installer contains all theforeman-* Puppet modules and their dependencies have a look into DEB/RPM packages for the build process 19 / 26
Foreman Core Foreman itself is a Ruby on Rails application, with dependencies onto dozens of Gems with specific versions. It’s much easier (especially mid/long-term) to have the Gems for Foreman core seperated from the rest of the system Gems. On Red Hat based systems this is done by using a Ruby from a SCL (software collection), making it also easy to update the Ruby version used. On Debian systems, all needed Gems are coming with the Foreman binary package by using bundle package. Some Gems will bring native extensions, often untested on non-Linux/OSX. JavaScript engines used by execjs (like libv8 or nodejs) will often require porting work, not only OS but also CPU architecture wise. 21 / 26
Provisioning Support 1/2 Have a look into existing implementations: Kickstart (PXELinux) Preseed (PXELinux) Solaris 8-10 (DHCP options) . . . FreeBSD (talk by Martin Matuška) CoreOS (talk by Nils Domrose and Johannes Scheuermann) 22 / 26
Provisioning Support 2/2 know your target OS installer very good some installers are not PXE friendly some installers are not really unattended manually set up PXE provisioning for that OS at least one time to know the DHCP specifics and file contents know PXELinux and how to use it to work around OS installer shortcomings FreeBSD provisioning via PXELinux memdisk and pxelinux.cfg re-usage via tftp to parametrize the install script 23 / 26
Further Goals Foreman core package on FreeBSD Dragonfly BSD (should already be covered by FreeBSD work) NetBSD, OpenBSD OpenSUSE, SLES (OBS project? converge RPM sources?) Solaris AI provisioning Puppet module support Packages NixOS VMware ESX as PXE installable OS XenServer as PXE installable OS setup.exe with proxy and installer for Windows Re-use Puppet Labs Ruby? 24 / 26
Katello Katello as repository server for OpenSUSE and SLES Pulp work already done zypper can use yum repositories yum is already packaged for Spacewalk / SUSE Manager katello-agent and friends yet to be done (stalled OBS project) Katello as repository server for Debian pulp_deb (WIP) package/port katello-agent and friends Katello as repository server for FreeBSD pulp_pkgng (N/A) package/port katello-agent and friends Katello itself on Debian Would be a whole lot of packaging work, but no technical reasons against it Current way to package Foreman core plugins on Debian might interfere 25 / 26