<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Posts tagged with “Go” on Mark van Lent’s weblog</title>
  <updated>2025-06-08T00:00:00+00:00</updated>
  <link rel="self" type="application/atom+xml" href="https://markvanlent.dev/tags/go/index.xml" hreflang="en"/>
  <id>tag:markvanlent.dev,2010-04-02:/tags/go/index.xml</id>
  <link rel="alternate" type="text/html" href="https://markvanlent.dev/tags/go/" 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[Full circle: rediscovering my joy in software engineering]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2025/06/08/full-circle-rediscovering-my-joy-in-software-engineering/" type="text/html" />
    <id>https://markvanlent.dev/2025/06/08/full-circle-rediscovering-my-joy-in-software-engineering/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="development" />
    <category term="go" />
    <category term="personal" />
    <category term="python" />
    
    <updated>2025-06-08T16:08:56Z</updated>
    <published>2025-06-08T00:00:00Z</published>
    <content type="html"><![CDATA[<p>This is a different kind of post than I normally write here. Most other posts
are about a problem I ran into or a conference I visited. This time is more a
story telling post. I though it would be nice to have a sort of summary of what
kind of work I have been doing for the last decade.</p>
<p>For years I&rsquo;ve have had a page <a href="/about/me">about me</a> which tells a bit of my
background and past and present jobs. In this post I would like to zoom in on,
roughly, the last thirteen years and write a bit about how my work and interests
evolved.</p>
<h2 id="software-developer">Software developer</h2>
<p>Let&rsquo;s start with my job at <a href="https://www.fox-it.com/">Fox-IT</a>, the company I
joined as a
<a href="https://www.djangoproject.com/">Django</a>/<a href="https://www.python.org/">Python</a>
developer mid 2013. I started building a portal for the customers of their
managed <a href="https://en.wikipedia.org/wiki/Security_operations_center">SOC</a> service
and I figured that&mdash;once this portal was done&mdash;I would find something else
within Fox to work on. However, this project only grew in functionality and even
became the tool used by the SOC analysts to get alerted on new incidents and
start their analysis in. I think all in all I spent the first four to five years
at Fox working on this platform on a daily basis.</p>
<p>Meanwile, due to organisational changes, my team was supposed to become less
dependant on a different business unit and as a ressult we would need to manage
our own infrastructure more. I&rsquo;ve always been interested in that kind of work,
so I started picking that up. And due to my background as a developer I wanted
to automate as much as possible. As a result my days started to become more an
more about creating and maintaining a testing environment. (I also have to admit
that messing around with physical servers was fun, especially initially.)</p>
<h2 id="infrastructure-developer">Infrastructure developer</h2>
<p>Slowly my work had become more about the infrastructure surrounding the product
we were developing, than writing code for the product itself. In hindsight I
think it was about 2018 when I was effectively no longer a developer on the
product. Instead of implementing features I was using
<a href="https://www.packer.io/">Packer</a> to create template for machine images, writing
<a href="https://www.terraform.io/">Terraform</a> to use these images (and managing other
infrastructure) and using
<a href="https://en.wikipedia.org/wiki/Ansible_(software)">Ansible</a> to help deploy the
product, et cetera.</p>
<p>Did I overengineer it? Probably. Did I like it and have I learned a lot from it?
Definitely!</p>
<p>Because I dislike the term &ldquo;DevOps engineer&rdquo;, I decided to call myself an
&ldquo;infrastructure developer&rdquo;. (Though I have to admit that on my CV and social
media profiles I used the title DevOps engineer when I was applying for a new
job since&mdash;whether I liked it or not&mdash;that is a more familiar term.) Looking
back to this now, there was also a clue hidden in there, but I&rsquo;ll get back to
that.</p>
<p>Since I was the only person doing this kind of work for my team, the
organisation figured it would be good to pair up with a colleague who was doing
similar kind of work for a different team to have some redundancy. While in
practice this did not work that well (yes, we had a similar role, but the
platforms and infrastructure were too diverse), it did lead to a new
opportunity.</p>
<p>A different team needed an extra person to help create a self-service, on-demand
environment to perform digital forensic investigations in. And given my interest
in cloud infrastructure (AWS) and my experience, I was a nice fit. I really
liked that project, learned a lot and enjoyed myself. And I wanted to do more of
this kind of work. However, this meant I had to look elsewhere.</p>
<h2 id="mission-critical-engineer">Mission Critical Engineer</h2>
<p>And that is how I ended up at <a href="https://schubergphilis.com/">Schuberg Philis</a> as
a mission critical engineer. As I had expected, this role is heavily operations
focussed. In my case, I helped to <a href="https://schubergphilis.com/how-we-work/plan-build-run">plan, build and
run</a> AWS infrastructure
for one of our customers. Unfortunately it was mostly &ldquo;run&rdquo; though. Don&rsquo;t get me
wrong, I definitely leveled up my AWS skills and genuinely enjoyed my time in
that team. But&hellip;</p>
<p>At a certain point in time our customer wanted to add an existing application to
their mission critical environment. Since it was a Python application (a Lambda
actually) I volunteered to help improve the application so it would be in a
state where we felt comfortable to offer 100% uptime and 24/7 support. Only then
did I realise what I was missing: software development and the joy that it gave
me.</p>
<p>Sure, I had been doing operations related work in the past, but in hindsight
most of the time I was still developing. Not building an application perhaps,
but infrastructure. I had always been more of a developer than an administrator.
I guess that was also why I liked the title &ldquo;infrastructure <strong>developer</strong>&rdquo;.</p>
<p>Lucky for me I was able to switch to a different team.</p>
<h2 id="mission-critical-software-engineer">Mission Critical Software Engineer</h2>
<p>And that&rsquo;s how I ended up where I am today. Little over a year ago I switched to
a role where I can focus on writing software again. And we, as a group of
software engineers, are also responsible for running, monitoring and supporting
our own services. So thinking about infrastructure is still a (small) part of
the job.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> But the main chunk of work is software engineering.</p>
<p>One thing did change though. Where my previous development jobs had been Python
oriented, in this team we use <a href="https://go.dev/">Go</a> to write our services. This
was part of my plan: by joining a Go team, I could broaden my horizon by
learning a new language.</p>
<p>Go was not completely new to me. I had done a
<a href="/2018/06/27/devopsdays-amsterdam-2018-workshops/#go-for-ops--michael-hausenblas-red-hat">Go workshop in 2018</a>.
And I had also made an attempt to rewrite an internal Python command line
application in Go. However, I had not properly learned the language, let
alone work with it as part of my job.</p>
<p>I might write more about learning and working with Go in a future post, but that
is beyond the scope of this one. I do want to say I thouroughly enjoy being a
software engineer again and learning how to do things in a differeny language.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>We also have a couple of people in our team who are responsible for
setting up and maintaining the infrastructure we are running our services
on.&#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[FOSDEM 2025]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2025/02/01/fosdem-2025/" type="text/html" />
    <id>https://markvanlent.dev/2025/02/01/fosdem-2025/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="conference" />
    <category term="go" />
    <category term="kubernetes" />
    
    <updated>2025-06-08T15:27:48Z</updated>
    <published>2025-02-01T00:00:00Z</published>
    <content type="html"><![CDATA[<p>After years of thinking &ldquo;I should have gone&rdquo; after the fact, I finally went to
FOSDEM!</p>
<p>FOSDEM&mdash;which stands for Free and Open source Software Developers’ European
Meeting&mdash;is a free, no registration required, event held in Brussels each year.
Thousands of developers gather there to connect and share ideas. This was the
25th edition.</p>
<p>Below are the notes I took during the talks I attended.</p>
<h2 id="the-state-of-go--maartje-eyskens">The state of Go &mdash; Maartje Eyskens</h2>
<p>This is the eleventh edition of the Go devroom at FOSDEM. It&rsquo;s the first time
the Go devroom is bigger than the Python devroom. (By the way: Rust has the biggest one this
year.)</p>
<p>Go itself is 15 years now (so it is definitely not a new language anymore) and
has had 25 point zero releases. Go has a stable API, a strong and stable
standard library, dependency management and generics.</p>
<p>Go 1.23 was released on August 13th, 2024. Go version 1.24 will be released this
month. So what has changed since last year? To name a few (Maartje mentioned
more, but I wasn&rsquo;t able to write them all down. Watch the recording if you want
to see them all):</p>
<ul>
<li><strong>Language changes</strong>
<ul>
<li>Go can now loop over three new types</li>
<li>Generic types can now be used in type aliases.</li>
</ul>
</li>
<li><strong>Tools</strong>
<ul>
<li>&ldquo;<code>go vet</code>&rdquo;: many new warnings</li>
<li>Go tooling now support JSON (e.g. &ldquo;<code>go test --json</code>&rdquo;).</li>
<li>Go sets binary version based on VCS: &ldquo;<code>debug.ReadBuildInfo()</code>&rdquo; (use
&ldquo;<code>--buildvcs=false</code>&rdquo; to disable the <code>dirty</code> flag)</li>
<li>&ldquo;<code>go tool</code>&rdquo;: add tools used in builds in <code>go.mod</code>.</li>
<li>Go telemetry is still opt-in. Use &ldquo;<code>go telemetry on</code>&rdquo; and &ldquo;<code>go telemetry off</code>&rdquo; to
switch it on and off. The Go team believes that telemetry will play a
critical role in helping Go development.</li>
</ul>
</li>
<li><strong>Standard lib</strong>
<ul>
<li>Several new helpers for <code>iter</code> functions</li>
<li>Support for quantum proof key exchanges</li>
<li>Bunch of modern algorithms (e.g. PBKDF2 and SHA3) moved to stable library</li>
<li>&ldquo;<code>os.OpenRoot(&quot;path&quot;)</code>&rdquo; gives you a safe file system. Even protects against symbolic links outside of path.</li>
<li>JSON encoding supports new <code>omitzero</code></li>
<li>New <code>unique</code> package for faster comparison.</li>
</ul>
</li>
<li><strong>Runtime</strong>
<ul>
<li>Swiss maps</li>
</ul>
</li>
<li><strong>Ports</strong>
<ul>
<li>Go 1.25 will require macOS Monterey or later</li>
<li>Go 1.24 has no support for Windows windows/arm</li>
<li>Go 1.24 requires Linux kernel version 3.2 or later (released in 2012)</li>
</ul>
</li>
</ul>
<p>Go conferences this year:</p>
<ul>
<li>Go devroom @ FOSDEM 2025 (today)</li>
<li>Gophercon Latam Brazil (May 5–6)</li>
<li>GopherCon Europe Berlin (June 16–19)</li>
<li>Gophercon New York (August 26–28)</li>
</ul>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-5353-the-state-of-go/">The state of Go</a></p>
<h2 id="the-inner-workings-of-go-generics--anton-sankov">The Inner Workings of Go Generics &mdash; Anton Sankov</h2>
<p>Generic allow you to work with different types, while keeping type safety.</p>
<p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">func</span><span class="w"> </span><span class="nx">ToSlice</span><span class="p">[</span><span class="nx">T</span><span class="w"> </span><span class="kt">any</span><span class="p">](</span><span class="nx">a</span><span class="p">,</span><span class="w"> </span><span class="nx">b</span><span class="w"> </span><span class="nx">T</span><span class="p">)</span><span class="w"> </span><span class="nx">T</span><span class="p">[]</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="p">[]</span><span class="nx">T</span><span class="p">{</span><span class="nx">a</span><span class="p">,</span><span class="w"> </span><span class="nx">b</span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">intSlice</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">ToSlice</span><span class="p">[</span><span class="kt">int</span><span class="p">](</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">floatSlice</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">ToSlice</span><span class="p">[</span><span class="kt">float32</span><span class="p">](</span><span class="mf">1.5</span><span class="p">,</span><span class="w"> </span><span class="mf">2.5</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">// Alternative, use type inference:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">intSlice2</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nf">ToSlice</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">// Type safety: this will NOT compile:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">wrongSlice</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nf">ToSlice</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&#34;string&#34;</span><span class="p">)</span><span class="w">
</span></span></span></code></pre></div><p>Why was Go created:</p>
<ul>
<li>Simplicity (over C++)</li>
<li>Fast compilation times (over C++)</li>
<li>Fast runtime (over C++)</li>
</ul>
<p>Generics complicates all three. However, people started complaining about the
lack of generics the day after Go was introduced to the world. Generics were
proposed a bunch of times and only in 2021 a proposal was accepted.</p>

  <figure>

<blockquote cite="https://research.swtch.com/generic">
The generic dilemma is this: do you want slow programmers, slow compilers and bloated binaries, or slow execution times?
</blockquote>

  <figcaption>
    &mdash;Russ Cox, <cite><a href="https://research.swtch.com/generic">The Generic Dilemma</a></cite>
  </figcaption>
  </figure>


<p>None of the proposals contained an implementation. So more proposals were
needed. Three proposals were written, and the last one was accepted: &ldquo;GC shape
stenciling&rdquo;, which is a middle ground between stenciling (proposal 1, the C++ way) and dictionaries (proposal 2, the Java way).</p>
<p>Anton showed an example of how this works. See <a href="https://asankov.dev/go-generics/">https://asankov.dev/go-generics/</a>
for the slides, which includes a full example, or his GitHub repo:
<a href="https://github.com/asankov/go-generics">https://github.com/asankov/go-generics</a></p>
<p>This proposal still has some drawbacks though: a performance penalty in compile time and in runtime. However, there&rsquo;s only little performance impact on compile time and usually only little performance penalty in runtime.</p>
<p>The exception to the latter is when you are passing interfaces to generic
methods. In this situation, generics can have a <em>big</em> performance impact. If
this matters to you: don&rsquo;t use generics.</p>
<figure><img src="/images/fosdem2025_anton_sankov_go_generics.png"
    alt="Picture comparing generics in C, C&#43;&#43;, Java and Go"><figcaption>
      <p>Anton comparing generics in different languages (image taken from <a href="https://asankov.dev/go-generics/36?clicks=3">his slides</a>)</p>
    </figcaption>
</figure>

<p>All in all, Go is in a good place with generics.</p>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-5329-the-inner-workings-of-go-generics/">The Inner Workings of Go Generics</a></p>
<h2 id="swiss-maps-in-go--bryan-boreham">Swiss Maps in Go &mdash; Bryan Boreham</h2>
<p>Swiss Map is a new map implementation in Go 1.24.</p>
<p>The name of the way it&rsquo;s implemented is <strong>C</strong>losed <strong>H</strong>ashing. The story goes
that this is where the name &ldquo;Swiss map&rdquo; comes from: CH is the country code of
Switzerland.</p>
<p>There were lots of visuals in the presentation to explain how it works, which I
found hard to take notes on that can be understood without copying the whole
presentation alongside it. It was an interesting presentation, do watch the
video if you want to know more about the topic.</p>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-6049-swiss-maps-in-go/">Swiss Maps in Go</a></p>
<h2 id="go-ing-easy-on-memory-writing-gc-friendly-code--sümer-cip">Go-ing Easy on Memory: Writing GC-Friendly code &mdash; Sümer Cip</h2>
<p>There&rsquo;s a lot of theoretical info around garbage collection (GC), but less actual
tips and tricks. This presentation aims to be as practical as possible.</p>
<p>An example of why this topic is important: Datadog switched from Go to Rust
because their service spent 30% of CPU resources on GC
(<a href="https://www.datadoghq.com/blog/engineering/timeseries-indexing-at-scale/">source</a>).</p>
<p>Some of the tips from Sümer:</p>
<ul>
<li>Reducing size almost always has compounding benefits</li>
<li>Returning escapes to heap, calling does not (note: stack is better than heap for performance)</li>
<li><code>interface{}</code> and generics escape to heap</li>
<li>Avoid pointers! GC overhead is linear with the number of pointers.</li>
<li>Try keeping map key/values sizes under 128 bytes</li>
<li>&ldquo;Copying is expensive&rdquo; is a myth. Copying cache lines is the same as copying a pointer</li>
<li>Remember zero allocation libraries? Use them!</li>
<li>Reuse slices (e.g. <code>a = append(a[0:], 10, 20)</code> instead of <code>a = append(a, 10, 20)</code>)</li>
<li>Tune GC by using <code>GOGC</code> and <code>GOMEMLIMIT</code></li>
<li>Profile and benchmark your code</li>
</ul>
<p>Execution tracer is an underrated tool. It&rsquo;s a great cinematic visualization.
It&rsquo;s (kind of) safe to use on production: with Go 1.21 overhead drops to ~1-2%.
For more information see <a href="https://go.dev/blog/execution-traces-2024">More powerful Go execution
traces</a></p>
<p>As always: for more tips, details and background information (e.g. on memory and
garbage collection) watch the recording.</p>
<p>Other interesting talk: <a href="https://archive.fosdem.org/2018/schedule/event/faster/">Make your Go Faster</a> by Bryan
Boreham, FOSDEM 2018.</p>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-5343-go-ing-easy-on-memory-writing-gc-friendly-code/">Go-ing Easy on Memory: Writing GC-Friendly code</a></p>
<h2 id="build-better-go-release-binaries--dimitri-john-ledkov">Build better Go release binaries &mdash; Dimitri John Ledkov</h2>
<p>The focus of this talk is on Linux binaries, but may also be applicable to other
environments. It&rsquo;s basically a list of tips. I wrote these down as reminders to
later look into these in more depth.</p>
<ul>
<li>&ldquo;<code>go build -ldflags -w</code>&rdquo; to remove debug information&mdash;which is on by
default&mdash;since it is often unused in production anyway but can be quite large
in size.</li>
<li>&ldquo;<code>go build -trimpath</code>&rdquo; to prevent leaking full file paths into the binary, to
not take up space an not doing it leads to non-reproducible builds.</li>
<li>&ldquo;<code>go build -tags netgo,osusergo</code>&rdquo; (for container/portable binaries,
&ldquo;<code>CGO_ENABLED=1 go build</code>&rdquo; for explicit host OS resolution)</li>
<li>&ldquo;<code>GOAMD64=v2 GOARM64=v8.0</code>&rdquo; for production hardware that is not 20 years old,
this will improve performance of your binaries</li>
<li>&ldquo;<code>go build -buildmode=pie</code>&rdquo;: position independent code/executable can improve
security. Use this for dynamic libraries.</li>
<li>&ldquo;<code>go build -ldflags=&quot;-X main.Version=$(git describe ...)&quot;</code>&rdquo;</li>
<li>Go toolchain doesn&rsquo;t respect <code>CFLAGS</code>/<code>CXXFLAGS</code>. Use <code>CGO_CFLAGS</code>,
<code>CGO_CXXFLAGS</code>, etc.</li>
<li>Use &ldquo;<code>govulncheck -mode=binary</code>&rdquo; to report module level CVEs. If your binary has
symbol tables, it reports symbol level CVEs. If you keep your symbols in your
binaries, the vulnerability checker could check better if the vulnerability is
actually affecting you.</li>
<li>Do <strong>not</strong> use &ldquo;<code>go build -ldflags -s</code>&rdquo; Do <strong>not</strong> use &ldquo;<code>strip --strip-all</code>&rdquo;.
Verify with &ldquo;<code>go tool nm</code>&rdquo;.</li>
<li>Bump your &ldquo;<code>toolchain go1.x.y</code>&rdquo; stanza regularly. The same code built with a new
go toolchain can be safer.</li>
</ul>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-4406-build-better-go-release-binaries/">Build better Go release binaries</a></p>
<h2 id="kubernetes-outside-of-the-cloud-lessons-learned-after-3-years--nadia-santalla">Kubernetes outside of the cloud: Lessons learned after 3 years &mdash; Nadia Santalla</h2>
<p>For Nadia a self managed Kubernetes cluster, out of the cloud, is: managing your
own hardware, managing your own control plane, and not relying on external
services (like DNS).</p>
<p>A Kubernetes node is a properly configured and running <code>kubelet</code> process. A
control plane is a series of services that make Kubernetes work: an API, a
database (etcd often) and a bunch of clients using the API. These services often
run on Kubernetes itself (often on one or more dedicated machines).</p>
<p>There&rsquo;s an inception problem: if the services that run the control plane also
run in that control plane, how do we start? The answer: with a static manifest.</p>
<p>Useful tools if you want to run your own cluster:</p>
<ul>
<li>Kubeadm: generate static manifests, generating consistent config files, create
RBAC objects, create TLS certs, etc.</li>
<li>Kine (instead of etcd): etcd is not friendly to SSD lifespan. Kine can also be
deployed with Kubeadm.</li>
<li>Cilium as the CNI plugin: well documented, less hard to debug, lots of knobs
to tweak.</li>
<li>Cilium egress gateway: useful for multitenancy.</li>
<li>MetalLB: You&rsquo;ll probably need a load balancer, this is a nice one. Implements
failover using Gossip.</li>
<li>External-dns: creates A and AAAA records for ingress, load balancer servies and
custom resources. But it will <strong>not</strong> service the DNS records itself.</li>
<li>txqueuelen/stateless-dns: combines external-dns with PowerDNS. It makes
PowerDNS stateless.</li>
</ul>
<blockquote>
<p>Gitops is what Kubernetes makes it worth it.</p></blockquote>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-4387-kubernetes-outside-of-the-cloud-lessons-learned-after-3-years/">Kubernetes outside of the cloud: Lessons learned after 3 years</a></p>
<h2 id="return-of-go-without-wires--ron-evans">Return Of Go Without Wires &mdash; Ron Evans</h2>
<p>I might be selling him short by summarizing it like this, but Ron showed his
adventures with his home made &ldquo;find my&rdquo; device, using
<a href="https://tinygo.org/">TinyGo</a>. If you like fiddling around with bluetooth
devices, definitely watch the recording.</p>
<p>Related link: <a href="https://github.com/hybridgroup/go-haystack">https://github.com/hybridgroup/go-haystack</a></p>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-5907-return-of-go-without-wires/">Return Of Go Without Wires</a></p>
<h2 id="go-lightning-talks">Go Lightning Talks</h2>
<p>These are short talks (8 minutes if I recall correctly), and I only took short
&ldquo;check this out later&rdquo; notes:</p>
<ul>
<li>Check what the <a href="https://pkg.go.dev/sync">sync package</a> has to offer.</li>
<li>A go links implementation: <a href="https://github.com/tobiaskohlbau/golinks">https://github.com/tobiaskohlbau/golinks</a></li>
<li><a href="https://github.com/nikolayk812/pgx-outbox">pgx-outbox</a>, a solution for the
<a href="https://thorben-janssen.com/dual-writes/">dual write problem</a> using the
<a href="https://microservices.io/patterns/data/transactional-outbox.html">transactional outbox pattern</a></li>
<li>Generate RESTful HTTP handlers for a resource/entity with
<a href="https://github.com/dolanor/rip">https://github.com/dolanor/rip</a></li>
<li>gno, &ldquo;go for dapps, design for modularity, composability and safety&rdquo;:
<a href="https://gno.land/">https://gno.land/</a></li>
</ul>
<p>Recording: <a href="https://fosdem.org/2025/schedule/event/fosdem-2025-4609-go-lightning-talks/">Go Lightning Talks</a></p>
<h2 id="summary--reflections">Summary / reflections</h2>
<p><em>This section was added on 2025-02-02 after I have had time to reflect on what
I&rsquo;ve heard and seen.</em></p>
<p>Looking back at yesterday, I must say I liked FOSDEM. I&rsquo;ve had a great day and
was able to listen to a bunch of interesting talks (more on those in a bit). I
usually go to these kind of conferences to get inspired and that also did happen
yesterday.</p>
<p>And while I&rsquo;m not really a <a href="https://en.wiktionary.org/wiki/hallway_track">hallway track</a>
kind of person, I did find the atmosphere at the stands pleasant. More than the
&ldquo;normal&rdquo;, commercial vendor booths you see at most conferences.</p>
<p>Now, about those talks. I think my biggest takeaways are:</p>
<ul>
<li>Using generics in Go is not something to shy away from for performance reasons
(at least in most cases). I&rsquo;ll keep them more in my mind when writing code.</li>
<li>Be more aware of garbage collection. While the services I&rsquo;m working on at work
do not have any performance issues (yet), it is good to be aware of some thinks,
like reusing slices. Especially for a person rather new to Go (me) it is
useful to form good habits.</li>
<li>There are lots of ways to tweak your Go binary builds. These are definitely
worth investigating and including them in our code base.</li>
<li>On a personal note: as the owner of a Raspberry Pi Pico W I&rsquo;ve learned that I
could use TinyGo instead of MicroPython to tinker with it.</li>
</ul>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Open tabs — March 2019]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2019/03/14/open-tabs-march-2019/" type="text/html" />
    <id>https://markvanlent.dev/2019/03/14/open-tabs-march-2019/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="aws" />
    <category term="blog" />
    <category term="devops" />
    <category term="go" />
    <category term="observability" />
    <category term="monitoring" />
    <category term="sre" />
    <category term="tabs" />
    
    <updated>2021-11-09T20:09:33Z</updated>
    <published>2019-03-14T00:00:00Z</published>
    <content type="html"><![CDATA[<p>Last May I <a href="/2018/05/12/open-tabs/">published the list of tabs</a> I had
open on my phone at that moment in time. This another one of those posts.</p>
<p>I have switched phones but there were about 50 tabs open in the browser on my
old phone. This article is a selection of the pages I want to (re)read in the
future.</p>
<h2 id="go">Go</h2>
<p>I want to learn <a href="https://golang.org/">Go</a>. This is a list of resources that seem
useful:</p>
<dl>
<dt><a href="https://elsesiy.com/blog/containerization-of-golang-applications">Containerization of Golang applications</a></dt>
<dd>An example by Jonas-Taha El Sesiy (including a <code>Dockerfile</code> and <code>Makefile</code>) of how
you can deploy a Go application in a Docker image.</dd>
<dt><a href="https://golang.org/doc/effective_go">Effective Go</a></dt>
<dd>I&rsquo;ve heard positive things about this document.</dd>
<dt><a href="https://golang-for-python-programmers.readthedocs.io/en/latest/about.html">Go for Python Programmers</a></dt>
<dd>Well&hellip; I&rsquo;m a Python programmer and I want to learn Go. Nuff said. ;-)</dd>
<dt><a href="https://gobyexample.com/">Go by Example</a></dt>
<dd>Again practical examples to teach the concepts in Go. The examples are, as far
as I&rsquo;ve seen, relatively short. This is positive because it highlights the
concept at hand, but on the other hand it can be useful to have more complex
examples to get a better understanding of how concepts work together to create a
larger application.</dd>
<dt><a href="https://lets-go.alexedwards.net/">Let&rsquo;s Go! Learn to Build Professional Web Applications With Golang</a></dt>
<dd>This book promises to teach Go while building an application. I find having
practical examples helps me when learning a new programming language.</dd>
<dt><a href="https://github.com/hellerve/programming-talks">Programming Talks</a></dt>
<dd>A (community maintained) list of talks on programming language specifics.</dd>
<dt><a href="https://golang.org/ref/spec">The Go Programming Language Specification</a></dt>
<dd>It&rsquo;s always good to have the specs nearby.</dd>
</dl>
<h2 id="observability-and-monitoring">Observability and monitoring</h2>
<dl>
<dt><a href="https://www.integralist.co.uk/posts/monitoring-best-practices/">Observability and Monitoring Best Practices</a></dt>
<dd>Terminology and a set of best practices by Mark McDonnell.</dd>
<dt><a href="https://netflixtechblog.com/lessons-from-building-observability-tools-at-netflix-7cfafed6ab17">Lessons from Building Observability Tools at Netflix</a></dt>
<dd>Lessons learned from big companies usually make an interesting read. Even
though things might not apply to your situation.</dd>
<dt><a href="https://www.digitalocean.com/community/tutorials/monitoring-for-distributed-and-microservices-deployments">Monitoring for Distributed and Microservices Deployments</a></dt>
<dd>An article about the challenges of distributed architectures and adjustments
needed to be able to respond to incidents in this changed environment.</dd>
<dt><a href="https://medium.com/observability">Observability+</a></dt>
<dd>A blog with a number of interesting articles about observability.</dd>
<dt><a href="https://nickcraver.com/blog/2018/11/29/stack-overflow-how-we-do-monitoring/">Stack Overflow: How We Do Monitoring - 2018 Edition</a></dt>
<dd>This article (and Nick Craver&rsquo;s previous posts by the way) makes for
fascinating reading.</dd>
<dt><a href="https://www.linuxjournal.com/content/why-your-server-monitoring-still-sucks">Why Your Server Monitoring (Still) Sucks</a></dt>
<dd>Five reasons why your current monitoring sucks and what to do about it.</dd>
<dt><a href="https://techbeacon.com/devops/10-monitoring-talks-every-developer-should-watch">10 monitoring talks that every developer should watch</a></dt>
<dd>Enough material in here to learn from.</dd>
</dl>
<h2 id="cloud-services">Cloud services</h2>
<dl>
<dt><a href="https://nodramadevops.com/2019/01/how-many-aws-accounts-do-i-need/">How many AWS accounts do I need?</a></dt>
<dt><a href="https://nodramadevops.com/2019/01/how-should-i-organize-my-aws-accounts/">How should I organize my AWS accounts?</a></dt>
<dd>Two articles published on the #NoDrama DevOps blog about organizing your AWS account(s).</dd>
<dt><a href="https://www.awsadvent.com/2018/12/19/serverless-from-azure-to-aws/">Serverless: From Azure to AWS</a></dt>
<dd>Comparing Azure and AWS serverless offerings.</dd>
</dl>
<h2 id="other-devops-related-articles">Other devops related articles</h2>
<dl>
<dt><a href="https://medium.com/@tonistiigi/advanced-multi-stage-build-patterns-6f741b852fae">Advanced multi-stage build patterns</a></dt>
<dd>Tõnis Tiigi has a number of examples of multi-stage Docker image build
patterns.</dd>
<dt><a href="https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks">How To Use Git Hooks To Automate Development and Deployment Tasks</a></dt>
<dd>A list of available Git hooks and a demonstration on how to use hooks to
automate tasks.</dd>
<dt><a href="https://blog.gruntwork.io/open-sourcing-terratest-a-swiss-army-knife-for-testing-infrastructure-code-5d883336fcd5">Open sourcing Terratest: a swiss army knife for testing infrastructure code</a></dt>
<dd>I am using tools like <a href="https://www.terraform.io/">Terraform</a> and
<a href="https://www.packer.io/">Packer</a> quite a bit these days, but testing the code is
still something I&rsquo;m doing manually. Perhaps <a href="https://github.com/gruntwork-io/terratest">Terratest</a> is a nice solution?</dd>
<dt><a href="https://github.com/andrealmar/sre-university">SRE University</a></dt>
<dd>A list of resources related to Site Reliability Engineering.</dd>
<dt><a href="https://www.scalyr.com/blog/site-reliability-engineer">What Does a Site Reliability Engineer Do?</a></dt>
<dd>Activities an Site Reliability Engineer is participating in, according to Erik
Dietrich.</dd>
</dl>
<h2 id="blog-improvements">Blog improvements</h2>
<p>Once I get around to working on this site again, there are a few things I want
to have a look at.</p>
<dl>
<dt><a href="https://matthiasadler.info/blog/isso-comment-integration/">Bye, Bye Disqus - Say Hello to Isso</a></dt>
<dd>I am thinking about replacing the <a href="https://disqus.com/">Disqus</a> comments with
something else. <a href="https://posativ.org/isso/">Isso</a> is a contestant.</dd>
<dt><a href="https://www.sarasoueidan.com/blog/hex-rgb-to-hsl/">On Switching from HEX &amp; RGB to HSL</a></dt>
<dd>Sara Soueidan convinced me in this article that expressing colors in HSL (Hue,
Saturation and Lightness) can be an intuitive way to choose colors. I&rsquo;ll want to
keep this in mind if I overhaul the colors used on this site.</dd>
<dt><a href="https://securitytxt.org/">security.txt</a></dt>
<dd>A (proposed) standard to provide information on how to report security issues.</dd>
<dt><a href="https://www.zachleat.com/web/font-checklist/">The Font Loading Checklist</a></dt>
<dd>I like having pretty (IMHO) fonts for this site. This resource might help me
improve the use of them.</dd>
<dt><a href="https://www.fastly.com/blog/headers-we-dont-want">The headers we don&rsquo;t want</a></dt>
<dd>Time to review the response headers this site is returning.</dd>
</dl>
<h2 id="miscellaneous">Miscellaneous</h2>
<dl>
<dt><a href="https://gchq.github.io/CyberChef/">CyberChef</a></dt>
<dd><q>CyberChef is a simple, intuitive web app for carrying out all manner of
&ldquo;cyber&rdquo; operations within a web browser.</q></dd>
<dt><a href="https://charity.wtf/2019/01/04/engineering-management-the-pendulum-or-the-ladder/">Engineering Management: The Pendulum Or The Ladder</a></dt>
<dd>Another great article by Charity Majors. This time she writes about becoming
an engineering manager and career options.</dd>
<dt><a href="https://web.archive.org/web/20201112013936/https://www.mockingbirdconsulting.co.uk/blog/2019-01-05-hashicorp-at-home/">Hashicorp at Home</a></dt>
<dt><a href="https://web.archive.org/web/20201112020207/https://www.mockingbirdconsulting.co.uk/blog/2019-01-08-hashicorp-at-home-part-2/">Hashicorp at Home - Part 2</a></dt>
<dd>Matt Wallace improved his home network with <a href="https://www.vaultproject.io/">Vault</a>
(managing secret), <a href="https://www.consul.io/">Consul</a> (managing DNS and service
discovery), <a href="https://www.nomadproject.io/">Nomad</a> (managing containers),
<a href="https://traefik.io/">Traefik</a> (dynamic reverse proxy/load balancing) and
<a href="https://www.datadoghq.com/">DataDog</a> (monitoring).</dd>
<dt><a href="https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh">How To Use SSHFS to Mount Remote File Systems Over SSH | DigitalOcean</a></dt>
<dd>Basically what the title says: instructions on how to mount a file system of a
remote machine, using SSH.</dd>
<dt><a href="https://www.oreilly.com/library/view/time-management-for/0596007833/">Time Management for System Administrators</a></dt>
<dd>Something I could get better at: time management. Now to make the time to
actually read this book&hellip;</dd>
</dl>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Devopsdays Amsterdam 2018: reflection]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2018/07/04/devopsdays-amsterdam-2018-reflection/" type="text/html" />
    <id>https://markvanlent.dev/2018/07/04/devopsdays-amsterdam-2018-reflection/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="conference" />
    <category term="devops" />
    <category term="docker" />
    <category term="elastic" />
    <category term="go" />
    <category term="kubernetes" />
    <category term="opinion" />
    
    <updated>2021-10-26T18:57:58Z</updated>
    <published>2018-07-04T00:00:00Z</published>
    <content type="html"><![CDATA[<p>About a week has past since devopsdays Amsterdam. Time to write down
some of my thoughts.</p>
<h2 id="the-conference">The conference</h2>
<p>This has been the third time I went to devopsdays Amsterdam. And I
love this conference!</p>
<p>Some of the reasons:</p>
<ul>
<li>The organizers manage to get great speakers with interesting talks
on stage each year.</li>
<li><a href="https://dezwijger.nl/">Pakhuis de Zwijger</a> is a great location.</li>
<li>Excellent Wi-Fi.</li>
<li>Great atmosphere.</li>
<li>Good food.</li>
</ul>
<h2 id="the-workshops">The workshops</h2>
<h3 id="go">Go</h3>
<p>I had heard about <a href="https://golang.org/">Go</a>, some of my co-workers
have some experience with it, but I never wrote anything in the
language. I was curious about it though.</p>
<p>The <a href="/2018/06/27/devopsdays-amsterdam-2018-workshops/#go-for-ops-----michael-hausenblas-red-hat">workshop from Michael
Hausenblas</a>
was a nice intro. Based on what he told and showed us I cannot say
that I expect that Go will replace Bash and Python for me. However, I
will make some time to actually write some code myself to get a better
feel for it.</p>
<h3 id="monitoring-with-elastic">Monitoring with Elastic</h3>
<p>We are already using the <a href="https://www.elastic.co/products/">Elastic Stack</a> in
some places at work, but I have not used it for monitoring purposes. (I
gravitate towards <a href="https://prometheus.io/">Prometheus</a> combined with
<a href="https://github.com/prometheus/alertmanager">Alertmanager</a> for alerting and
<a href="https://grafana.com/">Grafana</a> for dashboards with graphs.) However, <a href="/2018/06/27/devopsdays-amsterdam-2018-workshops/#monitor-your-microservices-----logs-metrics-pings-and-traces-----philipp-krenn-elastic">Philipp
Krenn showed
us</a>
that you can also do very interesting things with
<a href="https://www.elastic.co/kibana/">Kibana</a> in the monitoring and debugging realm.
Especially since you can correlate metrics with logs in the same tool.</p>
<h3 id="kubernetes">Kubernetes</h3>
<p>I could say that <a href="/2018/06/27/devopsdays-amsterdam-2018-workshops/#kubernetes-101-----bridget-kromhout-microsoft">Bridget Kromhout&rsquo;s Kubernetes
workshop</a>
was a nice refresher of what I had learned in the <a href="/2017/06/28/devopsdays-amsterdam-2017-day-zero-workshops/#introduction-to-kubernetes-----andy-repton-schuberg-philis">Kubernetes workshop
last
year</a>
but, to be honest, that would be a lie. I am glad I took this
workshop.</p>
<p>It was a good workshop with lots of hands-on tasks. But it went a bit
too fast to make it stick. I would have to spend more time on a
Kubernetes cluster to really understand everything and get fluent with
it. Luckily there is lots of information on
<a href="https://container.training/">container.training</a> (including the
sheets of this workshop) and there are plenty of cloud providers where
you can get a Kubernetes cluster without having to create or maintain
it yourself.</p>
<h2 id="the-talks">The talks</h2>
<p>The talk that resonated most with me this year was the one from <a href="/2018/06/29/devopsdays-amsterdam-2018-day-two/#that-product-team-really-brought-that-room-together-----harold-waldo-grunenwald-datadog">Waldo
Grunenwald about product
teams</a>.
Perhaps because (in my opinion) this is something that could be better
in my job. Product management, development and operations are three
different teams with different managers. Then again, I currently try
to be the &ldquo;ops guy&rdquo; in our development team so that&rsquo;s also DevOps, right? :)</p>
<p>The other most memorable talks for me were:</p>
<ul>
<li><a href="/2018/06/28/devopsdays-amsterdam-2018-day-one/#cloud-containers-kubernetes-----bridget-kromhout-microsoft">Bridget Kromhout&rsquo;s keynote: Cloud, containers, k8s </a></li>
<li><a href="/2018/06/28/devopsdays-amsterdam-2018-day-one/#service-mesh-for-microservices-----armon-dadgar-hashicorp">Armon Dadgar on service meshes</a></li>
<li><a href="/2018/06/28/devopsdays-amsterdam-2018-day-one/#going-dutch-observaties-over-nederlandse-cultuur--devops-----jason-yee-datadog">Jason Yee relating Dutch peculiarities to DevOps</a></li>
<li><a href="/2018/06/29/devopsdays-amsterdam-2018-day-two/#monitoring-the-dynamic-nature-of-cloud-computing-----lee-atchison-new-relic">Lee Atchison about monitoring in a dynamic (cloud) environment</a></li>
</ul>
<h2 id="miscellaneous">Miscellaneous</h2>
<p>I have been using <a href="https://www.gnu.org/software/emacs/">Emacs</a> for
quite a while. I was a <a href="https://www.vim.org/">Vim</a> user in the past,
but switched somewhere between 2007 and 2009. (The first time I wrote
about Emacs here was in
<a href="/2009/05/03/using-git-when-developing-plone-applications/">2009</a>.)</p>
<p>I have tried <a href="https://www.jetbrains.com/pycharm/">PyCharm</a> a couple of
times and it is a really nice editor with very useful features. It
just never stuck with me and I always went back to Emacs after a
while.</p>
<p>During the conference I used <a href="https://code.visualstudio.com/">Visual Studio Code</a>
to write my notes. And I have to say I quite liked it. I intend to also give it
a go at work. Who knows, I might even switch&hellip;</p>]]></content>
  </entry>
  <entry>
    <title type="html"><![CDATA[Devopsdays Amsterdam 2018: workshops]]></title>
    <link rel="alternate" href="https://markvanlent.dev/2018/06/27/devopsdays-amsterdam-2018-workshops/" type="text/html" />
    <id>https://markvanlent.dev/2018/06/27/devopsdays-amsterdam-2018-workshops/</id>
    <author>
      <name>map[name:Mark van Lent uri:https://markvanlent.dev/about/]</name>
    </author>
    <category term="conference" />
    <category term="devops" />
    <category term="docker" />
    <category term="elastic" />
    <category term="go" />
    <category term="kubernetes" />
    <category term="monitoring" />
    
    <updated>2021-10-26T18:57:58Z</updated>
    <published>2018-06-27T00:00:00Z</published>
    <content type="html"><![CDATA[<p>Just like the previous couple of years, devopsdays Amsterdam started
off with a day of workshops. This year I attended workshops about Go,
monitoring microservices and Kubernetes.</p>
<h2 id="go-for-ops--michael-hausenblas-red-hat">Go for Ops &mdash; Michael Hausenblas (Red Hat)</h2>
<p>Michael walked us through the features of the Go language by giving numerous
examples. This is a workshop that usually takes a full day so we were in for a
nice ride.</p>
<p><img src="/images/devopsdays2018_michael_hausenblas.jpg" alt="Michael Hausenblas about the language features of Go"></p>
<p>One thing he mentioned that he liked about the language is that there is (almost) no
magic involved.</p>
<p>Some things that stood out to me, Mark, (as someone who writes Python most of
the time and does not know much about Go):</p>
<ul>
<li>There are no objects in Go; they are &ldquo;structs&rdquo; and methods (functions bound to
a struct) (Note from Mark: Steve Francia wrote &ldquo;<a href="https://spf13.com/post/is-go-object-oriented/">Is Go an Object Oriented
language?</a>&rdquo; which seems like a
useful article).</li>
<li>You need to create a file first before you can write to it. (In Python you
open a file for writing and it is created if needed).</li>
<li>To format dates you have to use a special date in the formatter: Jan 2,
15:04:05, 2006 (which is basically 1, 2, 3, 4, 5, 6).</li>
<li>The standard library is very comprehensive. (This is actually something Go has
in common with Python.)</li>
<li>Code formatting is enforced via <code>gofmt</code>.</li>
</ul>
<p>Common pattern to handle errors:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="w">  </span><span class="nx">mail</span><span class="p">,</span><span class="w"> </span><span class="nx">err</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nf">mailof</span><span class="p">(</span><span class="nx">uid</span><span class="p">,</span><span class="w"> </span><span class="nx">aproject</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="nx">err</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="kc">nil</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="o">...</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nx">os</span><span class="p">.</span><span class="nf">Exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p><a href="https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#27">Slide 27</a>:
if you feed the <code>printf</code> function a different type, e.g. a string, it will not
even compile. (Mark: this is something I&rsquo;m not used to, coming from Python.)</p>
<p>To expose things like functions (make them available to other packages): start
the name with an uppercase letter. Functions starting with a lowercase letter
are internal/private to the package. If you try to access an internal
function, you get a nice error message (again: at compile time).</p>
<p><a href="https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#31">Slide 31</a>: &ldquo;<code>log.Fatalf()</code>&rdquo;
triggers the <code>os.Exit(1)</code> you can see when you run this example.</p>
<p>You can add a call to the <code>defer</code> function at the end of a scope (e.g. &ldquo;<code>defer f.Close()</code>&rdquo;
in <a href="https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#33">slide 33</a>).
Since the Go runtime will execute this always (even if there was an error), you can
use this e.g. as a cleanup of an open file. You can have as many <code>defer</code>s as you
like; they will be executed in reverse order.</p>
<p>Starting with writing tests is quite simple: create file with <code>&lt;module name&gt;_test.go</code>.
The function name of the test is irrelevant as long as it starts with &ldquo;<code>Test</code>&rdquo;.
Run the tests with &ldquo;<code>go test</code>&rdquo; (plus options, if you like). Go offers test
coverage information. Tip: use a nice editor/IDE and integrate running the tests
and code coverage there.</p>
<p>As you can see on <a href="https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#39">slide 39</a> it
is possible to add encodings to your struct to be able to, for instance, encode
and decode JSON. There are other encodings, see e.g.
<a href="https://pkg.go.dev/encoding#section-directories">https://pkg.go.dev/encoding#section-directories</a></p>
<p>Google, where Go was created, uses a monorepo. As a result they did not need
dependency management in Go. Use e.g. <a href="https://github.com/golang/dep">dep</a> to
help you out here. It looks like <a href="https://github.com/golang/go/wiki/vgo">vgo</a>
will be part of the language in the future.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<p>You can either trust upstream (and Github to be available) and not put your
dependencies in your repo, or chose not to and version control the code you
depend on yourself.</p>
<p>About running a Go application in a container: you can either pick an image with
debug tools (like <code>centos:7</code>), or pick a minimal image like <code>alpine</code> or
<code>scratch</code> as the basis of your image. You have to decide whether you want the
smallest image possible or want (some) tools included.</p>
<p>For Michael, Go replaced a lot of Bash and Python. However, Michael is not
convinced that Go is a good fit to write a complete web application in, for
instance. But decide for yourself. On <a href="https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#56">slide 56</a>
there are a couple of links to some pages with criticism.</p>
<p>As already stated, Go has an extensive standard library. Michael advises to use
it. If it does not have or do what you want, your second best option is to use a
drop-in replacement. Only if that is not possible, search for a package with a
different API.</p>
<p>Useful resources:</p>
<ul>
<li>The sheets for this workshop can be found via <a href="https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#1">https://go-talks.appspot.com/github.com/mhausenblas/go4ops/main.slide#1</a>.</li>
<li><a href="https://gobyexample.com/">Go by example</a> is a nice resource to learn about
the concepts in Go.</li>
<li><a href="https://goreportcard.com/">https://goreportcard.com/</a></li>
<li><a href="https://golang.org/doc/">https://golang.org/doc/</a></li>
</ul>
<h2 id="monitor-your-microservices--logs-metrics-pings-and-traces--philipp-krenn-elastic">Monitor Your Microservices &mdash; Logs, Metrics, Pings, And Traces &mdash; Philipp Krenn (Elastic)</h2>
<p>Distributed services make debugging &hellip; interesting.</p>
<p><img src="/images/devopsdays2018_philipp_krenn.jpg" alt="Philipp Krenn talking about microservices"></p>
<p>The code for this workshop, a highly monitored &ldquo;hello world&rdquo; app can be found on
<a href="https://github.com/xeraa/microservice-monitoring">Github</a>.</p>
<p>The server provided for the workshop is an Amazon Lightsail instance created
with Terraform and provisioned with Ansible. (The code for this deployment is
also included in the aforementioned repo.)</p>
<p>Notable changes in Kibana 6.3:</p>
<ul>
<li>It has tools to manage the Elasticsearch indices.</li>
<li>In visualizations the aggregation previously called &ldquo;calculation&rdquo; has been
renamed to &ldquo;math.&rdquo;</li>
</ul>
<p>Packetbeat is using libpcap, just like Wireshark. Philipp thinks the future of
Packetbeat is in tracking down DNS + TLS errors since you should encrypt the
data between your services (which means that Packetbeat can no longer extract
much information from the packets).</p>
<p>Previously you used Logstash to get the Nginx access logs into Elasticsearch.
Filebeat modules can help you there. Filebeat is just forwarding the data; the
parsing is done by Elasticsearch. Filebeat has processors to enrich events with
e.g. cloud and host metadata (quite cheaply actually since this information is
collected on startup of Filebeat and cached).</p>
<p>Auditbeat has the same type configuration as auditd.</p>
<p><a href="https://github.com/mheese/journalbeat">Journalbeat</a> (from a third party) can be
used for journald support. Philipp doesn&rsquo;t guarantee anything, but this is on
the list of the Elastic team and he hopes there will be official support for
journald.</p>
<p>You can have a rule to collect multiline messages, like stack traces, together in
one document by telling Filebeat that if a line start with e.g. a timestamp, it
is the start of a new line and if it starts with e.g. a space it is part of a
stack trace. You could also use structured logs (which is recommended if you
can).</p>
<p>As of version 6 you can tell beats to enable (and update) the related dashboards
in Kibana.</p>
<p>For alerting with the Elastic stack you need a commercial license.</p>
<p>The machine learning (also only available in the commercial X-Pack license)
takes three iterations to detect a pattern. For example the pattern of how
much traffic your application receives on a workday can be learned in three
days. For a weekday/weekend pattern, it would need three weeks.</p>
<p>Kibana also has support for APM (Application Performance Monitoring). There are
agents for e.g. Python and Node and a bunch of others (some in beta or alpha
stage, see <a href="https://www.elastic.co/guide/en/apm/agent/index.html">the docs</a>).</p>
<p>Elastic is working on Index Lifecycle Management (ILM) which will run as part of
the cluster. Philipp is not sure when it will be available though. For now use
<a href="https://github.com/elastic/curator">Curator</a>.</p>
<p>Elasticsearch already supports metrics aggregation (called &ldquo;rollups&rdquo;) via the
API. In a future version there will also be an graphical interface to configure
this.</p>
<p>Philipp compared his workshop to Lego. He showed us some configuration,
visualizations, etcetera but &ldquo;some assembly is required.&rdquo;</p>
<h2 id="kubernetes-101--bridget-kromhout-microsoft">Kubernetes 101 &mdash; Bridget Kromhout (Microsoft)</h2>
<p><em>This was a fast paced, highly interactive workshop about Kubernetes so I only
took a few notes. However, the slides have so much information on them, you can
follow the workshop perfectly fine without comments from me.</em></p>
<p>Resources:</p>
<ul>
<li>Slides: <a href="https://devopsdaysams2018.container.training/">https://devopsdaysams2018.container.training/</a></li>
<li>Git repo: <a href="https://github.com/jpetazzo/container.training">https://github.com/jpetazzo/container.training</a></li>
</ul>
<p>Warning: we have done stuff you should not do in production. :)</p>
<p><img src="/images/devopsdays2018_bridget_kromhout.jpg" alt="Bridget Kromhout during her Kubernetes 101 workshop with lots of containers"></p>
<blockquote>
<p>Kubernetes is highly unopinionated.</p></blockquote>
<p>By default Kubernetes uses one big, flat network. However, you can configure
Kubernetes so that customers cannot access each other.</p>
<p>In real life you would not host your own Docker registry in the production
environment. We do it in the workshop because it is easier than messing with
credentials to other registries.</p>
<p>Kubernetes has extensive role based access control support.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Update 2021-10-08: According to the <code>deb</code> repository: <q>Dep was an official
experiment to implement a package manager for Go. As of 2020, Dep is deprecated
and archived in favor of Go modules, which have had official support since Go
1.11. For more details, see <a href="https://golang.org/ref/mod">https://golang.org/ref/mod</a>.</q>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>]]></content>
  </entry>
</feed>
