<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Posts tagged with “Tools” on Mark van Lent’s weblog</title>
  <updated>2025-11-29T00:00:00+00:00</updated>
  <link rel="self" type="application/atom+xml" href="https://markvanlent.dev/tags/tools/index.xml" hreflang="en"/>
  <id>tag:markvanlent.dev,2010-04-02:/tags/tools/index.xml</id>
  <link rel="alternate" type="text/html" href="https://markvanlent.dev/tags/tools/" hreflang="en"/>
  <author>
      <name>Mark van Lent</name>
      <uri>https://markvanlent.dev/about/</uri>
    </author>
  <rights>Copyright (c) Mark van Lent, Creative Commons Attribution 4.0 International License.</rights>
  <icon>https://markvanlent.dev/favicon.ico</icon>
  <entry>
    <title type="html"><![CDATA[Proxmox Backup Server]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2025/11/29/proxmox-backup-server/" type="text/html" />
    <id>https://markvanlent.dev/2025/11/29/proxmox-backup-server/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="backups" />
    <category term="proxmox" />
    <category term="tools" />
    
    <updated>2025-11-29T22:47:31Z</updated>
    <published>2025-11-29T00:00:00Z</published>
    <content type="html"><![CDATA[<p>I have been using <a href="https://www.proxmox.com/en/products/proxmox-virtual-environment/overview">Proxmox Virtual
Environment</a>
for a few years now, but I only recently started using <a href="https://www.proxmox.com/en/products/proxmox-backup-server/overview">Proxmox Backup
Server</a>. I
wish I had done that sooner!</p>
<h2 id="backup-via-nfs">Backup via NFS</h2>
<p>When I started using Proxmox to host some services, I configured VM backups
almost immediately. For years, I have used an NFS mount to put the backups on my
NAS. This was a functioning solution and I have also successfully used those
backups to restore machines.</p>
<p>I had scheduled weekly backups early Monday morning and had retention configured
so that exactly one old backup was kept. So if disaster struck on Monday, I
could pick either the backup made earlier that day. But if I needed to restore
something on a Sunday, the most recent backup was one week old.</p>
<p>While this was an acceptable risk for my situation, it was also not really
efficient. The last time I made backups to the NAS (mid-November), this meant a
total of 122 GB in size for 10 VMs and two backups per VM.</p>
<h1 id="proxmox-backup-server">Proxmox Backup Server</h1>
<p>A couple of months ago, in the same period I was working on my
<a href="/2025/09/13/restic-at-the-center-of-my-backups/">Restic backup solution</a>,
I also stumbled upon
<a href="https://www.proxmox.com/en/products/proxmox-backup-server/overview">Proxmox Backup Server</a>
(or PBS for short).</p>
<p>I heard good things about it, so I decided to install it on a separate machine
and give it a try. And I&rsquo;m really happy with it. First of all, I have more
backups, and still use about the same disc space.</p>
<p><img src="/images/pbs_datastore_summary.png" alt="Screenshot of a Proxmox Backup Server datastore summary, showing 23 VMs and containers, with a total of 227 snapshots"></p>
<p>My datastore is currently using about 140 GB of disc space, which admittedly is
about 15% more than the mid-November set of backups on my NAS. But it&rsquo;s not a
fair comparison.</p>
<p>For starters: instead of backing up only the 10 most important
VMs, I am now creating backups for all of them. Currently this means 22 VMs and
1 container as you can see in the screenshot above.</p>
<p>Not only am I backing up more machines, instead of having only two backups, I
now have 6 daily backups, 3 weekly and 2 monthly. Put differently, I can go back
in time further than before and I only lose one day of data at most when I mess
something up now (assuming I notice the problem immediately).</p>
<p><img src="/images/pbs_backup_file_restore.png" alt="Screenshot of Proxmox VE window where one can select the file to restore from a backup"></p>
<p>Something else I like is that I can restore individual files from backups. So
I do not have to restore a whole VM just to get your hands on a single file.
While this was not my main driver to start using PBS, it <em>is</em> a really nice
bonus.</p>
<p>And I haven&rsquo;t even mentioned yet that PBS can <a href="https://pbs.proxmox.com/docs/maintenance.html#verification">verify snapshots</a>
for you. Or that you can have a <a href="https://pbs.proxmox.com/docs/managing-remotes.html">remote PBS with which to sync datastores</a>.</p>
<p>Summarised: with Proxmox Backup Server I now have:</p>
<ul>
<li>backups of more than double the number of VMs (10 → 22)</li>
<li>more backups (2 weekly backups → 6 daily, 3 weekly and 2 monthly)</li>
<li>more features</li>
</ul>
<p>This only costs me about 15% extra disc space in my specific situation. If
that isn&rsquo;t a good deal, I don&rsquo;t know what is.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Restic at the center of my backups]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2025/09/13/restic-at-the-center-of-my-backups/" type="text/html" />
    <id>https://markvanlent.dev/2025/09/13/restic-at-the-center-of-my-backups/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="backups" />
    <category term="restic" />
    <category term="tools" />
    
    <updated>2025-11-27T19:59:36Z</updated>
    <published>2025-09-13T00:00:00Z</published>
    <content type="html"><![CDATA[<p>Some time ago I started using <code>restic</code> for creating backups of my home directory
of my laptop. Now it has become my main solution for backing up my most valued data.</p>
<h2 id="the-old-script">The old script</h2>
<p>In the olden days, when I was still using CD-ROMs (or actually
<a href="https://en.wikipedia.org/wiki/CD-RW">CD-RWs</a>) to store backups, I had three
snapshots (each a set of two CDs). When I created a new backup, I rotated them by
overwriting the oldest disks.</p>
<figure><img src="/images/cd-rw_backups.jpg"
    alt="Photo of my old sets of backup CDs"><figcaption>
      <p>My actual sets of CDs, last used in 2005: red was the most recent backup, yellow one version older and the set of CDs in the green case contains the oldest backup</p>
    </figcaption>
</figure>

<p>Later on, when I was using an external hard disk, I had a script that made
incremental backups using <a href="https://en.wikipedia.org/wiki/Hard_link">hard links</a>
so I could have multiple full backups, but not need <em>x</em> times the space.
Unfortunately I lost that script.</p>
<p>After not creating backups for a while, I wrote a Bash script which handled the
whole backup process:</p>
<ul>
<li>opening the (LUKS encrypted) external drive,</li>
<li>mounting it,</li>
<li>performing the backup, and finally</li>
<li>unmounting and closing the device again.</li>
</ul>
<p>The following line was handling the actual backing up:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rsync -av --delete --exclude-from<span class="o">=</span>backup.excludes /home <span class="nv">$MOUNT_DIR</span>/<span class="k">$(</span>hostname -s<span class="k">)</span>/
</span></span></code></pre></div><p>Plain and simple.</p>
<p>This protected me from losing my data if my machine got stolen or if the hard
drive failed. And it served me well for a number of years. But on multiple
occasions I would have loved to have an older version of a file that got changed
or even deleted before my last backup. This triggered me to look for another
solution a few years back.</p>
<h2 id="restic-to-the-rescue">Restic to the rescue</h2>
<p>Since I didn&rsquo;t want to reinvent the wheel myself again, I was looking for backup
solutions and ran across <a href="https://restic.net/">restic</a>. After a bit of reading
and experimenting, I basically replaced the <code>rsync</code> line from the previous
script with the following:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">restic -r <span class="nv">$MOUNT_DIR</span> --verbose backup <span class="s2">&#34;/home/</span><span class="si">${</span><span class="nv">USER</span><span class="si">}</span><span class="s2">&#34;</span> --exclude-file<span class="o">=</span><span class="s2">&#34;/home/</span><span class="si">${</span><span class="nv">USER</span><span class="si">}</span><span class="s2">/backup.excludes&#34;</span>
</span></span></code></pre></div><p>And then I added a few more commands to the script:</p>
<ul>
<li>&ldquo;<code>restic -r $MOUNT_DIR check</code>&rdquo; to check the repository for errors</li>
<li>&ldquo;<code>restic -r $MOUNT_DIR forget --keep-last 7 --prune</code>&rdquo; to only keep the
last 7 snapshots</li>
</ul>
<h3 id="benefits">Benefits</h3>
<p>What did this change bring me?</p>
<p>For starters, if we assume I make a backup each week, I can go back at least 7
weeks in time. In practice I&rsquo;m not that consistent anymore so I can go back even
further in time.</p>
<p>What&rsquo;s more: according to restic each of my backups is about 105&ndash;100 GB of
data. But due to the compression and deduplication these 7 (incremental) backups
only use 69 GB <strong>combined</strong>.</p>
<p>Another benefit is that the backups are encrypted. So if I would want to store
them in the cloud, I can be sure the cloud provider cannot access my data.</p>
<p>And speaking of which: while I use <a href="https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#local">local storage</a>
(my external disk) and a remote <a href="https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#rest-server">REST Server</a>
(see below), restic supports a bunch of other backends: Amazon S3, Azure blob
storage and Google Cloud Storage to name a few.</p>
<p>A backup is worth nothing if you cannot restore from it. Besides restoring a
full snapshot, with restic I can also mount the snapshots to navigate the files
and view them individualy. This allows me to browse around in my snapshot just
like any other file system.</p>
<p>In case you had not noticed yet: I&rsquo;ve become a fan of restic.</p>
<h2 id="next-level">Next level</h2>
<p>Initially I was only using restic to make backups of my laptop to an external
hard drive. But recently I&rsquo;ve taken it to a next level and use it for offsite
backups as well.</p>
<p><figure class="float-left"><img src="/images/restic_via_vpn.svg"
    alt="Schematic of my backup solution: restic -&gt; HAproxy -&gt; VPN tunnel -&gt; Nginx -&gt; Rest Server" width="150px">
</figure>

I&rsquo;ve put a computer at a remote location and run the <a href="https://github.com/restic/rest-server">Rest
Server</a>. In my local network I have
a VM that acts as a transparent HTTP proxy and is connected to the remote box
via VPN.</p>
<p>This way any local machine (like my NAS) only needs to be able to run restic and
I&rsquo;m good to go. I just point restic to the internal VM and it handles the VPN
for me.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">restic -r rest:https://&lt;haproxy_host&gt;/&lt;repository&gt;
</span></span></code></pre></div><p>The reason I put Nginx in front of the Rest Server is so that it can handle the
authentication and TLS termination. Sure, the Rest Server itself can also do
this, but I feel Nginx is more battle tested.</p>
<p>This setup allows me to automatically run my backups each night since I do not
have to attach a USB disk. It also gives me an offsite backup, without a monthly
bill from a storage provider. What&rsquo;s more: it gives me a sense of control. I know
exactly how everything works and if disaser strikes and I need to restore all my
data, I can bring the remote machine home and have local access to it.</p>
<p>Setting this up was something I have been putting off for a while now, but this
project is finally finished.</p>
<h2 id="useful-resources">Useful resources</h2>
<p>Some of the resources that helped me:</p>
<ul>
<li>The <a href="https://restic.readthedocs.io/en/stable/">restic documentation</a></li>
<li><a href="https://blog.stabel.family/restic-on-synology/">Restic on Synology</a></li>
<li><a href="https://braincoke.fr/blog/2020/06/backup-all-the-things-with-restic">Backup all the things with restic</a></li>
</ul>
<p>To be honest, I do not recall why I chose restic over
<a href="https://www.borgbackup.org/">BorgBackup</a> (Borg for short) at the time. But
if you are in the market for a tool to create backups with deduplication,
compression and encryption, you might want to check out both projects and see
which fits your situation best.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Custom Kali Linux ISO — part 2]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2024/02/13/custom-kali-linux-iso-part-2/" type="text/html" />
    <id>https://markvanlent.dev/2024/02/13/custom-kali-linux-iso-part-2/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="kali" />
    <category term="tools" />
    <category term="vagrant" />
    
    <updated>2024-02-13T20:03:46Z</updated>
    <published>2024-02-13T00:00:00Z</published>
    <content type="html"><![CDATA[<p>In <a href="/2024/02/11/custom-kali-linux-iso-part-1/">part 1</a> of this (mini) series I
described what I did to be able to build an ISO image using Vagrant. Now it&rsquo;s
time to actually customize it.</p>
<p>I&rsquo;ll show what I have done and will provide links to the official documentation
for more in-depth information. This post is mainly for my own reference in the
future, but others might benefit from it as wel.</p>
<p>The basis is an existing Kali Linux environment which is setup with the build
script. See the
<a href="https://www.kali.org/docs/development/live-build-a-custom-kali-iso/#getting-ready---setting-up-the-build-script-kali-system">Getting Ready</a>
section of the documentation. Long story short:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install -y git live-build simple-cdd cdebootstrap curl
</span></span><span class="line"><span class="cl">git clone https://gitlab.com/kalilinux/build-scripts/live-build-config.git
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> live-build-config
</span></span></code></pre></div><h2 id="additional-packages">Additional packages</h2>
<p>You can include extra packages on your custom Live ISO. If these are available in the
Kali repos, it is quite simple. As described in the
<a href="https://www.kali.org/docs/development/live-build-a-custom-kali-iso/#controlling-the-packages-included-in-your-build">documentation</a>
you can edit the files (in case of the default Live ISO) in
<code>kali-config/variant-default/package-lists/kali.list.chroot</code>. I decided to put
the additional packages in a new file:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;# Custom packages
</span></span></span><span class="line"><span class="cl"><span class="s2">chromium
</span></span></span><span class="line"><span class="cl"><span class="s2">torbrowser-launcher
</span></span></span><span class="line"><span class="cl"><span class="s2">&#34;</span> &gt; kali-config/variant-default/package-lists/custom.list.chroot
</span></span></code></pre></div><h2 id="additional-apt-repositories">Additional APT repositories</h2>
<p>A bit harder was the case where I wanted to add Visual Studio Code. This package
requires a separate APT repository. So let&rsquo;s start there first.</p>
<p>To be able to add the files needed, you need to create an additional directory:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir -p kali-config/common/archives
</span></span></code></pre></div><p>Now you can configure the repository:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main&#34;</span> &gt; kali-config/common/archives/vscode.list.chroot
</span></span><span class="line"><span class="cl">cp kali-config/common/archives/vscode.list.chroot kali-config/common/archives/vscode.list.binary
</span></span></code></pre></div><p>The first command creates a file with the <code>.chroot</code> extension and is used during
the chroot stage. To also have this file on the live system (to be able to use
APT later on to update the packages), I copy the <code>.chroot</code> file to one ending in
<code>.binary</code>. For more information on this subject, see the Debian documentation pages
<a href="https://live-team.pages.debian.net/live-manual/html/live-manual/customization-overview.en.html">Customization overview</a>
and
<a href="https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-package-installation.en.html">Customizing package installation</a>.</p>
<p>The APT repository signing key also needs to be stored in the same directory:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -s -o kali-config/common/archives/vscode.key https://packages.microsoft.com/keys/microsoft.asc
</span></span></code></pre></div><p>There&rsquo;s one more change that needs to be made. To make sure the build process
can actually use the packages from the added repository, you&rsquo;ll need to include a
few more packages at boot time.</p>
<p>To do this, edit the file <code>auto/config</code> and add an <code>--include</code> option to the
<code>debootstrap-options</code> line. Concretely this means changing this line:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">--debootstrap-options &#34;--keyring=/usr/share/keyrings/kali-archive-keyring.gpg&#34; \
</span></span></code></pre></div><p>into this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">--debootstrap-options &#34;--include=apt-transport-https,ca-certificates,openssl --keyring=/usr/share/keyrings/kali-archive-keyring.gpg&#34; \
</span></span></code></pre></div><p>After that you are good to go. Just do not forget to add the package you want to
install (in this case <code>code</code>) to the list of packages. In my case this meant
updating <code>kali-config/variant-default/package-lists/custom.list.chroot</code>.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Custom Kali Linux ISO — part 1]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2024/02/11/custom-kali-linux-iso-part-1/" type="text/html" />
    <id>https://markvanlent.dev/2024/02/11/custom-kali-linux-iso-part-1/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="kali" />
    <category term="tools" />
    <category term="vagrant" />
    
    <updated>2024-02-13T20:03:46Z</updated>
    <published>2024-02-11T00:00:00Z</published>
    <content type="html"><![CDATA[<p>When I wanted to create a custom Kali Linux ISO using Vagrant, the allocated
disk was not big enough. Solving this required some searching and putting
several bits of information together. This post shows how I increased the disk
size.</p>
<p>The Kali documentation contains a nice page about <a href="https://www.kali.org/docs/development/live-build-a-custom-kali-iso/">creating a custom Kali
ISO</a>. That
page states that <q>[i]deally, you should build your custom
Kali ISO from within a pre-existing Kali environment, [&hellip;]</q> so I
decided to use <a href="https://www.vagrantup.com/">Vagrant</a> to create a virtual machine
which I could use.</p>
<p>The basic configuration for that box:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="no">Vagrant</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s2">&#34;2&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">config</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">box</span> <span class="o">=</span> <span class="s2">&#34;kalilinux/rolling&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provider</span> <span class="s2">&#34;virtualbox&#34;</span> <span class="k">do</span> <span class="o">|</span><span class="n">vb</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="c1"># Do not display the VirtualBox GUI when booting the machine</span>
</span></span><span class="line"><span class="cl">    <span class="n">vb</span><span class="o">.</span><span class="n">gui</span> <span class="o">=</span> <span class="kp">false</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span>
</span></span></code></pre></div><p>When I started building the ISO, the default 40G disk filled up and the process
could not be completed.</p>
<p>To solve this, the first step was to have Vagrant resize the disk for the
machine. You can do this by adding a single line to your configuration.
(For details see the relevant
<a href="https://developer.hashicorp.com/vagrant/docs/disks/usage">Vagrant documentation</a>.)</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="no">Vagrant</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s2">&#34;2&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">config</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">box</span> <span class="o">=</span> <span class="s2">&#34;kalilinux/rolling&#34;</span>
</span></span><span class="line hl"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">disk</span> <span class="ss">:disk</span><span class="p">,</span> <span class="ss">size</span><span class="p">:</span> <span class="s2">&#34;50GB&#34;</span><span class="p">,</span> <span class="ss">primary</span><span class="p">:</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provider</span> <span class="s2">&#34;virtualbox&#34;</span> <span class="k">do</span> <span class="o">|</span><span class="n">vb</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="c1"># Do not display the VirtualBox GUI when booting the machine</span>
</span></span><span class="line"><span class="cl">    <span class="n">vb</span><span class="o">.</span><span class="n">gui</span> <span class="o">=</span> <span class="kp">false</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span></span></span></code></pre></div>
<p>While this increases the size of the disk, I still had to increase the
partition in the OS. This was a bit more involved, but by adding a couple of
commands in a <code>config.vm.provision</code> section, I got it working without needing to
reboot the machine afterwards:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="no">Vagrant</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s2">&#34;2&#34;</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">config</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">box</span> <span class="o">=</span> <span class="s2">&#34;kalilinux/rolling&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">disk</span> <span class="ss">:disk</span><span class="p">,</span> <span class="ss">size</span><span class="p">:</span> <span class="s2">&#34;50GB&#34;</span><span class="p">,</span> <span class="ss">primary</span><span class="p">:</span> <span class="kp">true</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provider</span> <span class="s2">&#34;virtualbox&#34;</span> <span class="k">do</span> <span class="o">|</span><span class="n">vb</span><span class="o">|</span>
</span></span><span class="line"><span class="cl">    <span class="c1"># Do not display the VirtualBox GUI when booting the machine</span>
</span></span><span class="line"><span class="cl">    <span class="n">vb</span><span class="o">.</span><span class="n">gui</span> <span class="o">=</span> <span class="kp">false</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">  <span class="n">config</span><span class="o">.</span><span class="n">vm</span><span class="o">.</span><span class="n">provision</span> <span class="s2">&#34;shell&#34;</span><span class="p">,</span> <span class="ss">inline</span><span class="p">:</span> <span class="s">&lt;&lt;-SHELL
</span></span></span><span class="line"><span class="cl"><span class="s"></span>    <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
</span></span><span class="line"><span class="cl">    <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="o">-</span><span class="n">y</span> <span class="n">cloud</span><span class="o">-</span><span class="n">guest</span><span class="o">-</span><span class="n">utils</span>
</span></span><span class="line"><span class="cl">    <span class="n">swapoff</span> <span class="o">-</span><span class="n">a</span>
</span></span><span class="line"><span class="cl">    <span class="n">echo</span> <span class="s1">&#39;+10G,&#39;</span> <span class="o">|</span> <span class="n">sfdisk</span> <span class="o">--</span><span class="n">move</span><span class="o">-</span><span class="n">data</span> <span class="o">--</span><span class="n">force</span> <span class="sr">/dev/s</span><span class="n">da</span> <span class="o">-</span><span class="n">N</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl">    <span class="n">partprobe</span>
</span></span><span class="line"><span class="cl">    <span class="n">growpart</span> <span class="sr">/dev/s</span><span class="n">da</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl">    <span class="n">resize2fs</span> <span class="sr">/dev/s</span><span class="n">da1</span>
</span></span><span class="line"><span class="cl">    <span class="n">swapon</span> <span class="o">-</span><span class="n">a</span>
</span></span><span class="line"><span class="cl">  <span class="no">SHELL</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span>
</span></span></code></pre></div><p>Running &ldquo;<code>vagrant up</code>&rdquo; now does all the heavy lifting for you. Do note that
resizing the disk and making the extra space available to the OS takes
significantly more time when creating the machine (compared to using a machine
with the default disk size). Then again: if you know this, you can plan to have
a cup of coffee (or tea if you are like me) in that time.</p>
<p>The end result:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">┌──(vagrant㉿kali)-[~]
</span></span><span class="line"><span class="cl">└─$ df -h
</span></span><span class="line"><span class="cl">Filesystem      Size  Used Avail Use% Mounted on
</span></span><span class="line"><span class="cl">udev            942M     0  942M   0% /dev
</span></span><span class="line"><span class="cl">tmpfs           197M  896K  196M   1% /run
</span></span><span class="line hl"><span class="cl">/dev/sda1        48G   14G   32G  31% /
</span></span><span class="line"><span class="cl">tmpfs           983M     0  983M   0% /dev/shm
</span></span><span class="line"><span class="cl">tmpfs           5.0M     0  5.0M   0% /run/lock
</span></span><span class="line"><span class="cl">tmpfs           197M  116K  197M   1% /run/user/126
</span></span><span class="line"><span class="cl">vagrant         232G  173G   59G  75% /vagrant
</span></span><span class="line"><span class="cl">tmpfs           197M  112K  197M   1% /run/user/1000</span></span></code></pre></div>
<p>Time to create a custom Kali ISO&hellip; See
<a href="/2024/02/13/custom-kali-linux-iso-part-2/">part 2</a> for how I added extra
packages to the ISO.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[AWS CLI tools I&#39;ve used]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2022/12/07/aws-cli-tools-ive-used/" type="text/html" />
    <id>https://markvanlent.dev/2022/12/07/aws-cli-tools-ive-used/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="aws" />
    <category term="cli" />
    <category term="mfa" />
    <category term="sso" />
    <category term="tools" />
    
    <updated>2022-12-07T20:47:08Z</updated>
    <published>2022-12-07T00:00:00Z</published>
    <content type="html"><![CDATA[<p>A quick post (mostly for myself) to list the command line tools I&rsquo;ve used over
the years to interact with AWS, besides the official AWS Command Line Interface
(AWS CLI).</p>
<p>I was content with the AWS CLI initially, but once I had enabled and required
multi-factor authentication (MFA), using the AWS CLI became a bit of a nuisance.
So I started using <strong><a href="https://github.com/broamski/aws-mfa">aws-mfa</a></strong>. I also
wrote a post about it here, titled <a href="/2019/02/24/using-mfa-with-aws-cli/">Using MFA with AWS
CLI</a>.</p>
<p>The next tool I started using was <strong><a href="https://awsu.me/">Awsume</a></strong>. This Python
package makes it easier to manage your AWS credentials and sessions, especially
if you are accessing more than one account.</p>
<p>Once we started using Single Sign-On (SSO) more and more at work, I switched to
using <strong><a href="https://github.com/99designs/aws-vault">AWS Vault</a></strong>. I <em>think</em> the
reason I switched to AWS Vault was simply because Awsume did not support SSO,
but to be honest, I am not sure about that. (Neither do I know if Awsume
supports SSO at the moment.) Either way, what I really like about AWS Vault is
that it stores the credentials in an encrypted password store. So I no longer
had credentials lying around on my hard drive in plain text.</p>
<p>After reading the article
<a href="https://www.lastweekinaws.com/blog/taking-aws-account-logins-for-granted/">Taking AWS Account Logins For Granted</a>,
I also switched to using <strong><a href="https://granted.dev/">Granted</a></strong>. In contrast to AWS
Vault, Granted does not seem to have a way to securely store your long lived
credentials. If you are using those, you may want to use AWS Vault for those.
Since both tools use the same <code>~/.aws/config</code> file, you can use them next to each
other without a problem.</p>
<p>And that&rsquo;s the current state of affairs for me. Since I effectively only deal
with SSO logins, I use Granted and its <code>assume</code> command for my day-to-day.
Combined with the
<a href="https://addons.mozilla.org/en-GB/firefox/addon/granted/">Granted add-on for Firefox</a>
I can easily use multiple accounts and roles on the command line <em>and</em> in my
browser.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Monitoring TLS certificate expiry]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2021/06/23/monitoring-tls-certificate-expiry/" type="text/html" />
    <id>https://markvanlent.dev/2021/06/23/monitoring-tls-certificate-expiry/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="grafana" />
    <category term="prometheus" />
    <category term="tls" />
    <category term="tools" />
    
    <updated>2021-11-10T20:39:28Z</updated>
    <published>2021-06-23T00:00:00Z</published>
    <content type="html"><![CDATA[<p>This is a short follow-up article to the <a href="/2020/10/02/replacing-the-tls-certificate-on-a-synology-nas-via-the-command-line/">NAS TLS certificate
replacement</a>
one I wrote a few months back. Since then I have set up monitoring of the TLS
certificates I&rsquo;ve deployed.</p>
<p>My initial idea was to build some custom tool which would fetch the
certificates, inspect them and output the expiry date (or the numbers of days
left until that date). And although that would have been fun, I also didn&rsquo;t get
around to it for some time. Meanwhile more certificates were about to expire&hellip;</p>
<p>I already had <a href="https://grafana.com/">Grafana</a> running for another dashboard and
I have some experience with <a href="https://prometheus.io/">Prometheus</a>. So using the
<a href="https://github.com/prometheus/blackbox_exporter">Blackbox exporter</a> to solve
the data collection part was&mdash;in hindsight&mdash;an obvious solution for my
problem. Importing a community built
<a href="https://grafana.com/grafana/dashboards/13659">dashboard</a> in Grafana was the
next logical step.</p>
<p><img src="/images/blackbox_exporter_grafana.png" alt="Screenshot of my Grafana dashboard displaying Blackbox exporter data"></p>
<p>This gives me just about everything I need and a bit more. I peek at this
dashboard every once in a while and thus far have been able to replace
certificates <em>before</em> they expire.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[All Day DevOps]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2019/11/06/all-day-devops/" type="text/html" />
    <id>https://markvanlent.dev/2019/11/06/all-day-devops/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="aws" />
    <category term="conference" />
    <category term="culture" />
    <category term="devops" />
    <category term="observability" />
    <category term="infrastructure as code" />
    <category term="serverless" />
    <category term="sre" />
    <category term="tools" />
    
    <updated>2021-11-09T20:09:33Z</updated>
    <published>2019-11-06T00:00:00Z</published>
    <content type="html"><![CDATA[<p><a href="https://www.alldaydevops.com/">All Day DevOps</a> is an online conference
which lasts for 24 hours. With 150 sessions across 5 tracks, there&rsquo;s enough
content to consume.</p>
<p><em>(As with all my recent conference notes: these are just notes, not complete summaries.)</em></p>
<p><img src="/images/all_day_devops_2019.png" alt="All Day DevOps"></p>
<h2 id="adidoescode-where-devops-meets-the-sporting-goods-industry--fernando-cornago">#adidoescode Where DevOps Meets The Sporting Goods Industry &mdash; Fernando Cornago</h2>
<p>Adidas is a big company, about 57,000 employees. Software is also having an
impact on sports, e.g. registering your performance, etc. Is Adidas already a
software company? Definitely not, but they should start behaving as if they are.
They are building their applications 10,000 times a day.</p>
<p>New book from Gene Kim (the author of
<a href="https://itrevolution.com/the-phoenix-project/">The Phoenix Project</a>):
<a href="https://itrevolution.com/the-unicorn-project/">The Unicorn Project</a>.
Expected end of November 2019.</p>
<p>The platform you need to be able to accelerate you business should be:</p>
<ul>
<li>on demand and self-service</li>
<li>scalable and elastic</li>
<li>pay per use (which helps with the efficiency mindset)</li>
<li>transparent and measurable (observability)</li>
<li>open source + inner source</li>
</ul>
<p>To improve sales, Adidas&rsquo; platform can run where their customers are (globally)
and can scale up if needed and scale down again when possible.</p>
<p>Making use of data is key. The data is seen as a baton in a relay race and makes
its way through the teams. A large part of time consumed in creating a service
is spent at looking at the data. The data is used to train their AI systems.</p>
<p>You want to deliver value and make sure that things are working. Testing needs
to be done on the physical level (the actual products that are being sold), but
also on the virtual level: the IT platform also needs to perform and work as
expected.</p>
<p>At Adidas they went from having a couple of &ldquo;DevOps engineers&rdquo; to having a
DevOps culture in all teams. This removed bottlenecks and allowed them to grow
faster. They have substantially reduced costs and manual testing and improved
drastically on time to production.</p>
<h2 id="multi-cloud-day-to-day-devops-power-tools--ronen-freeman">Multi Cloud &ldquo;day-to-day&rdquo; DevOps Power Tools &mdash; Ronen Freeman</h2>
<p>About the relation between SRE (Site Reliability Engineering) and DevOps: SRE is
an implementation of DevOps.</p>
<p>What defines a great SRE:</p>
<ul>
<li>Quality
<ul>
<li>Be curious
<ul>
<li>Stay up to date</li>
<li>Attend events</li>
<li>Tinker with things</li>
</ul>
</li>
<li>Adapt to change (change <strong>will</strong> happen, anticipate it, monitor it, adapt
to it and prepare for the next change)</li>
<li>Learn: <q>learn fast so you may promptly begin again</q></li>
<li>Laziness: automate, but ask your self the question whether it will
actually save time or not</li>
</ul>
</li>
<li>Support
<ul>
<li>Googling is an art form</li>
<li>You&rsquo;ll learn the answer itself but also discover things in the process</li>
<li>There are numerous forums (for example: Stack Overflow, GitHub, Slack,
etc)</li>
<li>Have a daily standup</li>
<li>Pass on knowledge</li>
</ul>
</li>
<li>Tools: there are a number of areas to consider:
<ul>
<li>Code: Bash</li>
<li>Package: Docker</li>
<li>Deliver: <a href="https://concourse-ci.org/">Concourse</a></li>
<li>Platform:
<ul>
<li>Infrastructure: Kubernetes (<q>relatively simple to get started with</q>);
<a href="https://cloud.google.com/kubernetes-engine/">GKE</a> is the most mature</li>
<li>Configuration tool: Terraform</li>
</ul>
</li>
<li>Monitor: <a href="https://cloud.google.com/products/operations">Google Stackdriver</a>
(since already running on GKE)</li>
</ul>
</li>
</ul>
<p>There&rsquo;s a demo app:
<a href="https://github.com/Darillium/addo-demo">https://github.com/Darillium/addo-demo</a></p>
<h2 id="how-to-run-smarter-in-production-getting-started-with-site-reliability-engineering--jennifer-petoff">How to Run Smarter in Production: Getting Started with Site Reliability Engineering &mdash; Jennifer Petoff</h2>
<p>Software engineering is focussed on design and building, not about running the
application.</p>
<p>There are multiple places in organizations where friction occurs:</p>
<ul>
<li>Business vs development: this is addressed by Agile</li>
<li>Development vs operations: this friction is addressed by DevOps</li>
</ul>
<p>SRE is a bridge between business, development and operations.</p>
<p>Four key SRE principles:</p>
<ul>
<li>SRE needs Service Level Objectives (SLOs) with consequences</li>
<li>SREs must have time to improve the world</li>
<li>SRE teams must be able to regulate their workload</li>
<li>Failure is an opportunity to learn (having a blamelessness culture)</li>
</ul>
<p>Some terminology:</p>
<ul>
<li>Service Level Objectives (SLOs): a goal you want to achieve. For example, you
may want to set an uptime SLO, but typically you want to dig deeper, like
99.99% of HTTP requests should succeed with a &ldquo;200 OK&rdquo; response. You want to
measure something your user cares about.</li>
<li>Service Level Agreements (SLAs): these are &ldquo;handshakes between companies,&rdquo;
contractual guarantees.</li>
<li>Error budget: the gap between your SLO and perfect reliability. E.g. the
allowed downtime to still match your 99.9% uptime SLO.</li>
<li>Error budget policy: this policy describes what do you do when you have spent
your error budget. Example: no new features until within your error budget
again.</li>
</ul>
<blockquote>
<p>100% is the wrong reliability target for basically everything</p></blockquote>
<p>SRE is about balancing between reliability, engineering time, delivery speed and
costs.</p>
<p>Note that you <em>can</em> have an error budget policy without even hiring a single
SRE. You can already start with an SLO.</p>
<p>SLOs and error budgets are a necessary first step if you want to improve the
situation.</p>
<p>When talking about making tomorrow better than today, you need to address toil
(work that needs to be done that is manual, repetitive, automatable and does not
add value). If your SRE team is spending time on toil, they are basically an ops
team. Instead you want them to make the system more robust and improve the
operability of the system.</p>
<p>One way to be able to have your SRE team regulate their workload is to put them
in a different part of the organization.</p>
<p>If you want to start with SRE, start with SLOs and let your SRE team own the
most critical system first. Don&rsquo;t make them responsible for all systems at once.
Let them deal with the most important systems first. Once they have that under
control (removed toil, etc), they can take on more work.</p>
<p>You need leadership buy-in for every aspect of SRE work.</p>
<p>Aim for reliability and consistency upfront. SRE teams should consult on
architectural discussions to get to resilient systems.</p>
<p>SRE teams can benefit from automation:</p>
<ul>
<li>Eliminate toil</li>
<li>Capacity planning (auto scaling instead of forecasting)</li>
<li>To fix issues: if you can write a playbook, you can automate it.</li>
</ul>
<p>SRE teams embrace failure:</p>
<ul>
<li>Setting SLO less than 100%</li>
<li>Blamelessness at all levels</li>
<li>Learning from failure</li>
<li>Make the postmortems available so other teams can also learn from them</li>
</ul>
<p>Resources (books):</p>
<ul>
<li><a href="https://sre.google/sre-book/table-of-contents/">Site Reliability Engineering</a></li>
<li><a href="https://sre.google/workbook/table-of-contents/">The Site Reliability Workbook</a></li>
<li><a href="https://www.oreilly.com/library/view/seeking-sre/9781491978856/">Seeking SRE</a></li>
</ul>
<h2 id="everybody-gets-a-staging-environment--yaron-idan">Everybody Gets A Staging Environment! &mdash; Yaron Idan</h2>
<p>How can you give an isolated and secure staging environment for each developer?
If you follow the path Yaron&rsquo;s company (Soluto) took, prepare for a rocky
transition, getting used to new terminology when moving to Kubernetes and users
that can get upset at first.</p>
<p>Their first step: automate the entire process. The realized they needed
onboarding documentation and templates. They used Helm for the templates.</p>
<p>Deploy feature branches to the production environment. When developers open a
pull request, the CI/CD tool adds a link to where this PR is deployed. This
empowers the developers and provides a sense of security. This accelerated the
way the developers built features and the adoption of the platform by the
company.</p>
<p>The benefits:</p>
<ul>
<li>Code is fit for production during entire life cycle of the feature branch.</li>
<li>Makes performance testing easier (after all: it&rsquo;s deployed on the production environment).</li>
<li>Easier to share things with the stakeholders and thus improves collaboration.</li>
<li>You can deploy an entire set of microservices.</li>
</ul>
<p>The tools used for their implementation:</p>
<ul>
<li>GitHub (VCS)</li>
<li>Docker (code as configuration)</li>
<li>CodeFresh (CI)</li>
<li>Helm (CD)</li>
<li>Kubernetes (production platform)</li>
</ul>
<p>You can swap the aforementioned tools with other tools, but you must be able to
automate them and make sure that they work with the push of a single button.</p>
<p>GitHub repository for the demo:
<a href="https://github.com/yaron-idan/staging-environments-example">https://github.com/yaron-idan/staging-environments-example</a></p>
<h2 id="devops-to-the-next-level-with-serverless-chatops--jan-de-vries">DevOps to the Next Level with Serverless ChatOps &mdash; Jan de Vries</h2>
<p>What DevOps is about:</p>
<ul>
<li>Shipping code</li>
<li>Adding value</li>
<li>Do this continuously</li>
</ul>
<p>It&rsquo;s <strong>not</strong> about:</p>
<ul>
<li>Adding additional load to your team</li>
<li>Lowering quality</li>
<li>More support calls</li>
<li>Slow response times when there are errors</li>
</ul>
<p>One option is to send emails if something is wrong. But these emails are slow
(knowing that there was an issue <em>yesterday</em> is too late) and it generates a lot
of noise. Monitoring dashboards are nice, but you have to actively look at them
to detect if there&rsquo;s something wrong.</p>
<p>A better solution is using chat applications (like Microsoft Teams or Slack).</p>
<p>Your first step is to emit events when something fails (in Azure you can sent
such events to <a href="https://azure.microsoft.com/en-us/services/event-grid/">Event Grid</a>).
Next, you have to subscribe to these events/topics. You can use an Azure
Function for this and then have it post an actionable message to Teams.</p>
<p>These messages can have buttons to take immediate action (e.g. post to a web API
like an Azure Function) to recover from the problem. The output from the recover
action can also send events, so you can get another notification in your chat
application about the result.</p>
<p>GitHub repository with demo code: <a href="https://github.com/Jandev/ServerlessDevOps">https://github.com/Jandev/ServerlessDevOps</a></p>
<h2 id="building-modular-infrastructure-in-code--fergal-dearle">Building Modular Infrastructure in Code &mdash; Fergal Dearle</h2>
<p>Why use infrastructure as code (IaC)?</p>
<ul>
<li>Fergal is a fan of immutable infrastructure and the pets vs cattle analogy (which
goes further than just servers)</li>
<li>Everything as code</li>
<li>You don&rsquo;t have to log into a server via SSH to fix things</li>
<li>Better testability and maintainability</li>
</ul>
<p>The <a href="https://itrevolution.com/book/the-devops-handbook/">DevOps handbook</a> (part
III, chapter 9) talks about on demand spinning up a production-like environment.
The only way to do this is to use IaC.</p>
<p>First thing is understanding your infrastructure (VPC, networking, DNS,
services, database). Look at patterns like requestor/broker. Use these patterns
to create modular stacks.</p>
<p>Patterns:</p>
<ul>
<li>Singleton stack pattern: one stack per instance. But this is actually an
anti-pattern because you are mixing configuration and infrastructure.</li>
<li>Multiheaded stack pattern: multiple stacks in single project, config built in.</li>
<li>Template stack pattern: single stack, config separate, multiple instances from
that template</li>
</ul>
<p>Stack templates &amp; stack instances:</p>
<ul>
<li>Reusable template that implements building blocks</li>
<li>Appropriate tags</li>
<li>Must be able to uniquely identify instances (namespacing)</li>
</ul>
<blockquote>
<p>Stay clear of monoliths</p></blockquote>
<p>Monoliths are stacks with everything in them. This is one end of the spectrum.
The other end is to have one service per stack. You&rsquo;ll probably will want to end
up somewhere in between, where you have a component stack (e.g. with a
requestor/broker combination). And then you can combine those stacks.</p>
<p>Static stack inputs: environment names, app names. You should externalize this
config from your stack, e.g. by feeding these parameters via the command line or
use the <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html">SSM Param Store</a>
and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html">Secrets Manager</a>.</p>
<p>(Note to self: Fergal mentioned <a href="https://github.com/Sceptre/sceptre">Sceptre</a>.
Check what this is about.)</p>
<p>Common problems:</p>
<ul>
<li>Drift can happen, especially if you also make manual changes (don&rsquo;t!)</li>
<li>Updates are not forward compatible</li>
<li>Region incompatibilities</li>
</ul>
<p>Best practices:</p>
<ul>
<li>Only use template stacks</li>
<li>Use layered and component</li>
<li>Externalize config</li>
<li>Test, test, test!</li>
<li>Only use automation, no manual steps</li>
</ul>
<h2 id="crossing-the-river-by-feeling-the-stones--simon-wardley">Crossing The River By Feeling The Stones &mdash; Simon Wardley</h2>
<p>In <a href="https://en.wikipedia.org/wiki/The_Art_of_War">The Art of War</a> Sun Tzu
discusses five fundamental factors which you should consider:</p>
<ul>
<li>Purpose</li>
<li>Landscape</li>
<li>Climate</li>
<li>Doctrine</li>
<li>Leadership</li>
</ul>
<p>John Boyd developed the <a href="https://en.wikipedia.org/wiki/OODA_loop">OODA loop</a>,
which cycles through the following:</p>
<ul>
<li>Observe</li>
<li>Orient</li>
<li>Decide</li>
<li>Act</li>
</ul>
<p>You can combine these cycles:</p>
<p><img src="/images/all_day_devops_2019_simon_wardley1.png" alt="Simon Wardley combining Sun Tzu&rsquo;s five factors and John Boyd&rsquo;s OODA loop"></p>
<p>By moving we learn, as long as we can observe the environment.</p>
<p>Maps are ways to:</p>
<ul>
<li>explore</li>
<li>communicate</li>
<li>share understanding</li>
<li>de-personalize</li>
</ul>
<p>Graphs are not maps. Identical graphs can spatially be different. On a map,
space has meaning, in a graph not. And because space has meaning, we can
explore, e.g. by asking ourselves the question &ldquo;what if we go in <em>that</em>
direction?&rdquo;</p>
<p>What makes a map?</p>
<ul>
<li>Anchor (compass)</li>
<li>Position (places, relative to the compass)</li>
<li>Consistency of movement (going to right below means go to south-east, assuming
on this map &ldquo;up&rdquo; is north)</li>
</ul>
<p>In business there are a lot of maps, e.g. a systems diagram. But almost
everything in business we call a map actually is a graph. Which means we don&rsquo;t
have a sense of the landscape.</p>
<p>How do you create a map for a business? Start with the anchors, e.g. business
and customers. Work from there to get all related components and express them in
a chain of needs.</p>
<p>But how do you position those components? We can use &ldquo;visibility&rdquo; as an analogy
of distance. You can use this to create a &ldquo;partial ordered chain of needs.&rdquo;</p>
<p>And what about movement? You can describe movement as a chain of changes. But
how do you do <em>that</em>? You can order components based on their evolutionary
stage. Are they in the genesis stage, do we use custom built components, do we
have standard products or can we consider it a commodity?</p>
<p>By combining these we can create a map of components by using the position
(visibility) on the y-axis and the movement (evolution) on the x-axis.</p>
<figure><img src="/images/all_day_devops_2019_simon_wardley2.png"
    alt="Simon Wardley showing a map"><figcaption>
      <p>Simon Wardley shows a map of a fictional company selling cups of tea</p>
    </figcaption>
</figure>

<p>You can add intent (evolutionary flow) to your map, e.g. move a component from
custom built to using a commodity.</p>
<p>By using such a map, you can de-personalize discussions since now you talk about
the map, not a story.</p>
<p>Simon told a story of a company that wanted to invest in robots to do manual
labour. After putting their business in a map, the problem became clear: they
were using custom built racks and as a result needed to customize their servers
because they would not fit their non-standard rack. Because the market had changed
since the company started, they could switch to commodity (cloud) and as a
result also did not need robots.</p>
<p>But keep this in mind:</p>
<blockquote>
<p>All maps are imperfect representations of a space</p></blockquote>
<h2 id="deploying-microservices-to-aws-fargate--ariane-gadd">Deploying Microservices to AWS Fargate &mdash; Ariane Gadd</h2>
<p>At KPMG they moved a project from using Amazon EC2 to AWS Fargate. They also
replaced CloudFormation with Terraform for standardization.</p>
<p>Why managed container services and not EKS?</p>
<ul>
<li>Immutable deployments</li>
<li>Cluster provisioning handled by Fargate</li>
<li>Only pay for what you execute</li>
<li>No OS patching</li>
<li>Smaller attack service</li>
</ul>
<p>They used <a href="https://github.com/fabfuel/ecs-deploy">ECS deploy</a> to deploy
containers to Fargate.</p>
<p>Why was the customer okay with this change?</p>
<ul>
<li>They were already familiar with Docker</li>
<li>Fargate has integrations with ECS and ECR.</li>
<li>Overhead of managing EC2 vs cost of AWS Fargate</li>
</ul>
<p>Fargate runs in your own VPC so you own the network, etc.</p>
<p>The microservices for this project are placed behind an application load
balancer (ALB) using AWS Web Application Firewall (WAF) and TLS termination.
Logs are sent to AWS CloudWatch Logs. They used Anchor for end-to-end container
security and compliance.</p>
<p>Benefits of AWS for KPMG:</p>
<ul>
<li>Cost reduction (automation tools were already in place, they already used
Lambda for account creation and had reserved instances)</li>
<li>Speed of delivery</li>
<li>Allows collaboration with developers (automation, DevOps).</li>
<li>70% of the engineers were already AWS certified.</li>
</ul>
<h2 id="automate-everyday-tasks-with-functions--sean-odell">Automate Everyday Tasks with Functions &mdash; Sean O&rsquo;Dell</h2>
<p>Common use cases for serverless applications are things like web applications
(such as static websites), data processing, Amazon Alexa (skills) and chatbots.</p>
<blockquote>
<p>Not every workload should run in a serverless fashion</p></blockquote>
<p>Organizational and application context are relevant. Serverless is just another
option. You pick what is right for your use case as serverless is not a silver
bullet.</p>
<p>AWS Lambda in a nutshell: there is an event source (e.g. a state change in data
or a resource), which triggers a function, which in turn interacts with a service.</p>
<p>GitHub repository with examples: <a href="https://github.com/vmwarecloudadvocacy/cloudhealth-lambda-functions">https://github.com/vmwarecloudadvocacy/cloudhealth-lambda-functions</a></p>
<p>(Note to self: check <a href="https://docs.amplify.aws/">Amplify</a>)</p>
<h2 id="beyond-dev--ops--patrick-debois">Beyond dev &amp; ops &mdash; Patrick Debois</h2>
<p>The DevOps pipeline usually starts at the backlog. But what happens before? And
how does that influence people outside the engineering department?</p>
<p>Patrick joined a startup five years ago. He fixed the DevOps pipeline. After a
while the organization wanted to sell a product.</p>
<p>The book <a href="https://www.amazon.com/Machine-Radical-Approach-Design-Function/dp/1626342245">The Machine</a>
by Justin Roff-March describes &ldquo;the agile version of sales.&rdquo;</p>
<p>Sales had more in common with IT than Patrick expected. The sales pipeline
looked like a Kanban board. Sales people are also on call, especially if you do
international sales. If we can deliver faster, this increases the chance of a
sale. Sales persons are actually mind readers; this reminded Patrick how IT
people feel about tickets in the backlog: &ldquo;what is meant with this ticket, what
do the customers actually want?&rdquo;</p>
<p>Thinking about the life of the project after it has been delivered, in terms of
maintenance and operational costs, is important. Doing this upfront, is
beneficial for the project.</p>
<p>The biggest impact sales had on IT was the never ending hammer of &ldquo;can you make
things simpler?&rdquo; Sales can help you with making your design less complex.
Together you can determine what actually adds value for the customer.</p>
<p>Having publicly available documentation really helps and makes it easier to sell
the product. Getting the customers on Slack also helped. This showed that the
company was willing to listen and help. This also helps sales.</p>
<p>After sales, the marketing department got focus. Patrick has seen the most
interesting automation within the marketing department (e.g. email sending).
Marketing has a lot of fancy metrics and tools to measure stuff; did they invent
metrics? The IT department can help marketing by providing information.
Conferences are also a marketing instrument. Marketing also has CALMS; they do
very similar things.</p>
<p>We&rsquo;ve got sales and marketing covered, but for a lot of things we still need
budgets. To budget things, you also need to estimate things. Finance knows what
it is to be on the receiving end of tickets where you have to guess what is
going on.</p>
<p>Sometimes you need to buy things. Patrick looked into agile procurement. Lots of
stuff has to be figured out: is it a fit? is there a way to be partners?</p>
<p>Serverless is a manifestation of servicefull, where you use a lot of services,
so you can focus on your domain instead of having to build everything yourself.</p>
<p>With cloud services there doesn&rsquo;t have to be communication initially: you read
the website, check the documentation, pull your credit card and start with a
proof of concept. Communication is still important. You have to treat your
suppliers with respect.</p>
<p>HR: how does your company support hiring people? Have people join the team for
some actual work to see if they are a good fit or not.</p>
<p>Do you know what <a href="https://en.wikipedia.org/wiki/Pair_programming">pair programming</a>
is? Well, <a href="https://en.wikipedia.org/wiki/Mob_programming">mob programming</a> is a whole
other level of collaborating. (Note that it&rsquo;s more than just have one person
typing and a bunch of other people commenting&mdash;it has a lot of patterns going
on.) Teams can get very enthusiastic about this and can be very productive the
first week. But if they are not careful, the team is exhausted the next week.
You need to develop a sustainable pace.</p>
<p>Patrick learned a lot from talking to the different departments. They are solving
similar problems as IT is.</p>
<p>Reading tip:
<a href="https://www.amazon.com/Company-wide-Agility-Beyond-Budgeting-Sociocracy/dp/154467287X">Company-wide Agility with Beyond Budgeting, Open Space &amp; Sociocracy</a>
by Jutta Eckstein and John Buck.</p>
<h2 id="the-open-source-observability-toolkit--mickey-boxell">The Open Source Observability Toolkit &mdash; Mickey Boxell</h2>
<p>Some characteristics of a modern application:</p>
<ul>
<li>Microservices</li>
<li>Distributed</li>
<li>Multiple programming languages</li>
<li>Scalable</li>
<li>Ephemeral</li>
</ul>
<p>This brings new challenges compared to the old situation with a monolithic
application running on a single machine. You still want to address threats to
customer satisfaction. But the old debugging solutions we used for a monolith
will not work.</p>
<p>Observability means designing and operating a more visible system. This includes
systems that can explain themselves without you having to deploy new code. The
tools help you understand the difference between a healthy and unhealthy system.</p>
<blockquote>
<p>Modern, distributed systems <strong>will</strong> experience failures.</p></blockquote>
<p>Observability takes a holistic approach that recognizes the impact an issue has
on the business as a whole. Outages affect the whole business, which should be
able to react. Observability gives tools to address issues when they arrive.</p>
<p>External outputs:</p>
<ul>
<li>Logs</li>
<li>Metrics</li>
<li>Traces</li>
</ul>
<p>These outputs don&rsquo;t make your system more observable, but they can be part of
the holistic approach. They can help you with e.g. a root cause analysis.</p>

  <figure>

<blockquote >
Monitoring tells you whether a system is working, observability lets you ask
why it isn&rsquo;t working.
</blockquote>

  <figcaption>
    &mdash;Baron Schwartz
  </figcaption>
  </figure>


<p>Key SRE concepts:</p>
<ul>
<li>Service Level Indictors (SLIs; what are you measuring), Service Level
Objectives (SLOs; what should the values be), Service Level Agreements (SLAs;
defines the planned reaction if the objectives are not met).</li>
<li>Subset of Google&rsquo;s golden SRE signals: RED (Rate, Errors, Duration).</li>
<li>Mean Time To Failure (MTTF) and Mean Time To Repair (MTTR)</li>
</ul>
<p>Users are comfortable with a certain level of imperfection. A site that is a bit
slow sometimes, is less annoying than a shopping cart that sometimes looses its
content. Use this to determine what you&rsquo;ll spend your time on first.</p>
<h3 id="logging">Logging</h3>
<p>Logging is the most fundamental pillar of monitoring. Logging records events
that took place at a given time. Supported by most libraries because it is such
a fundamental thing.</p>
<p>You only get logs if you actually put them in your code. You also have to make
sure you don&rsquo;t lose them, for instance by aggregating them.</p>
<p>Tools:</p>
<ul>
<li><a href="https://www.fluentd.org/">Fluentd</a>: scrape, process and ship logs</li>
<li><a href="https://www.elastic.co/elasticsearch/">Elasticsearch</a>: a data store</li>
<li><a href="https://www.elastic.co/kibana/">Kibana</a>: interact with your logs</li>
</ul>
<h3 id="metrics">Metrics</h3>
<p>Metrics are a numeric aggregation of data describing the behavior of a component
measured over time. They are useful to understand typical system behavior.</p>
<p>Tools:</p>
<ul>
<li><a href="https://prometheus.io/">Prometheus</a>: scrape data, store the data and query
the data</li>
<li><a href="https://grafana.com/">Grafana</a>: visualize the metrics, can aggregate data
from different sources</li>
</ul>
<p>Alerts are notifications to indicate that a human needs to take action.</p>
<h3 id="tracing">Tracing</h3>
<p>Tracing is capturing a set of causally related events. Helpful for debugging.
Example: each request has a global ID and if you insert this ID as metadata at
each step, you can trace what happens.</p>
<p>Tools: <a href="https://www.jaegertracing.io/">Jaeger</a> and <a href="https://zipkin.io/">Zipkin</a>
can visualize and inspect traces.</p>
<p>The challenge is that tracing is hard to retrofit into an existing application.
You need to instrument all component. Service meshes can make it easier to
retrofit tracing.</p>
<h3 id="service-meshes">Service meshes</h3>
<p>A service mesh is a configurable infrastructure layer for microservice
applications. It can monitor and control the traffic in your environment. It can
be a great approach for observability. You will get less information from a
service mesh compared to adding tracing to all of your components, but on the
other hand it takes less effort to implement than instrumenting your existing
code base.</p>
<p>Tools:</p>
<ul>
<li><a href="https://istio.io/">Istio</a></li>
<li><a href="https://linkerd.io/">Linkerd</a></li>
<li><a href="https://traefik.io/traefik-mesh/">Maesh</a><sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></li>
<li><a href="https://kuma.io/">Kuma</a></li>
<li><a href="https://www.consul.io/">Consul</a></li>
</ul>
<p>Using service meshes won&rsquo;t eliminate the need to instrument your code, but it
can make your life more simple.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Called Traefik Mesh these days.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Devopsdays Ghent 2019: random notes]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2019/11/02/devopsdays-ghent-2019-random-notes/" type="text/html" />
    <id>https://markvanlent.dev/2019/11/02/devopsdays-ghent-2019-random-notes/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="conference" />
    <category term="devops" />
    <category term="opinion" />
    <category term="tools" />
    
    <updated>2021-11-09T20:09:33Z</updated>
    <published>2019-11-02T00:00:00Z</published>
    <content type="html"><![CDATA[<p>Where my <a href="/2019/10/29/devopsdays-ghent-2019-day-one/">previous</a>
<a href="/2019/10/30/devopsdays-ghent-2019-day-two/">articles</a> were focussed on
the notes I took of the talks, this article is a mix of random notes and
observations I made throughout the conference.</p>
<p><img src="/images/devopsdaysghent2019_random_notes.jpg" alt="Belgian chocolates: &ldquo;dev&rdquo;, &ldquo;heart&rdquo;, &ldquo;ops&rdquo;, &ldquo;days&rdquo;"></p>
<h2 id="the-conference">The conference</h2>
<p>First of all: this devopsdays conference&mdash;once again&mdash;inspired me. It
refreshed my desire to make the world (or at least a part of it) a better place.</p>
<p>A big change in the format was that each speaker only had a 15 minute time slot.
This was done to allow more people to speak. While the organization certainly
succeeded in that regard, I felt that most talks were too short, that is: I
would have loved them to last longer.</p>
<p>It felt like the conference was less technical. Perhaps this was because of the
length of the talks, which meant the speakers could not go as deep into a
subject as with a 30-minute talk? Perhaps it was because there were no workshops
where I usually get (more than) my dose of technical deep dives? Perhaps it was
just me?</p>
<p>Note that this is <strong>not</strong> a complaint about the speakers. Each and every one of
them did a great job and had an inspiring talk. I really appreciate them taking
the stage and sharing their knowledge, experience and opinions with us. Thank
you all!</p>
<h2 id="sponsors">Sponsors</h2>
<p>I talked to a number of sponsors and would like to do more research on certain
products. Examples:</p>
<ul>
<li><a href="https://cloud.google.com">Google Cloud</a>: so far my focus has been on AWS and
Azure, but Google&rsquo;s cloud offering might also be interesting.</li>
<li><a href="https://logz.io/">Logz.io</a>: instead of managing our own Elastic stack and
metrics collection + visualization, we might be able to use logz.io for things
we want to run in the cloud. Apparently you can also specify that you want
your data to stay within the EU, which is a plus.</li>
<li><a href="https://www.pulumi.com/">Pulumi</a>: So far I have used Ansible, Terraform and
CloudFormation for my infrastructure-as-code needs. Pulumi allows you to code
in e.g. Python instead of YAML or a domain specific language.</li>
<li><a href="https://rancher.com/">Rancher</a>: although the projects I&rsquo;m involved in do not
use Kubernetes at the moment, they might in the future. And then it might be
useful to see what Rancher can do for us.</li>
<li><a href="https://www.sonatype.com/">Sonaytpe</a>: detect components with a known
vulnerability in your stack.</li>
</ul>
<h2 id="other-conferences">Other conferences</h2>
<p>During the ignites on the second day, a few other conferences were
mentioned:</p>
<ul>
<li><a href="https://www.deliveryconf.com/">Delivery Conf</a>: 21 &amp; 22 January 2020, Seattle, WA, USA</li>
<li><a href="https://archive.fosdem.org/2020/">FOSDEM</a>: 1 &amp; 2 February 2020, Bruxelles, Belgium</li>
<li><a href="https://cfgmgmtcamp.eu/ghent2020/">Configuration Management Camp</a>: 3&ndash;5 February 2020, Ghent, Belgium</li>
</ul>
<h2 id="home-lab">Home lab</h2>
<p>One of the open spaces I joined was about home labs. I only have a small setup
at home, but I did get a few ideas out of this session that may be worth
checking out.</p>
<ul>
<li><a href="https://nextcloud.com/">Nextcloud</a></li>
<li>Have my Synology NAS backup stuff to AWS Glacier</li>
<li><a href="https://www.plex.tv/">Plex</a>; perhaps I can use this to make my DVD collection
(which is now gathering dust) accessible again?</li>
</ul>
<p>But the most important question, in my opinion, that was asked during this
session: <q>do you have a disaster recovery plan for your home lab?</q></p>
<p>What if I&rsquo;m not around and something breaks down, like the WiFi, how does my
family get things up and running again? Spoiler: they probably won&rsquo;t. And this
is not their fault. I made things more complex than needed (from their
perspective that is) and failed to provide instructions on how to solve issues.</p>
<h2 id="miscellaneous">Miscellaneous</h2>
<p>On meetings:</p>
<ul>
<li><a href="https://agilecoffee.com/leancoffee/">Lean Coffee</a>: an interesting, lightweight meeting format</li>
<li><a href="https://medium.com/@agileGeorge/power-start-your-meetings-fcdeab634bf3">POWER start</a>:
a meeting facilitation technique to increase the effectiveness of meetings</li>
</ul>
<p>On toil:</p>
<ul>
<li>Read up on the subject of toil: Google&rsquo;s SRE book, chapter 5:
<a href="https://sre.google/sre-book/eliminating-toil/">Eliminating toil</a></li>
<li>Learn to better recognize toil and record it (what is it, what does it cost
in time, energy, etc and what is the frequency)</li>
<li>Make time to eliminate toil</li>
<li>Read up on, and think about, <a href="https://www.hashicorp.com/resources/what-is-mutable-vs-immutable-infrastructure">immutable infrastructure</a>
and see if we can use it to remove toil</li>
</ul>
<p>Random, unrelated stuff:</p>
<ul>
<li>Look at <a href="https://pypi.org/project/cfn-lint/">CloudFormation Lint</a></li>
<li>Read the <a href="https://www.weave.works/technologies/gitops/">GitOps</a> article by Weaveworks</li>
</ul>
<p>Something that was said during an open space about testing infrastructure-as-code:</p>
<blockquote>
<p>You deploy infrastructure not to have that infrastructure, but to run an application on top of.</p></blockquote>
<p>I don&rsquo;t recall who mentioned it, when and what the context was, but
<a href="https://www.reddit.com/r/devops">r/devops</a> might be fun to read.</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Microsoft Ignite | The Tour: Amsterdam — day one]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2019/03/20/microsoft-ignite-the-tour-amsterdam-day-one/" type="text/html" />
    <id>https://markvanlent.dev/2019/03/20/microsoft-ignite-the-tour-amsterdam-day-one/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="azure" />
    <category term="cloud" />
    <category term="devops" />
    <category term="serverless" />
    <category term="tools" />
    
    <updated>2021-11-09T20:09:33Z</updated>
    <published>2019-03-20T00:00:00Z</published>
    <content type="html"><![CDATA[<p><em>Microsoft Ignite | The Tour: Amsterdam</em> is a two day tech conference organized by
Microsoft. On this first day I attended the talks in the &ldquo;Building your
application for the cloud&rdquo; learning path.</p>
<p>(On the <a href="/2019/03/21/microsoft-ignite-the-tour-amsterdam-day-two/">second day</a>
I followed the sessions of the &ldquo;Operating applications and infrastructure in the
cloud&rdquo; learning path.)</p>
<p><img src="/images/mitta2019_welcome.jpg" alt="Welcome to Microsoft Ignite | The Tour: Amsterdam"></p>
<h2 id="designing-resilient-cloud-applications--jeremy-likness">Designing resilient cloud applications &mdash; Jeremy Likness</h2>
<p>Most of the things in this talk allow you to scale your app without changing
your application itself.</p>
<p>We want to design for security. So instead of relying on e.g. environment
variables to distribute secrets, you are better off using a centralized solution,
like <a href="https://azure.microsoft.com/en-us/services/key-vault/">Azure Key Vault</a>.</p>
<p>Some of its features:</p>
<ul>
<li>You can version your secrets</li>
<li>Manage all secrets in one place</li>
<li>Manage secrets across environments (dev, QA, production)</li>
<li>Easy to integrate</li>
</ul>
<p>Use <a href="https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview">Managed identities</a>
(formerly &ldquo;Managed Service Identity&rdquo; or MSI) on your VM, app service or function
to authenticate to Azure Key Vault.</p>
<p>To make your database more resilient, you can use
<a href="https://azure.microsoft.com/en-us/services/cosmos-db/">Cosmos DB</a>,
which has features like:</p>
<ul>
<li>Global distribution (get the DB as close to you as possible, without having to
change connection strings)</li>
<li>Elastic scale</li>
<li>Consistency ranging from strong (wait until every replica is up to date) to
&ldquo;eventually consistent&rdquo; (it might take a while until all the replicas are up to
date).</li>
</ul>
<p>Failovers can be done automatically and manually. But whatever you choose, you
don&rsquo;t have to touch your application. It is possible (and easy) to have a multi
master setup. (It is more expensive though.)</p>
<p>There are several extensions for VS Code to connect to e.g. Cosmos DB from
within VS Code. This means you could edit data from within VS Code.
However, it might be better to hand out read-only credentials for your
production database.</p>
<p><a href="https://azure.microsoft.com/en-us/services/app-service/">Azure App Service</a> is
a managed platform that makes it easy to run your application (like .NET, .NET
Core, Node.js, Java or Python). It makes scaling up and scaling out on the fly
easy. Even better: you can configure your application to autoscale.</p>
<p>Check out the <a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-azureextensionpack">Azure Extension Pack</a>
extension for VS Code. It has a lot of useful features like connecting with
your Cosmos DB, as mentioned above, but you can also do things like deploying
your application from within your editor.</p>
<p><a href="https://azure.microsoft.com/en-us/product-categories/storage/">Azure Storage</a> is useful
for static things you want stored in the cloud, e.g. blobs, tables, files and
queues. <a href="https://azure.microsoft.com/en-us/blog/static-websites-on-azure-storage-now-generally-available/">Azure Static Sites</a>
are currently in preview. It allows you to serve static files via a web server.
Even the right MIME types are returned.</p>
<p><img src="/images/mitta2019_jeremy_likness_1.jpg" alt="Jeremy Likness about the Azure Front Door Service"></p>
<p>To have a resilient architecture, you&rsquo;ll have to have the service available
across multiple regions. Use <a href="https://azure.microsoft.com/en-us/services/frontdoor/">Azure Front Door Service</a>
(currently in preview). It can be used with <a href="https://azure.microsoft.com/en-us/services/traffic-manager/">Traffic Manager</a>.
In the Front Door designer there are &ldquo;frontend hosts&rdquo; (domains the service is
hosted on), &ldquo;backend pools&rdquo; (the available backends) and &ldquo;routing rules&rdquo; which
map frontend hosts to backend pools based on path patterns (e.g.
<code>/api/products/.*</code>).</p>
<p>Additional resources:</p>
<ul>
<li><a href="https://github.com/Microsoft/IgniteTheTour/tree/master/DEV%20-%20Building%20your%20Applications%20for%20the%20Cloud/DEV10">Code</a></li>
<li><a href="https://docs.microsoft.com/en-us/learn/modules/manage-secrets-with-azure-key-vault/">Manage secrets in your server apps with Azure Key Vault</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/frontdoor/">Azure Front Door Documentation</a></li>
</ul>
<h2 id="deploying-your-application-faster-and-safer--damian-brady">Deploying your application faster and safer &mdash; Damian Brady</h2>
<p>Damian Brady uses the analogy of a pit stop in 1905 compared to one in 2013.
Summary: much faster, more people involved.</p>
<p>What is &ldquo;DevOps&rdquo;? There are a number of different definitions. At Microsoft it
is defined as:</p>
<blockquote>
<p>DevOps is the union of people, process and products to enable continuous
delivery of value to our end users.</p></blockquote>
<p>Why DevOps is important:</p>
<ul>
<li>Increases velocity</li>
<li>Decreases downtime and human error</li>
<li>Your competitors are already doing this</li>
</ul>
<p>Have a look at the <a href="https://puppet.com/resources/?query=state%20of%20devops">State of DevOps Report</a>. It is
a yearly report full of interesting information. The report compares the high
performing teams with low performing teams. The high performers have a 46
times higher deployment frequency, fail less frequently, fix failures 2555 times
faster, etc. It&rsquo;s a great report to convince your manager to change things.</p>
<p>Development used to toss software over the wall to the operations team. When
things go wrong, people tend to blame the other team. Developers want change but
operations want to have stability (in other words: not change anything)&mdash;the
teams have opposite incentives.</p>
<p>To change this, you&rsquo;ll need a process. And you&rsquo;ll need good products to help you
with the process. <a href="https://azure.microsoft.com/en-us/services/devops/">Azure DevOps</a>
can do everything you need.  Fortunately Microsoft does allow you to use your
current products as well.</p>
<p><img src="/images/mitta2019_damian_brady.jpg" alt="Damian Brady showing Azure DevOps can be used in combination with many other products"></p>
<p>Azure DevOps components:</p>
<ul>
<li><a href="https://azure.microsoft.com/en-us/services/devops/boards/">Azure Boards</a>: track work</li>
<li><a href="https://azure.microsoft.com/en-us/services/devops/pipelines/">Azure Pipelines</a>: CI/CD</li>
<li><a href="https://azure.microsoft.com/en-us/services/devops/repos/">Azure Repos</a>: Git repos</li>
<li><a href="https://azure.microsoft.com/en-us/services/devops/test-plans/">Azure Test Plans</a>: coordinate your testing efforts</li>
<li><a href="https://azure.microsoft.com/en-us/services/devops/artifacts/">Azure Artifacts</a>: build artifacts storage</li>
</ul>
<p>This talk will demo Azure Pipelines.</p>
<p>Azure Pipelines is on the <a href="https://github.com/marketplace/azure-pipelines">GitHub Marketplace</a>.
It is free, assuming you stay within the limits set.</p>
<p>You can configure your Pipeline in your browser and by doing so, a file called
<code>azure-pipelines.yml</code> is created in your repository. This immediately creates a
build check in GitHub.</p>
<p>Build configuration is similar to deployment configuration.</p>
<p>You can have multiple stages and have pre-deployment conditions between them.
This way you can for instance make sure that person X or group Y has to approve
the deployment to production.</p>
<p>You can have build artifacts, which you can use in your build pipeline. These
artifacts are not available externally&mdash;they are part of the release pipeline.
If you need more persistent artifacts, you&rsquo;ll want to use Azure Artifacts.</p>
<p>You can configure canary deployments and do so in different ways. In this demo
&ldquo;deployment slots&rdquo; are used. They allow you to create a duplicate deployment and
direct a part of the traffic to the cloned slot (canary environment).</p>
<p><a href="https://launchdarkly.com/">LaunchDarkly</a> allows you to roll out based on many
more criteria (e.g. regional, a specific customer, etc). Note that this is a
paid service.</p>
<p>Manual approval can be replaced by a so called deployment gate. These deployment
gates are automated approval processes. You can perform a number of checks
(security and compliance assessment, work items, Azure Monitor Alerts or invoke
a REST API or Azure Function). When they are successful, the application is deployed,
otherwise not. This makes deployment faster and safer.</p>
<p>Additional resources:</p>
<ul>
<li><a href="https://github.com/Microsoft/IgniteTheTour/tree/master/DEV%20-%20Building%20your%20Applications%20for%20the%20Cloud/DEV20">Code</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/devops/">Azure DevOps documentation</a></li>
<li><a href="https://docs.microsoft.com/en-us/devops/">DevOps Resource Center</a></li>
</ul>
<h2 id="detecting-application-anomalies-with-telemetry--jason-hand">Detecting application anomalies with Telemetry &mdash; Jason Hand</h2>
<p>A demonstration of <a href="https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview">Azure Application Insights</a>.</p>
<p>Jason Hand is using the analogy of a car: if it breaks down (e.g. runs out of
gas), it becomes useless. You&rsquo;ll want to prevent this. Cars have dashboards to
warn if things go out of bounds.</p>
<p><img src="/images/mitta2019_jason_hand_1.jpg" alt="Jason Hand about cars that have dashboards to warn if things go out of bounds"></p>
<p>Application Insights has a lot of tools to help you monitor your application.
Going back to the car analogy: it&rsquo;s like having a mechanic with tools in the
vehicle with you. It has, among other things,
<a href="https://docs.microsoft.com/en-us/azure/azure-monitor/app/proactive-diagnostics">Smart Detection</a>
to warn about performance problems and failures. Something else it provides is
<a href="https://azure.microsoft.com/en-us/services/azure-maps/">Application Map</a> where
you can more easily spot performance issues.</p>
<p>More in depth information in his other talks:</p>
<ul>
<li><a href="/2019/03/21/microsoft-ignite-the-tour-amsterdam-day-two/#monitoring-your-infrastructure-and-applications-in-production-----jason-hand">Monitoring your infrastructure and applications in production</a></li>
<li><a href="/2019/03/21/microsoft-ignite-the-tour-amsterdam-day-two/#troubleshooting-failure-in-the-cloud-----jason-hand">Troubleshooting failure in the cloud</a></li>
</ul>
<p>Additional resources:</p>
<ul>
<li><a href="https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview">Application Insights documentation</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/traffic-manager/traffic-manager-manage-profiles">Manage an Azure Traffic Manager profile</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-overview">Analytics in Application Insights</a></li>
</ul>
<h2 id="selecting-the-right-data-storage-strategy-for-your-cloud-application--jeramiah-dooley">Selecting the right data storage strategy for your cloud application &mdash; Jeramiah Dooley</h2>
<p>It is important to think about your data storage. The benefits of having a
storage strategy:</p>
<ul>
<li>It facilitates an upgrade of legacy processes without running past the
operational teams supporting this.</li>
<li>It provides guardrails to keep everyone aligned.</li>
<li>To build a strategy, you have to break things down into manageable pieces.
This will help you down the line.</li>
<li>A strategy can function as a plan on how to swap pieces in and out.</li>
<li>If everyone is on board on the strategy it is easier to maintain security
posture.</li>
</ul>
<p>Azure might give you a different way to look at data storage. There are a number
of different storage options. Do note that storage is only a small part of the
whole.</p>
<p><img src="/images/mitta2019_jeramiah_dooley_1.jpg" alt="Jeramiah Dooley"></p>
<p>Storage and compute are abstracted away more and more these days, but everything
eventually depends on the storage sitting beneath it. If your storage breaks,
you will have a bad day.</p>
<p>Why not use a relational database to store all data? By using other options, we
may make the application more granular to deploy and/or give developers more
control.</p>
<p>Different kinds of data:</p>
<ul>
<li>Structured data: this is where we came from with relational databases.</li>
<li>Semi-structured data: this is data that <em>is</em> structured, but cannot be fit
into a table that easily.</li>
<li>Unstructured data: for example video and images.</li>
</ul>
<p>Different properties of data:</p>
<ul>
<li>Volume: how big is it going to be?</li>
<li>Velocity: how much is it going to change?</li>
<li>Variety: how much different kinds of data will you have?</li>
</ul>
<p>Strategies:</p>
<ul>
<li>Storage driven: the operations team or the business decides on the storage and
development will have to use it. This means developers need to know a lot of
low-level details about the storage. And we probably don&rsquo;t want that.</li>
<li>Cloud-driven: deploy storage to what makes sense. Not much better for
development, the main difference is that the storage is not on premise.</li>
<li>Function-driven: build what you need, storage comes with it.</li>
</ul>
<p>An example of function driven approach is building a search functionality. We
could implement it as full-text search on our existing SQL database. However,
this has an impact on the production database. If we would use <a href="https://azure.microsoft.com/en-us/services/search/">Azure
Search</a>
(search-as-a-service), we would not have to worry about the storage or paying
for storage we don&rsquo;t use.</p>
<p>Data architectures summary:</p>
<ul>
<li>More complex and more options than in the past</li>
<li>Easier to choose, especially based on function</li>
<li>More direct access by developers</li>
<li>More control over experience and cost</li>
</ul>
<p>Additional resources:</p>
<ul>
<li><a href="https://docs.microsoft.com/en-us/learn/modules/choose-storage-approach-in-azure/">Choose a data storage approach in Azure</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/search/">Azure Search Documentation</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/graph/graph-introduction">Introduction to Azure Cosmos DB: Gremlin API</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/data-lake-analytics/">Azure Data Lake Analytics Documentation</a></li>
</ul>
<h2 id="investing-in-serverless-less-servers-more-code--jeremy-likness">Investing in Serverless: less servers, more code &mdash; Jeremy Likness</h2>
<p>On premise infrastructure requires you to answer a lot of questions, like:</p>
<ul>
<li>What media should I use to keep backups?</li>
<li>How can I scale my app?</li>
<li>Who monitors my servers?</li>
<li>What happens if the power goes out?</li>
<li>Who has physical access to my servers?</li>
</ul>
<p>Moving to infrastructure as a service still means dealing with a bunch of
questions, but less lower level. You pay for the service of someone else
worrying about the hardware, access, etc. You are left with questions like:</p>
<ul>
<li>How can I scale my app?</li>
<li>How often should I patch my servers?</li>
<li>How do I deploy new code to my servers?</li>
</ul>
<p>Platform as a service means even higher level questions:</p>
<ul>
<li>What is the right size of my server?</li>
<li>How many servers do I need?</li>
</ul>
<p>With serverless, you are down to a single question: how do I architect my app?
You focus on the event that happened (a request was sent to an endpoint) not on
the whole infrastructure to make that happen.</p>
<p>What is serverless (according to Jeremy)?</p>
<ul>
<li>Abstraction of servers</li>
<li>Event driven / instant scale</li>
<li>Micro-billing (focus on what you are using)</li>
</ul>
<p>Checklist to determine if something is serverless:</p>
<ul>
<li>Is it capable of running entirely in the cloud?</li>
<li>Does it run and scale without configuring a VM/cluster?</li>
<li>Do I only get billed for active invocations?</li>
</ul>
<p><img src="/images/mitta2019_jeremy_likness_2.jpg" alt="Jeremy Likness with an overview of serverless components in Azure"></p>
<h3 id="functions">Functions</h3>
<p>Functions: you pay for functions that get called and consume memory, not for
servers. You don&rsquo;t care how much machines are needed to handle the number of
requests.</p>
<p>Functions have triggers and bindings. Triggers are things like blob storage,
Cosmos DB, HTTP, timer and a webhook. Bindings allow you to work with resources
(like files, tables, emails, notifications).</p>
<p>Example: a file is added to storage, a function parses and transforms the file
and stores a chart graphic.</p>
<h3 id="event-grid">Event grid</h3>
<p>Managing events is cumbersome. Event grid can help you. It offers:</p>
<ul>
<li>Fully managed event routing to get a message from A to B.</li>
<li>Near real-time event delivery at scale.</li>
<li>Broad coverage within Azure and beyond.</li>
</ul>
<p>You can focus on the messages. The infrastructure ensures reliability and
performance. It can, for instance, handle ten million events per second per
region.</p>
<p>Event grid delivers the event to you; you never have to go out to grab events.</p>
<p>Scenarios:</p>
<ul>
<li>Serverless apps</li>
<li>Ops automation</li>
<li>Application integration</li>
</ul>
<p>Durable functions are an extension to functions for stuff that e.g. has to wait
for an asynchronous event. They are paused, but state is stored. And you are
only billed for the time the function is actually doing things; you don&rsquo;t pay
when the function is paused.</p>
<p>Durable function patterns:</p>
<ul>
<li>Sequential asynchronous calls</li>
<li>Fan out / fan in</li>
<li>Human approval</li>
<li>Ongoing monitoring</li>
</ul>
<h3 id="logic-apps">Logic apps</h3>
<p>Logic apps are the integration engine that connect things together. They allow
you to design workflows and processes. For example: when a new product is added,
an email is sent to the products team to add an image, etc.</p>
<p>Logic apps also have triggers.</p>
<p>Additional resources:</p>
<ul>
<li><a href="https://github.com/Microsoft/IgniteTheTour/tree/master/DEV%20-%20Building%20your%20Applications%20for%20the%20Cloud/DEV50">Code</a></li>
</ul>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Open Source Summit Europe 2018: day one]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2018/10/22/open-source-summit-europe-day-one/" type="text/html" />
    <id>https://markvanlent.dev/2018/10/22/open-source-summit-europe-day-one/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="cloud" />
    <category term="conference" />
    <category term="devops" />
    <category term="logging" />
    <category term="monitoring" />
    <category term="serverless" />
    <category term="tools" />
    
    <updated>2021-10-26T18:57:58Z</updated>
    <published>2018-10-22T00:00:00Z</published>
    <content type="html"><![CDATA[<p>The first day of the Open Source Summit Europe 2018.</p>
<p><em>These are just notes. They are not proper summaries of the talks.</em></p>
<h2 id="a-day-in-the-life-of-a-log-message-navigating-a-modern-distributed-system--kyle-liberti--josef-karasek-red-hat">A Day in the Life of a Log Message: Navigating a Modern Distributed System &mdash; Kyle Liberti &amp; Josef Karasek (Red Hat)</h2>
<p>Abstracted tools help us to make systems manageable. We layer abstractions on
top of each other.</p>
<p>Kafka is a publish/subscribe messaging system. It decouples the source of the
messages from the system where they are needed.</p>
<p><img src="/images/osse18_kyle_liberti_and_josef_karasek.jpg" alt="Integrate distributed logging with Kafka"></p>
<p>Origin aggregated logging is a part of <a href="https://www.okd.io/">OKD</a>. It is based
on Elasticsearch, Fluentd and Kibana (EKF).</p>
<p>Taking a look at the journey of a log message, it first encounters a log
collector. This component can tag and enrich log messages. The message then goes
to a Kafka source connector, which imports data from external systems into Kafka
brokers. (There are many types of connectors.) These brokers are like post
boxes: messages are delivered there and other systems can pull them out.
Messages written to topics. Finally a Kafka sink connector is used to export
broker data to external systems, for instance Elasticsearch.</p>
<p>Kafka is not a cloud native application. Strimzi Operators integrate Kubernetes,
OKD and Kafka; it manages the Kafka deployment. The most important operator is
the cluster operator which manages Kafka, Kafka Connect, Zookeeper and
MirrorMaker.</p>
<p>(<a href="https://events19.linuxfoundation.org/wp-content/uploads/2017/12/A-Day-in-the-Life-of-a-Log-Message-Navigating-a-Modern-Distributed-System-Kyle-Liberti-Josef-Karasek-Red-Hat-1.pdf">Slides</a>)</p>
<h2 id="aiops-anomaly-detection-with-prometheus--marcel-hild-red-hat">AIOps: Anomaly Detection with Prometheus &mdash; Marcel Hild (Red Hat)</h2>
<p>A quick intro to <a href="https://prometheus.io/">Prometheus</a>: Prometheus can pull
metrics from targets and store them in a time series database. It will push
alerts to the AlertManager, based on rules you specify.</p>
<p>For machine learning we need data. Prometheus is not configured to keep your
data for a long term. <a href="https://github.com/thanos-io/thanos">Thanos</a> is a
project for reliable historical data storage. Until it is production ready, you
can use <a href="https://www.influxdata.com/products/influxdb-overview/">Influxdb</a>.
Unfortunately it eats RAM for breakfast. You could instead store your metrics
using <a href="https://ceph.com/">Ceph</a>. This is also a future proof solution as it
provides a path to Thanos.</p>
<p><img src="/images/osse18_marcel_hild.jpg" alt="Marcel Hild about experimenting with collected data"></p>
<p><a href="https://facebook.github.io/prophet/">Prophet</a> is a Python library to predict
future data and dynamic thresholds.</p>
<p>Interesting links:</p>
<ul>
<li><a href="https://github.com/AICoE/prometheus-data-science">Data Science on Prometheus Metrics</a></li>
<li><a href="https://github.com/AICoE/prometheus-anomaly-detector">Prometheus Anomaly Detector</a></li>
</ul>
<p>(<a href="https://events19.linuxfoundation.org/wp-content/uploads/2017/12/AIOps-Anomaly-Detection-with-Prometheus-Marcel-Hild-Red-Hat.pdf">Slides</a>)</p>
<h2 id="lifecycles-versions-and-system-administration-oh-my--adam-samalik-red-hat">Lifecycles, Versions, and System Administration, Oh My! &mdash; Adam Samalik (Red Hat)</h2>
<p>Packaging makes software integrated, tested, updated and easily installable.
Linux distributions pick versions of packages and put them in the same
lifecycle.</p>
<p><img src="/images/osse18_adam_samalik.jpg" alt="Adam Samalik about packaging"></p>
<p>Containers are great, but they are not the solution for this problem. <a href="https://docs.fedoraproject.org/en-US/modularity/">Fedora
Modularity</a> tries to provide a
solution. Its core concepts are:</p>
<ul>
<li>Packages: the core building blocks of Linux distributions</li>
<li>Modules: logical groups of packages on independent lifecycles</li>
<li>Defaults: you can use a specific version only when you want to</li>
<li>Updates: respect your choice and won&rsquo;t automatically upgrade to a different stream.</li>
</ul>
<p>The true benefits of containers are that you can run them (almost) anywhere and
build and test the images upfront. With apps in containers, the OS can be
immutable (see <a href="https://getfedora.org/coreos">CoreOS</a>,
<a href="https://silverblue.fedoraproject.org/">Silverblue</a>).</p>
<h2 id="introducing-openfaas-cloud-a-developer-friendly-cicd-pipeline-for-serverless--alex-ellis-openfaas-project--vmware">Introducing OpenFaaS Cloud, a Developer-Friendly CI/CD Pipeline for Serverless &mdash; Alex Ellis (OpenFaaS project / VMware)</h2>
<p><a href="https://www.openfaas.com/">OpenFaaS</a>, functions as a service; serverless on
your terms. Used by dozens of companies.</p>
<p>Serverless is an architectural pattern. How do you arrange your compute and how
do you use it?</p>
<p><img src="/images/osse18_alex_ellis.jpg" alt="Alex Ellis about application evolution"></p>
<p>Functions:</p>
<ul>
<li>are short lived</li>
<li>have a single purpose</li>
<li>have no state</li>
</ul>
<p>These properties allow them to auto-scale.</p>
<p>Core values of OpenFaaS:</p>
<ul>
<li>Focus on developers first</li>
<li>Operator friendly; simple as possible to get it up and running, no magic
inside</li>
<li>Community centric</li>
</ul>
<p>(<a href="https://events19.linuxfoundation.org/wp-content/uploads/2017/12/Introducing-OpenFaaS-Cloud-a-Developer-Friendly-CICD-Pipeline-for-Serverless-Alex-Ellis-OpenFaaS-project-VMware.pdf">Slides</a>)</p>
<h2 id="automated-testing-for-infrastructure-as-a-code--florian-winkler-b1-systems-gmbh">Automated Testing for Infrastructure-as-a-code &mdash; Florian Winkler (B1 Systems GmbH)</h2>
<p>What (kind of) tools do we use? A lot!</p>
<ul>
<li>Source control (Git, SVN)</li>
<li>Predefined installation (Kickstart / autoYAST / preseed)</li>
<li>Software and images (Koji, open build service, Kiwi)</li>
<li>Installation tools (e.g. Cobbler, the Foreman)</li>
<li>Configuration management (Puppet, Chef, Ansible)</li>
<li>Enterprise tools (Red Had Satellite, SUSE Manager, Spacewalk)</li>
<li>Containers (LXC, Docker, etc)</li>
<li>IaaC tools (docker-compose, Docker swarm, Kubernetes, Vagrant, Terraform)</li>
<li>CI/CD (Jenkins, GitLab CI)</li>
</ul>
<p>Don&rsquo;t just use a tool and let it define your work. Define a goal, determine how
to achieve the goal and pick the tools that match what you actually need so they
work for you.</p>
<blockquote>
<p>Make use of automation, as much as you can.</p></blockquote>
<p><img src="/images/osse18_florian_winkler.jpg" alt="Florian Winkler about DevOps"></p>
<p>You can use a number of workflows:</p>
<ul>
<li>SCM polling: check if there is a commit and then start the build.</li>
<li>Web hook: the SCM server hook triggers the build.</li>
<li>External trigger: calling a URL which triggers the build.</li>
<li>Ticket based workflow: updating a ticket triggers a new build.</li>
</ul>
<p>(<a href="https://events19.linuxfoundation.org/wp-content/uploads/2017/12/Automated-Testing-for-Infrastructure-as-a-code-Florian-Winkler-B1-Systems-GmbH.pdf">Slides</a>)</p>]]></content>
  </entry>
</feed>
