<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Hiera on Puppeteers Oy</title>
		<link>https://www.puppeteers.net/tags/hiera/</link>
		<description>Recent content in Hiera on Puppeteers Oy</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Tue, 28 Dec 2021 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://www.puppeteers.net/tags/hiera/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Serverless Puppet with control repo, Hiera, roles and profiles and Puppet Bolt</title>
				<link>https://www.puppeteers.net/blog/serverless-puppet-with-control-repo-hiera-roles-and-profiles-and-puppet-bolt/</link>
				<pubDate>Tue, 28 Dec 2021 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/serverless-puppet-with-control-repo-hiera-roles-and-profiles-and-puppet-bolt/</guid>
				<description>&lt;p&gt;The traditional way of managing systems with &lt;a href=&#34;https://www.puppeteers.net/learn/what-is-puppet-and-how-does-it-work/&#34;&gt;Puppet&lt;/a&gt; is to install Puppet agent on the nodes being managed and point those agents to a Puppet server (more details &lt;a href=&#34;https://www.puppeteers.net/learn/what-is-puppet-and-how-does-it-work/&#34;&gt;here&lt;/a&gt;). This approach works well for environments with tens or hundreds of nodes, but is an overkill for small environments with just a handful of nodes. Fortunately nowadays &lt;a href=&#34;https://puppet.com/docs/bolt/latest/bolt.html&#34;&gt;Puppet Bolt&lt;/a&gt; enables you to &lt;a href=&#34;https://www.puppeteers.net/learn/understanding-infrastructure-as-code-iac/&#34;&gt;push&lt;/a&gt; configurations to the managed nodes via SSH and WinRM. When using Bolt the &lt;a href=&#34;https://www.puppeteers.net/learn/what-is-puppet-and-how-does-it-work/&#34;&gt;catalog&lt;/a&gt; (desired state) is created on the computer running Puppet Bolt using facts from managed nodes and then sent to the managed nodes to be applied.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fattening the workflow, part 5: Hiera and content encryption</title>
				<link>https://www.puppeteers.net/blog/fattening-the-workflow-part-5-hiera-and-content-encryption/</link>
				<pubDate>Thu, 03 Dec 2020 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/fattening-the-workflow-part-5-hiera-and-content-encryption/</guid>
				<description>&lt;p&gt;Separating data from code in Puppet modules is advisable as it improves reusability of code. The separation can be accomplished with Hiera by having separate levels based on facts, organizational units, locations, etc.&lt;/p&gt;&#xA;&lt;p&gt;Hiera can also be used for storing private data that needs to be protected and must not be readable by outsiders. Typically the data, like all other code, is stored in a version control system that may be located outside the organisation. In such a case Hiera encryption is a must.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fattening the Puppet workflow, part 1: The control repository</title>
				<link>https://www.puppeteers.net/blog/fattening-the-puppet-workflow-part-1-the-control-repository/</link>
				<pubDate>Thu, 26 Nov 2020 00:00:00 +0000</pubDate>
				<guid>https://www.puppeteers.net/blog/fattening-the-puppet-workflow-part-1-the-control-repository/</guid>
				<description>&lt;p&gt;If editing Puppet code and Hiera directly with puppetmaster feels too easy, you can complicate the Puppet workflow as much you like by adding more components to the palette. Adding the so called &lt;a href=&#34;https://puppet.com/docs/pe/2017.3/code_management/control_repo.html&#34;&gt;control repository&lt;/a&gt; and &lt;a href=&#34;https://puppet.com/docs/puppet/5.3/environments_about.html&#34;&gt;r10k&lt;/a&gt; to Puppet environment maintenance instantly adds several phases to your initially simple workflow. There are also benefits that I&amp;rsquo;ll discuss later on.&lt;/p&gt;&#xA;&lt;p&gt;The control repository (control repo for short) is a Git repository that is used to create dynamic Puppet environments on the Puppet master. Each Git branch can be turned into a matching Puppet environment. The name of the default branch, production, is the same as the environment the Puppet agents use by default. The content of the control repo branches look like this:&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>
