<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Jonnobrows Musings</title><link>https://blog.jonnobrow.co.uk</link><description>Recent content in Blogs on Jonathan's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 08 Apr 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://jonathanbartlett.co.uk/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>I've been outside</title><link>https://jonathanbartlett.co.uk/2025/04/08/ive-been-outside.html</link><pubDate>Tue, 08 Apr 2025 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2025/04/08/ive-been-outside.html</guid><description>&lt;p>So much has happened since my previous post, so here is the update.&lt;/p>
&lt;h2 id="life">Life&lt;/h2>
&lt;p>In my last post I mentioned that I was engaged and planning to buy a house.&lt;/p>
&lt;p>Shortly after that post we started the house hunting process and after nearly
15 months we finally completed on our purchase. Then, just six weeks later,
&lt;strong>we got married!&lt;/strong>&lt;/p>
&lt;p>We then spent a couple of weeks taking it slow on Honeymoon in Croatia.&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG_1939.webp" alt="A photograph from our wedding">&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG20240506171100_BURST016.webp" alt="A photograph from our honeymoon">&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG20240514131443.webp" alt="A POV photograph of us watching the world go by in Croatia">&lt;/p>
&lt;p>The (nearly) a year since has been great too, we&amp;rsquo;ve travelled, made our house
into a home, made memories with friends and family, and found our new normal
after being in a state of flux for a few years.&lt;/p>
&lt;p>I talked about wanting to get back into hiking, and while it may not be
hiking, I have been walking more, and exploring the surrounding area.&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG20250112132633.webp" alt="A photograph from Greenham Common">&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG20241114143204.webp" alt="A photograph from Berlin">&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG20250125172550.webp" alt="A photograph from Athens">&lt;/p>
&lt;p>The plan is to keep travelling and exploring, and we would also like to
adopt/rescue a cat at some point this year 🐱. Our garden is the priority at home
this year, and it&amp;rsquo;s been really nice to spend time outside in this unseasonably mild
spring weather.&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/IMG20250325111956.webp" alt="A photograph from our garden">&lt;/p>
&lt;h2 id="work">Work&lt;/h2>
&lt;p>Quite a bit has happened here too:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>December 2022: I was promoted to Site Reliability Engineer&lt;/p>
&lt;/li>
&lt;li>
&lt;p>April 2024: The platform I was working on was deprecated and I was moved to a new team&lt;/p>
&lt;/li>
&lt;li>
&lt;p>September 2024: I moved to Sky Protect, and was promoted to Senior SRE&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>It&amp;rsquo;s been a big change working for Sky Protect, but it&amp;rsquo;s definitely interesting
and a good opportunity for growth, in what is a relatively new team.&lt;/p>
&lt;h2 id="homelab">Homelab&lt;/h2>
&lt;p>My Homelab is really the reason my blog exists, so it gets it&amp;rsquo;s own section.&lt;/p>
&lt;p>After I moved house my Homelab became a 24/7 feature again, it even got an upgrade,
with more RAM and some hard-drives. More recently I&amp;rsquo;ve ditched K8s and focused
on the few main services I actually use:&lt;/p>
&lt;ul>
&lt;li>Paperless: Scans / &amp;ldquo;paper&amp;rdquo; documents&lt;/li>
&lt;li>Immich: Photos - although I still rely heavily on &lt;em>Google Photos&lt;/em>&lt;/li>
&lt;li>Nextcloud: File sync&lt;/li>
&lt;/ul>
&lt;p>These are all exposed via Traefik reverse proxy and backed-up with Borgmatic to
my Hetzner storage box. It works like a charm, is low maintenance and is simple
enough that I don&amp;rsquo;t have to re-learn everything if I step away for a couple of months.&lt;/p>
&lt;p>I&amp;rsquo;d like to have a &amp;ldquo;lab&amp;rdquo; again, but I don&amp;rsquo;t get all that much time to sink into
it at the moment (see &lt;a href="#life">Life&lt;/a>). For now, Home automation is scratching-the-itch. I have Home Assistant on a Raspberry Pi 5 (overkill), and have been enjoying
tinkering when I can - all Wife Approved of course!&lt;/p>
&lt;h2 id="next">Next&lt;/h2>
&lt;p>I make no promises about when I&amp;rsquo;ll blog next - I guess it will be when I have
another big update to share.&lt;/p>
&lt;p>Until next time&amp;hellip;&lt;/p></description></item><item><title>A Year in Review</title><link>https://jonathanbartlett.co.uk/2022/10/23/2022-a-year-in-review.html</link><pubDate>Sun, 23 Oct 2022 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2022/10/23/2022-a-year-in-review.html</guid><description>&lt;p>It has been 10 months since my last update, here is what I have been up to&amp;hellip;&lt;/p>
&lt;h2 id="october-2021---joining-sky">October 2021 - Joining Sky&lt;/h2>
&lt;p>&lt;a href="https://sky.com">Sky&lt;/a> was, and continues to be, a fantastic first workplace. It provided a great space
for me to learn and explore technologies with no real pressure to deliver results unless
I felt ready.&lt;/p>
&lt;p>The first few weeks were occupied by a technology Bootcamp where we learned about everything
from basic Python programming through to AWS and configuration management in Puppet. I then
joined a small team with some other graduates to build an internal tool for capturing and
analysing the cost of incident investigations - this primarily used Golang and GCP.&lt;/p>
&lt;h2 id="january-2022---dendrite-helm-chart">January 2022 - Dendrite Helm Chart&lt;/h2>
&lt;p>Towards the end of December 2021 I started working on a Helm chart to deploy Dendrite&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>,
on Kubernetes. You can see the post where this was announced here:
&lt;a href="https://matrix.org/blog/2022/01/07/this-week-in-matrix-2022-01-07#dendrite-helm-chart-website">https://matrix.org/blog/2022/01/07/this-week-in-matrix-2022-01-07#dendrite-helm-chart-website&lt;/a>&lt;/p>
&lt;h2 id="february-2022---joining-the-software-defined-streaming-team">February 2022 - Joining the Software Defined Streaming Team&lt;/h2>
&lt;p>After completing the internal tool we were all assigned to teams within the Global Reliability
department at Sky. I joined the Software Defined Streaming (SDS) Site Reliability Engineering (SRE)
team - SDS SRE for short. The platform within the team is sizeable and split between on-premise
vsphere clusters and GCP. We manage all of this using tools like Puppet, Jenkins and Terraform and my
main responsibilities in the team are to improve, modernise and maintain the platform, whilst also
supporting the Streaming Engineers and Testers that make up the rest of the Streaming team.&lt;/p>
&lt;p>I also released
&lt;a href="https://matrix.org/blog/2022/02/11/this-week-in-matrix-2022-02-11#dendrite-helm-chart-website">another update for the Dendrite Helm Chart&lt;/a>
which added the ability to do a Polylith deployment.&lt;/p>
&lt;h2 id="may-2022---getting-engaged">May 2022 - Getting Engaged&lt;/h2>
&lt;p>My long-term partner, Izzy, and I got engaged after dating for five-and-a-half years! We have now
set a date (4th May 2024) and are enjoying planning the ins and outs of our wedding day.&lt;/p>
&lt;p>At some point we hope to start sharing updates via &lt;a href="https://izzyandjonny.co.uk/wedding">our wedding website&lt;/a>,
so save that if you want to stay in-the-know.&lt;/p>
&lt;h2 id="julyaugust-2022---going-abroad-for-the-first-time-in-a-while">July/August 2022 - Going abroad for the first time in a while&lt;/h2>
&lt;p>Before COVID-19 a trip abroad was pretty much an annual thing for me and my family, and sometimes
it was even more frequent since we love to travel and explore the world. My last trip abroad was towards
the end of 2019.&lt;/p>
&lt;p>We spent two weeks exploring the Loire Valley in France, drinking good wine and eating
good food. It was certainly a much needed and enjoyable break from carrying out production releases!&lt;/p>
&lt;h2 id="september-2022---planing-to-buy-a-house">September 2022 - Planing to buy a house&lt;/h2>
&lt;p>The next step for us to get on the property ladder and we are hoping to do that early in the new year.
It&amp;rsquo;s early days at the moment but it has been fun to start nosing around on Rightmove and Zoopla.&lt;/p>
&lt;h2 id="october-2022---whats-next">October 2022 - What&amp;rsquo;s next?&lt;/h2>
&lt;p>&lt;em>For the homelab&lt;/em>: Earlier this month I turned off my server for the first time since it went on in
&lt;a href="https://jonathanbartlett.co.uk/2021/05/18/homelab-part-1.html">my first homelab post&lt;/a>. My usage has decreased over the past few
months and now the cost of electricity doesn&amp;rsquo;t really make it worthwhile. I have a couple of projects
and training goals that will make use of it again soon, but for now I&amp;rsquo;m happy to turn it on to backup
photos and files every once-in-a-while.&lt;/p>
&lt;p>&lt;em>For Dendrite&lt;/em>: The Dendrite chart repository was deprecated so has moved somewhere else and I haven&amp;rsquo;t
followed. I felt it has reached a point where maintaining it is fairly straightforward and/or no longer
required so I am leaving it up to those who actually use it keep it going if they want.&lt;/p>
&lt;p>&lt;em>For Sky&lt;/em>: I am looking to get promoted to Site Reliability Engineer in the coming months and take on some
more responsibilities in my team. We have some exciting projects just around the corner that I am looking
to lead on and/or be a large part of. The platform is changing and modernising at speed, so its definitely a good
place to see a progression from the way it was 10 years ago to the shiny cloud-centric world we now live in.&lt;/p>
&lt;p>&lt;em>For Personal Projects&lt;/em>: I&amp;rsquo;m looking to start/join a project again soon to fill the space the Dendrite chart
has left. This will probably tie in nicely with the Homelab again and be largely focused on K8s and Golang,
so watch this space.&lt;/p>
&lt;p>&lt;em>Beyond Tech&lt;/em>: My focus outside of work is planning for my wedding, buying a house and generally looking
forward to the future. I&amp;rsquo;m enjoying that as my main hobby and its certainly time consuming enough to be one.
Getting back into hiking is also quite high up on my list since I live relatively close to some lovely national
parks and can&amp;rsquo;t remember the last time I spent any real time there. In December I will also be seeing The Cure live
for a second time which is awesome!&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>See &lt;a href="https://github.com/matrix-org/dendrite">https://github.com/matrix-org/dendrite&lt;/a>. Dendrite is a Matrix Homeserver.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Homelab - Part 5: Reset, Renovate, Rebuild</title><link>https://jonathanbartlett.co.uk/2022/01/13/homelab-part-5.html</link><pubDate>Thu, 13 Jan 2022 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2022/01/13/homelab-part-5.html</guid><description>&lt;p>&lt;em>Checkout my homelab GitOps here: &lt;a href="https://github.com/Jonnobrow/coffee-shop">https://github.com/Jonnobrow/coffee-shop&lt;/a>&lt;/em>&lt;/p>
&lt;p>Since &lt;a href="https://jonathanbartlett.co.uk/2021/10/30/homelab-part-4.html">my previous post&lt;/a> not a great deal
has changed in my homelab. I have been busy with work and had some other
projects that have interested me more.&lt;/p>
&lt;p>Here is a quick rundown of what I have added/changed since part 4.&lt;/p>
&lt;h2 id="reset">Reset&lt;/h2>
&lt;p>I wiped out a bunch of services that I wasn&amp;rsquo;t using and now just have my core,
daily use services:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Nextcloud&lt;/strong>&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>: File storage and photo ingress for me and my partner&lt;/li>
&lt;li>&lt;strong>PhotoPrism&lt;/strong>&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>: Photo management and sharing&lt;/li>
&lt;li>&lt;strong>Paperless&lt;/strong>&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>: Document Manager&lt;/li>
&lt;li>&lt;strong>Mealie&lt;/strong>&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>: Recipe Manager and Meal Planner&lt;/li>
&lt;li>&lt;strong>Jellyfin&lt;/strong>&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>: Media System&lt;/li>
&lt;li>I also have a bunch of utilities and background services&lt;/li>
&lt;/ul>
&lt;h2 id="renovate">Renovate&lt;/h2>
&lt;p>I now self-host &lt;a href="https://docs.renovatebot.com/">&lt;code>renovate&lt;/code>&lt;/a> and have
&lt;a href="https://github.com/JonnobrowRenovateBot">a bot user&lt;/a> dedicated to operating that.&lt;/p>
&lt;p>The rationale behind self-hosting was to learn more about the bot rather than
using the Github action in which I would only have had to do the repository
specific config rather than the bot config. I also wanted to learn more about
&lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/">cron jobs in
k8s&lt;/a>.&lt;/p>
&lt;h2 id="rebuild">Rebuild&lt;/h2>
&lt;p>I went back to the roots of why I started a homelab and made space for learning again.&lt;/p>
&lt;p>A lot of my services were barely being used and had run their course in terms
of teachable moments. They went in the bin and will hopefully get replaced with
new things, some possiblities are:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Dendrite&lt;/strong>&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup>: A matrix homeserver&lt;/li>
&lt;li>&lt;strong>Drone&lt;/strong>&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>: A CI/CD server&lt;/li>
&lt;li>&lt;strong>Gitea&lt;/strong>&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup>: A git server&lt;/li>
&lt;li>&lt;strong>Vault&lt;/strong>&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup>: A secrets management tool&lt;/li>
&lt;/ul>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://nextcloud.com/">https://nextcloud.com/&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://photoprism.app/">https://photoprism.app/&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://github.com/jonaswinkler/paperless-ng">https://github.com/jonaswinkler/paperless-ng&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://hay-kot.github.io/mealie/">https://hay-kot.github.io/mealie/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>&lt;a href="https://jellyfin.org/">https://jellyfin.org/&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>&lt;a href="https://github.com/matrix-org/dendrite">https://github.com/matrix-org/dendrite&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>&lt;a href="https://www.drone.io/">https://www.drone.io/&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>&lt;a href="http://gitea.com/">http://gitea.com/&lt;/a>&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>&lt;a href="https://www.vaultproject.io/">https://www.vaultproject.io/&lt;/a>&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Homelab - Part 4: From the ground up</title><link>https://jonathanbartlett.co.uk/2021/10/30/homelab-part-4.html</link><pubDate>Sat, 30 Oct 2021 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2021/10/30/homelab-part-4.html</guid><description>&lt;p>For the last month I have been working on restructuring my Kubernetes cluster to
make everything a bit more organised and sensible. During the process I also
scripted the setup of the host using Ansible and made some changes to the way I
do things.&lt;/p>
&lt;p>If you&amp;rsquo;re just interested in seeing the GitOps repository, you can check that
out here: &lt;a href="https://github.com/Jonnobrow/coffee-shop">https://github.com/Jonnobrow/coffee-shop&lt;/a>.&lt;/p>
&lt;h2 id="motivation-for-change">Motivation for change&lt;/h2>
&lt;p>Before I dive in to the new structure of my cluster, the things I have added and
the things I have changed, I want to explain why this was necessary (or why I
felt it was anyway).&lt;/p>
&lt;p>Three main things prompted the changes:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Messy Manifests&lt;/strong>: I mentioned this towards the end of
&lt;a href="https://jonathanbartlett.co.uk/2021/09/02/homelab-part-2.html">my second post&lt;/a> and although functionally
everything was fine, having your manifests organised makes everything a little
easier to maintain.&lt;/li>
&lt;li>&lt;strong>Backups&lt;/strong>: Everything important is backed up so I can mess around with my
cluster knowing a restore is &lt;strong>(a)&lt;/strong> possible, and &lt;strong>(b)&lt;/strong> quite
straightforward thanks to the work I did in &lt;a href="https://jonathanbartlett.co.uk/2021/09/30/homelab-part-3.html">part 3&lt;/a>.&lt;/li>
&lt;li>&lt;strong>Learning and Automation&lt;/strong>: My initial cluster had been somewhat adapted from
a friends cluster&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>, so I hadn&amp;rsquo;t really learnt all that much about what I
was doing. Also, I had left a lot of manual processes creep into my
maintenance and I wanted to learn how to remove as much of these as possible -
&lt;em>automate everything&lt;/em>!&lt;/li>
&lt;/ul>
&lt;h2 id="some-new-tools">Some new tools&lt;/h2>
&lt;p>A couple of new tools were integrated into my workflow during this process. Some
replaced tools I was already using while others simply improved my quality of
life or were necessary for the automation I was trying to accomplish.&lt;/p>
&lt;h3 id="mozilla-sopsfn2">Mozilla SOPS&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/h3>
&lt;p>The Github repository describes SOPS (&lt;strong>S&lt;/strong>ecrets &lt;strong>OP&lt;/strong>eration&lt;strong>S&lt;/strong>) as being a
&amp;ldquo;simple and flexible tool for managing secrets&amp;rdquo;. It supports a wide range of
file formats and can encrypt using a few different mechanisms depending on your
needs.&lt;/p>
&lt;p>For me it replaces Bitnami Sealed Secrets&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>, but also gives me a way to
encrypt secrets that don&amp;rsquo;t like within my cluster, like secrets used in Ansible
deployments.&lt;/p>
&lt;p>Some examples of usage:&lt;/p>
&lt;ul>
&lt;li>To Encrypt a file in place: &lt;code>sops -e -i /path/to/file&lt;/code>&lt;/li>
&lt;li>To Decrypt a file in place: &lt;code>sops -d -i /path/to/file&lt;/code>&lt;/li>
&lt;li>To edit an encrypted file with $EDITOR: &lt;code>sops /path/to/file&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>FluxCD provides a guide&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> on using Mozilla SOPS, as does Ansible&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>.&lt;/p>
&lt;h3 id="taskfn6">Task&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup>&lt;/h3>
&lt;blockquote>
&lt;p>Task is a task runner &amp;hellip; that aims to be simpler and easier to use than &amp;hellip; GNU Make.&lt;/p>
&lt;/blockquote>
&lt;p>Instead on the Makefile format, Task uses yaml, which I am much more familiar
with. It also has a more natural feel to usage (for me) and I found the ability
to use templates, include other task files and define dynamic variables really
useful for the kinds of things I wanted to do with it.&lt;/p>
&lt;p>I predominantly use Task for running small admin tasks like:&lt;/p>
&lt;ul>
&lt;li>Enabling/Disabling Nextcloud Maintenance Mode&lt;/li>
&lt;li>Running an Ansible playbook&lt;/li>
&lt;li>Running a flux reconciliation&lt;/li>
&lt;/ul>
&lt;p>The documentation&lt;sup id="fnref1:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup> explains how to install and use Task and I recommend checking
it out for a little bit more automation in all of your projects. For an example
of multiple task files, see &lt;a href="https://github.com/Jonnobrow/coffee-shop/blob/main/Taskfile.yml">my GitOps repository&lt;/a>.&lt;/p>
&lt;h3 id="pre-commitfn7">pre-commit&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>&lt;/h3>
&lt;p>This tool managed pre-commit hooks for Git. These hooks mean that on every
commit my code or manifests are run through a linter and any other tools I want.&lt;/p>
&lt;p>So far I am only using this for a few checks for my manifests such as:&lt;/p>
&lt;ul>
&lt;li>Checking for trailing whitespace and line endings&lt;/li>
&lt;li>Checking for consistent yaml using yamllint&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup>&lt;/li>
&lt;li>Checking for unencrypted secrets&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup>&lt;/li>
&lt;/ul>
&lt;p>However, in the future I can see me using this to run linters and tests before
committing python code and much more.&lt;/p>
&lt;p>A small configuration file is included in &lt;a href="https://github.com/Jonnobrow/coffee-shop/blob/cf9c93f755cfc63d020cc40bb3cabbdc0b551a51/.pre-commit-config.yaml">my GitOps repository&lt;/a> and simply
running &lt;code>pre-commit install-hooks&lt;/code> will add the hooks to that repository, causing them
to run on every &lt;code>git commit&lt;/code> command, stopping the commit if a check fails.&lt;/p>
&lt;h2 id="still-messy-manifests">Still Messy Manifests&lt;/h2>
&lt;p>My original plan was to just put the manifests in to a new directory structure,
perhaps move around some services into more sensible namespaces and then be
done. However, I am somewhat prone to diving deep into the rabbit hole&lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup>
and found myself looking at other GitOps Kubernetes Clusters on
&lt;a href="https://github.com/k8s-at-home/awesome-home-kubernetes">k8s-at-home/awesome-home-kubernetes&lt;/a>.
This quickly led to me excitedly creating a new branch on my own GitOps
repository and the procrastination had officially begun.&lt;/p>
&lt;h3 id="a-new-cluster-is-born">A new cluster is born&lt;/h3>
&lt;p>I run a single node cluster, so by &amp;ldquo;a new cluster&amp;rdquo; what I really mean is &amp;ldquo;a new
node&amp;rdquo;. In order to test the re-done manifests I decided it was best to create a
separate environment because I wasn&amp;rsquo;t sure how long it would take and I didn&amp;rsquo;t
want to be without some of my services for an unknown amount of time.&lt;/p>
&lt;p>For ease, I decided to look into using k3s&lt;sup id="fnref:11">&lt;a href="#fn:11" class="footnote-ref" role="doc-noteref">11&lt;/a>&lt;/sup>, rather than doing everything
from scratch, and here begins the first descent into the rabbit hole.&lt;/p>
&lt;p>Many of the aforementioned repositories contain a directory with deployments
using either Ansible, Terraform or a combination of the two. Of course, I liked
the idea of having a single command I could run that would install dependencies,
configuration files and setup k3s - so I made it happen. It was a chance to
learn some more about Ansible&lt;sup id="fnref:12">&lt;a href="#fn:12" class="footnote-ref" role="doc-noteref">12&lt;/a>&lt;/sup> and also make my life easier in the future
should I decide to move to new hardware or rebuild my cluster again.&lt;/p>
&lt;p>So after about two days work I had a new cluster up an running, but still hadn&amp;rsquo;t
done anything that I originally set out to do, oh well.&lt;/p>
&lt;h3 id="making-use-of-kustomize">Making use of Kustomize&lt;/h3>
&lt;p>Another thing that was common across most of the repositories linked in the
awesome-home-kubernetes project was the use of Kustomize&lt;sup id="fnref:13">&lt;a href="#fn:13" class="footnote-ref" role="doc-noteref">13&lt;/a>&lt;/sup> and the Flux
Kustomize Controller&lt;sup id="fnref:14">&lt;a href="#fn:14" class="footnote-ref" role="doc-noteref">14&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>Kustomize is a powerful tool that can do some really cool stuff like generating
secrets and config maps from the actual files, so you aren&amp;rsquo;t managing two copies
of something. It can also apply patches, perform replacements and much more.
When coupled with the Kustomize Controller for flux it allows me to have quite
fine-grained control over my manifests and I had to have that.&lt;/p>
&lt;p>These are the things I mainly use Kustomize for:&lt;/p>
&lt;ul>
&lt;li>Decrypting secrets&lt;/li>
&lt;li>Substituting cluster wide values in all my manifests&lt;/li>
&lt;li>Applying the resulting manifests&lt;/li>
&lt;/ul>
&lt;p>Kustomizations also mean that I can specify exactly which manifests should be
applied, rather than the alternative which seemed quite flakey to me. I can
reconcile a whole kustomiztion in the knowledge that my volumes, secrets and
configs will also get applied whereas before only the helm release itself would
be updated.&lt;/p>
&lt;p>Once again, this is all very cool but at this point I&amp;rsquo;m three days in an not a
lot has changed in the way of removing messy manifests.&lt;/p>
&lt;h3 id="setting-up-tasks-and-sops">Setting up Tasks and SOPS&lt;/h3>
&lt;p>Of course, things must come in threes, so here we are with a third change before
the real work even begins. As mentioned in the
&amp;ldquo;&lt;a href="#some-new-tools">Some new tools&lt;/a>&amp;rdquo; section,
I wanted to use SOPS to manage secrets and Task to run tasks. I set up both of
these tools when creating the Ansible deployments so that I could easily keep
secret variables and run playbooks. However I needed to add a couple more tasks
and generate some extra keys before I could use everything with Kubernetes.&lt;/p>
&lt;p>I wrote a couple of tasks that simply ran Flux commands I use all the time, so
instead of running &lt;code>flux reconcile source git flux-system&lt;/code> I could type
&lt;code>task flux:sync&lt;/code> which saves me quite a few key presses over a day of
reconciliations.&lt;/p>
&lt;p>Additionally, I followed the instructions on the flux website&lt;sup id="fnref1:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> for using
SOPS and generated a separate key that the cluster would use to decrypt secrets.
I then added some tasks to my task files for generating those secrets again in
the future, although hopefully I will never have to as that would be very bad!
I also created a task to generate the secret in the cluster that flux uses to
decrypt everything and that was that.&lt;/p>
&lt;h2 id="finally-getting-somewhere">Finally getting somewhere&lt;/h2>
&lt;p>Now that there is new cluster, I have decided to use Kustomize and I&amp;rsquo;ve set up
some new tools, I can finally start re-organising my services. I started by
copying a structure from the repos I was using as inspiration.&lt;/p>
&lt;pre tabindex="0">&lt;code>/coffee-shop
├── cluster
│ ├── apps
│ ├── base
│ ├── core
│ └── crds
├── server # Notes live elsewhere, see above
└── Taskfile.yml # Contains tasks
&lt;/code>&lt;/pre>&lt;p>Let&amp;rsquo;s break that down a bit:&lt;/p>
&lt;ul>
&lt;li>&lt;code>cluster&lt;/code> contains all the manifests for my K8S cluster
&lt;ul>
&lt;li>&lt;code>apps&lt;/code> contains the services I am running on the cluster and inside lives
a directory for each namespace, which then holds a directory for each
service. More on that later.&lt;/li>
&lt;li>&lt;code>base&lt;/code> is the directory that flux uses as a source. It contains the
cluster settings and secrets, the core, apps and crd kustomizations and
the gotk manifests that contain everything required by Flux. I also put
other sources for my services, such as helm repositories, here.&lt;/li>
&lt;li>&lt;code>core&lt;/code> contains the namespaces themselves and the &lt;code>cert-manager&lt;/code>
manifests. It gets applied before anything else as the namespaces and
&lt;code>cert-manager&lt;/code> are crucial to the whole cluster.&lt;/li>
&lt;li>&lt;code>crds&lt;/code> contains custom resource definitions used by some of the services.
Although all of the services have an option to manage crds with the helm
chart, by having them here I can ensure they exist and have finer control
over their versions.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;code>server&lt;/code> contains the Ansible roles, playbooks and inventory files&lt;/li>
&lt;li>&lt;code>Taskfile.yml&lt;/code> contains tasks for the project
&lt;ul>
&lt;li>There is also a &lt;code>.taskfiles&lt;/code> directory with more task files that relate to
specific things like nextcloud or ansible.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Okay, so now a nice new structure is in place, what does a typical service look
like in that structure. Here is an example using Jellyfin:&lt;/p>
&lt;pre tabindex="0">&lt;code>/coffee-shop
└── cluster # Top Level
└── apps # Jellyfin is a service, so under apps
└── media # Jellyfin is a &amp;#34;Free Software Media System&amp;#34;
├── _pvc # Namespace level Persistent Volume Claims
└── jellyfin # Jellyfin get&amp;#39;s its own directory
├── helm-release.yaml # The helm release itself
├── kustomization.yaml # A kustomization to say what should be included
└── config-pvc.yaml # Service level Persistent Volume Claims
&lt;/code>&lt;/pre>&lt;p>By grouping resources into common namespaces I avoid having separate persistent
volume claims and persistent volumes for each service. I have six services in
the &lt;code>media&lt;/code> namespace that all use the same volumes, but I only have one
definition for each, not six like in my old setup.&lt;/p>
&lt;p>The logical next step would be moving everything over, but of course the rabbit
hole re-opened and I couldn&amp;rsquo;t help but jump in.&lt;/p>
&lt;h2 id="switching-to-traefikfn16">Switching to Traefik&lt;sup id="fnref:15">&lt;a href="#fn:15" class="footnote-ref" role="doc-noteref">15&lt;/a>&lt;/sup>&lt;/h2>
&lt;p>My cluster had been running fine using ingress-nginx&lt;sup id="fnref:16">&lt;a href="#fn:16" class="footnote-ref" role="doc-noteref">16&lt;/a>&lt;/sup> for a few months,
so I had no real reason to change to a different proxy. However, the main aim of
all of this is to learn &lt;strong>AND&lt;/strong> to follow trends, so naturally I took a look at
something new that goes by the name Traefik. Traefik is &amp;ldquo;The Cloud Native
Application Proxy&amp;rdquo; and provides a lot of nice features:&lt;/p>
&lt;ul>
&lt;li>Routing and load balancing&lt;/li>
&lt;li>Security: HTTPS, Let&amp;rsquo;s Encrypt Support and More&lt;/li>
&lt;li>Configuration: Service Auto-Discovery and Middlewares&lt;/li>
&lt;li>Observability: Built-in dashboard, real-time metrics&lt;/li>
&lt;/ul>
&lt;p>Further to this, Traefik seems to be the in-thing so with the aim of staying
somewhat current with my homelab, I decided to move to it.&lt;/p>
&lt;p>The process didn&amp;rsquo;t go off without a hitch though. For most services it was as
adding some annotations for Traefik service discovery. Something
like:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">annotations&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">traefik.ingress.kubernetes.io/router.entrypoints&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;websecure&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">traefik.ingress.kubernetes.io/router.middlewares&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;list,of,middlewares&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>However, for services like Nextcloud that required more configuration, I had to
define middlewares (&lt;a href="https://github.com/Jonnobrow/coffee-shop/blob/6c8b97e569b93e700f13591db30ea21b62126d9a/cluster/apps/networking/traefik/middlewares/nextcloud.yaml">see my nextcloud middleware here&lt;/a>)
in order to replace inline nginx configuration snippets in my old setup.
This took a bit of working out and quite a few commits to get sorted.&lt;/p>
&lt;p>As for some of the benefits, I could now define middlewares as an extra layer of
security. For example, I have a middleware that only allows traffic from
cloudflare IP addresses, for my external traffic, and another than only allows
RFC1918&lt;sup id="fnref:17">&lt;a href="#fn:17" class="footnote-ref" role="doc-noteref">17&lt;/a>&lt;/sup> IP addresses for my local traffic. I could also then define multiple
ingresses for some of my services, like those with a &lt;code>/api&lt;/code> path so that only
things on my local network could access the API, and only traffic through
cloudflares proxy could access the rest&lt;sup id="fnref:18">&lt;a href="#fn:18" class="footnote-ref" role="doc-noteref">18&lt;/a>&lt;/sup>.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://github.com/sseneca/sserver">https://github.com/sseneca/sserver&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://github.com/mozilla/sops">https://github.com/mozilla/sops&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://github.com/bitnami-labs/sealed-secrets">https://github.com/bitnami-labs/sealed-secrets&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://fluxcd.io/docs/guides/mozilla-sops/">https://fluxcd.io/docs/guides/mozilla-sops/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>&lt;a href="https://docs.ansible.com/ansible/latest/collections/community/sops/docsite/guide.html">https://docs.ansible.com/ansible/latest/collections/community/sops/docsite/guide.html&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>&lt;a href="https://taskfile.dev/#/">https://taskfile.dev/#/&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>&lt;a href="https://pre-commit.com/">https://pre-commit.com/&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>&lt;a href="https://yamllint.readthedocs.io/en/stable/index.html">https://yamllint.readthedocs.io/en/stable/index.html&lt;/a>&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>&lt;a href="https://github.com/k8s-at-home/sops-pre-commit">https://github.com/k8s-at-home/sops-pre-commit&lt;/a>&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10">
&lt;p>a complexly bizarre or difficult state or situation conceived of as a hole into which one falls or descends, especially one in which the pursuit of something leads to other questions, problems or pursuits. &amp;mdash; &lt;a href="https://www.merriam-webster.com/dictionary/rabbit%20hole">Merriam-Webster&lt;/a>&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:11">
&lt;p>&lt;a href="https://k3s.io/">https://k3s.io/&lt;/a>&amp;#160;&lt;a href="#fnref:11" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:12">
&lt;p>&lt;a href="https://www.ansible.com/">https://www.ansible.com/&lt;/a>&amp;#160;&lt;a href="#fnref:12" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:13">
&lt;p>&lt;a href="https://kustomize.io/">https://kustomize.io/&lt;/a>&amp;#160;&lt;a href="#fnref:13" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:14">
&lt;p>&lt;a href="https://fluxcd.io/docs/components/kustomize/">https://fluxcd.io/docs/components/kustomize/&lt;/a>&amp;#160;&lt;a href="#fnref:14" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:15">
&lt;p>&lt;a href="https://traefik.io/traefik/">https://traefik.io/traefik/&lt;/a>&amp;#160;&lt;a href="#fnref:15" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:16">
&lt;p>&lt;a href="https://kubernetes.github.io/ingress-nginx/">https://kubernetes.github.io/ingress-nginx/&lt;/a>&amp;#160;&lt;a href="#fnref:16" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:17">
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Private_network">https://en.wikipedia.org/wiki/Private_network&lt;/a>&amp;#160;&lt;a href="#fnref:17" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:18">
&lt;p>I appreciate that this might be possible with nginx but the simplicity
and declarative approach with Traefik makes it much nicer for me.&amp;#160;&lt;a href="#fnref:18" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Keeping a Sourdough Starter Alive</title><link>https://jonathanbartlett.co.uk/2021/10/21/keeping-a-sourdough-starter-alive.html</link><pubDate>Thu, 21 Oct 2021 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2021/10/21/keeping-a-sourdough-starter-alive.html</guid><description>&lt;h2 id="a-little-about-my-starter">A little about my starter&lt;/h2>
&lt;p>&lt;strong>The Lost Boys&lt;/strong>: A few years ago I tried to create a couple of starters from
flour, water and air. These were known as Peter Pain&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> Mk1 and Mk2. The
fact I tried more than once says it all - making a sourdough starter
from scratch isn&amp;rsquo;t easy. Both sadly never made anything more than a boule or
two, all of which resembled discuses&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>. So I resorted to plan B.&lt;/p>
&lt;p>&lt;strong>Peter Pain Mk3&lt;/strong>: Around October 2019 I purchased a small envelope of dried
sourdough starter from John Kirkwood&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> via his website
&lt;a href="https://profoodhomemade.com/product/sour-dough-starter/">profoodhomemade.com&lt;/a>.
I&amp;rsquo;ve fed it almost every week and have used it to bake some great bread (if I do
say so myself) and a wide array of other things. It is still going strong and I
highly recommend getting a well established starter if you want to take up
baking sourdough.&lt;/p>
&lt;h2 id="looking-after-a-sourdough-starter">Looking after a Sourdough Starter&lt;/h2>
&lt;p>I recently changed how I look after my starter and now use a technique called
the scrapings method which I learnt from Bake with Jack&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>. I have included
both methods below as they both have a use.&lt;/p>
&lt;p>Before getting to the methods, there are a few things that are useful to know
when looking after a starter:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>How much does your jar weigh?&lt;/strong> This can come in handy when feeding the
starter with either method. By knowing the weight I can put the jar on the
scales, deduct the jar weight and know how much starter is there. It saves
decanting starter to a new container to feed.&lt;/li>
&lt;li>&lt;strong>How often are you going to bake?&lt;/strong> If you bake more regularly you&amp;rsquo;ll have to
feed more regularly and may want to keep your starter at room temperature to
encourage growth. If you bake less frequently (like me) you&amp;rsquo;ll have to feed
less and should keep your starter in the fridge to slow growth.&lt;/li>
&lt;li>&lt;strong>A liquid on top of your starter isn&amp;rsquo;t a problem.&lt;/strong> After 5 days or so, my starter
usually starts to get a thin layer of liquid. Give it a sniff and it should
smell sweet and yeasty, this is fine and can be stirred back in before
discard/feeding.&lt;/li>
&lt;li>&lt;strong>What ratio is your starter?&lt;/strong> If you made it yourself you probably know
this, but the ratio refers to the amount of your starter that is flour versus
the amount that is water. My starter (and most others) are &lt;strong>1:1&lt;/strong>, meaning
equal parts flour and water.&lt;/li>
&lt;li>&lt;strong>What flour should you use?&lt;/strong> I use white bread flour, as this was what my
starter was made with. If you used a different flour to create your starter,
feed it with that.&lt;/li>
&lt;/ul>
&lt;h3 id="what-is-a-feed">What is a Feed?&lt;/h3>
&lt;p>A feed simply means giving the starter new flour and water so it can continue to
grow. The ratios may vary depending on your answers above, but for me (&lt;strong>1:1&lt;/strong>
ratio) I feed as follows:&lt;/p>
&lt;ol>
&lt;li>Mix 1 part starter with 2 parts filtered water (doesn&amp;rsquo;t have to be perfectly
mixed)&lt;/li>
&lt;li>Add 2 parts flour and mix until no dry flour is visible&lt;/li>
&lt;li>Scrape down the sides of your container to stop starter drying onto the sides&lt;/li>
&lt;li>Loosely cover and put in a safe place&lt;/li>
&lt;/ol>
&lt;p>This same formula is used for making a levain, which is then used to make bread.&lt;/p>
&lt;h3 id="1-the-scrapings-method">(#1) The Scrapings Method&lt;/h3>
&lt;p>This method is less wasteful since you don&amp;rsquo;t really discard any starter. It also
means you don&amp;rsquo;t have to find a load of recipes to use up your discard and is
very easy to pull off.&lt;/p>
&lt;ol>
&lt;li>A day or so before you wish to bake with the starter, feed the starter so
that it is active. The first time you do this you will have to discard, but
subsequently you should have the perfect amount for a feed in the jar.&lt;/li>
&lt;li>On bake day, use the active starter straight from the jar to make your bread.&lt;/li>
&lt;li>After using the starter for baking, simply scrape down the sides of the jar
and put it in the fridge ready for next week.&lt;/li>
&lt;li>When next week comes around you can start at step one again.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Example&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>I need 200g of starter to make my bread.&lt;/li>
&lt;li>I use 50g of starter plus 100g each of flour and water to make a starter
on Friday morning.&lt;/li>
&lt;li>On Saturday I use 200g of the starter to make my bread and make sure to
scrape down the sides of the container so my starter doesn&amp;rsquo;t dry out.&lt;/li>
&lt;li>I have 50g of starter in the fridge ready for next weeks feed.&lt;/li>
&lt;/ul>
&lt;h3 id="2-the-discard-method">(#2) The Discard Method&lt;/h3>
&lt;p>This method is great if you want to make lots of things with the discard (more
on that later). It is also useful if you bake less frequently than once a week.
I still use this method when I don&amp;rsquo;t bake in a given week and I need to recharge
my starter, or if I don&amp;rsquo;t use the full amount of starter I made.&lt;/p>
&lt;ol>
&lt;li>Weigh the jar with the starter in and deduct the jar weight. This is how much
starter you have. From this calculate how much to discard.
&lt;ul>
&lt;li>Example: Total weight = 500g and jar weight = 250g, then
starter weight = 250g, so discard = 200g to have 50g for feed.&lt;/li>
&lt;li>Example 2: Total weight = 410g and jar weight = 250g, then
starter weight = 160g, so discard = 110g to have 50g for feed.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&amp;ldquo;Discard&amp;rdquo; the amount you calculated.
&lt;ul>
&lt;li>For me this means putting it into a bowl and into the fridge so I can use
it for something else. You could bag and bin it though if you
aren&amp;rsquo;t going to use it.&lt;/li>
&lt;li>You can also use this &amp;ldquo;discard&amp;rdquo; to make a levain for baking or if the
discard is active, even use that directly to bake.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Perform a feed and put the starter back in the fridge.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Example (No Bake)&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>I&amp;rsquo;ve not baked in a week and don&amp;rsquo;t plan on baking soon.&lt;/li>
&lt;li>I weigh my starter and calculate that I have 210g.&lt;/li>
&lt;li>I pour 160g into a bowl to make a pancake batter in the morning.&lt;/li>
&lt;li>I feed the remaining 50g to make 250g total and store in the fridge.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Example (Bake)&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>I&amp;rsquo;ve not baked in a while but plan on baking this weekend.&lt;/li>
&lt;li>I weigh my starter and calculate that I need to discard 200g.&lt;/li>
&lt;li>I use 50g of discard to make a levain on Friday night ready to bake on
Saturday.&lt;/li>
&lt;li>I use the other 150g to make a spring onion and sesame pancake.&lt;/li>
&lt;li>I feed the 50g in the jar and store in the fridge.&lt;/li>
&lt;/ul>
&lt;p>Both methods have a place and I used both when it&amp;rsquo;s needed. I try to waste as
little as possible by using the scrapings method predominantly, but something I
don&amp;rsquo;t bake and need to feed to keep everything alive and that is where the
discard method comes in handy.&lt;/p>
&lt;h2 id="some-on-my-favourite-sourdough-recipes">Some on my favourite Sourdough recipes&lt;/h2>
&lt;h3 id="active-sourdough-loaf">(Active) Sourdough Loaf&lt;/h3>
&lt;ol>
&lt;li>Mix 250g active starter with 700g room temperature filtered water until a few
small chunks of starter remain.&lt;/li>
&lt;li>Add 1kg of white bread flour and mix to combine, making sure no dry flour
remains.&lt;/li>
&lt;li>Cover and leave for 45 minutes.&lt;/li>
&lt;li>Sprinkle over 20g of fine sea salt and 50g of room temperature water, dimple
this into the dough with your fingers, then mix to incorporate.&lt;/li>
&lt;li>Perform 3 stretch and folds over the next 2 hours then allow to bulk ferment
until doubled in size.&lt;/li>
&lt;li>Tip the dough out, split and shape into a shape of your choosing&lt;/li>
&lt;li>Cover and keep in fridge overnight.&lt;/li>
&lt;li>Bake for 45 minutes in a 200c oven.&lt;/li>
&lt;/ol>
&lt;h3 id="active-sourdough-pizza">(Active) Sourdough Pizza&lt;/h3>
&lt;p>&lt;strong>Recipe by&lt;/strong>: &lt;a href="https://www.youtube.com/watch?v=yMfOyJeIz8c">Joshua Weissman&lt;/a>&lt;/p>
&lt;ol>
&lt;li>Mix 700g all purpose flour, 14g fine sea salt, 98g active starter and 490g
water.&lt;/li>
&lt;li>Perform 3 stretch and folds and 30 minute intervals to build structure.&lt;/li>
&lt;li>Refrigerate dough overnight&lt;/li>
&lt;li>Shape dough balls (Recipe makes 4)&lt;/li>
&lt;li>Proof dough balls for 5 hours&lt;/li>
&lt;li>Refrigerate until ready, up to 1-2 days&lt;/li>
&lt;/ol>
&lt;h3 id="active-sourdough-focaccia">(Active) Sourdough Focaccia&lt;/h3>
&lt;p>&lt;strong>Recipe&lt;/strong>: &lt;a href="https://alexandracooks.com/2019/03/22/simple-sourdough-focaccia-a-beginners-guide/">Alexandra Cooks&lt;/a>&lt;/p>
&lt;h3 id="discard-sourdough-crepe">(Discard) Sourdough Crepe&lt;/h3>
&lt;ol>
&lt;li>Combine 1 egg, 150g sourdough starter and a splash of milk in a bowl and
whisk to form a thin batter.&lt;/li>
&lt;li>Melt 2 Tbsp of butter in a large frying pan or crepe pan.&lt;/li>
&lt;li>Add melted butter to batter and stir to combine.&lt;/li>
&lt;li>Add a thin layer of batter to the pan and cook until edges start to pull away
from the pan, then flip and cook on the other side for 30 seconds to a
minute.&lt;/li>
&lt;li>Keep crepes warm in the oven and serve with your favourite toppings.&lt;/li>
&lt;/ol>
&lt;h3 id="discard-sourdough-spring-onion-savoury-pancake">(Discard) Sourdough Spring Onion Savoury Pancake&lt;/h3>
&lt;ol>
&lt;li>Heat a little oil in a small to medium non-stick frying pan over medium heat.&lt;/li>
&lt;li>Pour the discard directly into the pan.&lt;/li>
&lt;li>Add sliced spring onions and a generous sprinkle of sesame seeds to the top
and cover for 3 minutes.&lt;/li>
&lt;li>Flip and cook for another 2-3 minutes or until onions are dark brown and
caramelised.&lt;/li>
&lt;li>Serve with sweet chilli dipping sauce or a mixture of soy sauce, sriracha and
sesame oil&lt;/li>
&lt;/ol>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;strong>pain&lt;/strong>: French for bread and pronounced &lt;em>pan&lt;/em>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;strong>discus&lt;/strong>: A disk, typically wooden, plastic or rubber with a metal rim, that is thrown for distance in athletic competitions.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://www.youtube.com/c/JohnKirkwoodProFoodHomemade">Retired professional chef turned YouTuber&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://www.youtube.com/watch?v=Uj6YpNCUYYQ">Baking YouTube Channel&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Homelab - Part 3: Backups</title><link>https://jonathanbartlett.co.uk/2021/09/30/homelab-part-3.html</link><pubDate>Thu, 30 Sep 2021 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2021/09/30/homelab-part-3.html</guid><description>&lt;p>As mentioned in &lt;a href="https://jonathanbartlett.co.uk/2021/09/02/homelab-part-2.html">Part 2 of this series&lt;/a>,
backups were a priority of mine over the last few weeks. Although I was backing
up some data when I wrote that article, not everything was being backed up
properly and nothing was being backed up offsite.&lt;/p>
&lt;p>That&amp;rsquo;s all changed now, and this post will explain the process I went through to
get a reasonable backup strategy for my homelab in place.&lt;/p>
&lt;h2 id="my-existing-backup-strategy-and-the-goal">My Existing Backup &amp;ldquo;Strategy&amp;rdquo; and the Goal&lt;/h2>
&lt;p>My existing backup strategy consisted of a cronjob running a simple script 8
times a day (every 3 hours). That script runs a Borg&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> backup which
includes most of the key directories on my homelab, including all the data and
database directories. The script also prunes the backup repository so that I
only have 7 daily backups (one for each weekday), 4 weekly backups (one for each
week of the month) and 6 monthly backups.&lt;/p>
&lt;p>This works well and gives a me a range of points to restore from if I make a
mistake or something bad happens. However, the backup repository is local,
meaning it sits on the same drive as the data originally came from, so in the
case of hard drive failure, I&amp;rsquo;d lose everything.&lt;/p>
&lt;p>The 3-2-1 Backup Strategy&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> is widely regarded as being pretty air-tight
and is used by a lot of the self-hosting and homelab community, not to mention
in business. The 3-2-1 strategy has 3 parts:&lt;/p>
&lt;ul>
&lt;li>3 copies of your data&lt;/li>
&lt;li>2 different mediums/devices&lt;/li>
&lt;li>1 copy off-site&lt;/li>
&lt;/ul>
&lt;p>So to quickly compare my old strategy to 3-2-1:&lt;/p>
&lt;ul>
&lt;li>I have: &lt;em>2&lt;/em> copies of my data and need &lt;em>3&lt;/em>&lt;/li>
&lt;li>I have: &lt;em>1&lt;/em> medium and need &lt;em>2&lt;/em>&lt;/li>
&lt;li>I have: &lt;em>0&lt;/em> copies off-site&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> and need &lt;em>at least 1&lt;/em>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>The goal&lt;/strong> is therefore to sort out some off-site location for my most
important data and continue doing local backups, but change the destination to a
different medium/device.&lt;/p>
&lt;h2 id="exploring-strange-new-worlds">Exploring strange new worlds&lt;/h2>
&lt;p>One thing I wanted to be certain of was that my choice of backup software was
sound. Therefore, before putting work into everything else I looked into some
other incremental backup solutions.&lt;/p>
&lt;p>Aside from Borg&lt;sup id="fnref1:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> there are several backup solutions such as
Duplicati&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> and Restic&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>. Both initially appeared worth a shot but
after a little research it became clear Duplicati wouldn&amp;rsquo;t meet my needs since I
wanted to do local backups too.&lt;/p>
&lt;p>Restic offers much the same as Borg, and even uses similar terminology and
commands, making it quite easy to try out. I got everything setup and working
nicely but unfortunately ran into some resilience issues with the backup
process. My poor home broadband means that disconnections and timeouts are a
regular occurrence and I need something that can handle this nicely.&lt;/p>
&lt;p>I persevered with Restic for a little over a week, but after failing to find a
solution to my problem I returned to Borg. Frequent cut outs happened with Borg
too, which I was able to resolve with some SSH options&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup>, but partial
backups are stored with Borg so after restarting the backup, everything just
continues from where it left off.&lt;/p>
&lt;p>I found that there isn&amp;rsquo;t much to choose between Borg and Restic, but this little
difference was quite important for me. Restic is worth a look and I will
certainly revisit it in the future, but for now &lt;em>Restic is futile&lt;/em> and Borg
shall live on.&lt;/p>
&lt;h2 id="where-do-off-site-backups-live">Where do off-site backups live?&lt;/h2>
&lt;p>The logistics of the off-site part was probably the biggest challenge of the
whole backup overhaul. As much as possible I want to be in control of my data
and that means not using big cloud services, hence I&amp;rsquo;m self-hosting everything.
Therefore, using a cloud service as a backup destination is not ideal. My ideals
coupled with the cost of storage in the cloud is probably why it took so long to
get this sorted.&lt;/p>
&lt;p>Here were the options I considered:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Amazon S3 (or similar)&lt;/strong> due to the relatively low cost of storage and my
familiarity with S3 from an internship. Sadly individual requests have an
associated cost in Amazon&amp;rsquo;s billing model and that means doing frequent
backups, as I do, could cost a fortune in the long run. It is also difficult
to predict costs, especially at this early stage in my homelab.&lt;/li>
&lt;li>&lt;strong>IDrive/Backblaze/Crashplan&amp;hellip;&lt;/strong> since they seem to be at the top of every
list entitled &amp;ldquo;Best Backup Service 2021&amp;rdquo;. These are very nice solutions and
allow for huge amounts of data, but I don&amp;rsquo;t need more than 100GB at the moment
for all of my most important files. Additionally I want a place I can host a
Borg repository, but most of these backup solutions have some proprietary
software or a lot of features I&amp;rsquo;ll never use and that is reflected in the
price.&lt;/li>
&lt;li>&lt;strong>Dropbox/Google Drive (or similar)&lt;/strong> is another option that seems popular.
Dropbox would let me keep 2TB of stuff in the cloud for £7.99 a month&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>,
but the same issues that I have with those dedicated backup solutions still
exist. I&amp;rsquo;m a DevOps engineer, I&amp;rsquo;m not afraid to get my hands dirty and I want
something fairly basic that I can build on not something that provides
everything imaginable.&lt;/li>
&lt;li>&lt;strong>Hetzner Storage Box&lt;/strong> is a much simpler solution with a wide range of price
points and ways to access the box. Hetzner also seems to be highly thought of
in the cloud hosting space. They offer everything from 100GB to 10TB and at
reasonable prices.&lt;/li>
&lt;/ul>
&lt;p>For my current usage, a 100GB BX10&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup> storage box from Hetzer, at a little
less than £3 a month, is the best choice. It was easy to setup and I can use
SFTP/SSH to access the data on the box. There are no overcomplicated extras, its
simple and that&amp;rsquo;s all it needs to be. Another solution might be the better for
me in the future though as the quantity of data I&amp;rsquo;m backing up increases.&lt;/p>
&lt;h2 id="ansible-roles-and-automation">Ansible Roles and Automation&lt;/h2>
&lt;p>I have a few different machines that I&amp;rsquo;d like to start backing up including my
personal laptop, desktop and homelab server. Therefore I would have to set up a
backup on each of the machines and any time a change in my backup setup occurs
I&amp;rsquo;d have to propagate that change to each machine. This caused me to revisit an
old friend by the name of Ansible to try and automate the installation (and also
the running) of my backup setup.&lt;/p>
&lt;p>Restic was still being tested when I started playing with Ansible and I
discovered &lt;a href="https://github.com/angristan/ansible-restic">a pretty decent role on Github&lt;/a>
that I was able to use as a starting point for my own backup role.&lt;/p>
&lt;p>I wanted a few things from this role:&lt;/p>
&lt;ul>
&lt;li>To be as platform agnostic as possible (especially Linux/MacOS)&lt;/li>
&lt;li>To handle general backups but also more service specific backups&lt;/li>
&lt;li>To be very configurable as my use on different machines varies&lt;/li>
&lt;/ul>
&lt;p>My initial task was to adapt a backup script I have been playing around with to
a Jinja2 template so that Ansible could populate it with the details of
whichever repository was configured. Then I added a Nextcloud backup script
which I will detail more in the next section. Finally I added in a playbook,
default configuration and inventory file and was able to start testing.&lt;/p>
&lt;p>My playbook installs an SSH key and configuration for the remote Hetzner storage
box. It then creates backup scripts for each configured repository and a
separate script for the Nextcloud backup. Next a cronjob is added for each of
the scripts at a configurable interval. I have been using this for a few days
and everything has gone smoothly so far.&lt;/p>
&lt;p>In addition to the basics, both Restic and Borg behaviour can be used and if
Borg is used a set of &lt;code>init&lt;/code> scripts are generated to create the initial
repository if it does not already exist.&lt;/p>
&lt;p>More detail on the configuration and usage of this Ansible role can be found on
my Github&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>It is definitely not perfect and still a work in progress, but it will do for
now and as I learn more about Ansible and my needs it will improve.&lt;/p>
&lt;h2 id="nextcloud-specific-backups">Nextcloud Specific Backups&lt;/h2>
&lt;p>Nextcloud is probably tied first for the most important thing to backup for me -
photos being the joint most important. Until this point Nextcloud had been
backed up as a folder like everything else, which isn&amp;rsquo;t good as it can lead to
inconsistencies in files which are then part of my backups. Additionally the
database was being backed up as a folder too, which again is far from the
recommended way to do that.&lt;/p>
&lt;p>In order to safely backup Nextcloud you must enable maintenance mode, then
backup the config, data and theme folders (or more if you want) and finally dump
the database&lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup>. Then you can disable maintenance mode and continue using
Nextcloud.&lt;/p>
&lt;p>To enable maintenance mode on my Nextcloud instance I must exec into the
Kubernetes pod and run a command, something like&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">kubectl &lt;span class="nb">exec&lt;/span> -n nextcloud &lt;span class="nv">$POD&lt;/span> -- &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> su - -s &lt;span class="s1">&amp;#39;/bin/sh&amp;#39;&lt;/span> www-data -c &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> &lt;span class="s2">&amp;#34;php -d memory_limit=-1 /var/www/html/occ maintenance:mode --on&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>which runs the command on the remote pod as the &lt;code>www-data&lt;/code> user with php memory
limit disabled (this was necessary at time of writing).&lt;/p>
&lt;p>Once this is done I can backup the data folders and then run another command on
the postgres pod to dump the database&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">kubectl &lt;span class="nb">exec&lt;/span> -n nextcloud &lt;span class="nv">$POD&lt;/span> -- &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> /bin/bash -c &lt;span class="s2">&amp;#34;/opt/bitnami/postgresql/bin/pg_dump -Unextcloud nextcloud&amp;#34;&lt;/span> &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> &amp;gt; nextcloud.bak.sql
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>I combined these commands into a Nextcloud backup script and piped the output of
the database dump to Borg/Restic, as both support backups from &lt;code>stdin&lt;/code>. Now my
data from Nextcloud is backed up safely.&lt;/p>
&lt;h2 id="next-steps">Next Steps&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> Make service specific scripts for Jellyfin and Photoprism&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Tidy up the Ansible role&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Add some resilience to the scripts&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Add general purpose database dumping to the ansible role&lt;/li>
&lt;/ul>
&lt;p>I will update this list as I tick off these items :)&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://www.borgbackup.org/">https://www.borgbackup.org/&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://www.backblaze.com/blog/the-3-2-1-backup-strategy/">A decent article about 3-2-1&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Not quite true as most of my data is still in the cloud somewhere until
I get this self-hosting stuff sorted.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://www.duplicati.com/">https://www.duplicati.com/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>&lt;a href="https://restic.net/">https://restic.net/&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>See this issue: &lt;a href="https://github.com/borgbackup/borg/issues/636">https://github.com/borgbackup/borg/issues/636&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>&lt;a href="https://www.dropbox.com/buy">https://www.dropbox.com/buy&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>&lt;a href="https://www.hetzner.com/storage/storage-box">https://www.hetzner.com/storage/storage-box&lt;/a>&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>&lt;a href="https://github.com/Jonnobrow/ansible-backup">https://github.com/Jonnobrow/ansible-backup&lt;/a>&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10">
&lt;p>&lt;a href="https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html">https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html&lt;/a>&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Homelab - Part 2</title><link>https://jonathanbartlett.co.uk/2021/09/02/homelab-part-2.html</link><pubDate>Thu, 02 Sep 2021 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2021/09/02/homelab-part-2.html</guid><description>&lt;p>Since &lt;a href="https://jonathanbartlett.co.uk/2021/05/18/homelab-part-1.html">my previous post&lt;/a> I have
spent a fair amount of time tinkering with my homelab. In part 1 I
hadn&amp;rsquo;t even built a server yet and now I have a number of services
running that my partner and I use on a daily basis. This post includes
some of the ups and downs of that tinkering and details the services I
am hosting and my plans for the future.&lt;/p>
&lt;h2 id="the-good-the-bad-and-the-ugly">The Good, the Bad and the Ugly&lt;/h2>
&lt;p>&lt;strong>The Good&lt;/strong>: Shortly after I released the first post in this series the
components for my server arrived. I have built a few PCs before and enjoyed the
build process, which, in the world of plastic constructions toys, I would equate
to Duplo as opposed to Lego, although the stakes can be a little higher. The
entire build took a little under two hours, and the system booted straight into
the PVE live USB I had plugged in.&lt;/p>
&lt;p>&lt;strong>The Bad&lt;/strong>: In my eagerness to get started I neglected to plan as thoroughly as
perhaps I should have. I sped through the guided installer for Proxmox&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>
and set up my first virtual machine. Once Ubuntu 21.04&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> had installed, I
SSH-ed into the VM and installed the required applications to get a Kubernetes
cluster up and running. This may all sound as though it was going well, but in
the setup I failed to set up static IP addressing for both the Proxmox host and
the Kubernetes VM. This would later result in me having to basically start the
installation from scratch, with a much more rigidly defined IP addressing
strategy for my home network. The re-installation of Kubernetes went smoothly,
as it had before, and I had a cluster up and running.&lt;/p>
&lt;p>&lt;strong>The Ugly&lt;/strong>: At this point in the story, my experience goes from limited to
non-existent. I knew that I wanted to use GitOps&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> where possible and had a
pretty decent idea of what I wanted to host, but claiming I understood more than
that would be straight up lying to you. I would like to stress the fact that
this is exactly the reason why I was doing any of this in the first place - to
learn. My lack of knowledge did mean that what follows isn&amp;rsquo;t the best and my
homelab is still nowhere near perfect or even good.&lt;/p>
&lt;ul>
&lt;li>I chose FluxCD (v2)&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> as my GitOps&lt;sup id="fnref1:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> provider and used a friends
manifests as the starting point for my own. The problem here arose from me
adding in stuff for my own particular use case. I added in files and created
Persistent Volumes and Persistent Volume Claims that were not needed. I had to
install a local-path provisioner&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup> in order for volumes to be
automatically created if I hadn&amp;rsquo;t explicitly defined them. Neeedless to say,
it got quite messy, and my manifests are still rather disorganised and my
volume management is far from ideal.&lt;/li>
&lt;li>Data storage and backups was the next issue. Until this point my solution for
backups left a lot to be desired. I had multiple copies of the really
important stuff but a lot of those copies hadn&amp;rsquo;t been updated in a while and
had therefore grown out of sync with the original, defeating the point of a
backup. All of my data lived (and sadly still lives) on a 2TB Portable HDD.
This gets mounted to the VM on boot and uses BTRFS (wanted to learn a bit
about this too) subvolumes for each main category of data. I now run
borg-backup&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup> 4 times a day to backup my photos and any essential
documents and data from my cluster. The ugliness comes from the fact my
backups live on the same portable HDD and that my database backups just copy
the files rather than using the intended backup functions for postgres.
Additionally, I make no use of BTRFS.&lt;/li>
&lt;li>As for how the data is served to my services, I use NFS. NFS is perfect for my
usage as I can mount exports on multiple services and have everything play
nicely. The issue here is permissions, and this is such an issue that I cannot
yet explain what is going on and has affected so much that it warrants it own
bullet. I&amp;rsquo;m sure a future post will address my solution to this. However, for
now it remains an issue that prevents Jellyfin from updating metadata,
prevents me from directly managing my photo library or prevents Nextcloud from
backing up photos from my devices.&lt;/li>
&lt;/ul>
&lt;h2 id="the-end-result">The End Result&lt;/h2>
&lt;p>So after all of this about the highs and lows of my experience, you may be
wondering what the end result is like. I changed my plans for what to host a
little during the process since I discovered certain things that I needed sooner
and found that a few services would not be required if I used something else
(*cough cough* nextcloud).&lt;/p>
&lt;p>So here is a bit about what I&amp;rsquo;m hosting, my thoughts on the service as a whole
and how the setup and maintenance has gone.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Nextcloud&lt;/strong>&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup> is probably the most crucial service I host (except
services I regard as being system services such as a load balancer and reverse
proxy). It is a self-hosted cloud with an abundance of features.&lt;/p>
&lt;details>
I rely on Nextcloud for: storage of my documents, backup and sync of
my photos, my calendar, my todo-list, my contacts, my quick notes, my RSS feed
aggregation, my bookmarks and probably some more things that I can't remember
right now.
&lt;p>I am very pleased with Nextcloud, the community surrounding it and the ongoing
development and would highly reccomend taking a look at it if you are thinking
of removing a cloud provider, like Google, from your day to day. And as far as
maintenance is concerned, after you have done the initial setup the day to day
is minimal and larger updates are generally pain-free too.&lt;/p>
&lt;/details>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>PhotoPrism&lt;/strong>&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup> is an app for managing and viewing your photo
collection. For years my photos have lived on Google Photos or on my portable
HDD. This worked for me and my family, but when Google announced changes to
the Google Photos storage policy&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup> I knew it was time for a change.&lt;/p>
&lt;details>
I use photoprism to manage my photo library. I can put photos into albums,
manage their metadata, archive lower quality snaps, share albums with family
and have full size images forever with not 15GB limit or crazy compression.
&lt;p>PhotoPrism is okay, it&amp;rsquo;s not perfect but is still in the early stages of life
and many features that would make it a really good Google Photos replacement
are in the roadmap or under development. These include multiple user accounts,
feeds (a bit like a personal Instagram/PixelFed) and more. It&amp;rsquo;s quite easy to
setup and maintain, indexing takes a while and so does the initial photo
organisation, but once that is done its trivial to maintain your library as a
user.&lt;/p>
&lt;/details>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Paperless-ng&lt;/strong>&lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup> is a self-hosted document manager with a nice
Django&lt;sup id="fnref:11">&lt;a href="#fn:11" class="footnote-ref" role="doc-noteref">11&lt;/a>&lt;/sup> web interface. I spun it up to have a play and its here to
stay. I can scan documents with my phone or a dedicated scanner and then add
the PDFs to a directory on Nextcloud which gets consumed by paperless.&lt;/p>
&lt;details>
I can tag documents, give them a correspondent, document type and date and
also inform paperless of the keywords or phrases in documents that relate to
the preceding things and paperless with use OCR[^fn:11] to work it out
automatically in the future. It has meant I don't need to keep paper copies of
a lot of things and can take all my documents with me wherever I go - super
useful.
&lt;p>As for the maintenance, it requires very little and I am yet to encounter any
issues with paperless whatsoever.&lt;/p>
&lt;/details>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Jellyfin&lt;/strong>&lt;sup id="fnref:12">&lt;a href="#fn:12" class="footnote-ref" role="doc-noteref">12&lt;/a>&lt;/sup> is a free-software media system and was one of the few
services I self-hosted prior to this new setup. My library was already setup
and its something I use a lot so was probably the second thing I setup after
Nextcloud.&lt;/p>
&lt;details>
I use it for Movies, Shows, Music, Podcasts and Audiobooks, but Jellyfin has
support for some other things as well. It can also grab metadata from many
sources, handle subtitles, stream to most devices and platforms and handle
multiple users.
&lt;p>This is unfortunately a service I am experiencing issues with. Since setting
it up on my new server I have yet to get metadata fetching working which
leaves my library ugly and uninformative (but functional). I have experimented
with several different fixes but I believe the issue lies with the permissions
error mentioned earlier.&lt;/p>
&lt;/details>
&lt;/li>
&lt;/ul>
&lt;h2 id="tackling-the-ugliness">Tackling the Ugliness&lt;/h2>
&lt;p>Backups are my next priority. My services, from a user perspective, are working
nicely and I have started relying upon them. Therefore, backing up data is super
important to keeping the self-hosting dream alive. I need to work out a solution
to creating offsite backups and will likely be looking into this over the next
few weeks and months - so watch this space.&lt;/p>
&lt;p>Once backups are sorted I will likely start tidying my manifests and organising
my services a little better. Then I will tackle the permissions issues I am
experiencing and try to get Jellyfin back to where it was before. I also want to
set up a recipe manager (with shopping list support) in the near future. My
personal website is also still on Gitlab pages, and while I don&amp;rsquo;t think it is
necessary to self-host this, it would be nice if &lt;a href="https://jonnobrow.co.uk">&lt;/a>
redirected to this site rather than just being a dead end.&lt;/p>
&lt;p>I also want to start creating Ansible roles for certain things I setup. For
example, a role to setup whatever my backup solution is and a role to setup
wireguard. These are things I need on 4+ different machines (a couple of
servers and a couple of personal devices) and therefore the time and effort of
creating an Ansible role will pay off quickly.&lt;/p>
&lt;p>Thats all for now, but I will hopefully have some more useful and interesting
posts to share in the near future.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://www.proxmox.com/en/proxmox-ve">https://www.proxmox.com/en/proxmox-ve&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://releases.ubuntu.com/21.04/">https://releases.ubuntu.com/21.04/&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>GitOps: versioned CI/CD on top of declarative infrastructure. Stop scripting and start shipping. - &lt;a href="https://twitter.com/kelseyhightower/status/953638870888849408">Kelsey Hightower&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://fluxcd.io/docs/">https://fluxcd.io/docs/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>&lt;a href="https://github.com/rancher/local-path-provisioner">https://github.com/rancher/local-path-provisioner&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>&lt;a href="https://www.borgbackup.org/">https://www.borgbackup.org/&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>&lt;a href="https://nextcloud.com/">https://nextcloud.com/&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>&lt;a href="https://photoprism.app">https://photoprism.app&lt;/a>&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>&lt;a href="https://blog.google/products/photos/storage-changes/">https://blog.google/products/photos/storage-changes/&lt;/a>&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10">
&lt;p>&lt;a href="https://github.com/jonaswinkler/paperless-ng">https://github.com/jonaswinkler/paperless-ng&lt;/a>&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:11">
&lt;p>&lt;a href="https://www.djangoproject.com/">https://www.djangoproject.com/&lt;/a>&amp;#160;&lt;a href="#fnref:11" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:12">
&lt;p>&lt;a href="https://jellyfin.org/">https://jellyfin.org/&lt;/a>&amp;#160;&lt;a href="#fnref:12" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Homelab - Part 1</title><link>https://jonathanbartlett.co.uk/2021/05/18/homelab-part-1.html</link><pubDate>Tue, 18 May 2021 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2021/05/18/homelab-part-1.html</guid><description>&lt;p>Now that I have finished university I have nearly 5 months of
unemployment ahead of me before I start my graduate role at Sky.
Therefore I need a project to keep my entertained. I have a huge list
of things to get done, some of which will end up immortalised as blog
posts on here. However, if you are reading this you are probably here
to hear about the beginnings of my Homelab.&lt;/p>
&lt;h2 id="what-is-a-homelab">What is a Homelab&lt;/h2>
&lt;p>&lt;strong>r/homelab&lt;/strong> provides the following definition&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>:&lt;/p>
&lt;blockquote>
&lt;p>Homelab [hom-læb](n): a laboratory of (usually slightly outdated)
awesome in the domicile&lt;/p>
&lt;/blockquote>
&lt;p>So essentially, it is some hardware that you set up a home in order to:&lt;/p>
&lt;ol>
&lt;li>Experiment with &amp;ldquo;enterprise&amp;rdquo; kit in your home&lt;/li>
&lt;li>Learn about network infrastructure&lt;/li>
&lt;li>Self-host your own apps and services&lt;/li>
&lt;/ol>
&lt;p>For me it&amp;rsquo;s the predominantly the last one, with a little of number 2 in
there as well. I will get to play with the enterprise stuff at work and
my degree has taught me about the underlying infrastructure, therefore
its mainly the benefits of self-hosting and the DevOps experience I get
along the way that I am interested in.&lt;/p>
&lt;p>&lt;em>So to quickly summarise, a homelab is some tech you have at home that
you can play around with, learn about and have fun with all at the same
time.&lt;/em>&lt;/p>
&lt;h3 id="the-benefits-of-self-hosting">The benefits of self-hosting&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>You own your data&lt;/strong>. If it&amp;rsquo;s on your hardware, then you own it. You
aren&amp;rsquo;t giving your memories to Google or relying on Spotify and
Netflix to have the music and tv you want to watch.&lt;/li>
&lt;li>&lt;strong>You learn a lot&lt;/strong>. Setting up some of this stuff isn&amp;rsquo;t easy and
isn&amp;rsquo;t for beginners (there is a lot that is though) and it &lt;em>can&lt;/em> be a
bit of a steep learning curve. However the community is great and will
probably help you if you ask 😜&lt;/li>
&lt;li>&lt;strong>You can make it your own&lt;/strong>. This may seem obvious, it may not, but
self-hosting gives you that all important freedom to do whatever you
like and with that comes the ability to tweak pretty much everything
to your liking. There is a big overlap between free-software&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> and
self-hosting so if you are so inclined you are almost certainly able
to contribute to or fork a project so that a feature you have always
wanted is included. And failing that, ask nicely and someone might get
to it eventually.&lt;/li>
&lt;/ul>
&lt;h2 id="my-current-experience">My current experience&lt;/h2>
&lt;p>So you might be able to tell that this isn&amp;rsquo;t exactly new to me.
Although this is first time I am inclined to call it a Homelab, I have
had some form of self-hosting going for a little while. Mainly on
Raspberry Pis and as virtual machines on my desktop PC, so I have been
quite limited in what I can do, but its a great place to start if you
aren&amp;rsquo;t sure it&amp;rsquo;s for you, or if you can&amp;rsquo;t afford to build or buy a
server.&lt;/p>
&lt;p>My &lt;em>credentials&lt;/em> in the Homelabbing space are:&lt;/p>
&lt;ul>
&lt;li>Self-hosted Nextcloud&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>, Minecraft, Jellyfin&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> (Just for me
on a RPi)&lt;/li>
&lt;li>Deployed K8s&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup> clusters the hard way&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup> and with various scripts&lt;/li>
&lt;li>Work experience with cloud technologies, docker and networking&lt;/li>
&lt;li>My dissertation was half DevOps&lt;/li>
&lt;li>I have a computer science degree in which I took some advanced
networking modules&lt;/li>
&lt;/ul>
&lt;p>I definitely do not know everything, far from it and I would still call
myself a Homelab beginner. A lot of the things I have set up were
relatively easy and my practical experience is limited, hence Homelab -
Part 1 and not Homelab - Part x.&lt;/p>
&lt;h2 id="the-sad-state-of-affairs-that-is-my-home-network">The sad state of affairs that is my home network&lt;/h2>
&lt;p>I wish I could tell you my home network was dreamy with gigabit fibre
broadband, high quality switches and access points, ethernet everywhere
and all the bells and whistles.&lt;/p>
&lt;p>However, the real state of my network is dire. I am a student still
(technically) when writing this and I live in a flat, which I rent,
therefore my ability to install ethernet, access points and the rest
is limited.&lt;/p>
&lt;p>I also had the misfortune of falling in love with a flat that receives
a maximum of 10Mbps download and 1Mbps upload speed.&lt;/p>
&lt;p>&lt;img src="https://jonathanbartlett.co.uk/speedtest.png" alt="My abismal speedtest">&lt;/p>
&lt;p>My home network actual consists of a Sky Hub with a single 25m ethernet
cable clipped to the skirting board all the way to the office. In there
it goes in to a 5 port gigabit switch and provides the upstream for my
PC, a range extender (because we have concrete walls too 😦), the
printer and my Raspberry Pi.&lt;/p>
&lt;p>I do plan to upgrade all this in the future but I don&amp;rsquo;t see the point in
getting good network hardware when the highest speed it will see is
10Mbps.&lt;/p>
&lt;h2 id="building-a-server">Building a &amp;ldquo;Server&amp;rdquo;&lt;/h2>
&lt;p>From my research it seems that there are four main choices when
it comes to getting in to homelabbing. These are listed below in order
of cost (both initial and ongoing, descending):&lt;/p>
&lt;ol>
&lt;li>The first is to buy enterprise grade kit second or third hand from
somewhere like eBay and deal with the incessant whining of high rpm
fans and the power bill that will kill your WAF&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>.&lt;/li>
&lt;li>&lt;em>(My choice)&lt;/em> Buy components, either new or used, and build a server
PC yourself.&lt;/li>
&lt;li>Buy some kit like Raspberry Pis and have a play since
they are cheap and low power. One day you might even get to a crazy
setup that dwarfs enterprise solutions&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup>.&lt;/li>
&lt;li>The last is that you just had some old kit lying around like an old
PC and you install an operating system on it an you&amp;rsquo;re good to
go. Unfortunately I am not in that position and all the kit I have is
either in use or useless.&lt;/li>
&lt;/ol>
&lt;p>So I decided to use consumer parts and build my own server PC. Although
for similar money I could have purchased a rack mountable, ex-enterprise
server, this would be extremely overkill for my needs and in the long
run probably cost me an arm and a leg whilst killing baby seals in the
process.&lt;/p>
&lt;h3 id="the-parts">The Parts&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: left">Part Type&lt;/th>
&lt;th style="text-align: left">Part Choice&lt;/th>
&lt;th style="text-align: left">Rationale&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: left">&lt;strong>CPU&lt;/strong>&lt;/td>
&lt;td style="text-align: left">Ryzen 3600&lt;/td>
&lt;td style="text-align: left">65W TDP and 12 Threads&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">&lt;strong>Memory&lt;/strong>&lt;/td>
&lt;td style="text-align: left">16GB DDR4 3200Mhz (KLEVV BOLT X)&lt;/td>
&lt;td style="text-align: left">16GB seems like the minimum these days&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">&lt;strong>Storage&lt;/strong>&lt;/td>
&lt;td style="text-align: left">500GB WD Blue SSD (For now)&lt;/td>
&lt;td style="text-align: left">Boot Drive and VM/OS Storage&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">&lt;strong>PSU&lt;/strong>&lt;/td>
&lt;td style="text-align: left">AeroCool Integrator 500 W, 80+ Bronze&lt;/td>
&lt;td style="text-align: left">Cheap and reasonably efficient&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">&lt;strong>Motherboard&lt;/strong>&lt;/td>
&lt;td style="text-align: left">Gigabyte B450M DS3H&lt;/td>
&lt;td style="text-align: left">64GB RAM, Good expandability&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">&lt;strong>Case&lt;/strong>&lt;/td>
&lt;td style="text-align: left">Antec VSK-3000-Elite&lt;/td>
&lt;td style="text-align: left">4 3.5&amp;quot; Bays, Not Ugly and MicroAtx&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="what-services-will-i-be-deploying">What services will I be deploying?&lt;/h2>
&lt;p>I can divide the software portion into a few different categories. These
being the host operating system, main virtual machines and then the
services I will use internally and the services I will use externally.&lt;/p>
&lt;h3 id="host-operating-system">Host Operating System&lt;/h3>
&lt;p>For the host operating system I will be using Proxmox Virtualization
Environment (PVE)&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup> which is AGPLv3&lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup> and is a distribution
of linux based on Debian. It is virtualization management system that is
based on QEMU/KVM, with which I am familiar, and will therefore allow me
to create virtual machines easily. It also provides some nice management
features and supports clustering with other PVE nodes for
redundancy - something I may explore in the future.&lt;/p>
&lt;p>My reasoning for choosing a virtualization environment over a server OS
like Ubuntu 20.4 LTS is that I hope to run several virtual machines in
the future including TrueNAS Core for data storage, pfsense for routing
and K8s.&lt;/p>
&lt;h3 id="main-virtual-machines">Main Virtual Machines&lt;/h3>
&lt;p>For now there will be only a single virtual machine, however as I
explained in my rationale for the host operating system, I plan to add
more in the future.&lt;/p>
&lt;p>The one virtual machine will basically use all of the system resources
not consumed by Proxmox and will house a K8s cluster. I have toyed with
splitting my cluster into a few separate virtual machines but given that
they will all be on the same hardware, the redundancy and
high-availability benefits are void - it&amp;rsquo;s also just me using it and if
it goes down, I just have to deal with it.&lt;/p>
&lt;p>K8s is a container orchestration tool that will allow me to neatly run
all of my services with much less overhead than if I provisioned virtual
machines for them all. It is also a great technology to learn in 2021.&lt;/p>
&lt;h3 id="utilities-and-services-for-internal-use">Utilities and Services for Internal Use&lt;/h3>
&lt;p>&lt;strong>High Priority&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>NGINX Proxy&lt;sup id="fnref:11">&lt;a href="#fn:11" class="footnote-ref" role="doc-noteref">11&lt;/a>&lt;/sup>: Access to services&lt;/li>
&lt;li>Wireguard&lt;sup id="fnref:12">&lt;a href="#fn:12" class="footnote-ref" role="doc-noteref">12&lt;/a>&lt;/sup>: Remote access to home network&lt;/li>
&lt;li>Prometheus&lt;sup id="fnref:13">&lt;a href="#fn:13" class="footnote-ref" role="doc-noteref">13&lt;/a>&lt;/sup>: Monitoring&lt;/li>
&lt;li>Grafana&lt;sup id="fnref:14">&lt;a href="#fn:14" class="footnote-ref" role="doc-noteref">14&lt;/a>&lt;/sup>: Dashboard for metrics&lt;/li>
&lt;li>Syncthing&lt;sup id="fnref:15">&lt;a href="#fn:15" class="footnote-ref" role="doc-noteref">15&lt;/a>&lt;/sup>: File synchronisation between devices&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Nice to Have&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Transmission&lt;sup id="fnref:16">&lt;a href="#fn:16" class="footnote-ref" role="doc-noteref">16&lt;/a>&lt;/sup>: BitTorrent client&lt;/li>
&lt;li>Sonarr&lt;sup id="fnref:17">&lt;a href="#fn:17" class="footnote-ref" role="doc-noteref">17&lt;/a>&lt;/sup>: TV Show Management&lt;/li>
&lt;li>Radarr&lt;sup id="fnref1:17">&lt;a href="#fn:17" class="footnote-ref" role="doc-noteref">17&lt;/a>&lt;/sup>: Movie Management&lt;/li>
&lt;li>Lidarr&lt;sup id="fnref2:17">&lt;a href="#fn:17" class="footnote-ref" role="doc-noteref">17&lt;/a>&lt;/sup>: Music Management&lt;/li>
&lt;li>Jackett&lt;sup id="fnref:18">&lt;a href="#fn:18" class="footnote-ref" role="doc-noteref">18&lt;/a>&lt;/sup>: Query aggregator for *arr apps above&lt;/li>
&lt;li>Organizr&lt;sup id="fnref:19">&lt;a href="#fn:19" class="footnote-ref" role="doc-noteref">19&lt;/a>&lt;/sup>: Dashboard for services&lt;/li>
&lt;/ul>
&lt;h3 id="services-for-external-use">Services for External Use&lt;/h3>
&lt;p>&lt;strong>High Priority&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Jellyfin&lt;sup id="fnref1:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>: Movies, TV, Music&lt;/li>
&lt;li>Nextcloud&lt;sup id="fnref1:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/li>
&lt;li>Tiny Tiny RSS&lt;sup id="fnref:20">&lt;a href="#fn:20" class="footnote-ref" role="doc-noteref">20&lt;/a>&lt;/sup>: RSS Aggregator&lt;/li>
&lt;li>My Personal Website&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Medium Priority&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Photos: Photoprism (Synced with Nextcloud)&lt;/li>
&lt;li>Prosody IM&lt;sup id="fnref:21">&lt;a href="#fn:21" class="footnote-ref" role="doc-noteref">21&lt;/a>&lt;/sup>: XMPP&lt;/li>
&lt;li>Paperless-ng: Document manager&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Nice to Have&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Recipe Sage&lt;sup id="fnref:22">&lt;a href="#fn:22" class="footnote-ref" role="doc-noteref">22&lt;/a>&lt;/sup>: Recipe management and food planner&lt;/li>
&lt;li>Sourcehut&lt;sup id="fnref:23">&lt;a href="#fn:23" class="footnote-ref" role="doc-noteref">23&lt;/a>&lt;/sup>: Software Development&lt;/li>
&lt;/ul>
&lt;h2 id="whats-next">What&amp;rsquo;s next?&lt;/h2>
&lt;p>Well, the first thing is to build the PC. The parts are on the way and
as soon as they arrive I will get started. Then I need to setup Proxmox
and Kubernetes. After that I will get started on moving over some of the
services I already self-host and the things that I have labelled as High
Priority. Once all that is done I will move on to the other services,
and eventually I will start adding in more VMs for things like TrueNAS
Core and pfsense, but thats a while away yet.&lt;/p>
&lt;p>Subscribe to my RSS feed so you don&amp;rsquo;t miss Homelab - Part 2.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://www.reddit.com/r/homelab/wiki/introduction">https://www.reddit.com/r/homelab/wiki/introduction&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Free as in freedom. Free Software gives everybody the rights to
use, understand, adapt and share software. &lt;a href="https://fsfe.org/">https://fsfe.org/&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://nextcloud.com/">https://nextcloud.com/&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://jellyfin.org/">https://jellyfin.org/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>K8s == Kubernetes &lt;a href="https://kubernetes.io/">https://kubernetes.io/&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>&lt;a href="https://github.com/kelseyhightower/kubernetes-the-hard-way">https://github.com/kelseyhightower/kubernetes-the-hard-way&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>Wife Acceptance Factor &lt;a href="https://openhomelab.org/index.php/WAF">https://openhomelab.org/index.php/WAF&lt;/a>
or &lt;a href="https://en.wikipedia.org/wiki/Wife_acceptance_factor">https://en.wikipedia.org/wiki/Wife_acceptance_factor&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>&lt;a href="https://www.reddit.com/r/homelab/comments/jqh6m8/raspberry_pi_k8s_cluster">https://www.reddit.com/r/homelab/comments/jqh6m8/raspberry_pi_k8s_cluster&lt;/a>&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>&lt;a href="https://pve.proxmox.com/wiki/Main_Page">https://pve.proxmox.com/wiki/Main_Page&lt;/a>&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10">
&lt;p>&lt;a href="https://www.gnu.org/licenses/agpl-3.0.en.html">https://www.gnu.org/licenses/agpl-3.0.en.html&lt;/a>&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:11">
&lt;p>&lt;a href="https://nginx.org/en/">https://nginx.org/en/&lt;/a>&amp;#160;&lt;a href="#fnref:11" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:12">
&lt;p>&lt;a href="https://www.wireguard.com/">https://www.wireguard.com/&lt;/a>&amp;#160;&lt;a href="#fnref:12" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:13">
&lt;p>&lt;a href="https://prometheus.io/docs/introduction/overview/">https://prometheus.io/docs/introduction/overview/&lt;/a>&amp;#160;&lt;a href="#fnref:13" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:14">
&lt;p>&lt;a href="https://grafana.com/">https://grafana.com/&lt;/a>&amp;#160;&lt;a href="#fnref:14" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:15">
&lt;p>&lt;a href="https://syncthing.net/">https://syncthing.net/&lt;/a>&amp;#160;&lt;a href="#fnref:15" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:16">
&lt;p>&lt;a href="https://transmissionbt.com/">https://transmissionbt.com/&lt;/a>&amp;#160;&lt;a href="#fnref:16" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:17">
&lt;p>&lt;a href="https://wiki.servarr.com/Main_Page">https://wiki.servarr.com/Main_Page&lt;/a>&amp;#160;&lt;a href="#fnref:17" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:17" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref2:17" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:18">
&lt;p>&lt;a href="https://github.com/Jackett/Jackett">https://github.com/Jackett/Jackett&lt;/a>&amp;#160;&lt;a href="#fnref:18" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:19">
&lt;p>&lt;a href="https://github.com/causefx/Organizr/">https://github.com/causefx/Organizr/&lt;/a>&amp;#160;&lt;a href="#fnref:19" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:20">
&lt;p>&lt;a href="https://tt-rss.org/">https://tt-rss.org/&lt;/a>&amp;#160;&lt;a href="#fnref:20" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:21">
&lt;p>&lt;a href="https://prosody.im/">https://prosody.im/&lt;/a>&amp;#160;&lt;a href="#fnref:21" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:22">
&lt;p>&lt;a href="https://recipesage.com/#/welcome">https://recipesage.com/#/welcome&lt;/a>&amp;#160;&lt;a href="#fnref:22" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:23">
&lt;p>&lt;a href="https://sr.ht/">https://sr.ht/&lt;/a>&amp;#160;&lt;a href="#fnref:23" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>A brief history of my dotfile management</title><link>https://jonathanbartlett.co.uk/2021/05/14/a-brief-history-of-my-dotfiles.html</link><pubDate>Fri, 14 May 2021 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2021/05/14/a-brief-history-of-my-dotfiles.html</guid><description>&lt;details>
&lt;summary>
tl;dr
&lt;/summary>
&lt;p class="details">
Over the past 2-3 years I have managed my dotfiles in various different ways.
This post covers some of the highlights of that journey, and some tips for those just
starting out on their configuration journey.
&lt;/p>
&lt;/details>
&lt;h2 id="what-is-a-dotfile-and-why-would-you-manage-them">What is a dotfile and why would you manage them?&lt;/h2>
&lt;p>For the uninitiated amongst you, a &amp;ldquo;dotfile&amp;rdquo; is a configuration file for a tool, program or service
on your computer. They usually refer to the user specific configuration and often on a Unix based
operating system like MacOS or Linux. The name comes from the &lt;code>.&lt;/code>(dot) usually at the start of the
filename which makes the file &amp;ldquo;hidden&amp;rdquo; in most operating systems.&lt;/p>
&lt;hr>
&lt;p>For example &lt;code>~/.config/nvim/init.lua&lt;/code> is the &amp;ldquo;dotfile&amp;rdquo; for my NeoVim configuration since it lives
in the hidden &amp;ldquo;.config&amp;rdquo; directory.&lt;/p>
&lt;hr>
&lt;p>As to why you should manage them, well you don&amp;rsquo;t have to and if you are using a
flashy distribution of Linux where everything is configured with graphical user
interfaces then chances are you will have very few dotfiles to manage even if you want to.
In my situation, I run a more customisable distribution of Linux called Arch
Linux&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> so there are more than a handful of dotfiles to keep track of.
Furthermore my configuration changes on a regular basis and I might want to
revert certain parts so version control if a really nice thing to have.&lt;/p>
&lt;p>So here are my top reasons for managing dotfiles:&lt;/p>
&lt;ul>
&lt;li>You can revert things that don&amp;rsquo;t go to plan&lt;/li>
&lt;li>You can easily move dotfiles between machines (I run at least two machines at any given time)&lt;/li>
&lt;li>You can keep your configuration in text format and not have to deal with configuration GUIs&lt;/li>
&lt;/ul>
&lt;p>So you may now be thinking &amp;ldquo;so how do I manage my dotfiles?&amp;rdquo; and here are some approaches I have
experience with that will hopefully answer that question.&lt;/p>
&lt;h2 id="symlinking">Symlinking&lt;/h2>
&lt;p>Symlinking (short for symbolic linking) creates a relationship between the real file and a linked
file, allowing the same file to appear multiple times in your filesystem. This can be really useful
for dotfiles since you can keep all your configurations in one place, say &lt;code>~/dotfiles&lt;/code> and then symlink
those files to their required locations.&lt;/p>
&lt;p>For example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># ZSH Configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ln -sf ~/dotfiles/.zshrc ~/.zshrc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now when we update the file in &lt;code>~/dotfiles&lt;/code> the changes will propagate to the relevant places and your
config will be updated.&lt;/p>
&lt;p>There are even tools to manage links like this, the most notable is Gnu Stow&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>.&lt;/p>
&lt;hr>
&lt;p>My personal experience is limited, I never got into Stow&lt;sup id="fnref1:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> and only briefly used the symlink method.
Since I use linux and almost every tool in my day to day has a config file that lives in its own unique
location I ended up confusing myself with symlinks and therefore I quickly started looking for something
else.&lt;/p>
&lt;p>Now I am not saying don&amp;rsquo;t use Stow&lt;sup id="fnref2:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> or plain old symlinks, but it wasn&amp;rsquo;t for me when I tried it.&lt;/p>
&lt;p>Another downside I noticed is that you either have to script the linking or do it manually, which again
I didn&amp;rsquo;t get along with.&lt;/p>
&lt;h2 id="git-at-">&lt;code>.git&lt;/code> at &lt;code>~&lt;/code>&lt;/h2>
&lt;p>My second management tool involved creating a git repository in my home directory (&lt;code>~/&lt;/code>).&lt;/p>
&lt;p>This is a fairly simple concept. You create a git repository, add most things to .gitignore
and then add your dotfiles relative to the home directory.&lt;/p>
&lt;p>Another similar approach involves creating a bare repository, again in somewhere like &lt;code>~/dotfiles&lt;/code>,
and then changing the work tree for the git operations to be &lt;code>~/&lt;/code> or &lt;code>$HOME&lt;/code>.
There is a pretty good &lt;a href="https://marcel.is/managing-dotfiles-with-git-bare-repo/">blog post by Marcel Krčah&lt;/a>
that explains it better than I can.&lt;/p>
&lt;hr>
&lt;p>I have taken both approaches, for similar periods of time and neither stuck.&lt;/p>
&lt;p>The first approach meant everything below my home directory was inside a git repository and this was
far from ideal and meant that maintaining the &lt;code>.gitignore&lt;/code> file was more than half the battle here.
Furthermore, the process of using this repo when setting up a new machine was a little confused.&lt;/p>
&lt;p>The second approach was arguably better, however the work tree still covered all of the home
directory and there were special aliases required for calling git. In my mind, git should be git
and not my dotfile manager. Git can play a valuable part in managing dotfiles and it essential
to each of the strategies in this post, but it just isn&amp;rsquo;t what a configuration management tool
should be (in my mind) on its own.&lt;/p>
&lt;h2 id="chezmoi-part-1">chezmoi part 1&lt;/h2>
&lt;p>Chezmoi&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> solves some problems with previous setups. It is a tool that on the
surface appears to be a wrapper for &lt;code>git&lt;/code>, and in some ways it is, but it can
manage secrets, run scripts and conditionally apply configuration.
These features pulled me in because the state of my laptop and PC were largely separate
apart from the basic building blocks.&lt;/p>
&lt;p>Chezmoi allowed me to create a simple setup (which I ran on my laptop) and then add
to that to create the setup I used on my PC. Further to this, I was able to use
my same Chezmoi repo to manage the dotfiles on my Windows VM when I was working
at my summer internship.&lt;/p>
&lt;p>Although possibly biased, there is a comparison between Chezmoi and other dotfile
managers &lt;a href="https://www.chezmoi.io/docs/comparison/">that you can find here.&lt;/a>&lt;/p>
&lt;p>The reason I left Chezmoi for a period was that some features got a little abstract.
My least favourite part was when managing dotfiles that were edited externally
(not with &lt;code>chezmoi edit &amp;lt;filename&amp;gt;&lt;/code>) since these would have to be added to
chezmoi again or you would risk losing them next time you applied your changes.
As a user of Emacs, where I would edit my dotfiles daily and from within Emacs,
this was a pain.&lt;/p>
&lt;h2 id="the-ansible-era">The Ansible Era&lt;/h2>
&lt;p>During a boredom driven spiral through YouTube I stumbled across a
&lt;a href="https://www.youtube.com/watch?list=PL2%5FOBreMn7FqZkvMYt6ATmgC0KAGGJNAN&amp;amp;v=goclfp6a2IQ">series of videos&lt;/a>
by &lt;a href="https://www.jeffgeerling.com/">Jeff Geerling&lt;/a>
which go through basically everything you need to know about Ansible&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>,
especially for a hobbyist like me.
I had heard of Ansible&lt;sup id="fnref1:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup> prior to this point but had never really taken the time to learn about it,
and Jeff seemed like a reputable source so I started to watch.&lt;/p>
&lt;p>During the series he mentions at least once about
&lt;a href="https://github.com/geerlingguy/mac-dev-playbook">managing his personal Mac with an Ansible playbook&lt;/a>.
So I set about looking for ways to do that myself. This is when I found myself clicking through
a repository by &lt;code>kespinola&lt;/code> on Github &lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>. These seemed a little more my speed as they
were targeted towards linux, so I used the layout of his repository and copied the &lt;code>bin&lt;/code>
directory for the bootstrapping script.&lt;/p>
&lt;p>I switched to Ansible when I found Chezmoi&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup> to be limited when it came to system operations
such as installing packages. Ansible provides this in an idempotent fashion meaning that it won&amp;rsquo;t try to
install stuff that&amp;rsquo;s already installed, it won&amp;rsquo;t copy files if they exist or, more generally, it won&amp;rsquo;t
do something it&amp;rsquo;s already done. This saved some pain in trying to script that behaviour.&lt;/p>
&lt;p>I left Ansible when it became too much effort to update dotfiles. It was perfect for the initial
setup of a new machine but fell apart in the day-to-day. If you have a large number of machines that
you want to be configured exactly the same way then Ansible is for you - otherwise you are better
off with one of the other options in this post.&lt;/p>
&lt;h2 id="chezmoi-part-2-electric-boogaloo">chezmoi part 2 electric boogaloo&lt;/h2>
&lt;p>Chezmoi didn&amp;rsquo;t change massively from part 1 other than a few nice features&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>.
I had seen the full spectrum (email me if you think I haven&amp;rsquo;t) and had to choose and Chezmoi seemed
like the lesser of many evils. It doesn&amp;rsquo;t do the system stuff but otherwise is the best option as it
is relatively simple and doesn&amp;rsquo;t rely on symbolic links. As for the scripting I have switched to
using a Makefile to run some simple shell scripts that install dependencies, start services, create
directories and more.&lt;/p>
&lt;p>Chezmoi isn&amp;rsquo;t perfect, but neither are any of the other options in this article, for me anyway.&lt;/p>
&lt;h2 id="the-takeaway">The Takeaway&lt;/h2>
&lt;p>I am by no means an expert in dotfile management and have certainly not used all the possible
approaches. There is a much more comprehensive list of tools at &lt;a href="https://dotfiles.github.io/">https://dotfiles.github.io/&lt;/a>
which I recommend looking at if you don&amp;rsquo;t see something in this post you like the look of.&lt;/p>
&lt;p>For me, Chezmoi is king at the moment. It offers me the things I need for my current situation
and the near future. Ansible is a close second but is overkill for my personal dotfiles and
I don&amp;rsquo;t set up new machines from scratch often enough to warrant it. A bare git repository
is a cool, minimalist approach but only works if you have a single machine with the same
structure, or you will be managing a bunch of branches and it gets needlessly complicated.&lt;/p>
&lt;h2 id="my-dotfiles">My Dotfiles&lt;/h2>
&lt;p>This is an ongoing project of mine. I continuously modify the configurations and scripts as my needs
change with the view of improving my quality of life and making stuff look nice.&lt;/p>
&lt;p>You can check them out at &lt;a href="https://github.com/jonnobrow/dotfiles">https://github.com/jonnobrow/dotfiles&lt;/a>.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://www.archlinux.org/">https://www.archlinux.org/&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://www.gnu.org/software/stow/">https://www.gnu.org/software/stow/&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref2:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://www.chezmoi.io/">https://www.chezmoi.io/&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://www.ansible.com/">https://www.ansible.com/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>&lt;a href="https://github.com/kespinola/dotfiles">https://github.com/kespinola/dotfiles&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>&lt;a href="https://www.chezmoi.io/">https://www.chezmoi.io/&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>Checkout Version 2 Features: &lt;a href="https://www.chezmoi.io/docs/changes/">https://www.chezmoi.io/docs/changes/&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Emacs Fatigue</title><link>https://jonathanbartlett.co.uk/2020/10/28/emacs-fatigue.html</link><pubDate>Wed, 28 Oct 2020 00:00:00 +0000</pubDate><guid>https://jonathanbartlett.co.uk/2020/10/28/emacs-fatigue.html</guid><description>&lt;p>As users of Emacs&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> and Arch linux&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> will be aware, you can&amp;rsquo;t simply
perfect your setup. There is almost always something that needs tweaking, or
something new a like-minded FOSS-head is working on that you want to try
instead. This is all good fun until you reach the point where it all feels a
bit excessive and overly specific to one tool and you enter a depressive funk
about your setup.&lt;/p>
&lt;p>This hasn&amp;rsquo;t happened to me before, but it&amp;rsquo;s happening to me now and the
following is my journey to this point and some thoughts on the issue.&lt;/p>
&lt;h2 id="from-vim-to-vimwiki">From &lt;code>vim&lt;/code> to &lt;code>VimWiki&lt;/code>&lt;/h2>
&lt;p>When I first switched from &lt;del>Windows&lt;/del> to Linux I started using vim to take
notes. They were simple and written in Markdown. It was very pure and frankly I
do miss the simplicity of it. vim is very lightweight and this approach
required little to no plugins to be effective.&lt;/p>
&lt;p>However as my notes started to grow in quantity and the complexity of each note
evolved (I wanted LaTeX maths and code snippets), I started to look for something
a little bit more. Enter VimWiki &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> , a &amp;ldquo;Personal Wiki for Vim&amp;rdquo;.&lt;/p>
&lt;p>VimWiki lets you organise your notes and thoughts into a more structure
knowledge base and this worked for me. I could create different files for
everything and navigate through a file structure I have defined in my markup. I
could also maintain to-do lists and write diary entries.&lt;/p>
&lt;p>Sadly, VimWiki uses a custom markup language, and although Markdown is
supported, I always felt like it just wasn&amp;rsquo;t quite right. So once again I set
out to find something a little bit more. It wasn&amp;rsquo;t hard to find Emacs, but I
wasn&amp;rsquo;t ready for that yet so I kept on with VimWiki until the summer, when I
had far too much time on my hands and took the plunge into
Spacemacs &lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>.&lt;/p>
&lt;h2 id="slowly-getting-more-evil-the-spacemacs-era">Slowly getting more EVIL (The Spacemacs Era)&lt;/h2>
&lt;p>The transition from vim to Emacs wasn&amp;rsquo;t particularly hard for me. EVIL&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>
mode and some of the easy beginner friendly features of Spacemacs like layers
made it a smooth transition. I was also willing to sink time into it because I
had read about the supposed benefits of org-mode and wasn&amp;rsquo;t going to miss out
on the opportunity.&lt;/p>
&lt;p>Spacemacs had the potential to be so much more that vim but I didn&amp;rsquo;t want to
overdo it and reach the stage where the quote &amp;ldquo;a great operating system,
lacking only a decent editor&amp;rdquo; applied to me. I made myself somewhat of a
promise that I would use it only for things I could do in something like
VS-Code or Atom, that included:&lt;/p>
&lt;ul>
&lt;li>Note taking in plain text&lt;/li>
&lt;li>Fully featured IDE for most if not all language I used&lt;/li>
&lt;li>A terminal and file-tree&lt;/li>
&lt;li>Syntax Highlighting&lt;/li>
&lt;li>Some other nice-to-haves&lt;/li>
&lt;/ul>
&lt;p>I pulled this off quite easily, Spacemacs lets you drop in a list of layers
and, due to its relatively wide adoption, a lot of these things already existed
in a layer. Perhaps the most important thing on the list was note taking since
I am mainly a student and note-taking forms a dominant portion of my week.&lt;/p>
&lt;h2 id="org-mode---your-life-in-plain-text">&lt;code>org-mode&lt;/code> - your life in plain text&lt;/h2>
&lt;p>First off, I highly recommend org-mode &lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup> , it is flexible, simple
and versatile and offers something for everyone if you are willing to put in
the work. You can read more about it on &lt;a href="https://orgmode.org/">their shiny new
website&lt;/a>.&lt;/p>
&lt;p>When I first started using org-mode my setup consisted of a relatively small
portion of the what was possible. I took what I was comfortable with in VimWiki
and replicated it in org-mode but I also started using things like &lt;code>TODO&lt;/code>
keywords, scheduling and deadlines which helped me to keep track of work I had
to do for Uni.&lt;/p>
&lt;p>Another feature I really liked was &lt;code>org-babel&lt;/code> because it let me keep bits of code in my notes, and
execute them, and if necessary, export them to a source file. This was a little out of my initial
scope for what a text editor needed to be, but wasn&amp;rsquo;t too far off, so I let it happen.&lt;/p>
&lt;p>When you use org-mode every day, as I did and still do, you discover new things you can do and
if you have the same disposition as me you will start to explore these things when you get a little
time.
Next I want to discuss the broader topic of Emacs and how I started to stray from the idea of
a text editor.&lt;/p>
&lt;h2 id="emacs-makes-any-computer-slow">EMACS Makes Any Computer Slow&lt;/h2>
&lt;p>There is a reason Emacs is more demanding than &lt;strong>vi&lt;/strong> and that is because it can do so much more,
it can become the aforementioned operating system if you make it. A few features took my fancy
such as Email (&lt;strong>mu4e&lt;/strong>) and PDF Browsing (&lt;strong>pdf-tools&lt;/strong>).&lt;/p>
&lt;p>I had been using &lt;strong>mutt&lt;/strong> and then &lt;strong>neomutt&lt;/strong> for a little while before I switched to Emacs, so mail
in the terminal was no stranger to me. When I switched the Emacs I stuck with using a dedicated
tool for mail for a couple of months, then finally caved - the first instance of wanting Emacs
to do more that I had originally set out. Along comes &lt;strong>mu4e&lt;/strong> which does everything &lt;strong>neomutt&lt;/strong> did, it
even uses the same tools in the background the sync mail, but it handles accounts in a cleaner
way and I can write emails in org-mode so they are prettier, plus I can have images in my emacs
buffers so all those modern emails don&amp;rsquo;t look as bad.&lt;/p>
&lt;p>I felt good about my switch to &lt;strong>mu4e&lt;/strong> because I had streamlined my workflow, I had removed an entire
application from my day-to-day and replaced it with a package for emacs. I wanted more of this
feeling so I started to add other little bits and pieces into my day-to-day until Emacs was more
than I had agreed for it to be, but that was okay, I was streamlining my workflow, I felt more
productive, I had to learn fewer specific tools, I knew Emacs.&lt;/p>
&lt;p>I found that, if anything, Emacs made my computer faster because I could switch buffers in Emacs
quicker than I could switch applications, or start a new application in Arch.&lt;/p>
&lt;h2 id="social-networking-for-thoughts-org-roam">Social Networking for Thoughts (&lt;code>org-roam&lt;/code>)&lt;/h2>
&lt;p>We are now at October 2020 in my story and I am using Emacs for a lot of things, I refuse to
browse the internet in Emacs and a few other things, but most things happen in Emacs. A friend,
&lt;a href="https://ssene.ca">@sseneca&lt;/a>, mentioned to me that something called &lt;code>org-roam&lt;/code> &lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup> existed, they hadn&amp;rsquo;t had the chance
to explore it yet so I was the guinea pig and installed in on my setup.&lt;/p>
&lt;p>&lt;code>org-roam&lt;/code> is an &lt;code>org-mode&lt;/code> remake of the popular &lt;strong>Roam Research&lt;/strong> tool, which employs the Zettelkasten &lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup>
method of note taking. Basically each note forms a node in the network of your knowledge, you
can then form links between these notes and relate ideas together. Building your knowledge in
this way makes it very easy to jump into your notes and find everything you have on a topic.&lt;/p>
&lt;p>Since it was the start of a new year at Uni, now was the time to adopt it, so I did, I created
a basic structure for all of my notes, and then started from scratch, and repeated that process
probably three to four times before I got it just right. Now I am happy with the way I take notes
and I feel that I am not just taking notes for a university module, I am recording my knowledge
on a topic and its not just my &amp;ldquo;uni notes&amp;rdquo;, its my notes forever.&lt;/p>
&lt;p>I even found something that lets you view all of you notes in a big interactive graph called
&lt;code>org-roam-server&lt;/code> and had that open in my browser most of the time when I was taking notes so
I could see how my thoughts were building up, and get a kick of saying &amp;ldquo;wow, look at all then
stuff I know!&amp;rdquo;.&lt;/p>
&lt;h2 id="we-are-all-doom-ed">We are all DOOM-ed&lt;/h2>
&lt;p>DOOM Emacs&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup> was the next thing, Spacemacs started to feel sluggish and wasn&amp;rsquo;t handling the masses
of org-mode files I was accruing. So one afternoon in early October I ditched Spacemacs and said
hello to DOOM, which is faster, more barebones and still lets me use &lt;strong>vi&lt;/strong> bindings and easily manage
packages.&lt;/p>
&lt;p>Moving my configurations across meant I was looking into my configuration files for the first time
in a little while, so a few things started to bug me and I started to go down the rabbit hole, I
removed a lot of stuff, then added it back again, and then I decided to commit a weekend to
making the &lt;code>org-agenda&lt;/code> more useful to me, so that I could manage projects and schedule my uni work
for my final year.&lt;/p>
&lt;h2 id="the-agenda-rabbit-hole">The Agenda Rabbit Hole&lt;/h2>
&lt;p>This is the last step before it all went wrong. I found some very well maintained dotfiles by a few
different people &lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup> &lt;sup>, &lt;/sup>&lt;sup id="fnref:11">&lt;a href="#fn:11" class="footnote-ref" role="doc-noteref">11&lt;/a>&lt;/sup> &lt;sup>, &lt;/sup>&lt;sup id="fnref:12">&lt;a href="#fn:12" class="footnote-ref" role="doc-noteref">12&lt;/a>&lt;/sup> &lt;sup>, &lt;/sup>&lt;sup id="fnref1:12">&lt;a href="#fn:12" class="footnote-ref" role="doc-noteref">12&lt;/a>&lt;/sup>.
They had all adopted the &lt;strong>Get Things Done&lt;/strong> way of staying organised and had really
perfected the way they managed that in org-mode. One feature of org-mode that I hadn&amp;rsquo;t really spent
any time on was the &lt;code>org-agenda&lt;/code> and that seemed to be a focus of the &lt;strong>Get Things Done&lt;sup id="fnref:13">&lt;a href="#fn:13" class="footnote-ref" role="doc-noteref">13&lt;/a>&lt;/sup>&lt;/strong> way of life.&lt;/p>
&lt;p>Another thing that came up was the ability to log your time against heading in org-mode, which I
fancied doing after logging time for an internship all summer and finding it useful in terms of
predicting what I could do in a day.&lt;/p>
&lt;p>So it began, I sat down on a Saturday to setup the following things:&lt;/p>
&lt;ul>
&lt;li>A tagging system&lt;/li>
&lt;li>A file structure for my org-mode files&lt;/li>
&lt;li>New &lt;strong>TODO&lt;/strong> keywords and associated task flows&lt;/li>
&lt;li>Custom agenda views for different purposes&lt;/li>
&lt;li>Time clocking&lt;/li>
&lt;/ul>
&lt;p>It took all weekend but the result was amazing, I could see all the things I had to do next in one
neat little view, I could see all the projects I was working on, I could see the things I had
scheduled for today, I could see my deadlines for the next 30 days, and so much more. It was &amp;hellip;
perfect?&lt;/p>
&lt;h2 id="so-where-did-it-all-go-wrong">So where did it all go wrong?&lt;/h2>
&lt;p>I wish I understood why I feel like I do, but I don&amp;rsquo;t, I can only guess and try to solve the problem
as I always do. So my number one theory at the time of writing this is: &amp;ldquo;&lt;strong>emacs fatigue&lt;/strong>&amp;rdquo; which to me
means that I have done so much with emacs that whenever I can&amp;rsquo;t do something with emacs I feel like
all that work trying to make it &lt;strong>perfect&lt;/strong> has been for nothing. It also means that I&amp;rsquo;ve run out of the
easy wins, there aren&amp;rsquo;t many more untapped sources of pristine dotfiles out there. I have started
writing my own functions and learning &lt;code>elisp&lt;/code>, and it means the return of my investment is diminishing.&lt;/p>
&lt;p>I think the trigger for all of these feelings came from the realisation I had strayed from my goal
of keeping Emacs as a text editor and nothing more. I immediately decided that switching back to
vim was the only option, and going &lt;code>cold turkey&lt;/code> was the only way. I quickly realised how much I would
miss org-mode and scurried back to the comfort of emacs but now with the feeling that even though
I loved emacs it would never be &lt;code>perfect&lt;/code> and there will probably never be the perfect tool for all
the things I do on a computer.&lt;/p>
&lt;p>I am too invested to just ditch emacs but I also know I have gone too far, but now I don&amp;rsquo;t have the
time of the energy to dig myself out of the emacs hole I have dug for myself. The best I can do
is to remove the things that aren&amp;rsquo;t &amp;ldquo;supposed&amp;rdquo; to be in emacs and hope the fatigue passes and one
day in the future I build up the courage to streamline even further, so emacs will be nothing more
than a note-taking tool and maybe a code editor.&lt;/p>
&lt;h2 id="closing-thoughts">Closing Thoughts&lt;/h2>
&lt;p>I love computers, I love Linux and I love Emacs but I was exposed to too much fun and exciting stuff
in a short period of time and now there isn&amp;rsquo;t anything else for me to do. I also feel like what I
have done isn&amp;rsquo;t enough because I am a perfectionist, but I know I have really done too much.&lt;/p>
&lt;p>Therefore my only closing thought is that people like me need to spend time actually enjoying a new
thing before adding something else to the mix, the Agenda Rabbit hole might have just been one step
too far or maybe it was even &lt;strong>org-roam&lt;/strong>. I was just as happy before &lt;strong>org-roam&lt;/strong> as I was after it, perhaps
a little more organised and productive but the same level of happy, so I could have relished that
longer before working &lt;strong>org-roam&lt;/strong> into my day-to-day and maybe I wouldn&amp;rsquo;t have crashed as hard, if at
all.&lt;/p>
&lt;p>So, slow down and enjoy the things you make, or, like me, you will experience &lt;strong>Emacs fatigue.&lt;/strong>&lt;/p>
&lt;h2 id="updates">Updates&lt;/h2>
&lt;h3 id="kicking-the-fatigue-2020-11-05">Kicking the Fatigue (2020-11-05)&lt;/h3>
&lt;p>I think I have now overcome the fatigue, I am a little too busy to write a whole new post
so I am going to briefly explain what I did in an updates section here.&lt;/p>
&lt;ul>
&lt;li>I removed most of the features I talked about as being out of scope for a text editor. I
can use the client in a browser or maybe setup neomutt again as and when I feel the need.&lt;/li>
&lt;li>I also automated my dotfiles in an Ansible playbook (it will save me time in the long run)
so that I am not so involved in the process of a re-install. Blog post coming soon.&lt;/li>
&lt;li>I took a complete break, a few days off from everything (this way probably most effective).&lt;/li>
&lt;/ul>
&lt;h3 id="i-quit-2021-03-15">I quit! (2021-03-15)&lt;/h3>
&lt;p>Emacs is a thing of the past for me. It just got too complicated and tried to do too much. Back to
simple tools that do one thing well!&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a href="https://www.gnu.org/software/emacs/">https://www.gnu.org/software/emacs/&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a href="https://www.archlinux.org/">https://www.archlinux.org/&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a href="https://vimwiki.github.io/">https://vimwiki.github.io/&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a href="https://www.spacemacs.org/">https://www.spacemacs.org/&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>Extensible VI Layer for Emacs&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6">
&lt;p>&lt;a href="https://orgmode.org/">https://orgmode.org/&lt;/a>&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7">
&lt;p>&lt;a href="https://github.com/org-roam/org-roam">https://github.com/org-roam/org-roam&lt;/a>&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8">
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Zettelkasten">https://en.wikipedia.org/wiki/Zettelkasten&lt;/a>&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9">
&lt;p>&lt;a href="https://github.com/hlissner/doom-emacs">https://github.com/hlissner/doom-emacs&lt;/a>&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10">
&lt;p>&lt;a href="https://github.com/jethrokuan/dots/blob/master/.doom.d/config.el">https://github.com/jethrokuan/dots/blob/master/.doom.d/config.el&lt;/a>&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:11">
&lt;p>&lt;a href="https://github.com/gjstein/emacs.d">https://github.com/gjstein/emacs.d&lt;/a>&amp;#160;&lt;a href="#fnref:11" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:12">
&lt;p>&lt;a href="https://www.lengyueyang.com/post/tools/spacemacs/lengyueyang/">https://www.lengyueyang.com/post/tools/spacemacs/lengyueyang/&lt;/a>&amp;#160;&lt;a href="#fnref:12" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:12" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:13">
&lt;p>&lt;a href="https://gettingthingsdone.com/">https://gettingthingsdone.com/&lt;/a>&amp;#160;&lt;a href="#fnref:13" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item></channel></rss>