<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cfg on Miek Gieben</title>
    <link>https://miek.nl/tags/cfg/</link>
    <description>Recent content in Cfg on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Fri, 02 Feb 2024 15:20:33 +0100</lastBuildDate>
    <atom:link href="https://miek.nl/tags/cfg/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Config Management, part III: Rolling Back</title>
      <link>https://miek.nl/2024/february/02/config-management-part-iii-rolling-back/</link>
      <pubDate>Fri, 02 Feb 2024 15:20:33 +0100</pubDate>
      <guid>https://miek.nl/2024/february/02/config-management-part-iii-rolling-back/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://miek.nl/2024/february/01/config-management-part-ii-microcode-language/&#34;&gt;The second part&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In the previous part we looked how a micro language would look like, now I want to focus on what it&#xA;means to roll back to a previous version. First take a look at an instruction that have no obvious&#xA;reverse: CHMOD&lt;/p&gt;&#xA;&lt;p&gt;When rolling back CHMOD you want to revert to the previous permissions. This would work&#xA;automatically &lt;em&gt;if&lt;/em&gt; there was an older CHMOD that would also set the permission, but in a lot of&#xA;situations you probably just go with the (package) defaults. This implies you don&amp;rsquo;t know what a&#xA;CHMOD reversal would be, and that implies we need to track that, like in a proper &lt;em&gt;journal&lt;/em&gt;. As said&#xA;each instruction has an implicit condition, if that condition doesn&amp;rsquo;t hold, it executes the&#xA;instruction, we can utilize that state and save it in the journal. Let&amp;rsquo;s see in detail how this&#xA;would work with something like CHMOD.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Config Management, part II: Microcode Language</title>
      <link>https://miek.nl/2024/february/01/config-management-part-ii-microcode-language/</link>
      <pubDate>Thu, 01 Feb 2024 15:20:33 +0100</pubDate>
      <guid>https://miek.nl/2024/february/01/config-management-part-ii-microcode-language/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://miek.nl/2024/january/29/config-management/&#34;&gt;The first part&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This cfg mgmt system uses a micro language to perform the changes on the target&#xA;system. This language is limited in its scope and has the following &amp;ldquo;instructions&amp;rdquo;:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;INSTRUCTION&lt;/th&gt;&#xA;          &lt;th&gt;ARITY&lt;/th&gt;&#xA;          &lt;th&gt;ARGUMENTS&lt;/th&gt;&#xA;          &lt;th&gt;REMARK&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;REM&lt;/td&gt;&#xA;          &lt;td&gt;1&lt;/td&gt;&#xA;          &lt;td&gt;TEXT&lt;/td&gt;&#xA;          &lt;td&gt;a comment&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;MKDIR&lt;/td&gt;&#xA;          &lt;td&gt;2&lt;/td&gt;&#xA;          &lt;td&gt;MODE PATH&lt;/td&gt;&#xA;          &lt;td&gt;create a directory&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;COPY&lt;/td&gt;&#xA;          &lt;td&gt;2&lt;/td&gt;&#xA;          &lt;td&gt;SRC-PATH DST-PATH&lt;/td&gt;&#xA;          &lt;td&gt;copy a file&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;CHMOD&lt;/td&gt;&#xA;          &lt;td&gt;2&lt;/td&gt;&#xA;          &lt;td&gt;MODE PATH&lt;/td&gt;&#xA;          &lt;td&gt;set the mode&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;CHOWN&lt;/td&gt;&#xA;          &lt;td&gt;2&lt;/td&gt;&#xA;          &lt;td&gt;USER/ID PATH&lt;/td&gt;&#xA;          &lt;td&gt;set the owner&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;CHGRP&lt;/td&gt;&#xA;          &lt;td&gt;2&lt;/td&gt;&#xA;          &lt;td&gt;GROUP/ID PATH&lt;/td&gt;&#xA;          &lt;td&gt;set the group&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;RM&lt;/td&gt;&#xA;          &lt;td&gt;1&lt;/td&gt;&#xA;          &lt;td&gt;PATH&lt;/td&gt;&#xA;          &lt;td&gt;rm the file&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;EXEC&lt;/td&gt;&#xA;          &lt;td&gt;1&lt;/td&gt;&#xA;          &lt;td&gt;CMD&lt;/td&gt;&#xA;          &lt;td&gt;install a package&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;These micro-instruction basically all call a simple system call to make the changes.&#xA;Note, except for the latter this is the Unix API of everything is a file. &lt;code&gt;EXEC&lt;/code&gt; is now only used&#xA;to install/deinstall a package; of course such a generic instruction is ripe for abuse&amp;hellip;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Config Management</title>
      <link>https://miek.nl/2024/january/29/config-management/</link>
      <pubDate>Mon, 29 Jan 2024 14:20:33 +0100</pubDate>
      <guid>https://miek.nl/2024/january/29/config-management/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;this project needs a name and a domain.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;After many years of playing with YAML in k8s, I&amp;rsquo;ve returned to using CFEngine (at work). The last&#xA;config management software before that was Puppet. An issue I see with all modern config management&#xA;tooling is the lack of monitoring and the impossibility to cleanly roll back. In k8s it works&#xA;better, but that&amp;rsquo;s only for pods running in k8s (which are stateless), not the underlying machines.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
