<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Foreman on Puppeteers Oy</title>
		<link>https://www.puppeteers.net/tags/foreman/</link>
		<description>Recent content in Foreman on Puppeteers Oy</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Wed, 12 May 2021 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://www.puppeteers.net/tags/foreman/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Dynamic partitioning in Foreman kickstart templates</title>
				<link>https://www.puppeteers.net/blog/dynamic-partitioning-in-foreman-kickstart-templates/</link>
				<pubDate>Wed, 12 May 2021 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/dynamic-partitioning-in-foreman-kickstart-templates/</guid>
				<description>&lt;p&gt;Foreman&amp;rsquo;s &lt;a href=&#34;https://docs.theforeman.org/nightly/Provisioning_Guide/index-foreman-deb.html&#34;&gt;provisioning system&lt;/a&gt; allows creating provisioning templates with highly dynamic content. This article describes how to create dynamic content in your Foreman provisioning templates. While the example is related to dynamic partitioning in kickstart, the basic mechanisms for setting this up applies to any kind of template.&lt;/p&gt;&#xA;&lt;p&gt;Foreman &lt;a href=&#34;https://docs.theforeman.org/nightly/Provisioning_Guide/index-foreman-deb.html#provisioning-templates_provisioning&#34;&gt;provisioning templates&lt;/a&gt; are written in &lt;a href=&#34;https://www.stuartellis.name/articles/erb/&#34;&gt;ERB format&lt;/a&gt;. This allows having logic in the template itself based on user-defined host parameters. For example the &lt;a href=&#34;https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/provision/kickstart_default.erb&#34;&gt;Kickstart default template&lt;/a&gt; consumes a bunch of &lt;a href=&#34;https://docs.theforeman.org/nightly/Managing_Hosts/index-foreman-el.html&#34;&gt;host parameters&lt;/a&gt; that allow you to define what kind of kickstart file you want Foreman to spit out for each host or host group. To give a simple example there&amp;rsquo;s the &amp;ldquo;lang&amp;rdquo; parameter which sets the value for &amp;ldquo;lang&amp;rdquo; kickstart option:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fixing foreman-installer &#34;Forward DNS points to x&#34; errors</title>
				<link>https://www.puppeteers.net/blog/fixing-foreman-installer-forward-dns-points-to-errors/</link>
				<pubDate>Wed, 03 Mar 2021 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/fixing-foreman-installer-forward-dns-points-to-errors/</guid>
				<description>&lt;p&gt;This posting comes strictly from the land of esoteria. We have a &lt;a href=&#34;https://www.vagrantup.com/&#34;&gt;Vagrant&lt;/a&gt; + &lt;a href=&#34;https://www.virtualbox.org/&#34;&gt;Virtualbox&lt;/a&gt; environment that sets up &lt;a href=&#34;https://theforeman.org/&#34;&gt;Foreman&lt;/a&gt; used for &lt;a href=&#34;https://www.howtogeek.com/57601/what-is-network-booting-pxe-and-how-can-you-use-it/&#34;&gt;PXE booting&lt;/a&gt; baremetal servers. The environment work fine on Linux and MacOS. But we needed to make this environment work also on Windows. Easy, right? Vagrant and Virtualbox are supposed to abstract all those pesky operating system settings away, correct? After resolving a &lt;a href=&#34;https://www.puppeteers.net/blog/fixing-vagrant-vbguest-for-the-centos-7-base-box/&#34;&gt;non-Windows related challenge&lt;/a&gt; provisioning of Foreman on Windows almost worked. Except that it failed when foreman-installer attempted to start[*]. The error message was this:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Testing Puppet feature branches in Foreman</title>
				<link>https://www.puppeteers.net/blog/testing-puppet-feature-branches-in-foreman/</link>
				<pubDate>Tue, 26 Nov 2019 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/testing-puppet-feature-branches-in-foreman/</guid>
				<description>&lt;p&gt;With default settings &lt;a href=&#34;https://theforeman.org/&#34;&gt;Foreman&lt;/a&gt; does not allow Puppet Agents to specify their own environment when connecting to the Puppetserver. This makes it impossible to use r10k and feature branch workflow like you can with a normal Puppetserver. This behavior can fortunately be reverted easily by modifying Foreman configuration file, &lt;em&gt;/etc/foreman/settings.yaml&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;    &lt;button class=&#34;code-copy&#34; type=&#34;button&#34; hidden aria-label=&#34;Copy code to clipboard&#34;&gt;&#xA;      &lt;span class=&#34;code-copy-label&#34; aria-hidden=&#34;true&#34;&gt;Copy&lt;/span&gt;&#xA;    &lt;/button&gt;&#xA;    &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Allow testing feature branches on nodes&#xA;:enc_environment: false&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&lt;p&gt;After modifying settings restart the webserver, e.g.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Reprovisioning bare metal Linux servers with Foreman and IPMI</title>
				<link>https://www.puppeteers.net/blog/reprovisioning-bare-metal-linux-servers-with-foreman-and-ipmi/</link>
				<pubDate>Wed, 25 Sep 2019 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/reprovisioning-bare-metal-linux-servers-with-foreman-and-ipmi/</guid>
				<description>&lt;p&gt;Recently we had to reprovision a bare metal server that was in Foreman and had IPMI support. The goal was to check if our automated &amp;ldquo;force-join to FreeIPA domain after reprovisioning&amp;rdquo; logic worked as intented. We did not have access to any graphical IPMI console, nor Foreman&amp;rsquo;s GUI, so we had to do everything from the command-line. The host we reprovisioned was a CentOS 7 instance. It is assumed that &lt;a href=&#34;https://community.pivotal.io/s/article/How-to-work-on-IPMI-and-IPMITOOL&#34;&gt;IPMI tools are installed&lt;/a&gt;. This post was inspired by the &lt;a href=&#34;https://hobo.house/2016/08/10/automate-supermicro-server-provisioning-or-die-trying/&#34;&gt;Automate SuperMicro Server Provisioning or Die Trying&lt;/a&gt; blog post.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Määriteltyjen resurssien luonti suoraan Puppet-luokista</title>
				<link>https://www.puppeteers.net/blog/maariteltyjen-resurssien-luonti-suoraan-puppet-luokista/</link>
				<pubDate>Mon, 02 Feb 2015 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/maariteltyjen-resurssien-luonti-suoraan-puppet-luokista/</guid>
				<description>&lt;p&gt;Jotkin Puppet ENC:t (&lt;a href=&#34;https://docs.puppetlabs.com/guides/external_nodes.html&#34;&gt;External Node Classifier&lt;/a&gt;), hyvänä esimerkkinä &lt;a href=&#34;http://theforeman.org/&#34;&gt;Foreman&lt;/a&gt;, eivät tue määriteltyjen resurssien (&lt;a href=&#34;https://docs.puppetlabs.com/puppet/latest/reference/lang_defined_types.html&#34;&gt;Defined Resource Types&lt;/a&gt;) käyttöä suoraan, vaan kaikki konfiguraatiot pitää sisällyttää &lt;a href=&#34;https://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html&#34;&gt;Puppet-luokkiin&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Myös &lt;a href=&#34;https://docs.puppetlabs.com/hiera/1/index.html&#34;&gt;Hieran&lt;/a&gt; kanssa määritellyt resurssit ovat hieman ongelmallisia, koska ne pitää erikseen luoda create_resources funktiolla. Eräs ratkaisu on määrittää kaikki create_resources -funktiot site.pp-tiedostossa (sovellettu &lt;a href=&#34;http://drewblessing.com/blog/-/blogs/puppet-hiera-implement-defined-resource-types-in-hiera&#34;&gt;täältä&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;div class=&#34;code-block&#34;&gt;&#xA;    &lt;button class=&#34;code-copy&#34; type=&#34;button&#34; hidden aria-label=&#34;Copy code to clipboard&#34;&gt;&#xA;      &lt;span class=&#34;code-copy-label&#34; aria-hidden=&#34;true&#34;&gt;Copy&lt;/span&gt;&#xA;    &lt;/button&gt;&#xA;    &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;create_resources(&amp;#39;mysqldump::backup&amp;#39;,hiera(&amp;#39;mysqldump_backups&amp;#39;, {}))&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/div&gt;&lt;p&gt;Tämän lähestymistavan ongelma on se, että uudet määritellyt resurssit pitää muistaa lisätä site.pp-tiedostoon.&lt;/p&gt;&#xA;&lt;p&gt;Yksinkertaisempi ja myös Foremanin kanssa toimiva ratkaisu on luoda määritellyt resurssit suoraan Puppet-moduulin pääluokasta (sovellettu &lt;a href=&#34;https://github.com/arnoudj/puppet-sudo&#34;&gt;täältä&lt;/a&gt;):&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
