Puppet~\cite{ref:puppet} 3 support ends at 12/31/2016. The CNAF provisioning system based on Puppet 3 need to be upgraded to a new version. Due to other high priority task, this activity was postponed. In this report we are going to describe the activity relate to the upgrade from Puppet 3 to 5.
Puppet~\cite{ref:puppet} 3 has reached "End-of-life" at 31/12/2016. The CNAF provisioning must therefore be upgraded to a new version of Puppet. Due to other high priority tasks, this activity was postponed. In this report we are going to describe the activity necessary before upgrade to Puppet 5.
\section{Puppet version upgrade}
\section{Puppet version upgrade: preparation}
The main activity in 2017 has been the setup of automated test and related utils for puppet modules in order to prepare the migration from puppet 3 to puppet 5. Upgrading from Puppet 3 to Puppet 4 is a major upgrade with lots of configuration and functionality changes:
Upgrading from Puppet 3 to Puppet 5 is a major upgrade with lots of configuration and functionality changes:
\begin{itemize}
\item The Puppet master setup require the migration from a Rack and WEBrick setup to a Puppetserver based setup;
\item The puppet code need to be updated to mitigate breaking changes introduced by puppet 4.
\item The Puppet master setup requires the migration from a Rack and WEBrick setup to a Puppetserver based setup;
\item The Puppet code needs to be updated to mitigate breaking changes introduced by Puppet 4 and Puppet 5;
\item Foreman~\cite{ref:foreman} needs to be updated to a version supporting both Puppet versions;
\end{itemize}
The main activity in 2017 has been the setup of automated test and development related utils for Puppet modules in order to prepare the migration from Puppet 3 to Puppet 5.
This task involve a lot of effort which was spent in several tasks such as follow:
\begin{itemize}
\item Analysis, testing and upgrade of Puppetforge modules to a version usable by both Puppet 3 and 5;
\item Modify others Puppet modules (as much automated as possible) in order to:
\item Analysis, testing and upgrade of Puppetforge modules to a version usable by both Puppet versions;
\item Creation of a Puppet modules development kit and related docs to facilitate the setup of development and testing environment using Docker.
\item Modification of other Puppet modules (as much automated as possible) in order to:
\begin{itemize}
\item Fix module dependencies;
\item Add to metadata.json supported operating systems and Puppet versions;
\item Review rake tasks and its management inside Rakefile;
\item Setup a basic tests of any modules.
\item Setup of basic tests suite for any modules.
\end{itemize}
\item Create a Puppet modules development kit and related docs to facilitate the setup of development and testing environment using Docker.
\end{itemize}
In addition to this, a detailed upgrade procedure of Foreman and Puppet was written and tried several times.
\newpage
Thanks to these tasks, the RSpec test suite with some plugins and the Puppet-lint utils, it is possible to test if a Puppet module is compliant with a specific Puppet version, reducing the amount of errors while upgrading to Puppet 5, also improving the development process itself.
At present, we are keep fixing and testing our modules, in order to upgrade Foreman and deploy a Puppet 5 infrastructure at the beginning of the 2018.