<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Yarmo - homelab</title>
    <subtitle>Blog of an Open Source developer</subtitle>
    <link rel="self" type="application/atom+xml" href="https://yarmo.eu/tags/homelab/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://yarmo.eu"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2022-05-20T18:36:41+00:00</updated>
    <id>https://yarmo.eu/tags/homelab/atom.xml</id>
    <entry xml:lang="en">
        <title>InfluxDB 2 migration</title>
        <published>2022-05-20T18:36:41+00:00</published>
        <updated>2022-05-20T18:36:41+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://yarmo.eu/blog/influxdb-2-migration/"/>
        <id>https://yarmo.eu/blog/influxdb-2-migration/</id>
        
        <content type="html" xml:base="https://yarmo.eu/blog/influxdb-2-migration/">&lt;h2 id=&quot;What_is_InfluxDB?&quot;&gt;What is InfluxDB?&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.influxdata.com&#x2F;&quot;&gt;InfluxDB&lt;&#x2F;a&gt; is the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;influxdata&#x2F;influxdb&#x2F;blob&#x2F;master&#x2F;LICENSE&quot;&gt;MIT licensed&lt;&#x2F;a&gt; &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Time_series_database&quot;&gt;time series database&lt;&#x2F;a&gt; of my monitoring stack of choice, the so-called &lt;a href=&quot;https:&#x2F;&#x2F;www.influxdata.com&#x2F;blog&#x2F;introduction-to-influxdatas-influxdb-and-tick-stack&#x2F;&quot;&gt;TICK stack&lt;&#x2F;a&gt;, consisting of &lt;a href=&quot;https:&#x2F;&#x2F;www.influxdata.com&#x2F;time-series-platform&#x2F;telegraf&#x2F;&quot;&gt;Telegraf&lt;&#x2F;a&gt; (data collection agent), &lt;a href=&quot;https:&#x2F;&#x2F;www.influxdata.com&#x2F;&quot;&gt;InfluxDB&lt;&#x2F;a&gt; (time series database), &lt;a href=&quot;https:&#x2F;&#x2F;www.influxdata.com&#x2F;time-series-platform&#x2F;chronograf&#x2F;&quot;&gt;Chronograf&lt;&#x2F;a&gt; (charts and dashboard interface) and &lt;a href=&quot;https:&#x2F;&#x2F;www.influxdata.com&#x2F;time-series-platform&#x2F;kapacitor&#x2F;&quot;&gt;Kapacitor&lt;&#x2F;a&gt; (data processing engine).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;My_history_with_InfluxDB&quot;&gt;My history with InfluxDB&lt;&#x2F;h2&gt;
&lt;p&gt;I started my homelab somewhere in 2017-2018. When about a year in I faced some random crashes and reboots which I did not manage to understand or fix, I first turned to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;netdata&#x2F;netdata&quot;&gt;netdata&lt;&#x2F;a&gt; before settling with the TICK stack.&lt;&#x2F;p&gt;
&lt;p&gt;While I did eventually solve the random crashes, an obvious issue surfaced: if I want to monitor a crashing server, I probably shouldn&#x27;t host the monitoring stack on that same server.&lt;&#x2F;p&gt;
&lt;p&gt;And so, my setup eventually converged to the one I use today: a homelab and a few VPSs, all monitored by a TICK stack installed on a dedicated VPS.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;docs.influxdata.com&#x2F;influxdb&#x2F;v2.0&#x2F;reference&#x2F;release-notes&#x2F;influxdb&#x2F;&quot;&gt;InfluxDB 2.0&lt;&#x2F;a&gt; was released in November of 2020 and I remember this moment clearly: I updated my InfluxDB docker container, I noticed everything immediately broke, I read up on what a gargantuan update this 2.0 release was, I said &amp;quot;nope&amp;quot; and immediately reverted to 1.8.x.&lt;&#x2F;p&gt;
&lt;p&gt;Yesterday, I decided it was finally time to sit down and calmly move to InfluxDB 2(.2.0).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;InfluxDB_2,_or_the_Death_of_the_TICK_stack&quot;&gt;InfluxDB 2, or the Death of the TICK stack&lt;&#x2F;h2&gt;
&lt;p&gt;Please refer &lt;a href=&quot;https:&#x2F;&#x2F;docs.influxdata.com&#x2F;influxdb&#x2F;v2.0&#x2F;reference&#x2F;release-notes&#x2F;influxdb&#x2F;&quot;&gt;release notes for InfluxDB 2&lt;&#x2F;a&gt; to see for yourself what has changed.&lt;&#x2F;p&gt;
&lt;p&gt;One of the most notable changes is that InfluxDB 2 now has a interface with graphs and dashboards (replacing Chronograf&#x27;s functionality) and can send alerts based on data (which previously required Kapacitor). While I am sure Chronograf and Kapacitor can still be used together with InfluxDB 2, they no longer need to and indeed, I have now removed these services from my monitoring stack.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;InfluxDB_2,_the_migration&quot;&gt;InfluxDB 2, the migration&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;a href=&quot;https:&#x2F;&#x2F;hub.docker.com&#x2F;_&#x2F;influxdb&quot;&gt;InfluxDB 2 dockerhub page&lt;&#x2F;a&gt; has clear instructions on how to migrate from 1.x to 2.x when using containers and so I did. And while the container logs showed the migration process was successful, I had this weird issue where when I would try to then log in on the web interface, I was greeted with a &amp;quot;fresh install&amp;quot; screen, suggesting the InfluxDB instance was in fact not aware of the migration.&lt;&#x2F;p&gt;
&lt;p&gt;And indeed, after following the instructions of the &amp;quot;fresh install&amp;quot; screen, everything was working fine but no trace of any migrated data :(&lt;&#x2F;p&gt;
&lt;p&gt;If my historical InfluxDB data was in any way valuable to me, I would have put more effort into migrating all of it to InfluxDB 2.&lt;&#x2F;p&gt;
&lt;p&gt;But it wasn&#x27;t.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;InfluxDB_2,_the_non-migration&quot;&gt;InfluxDB 2, the non-migration&lt;&#x2F;h2&gt;
&lt;p&gt;And thus, in a bit of an anticlimax to this whole situation, I &lt;code&gt;rm -rf&lt;&#x2F;code&gt;ed the whole data directory and started anew with a fresh InfluxDB 2 instance. No more Chronograf, no more Kapacitor. All servers have updated Telegraf configurations and I am currently rebuilding the dashboards in InfluxDB&#x27;s web interface.&lt;&#x2F;p&gt;
&lt;p&gt;And I also still need to rebuild my Grafana dashboards to make use of Flux instead of InfluxQL. I still have things to do before I can fully enjoy my monitoring solution again.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Friendly reminder to clean your NUC&#x27;s fan</title>
        <published>2020-06-08T13:35:15+00:00</published>
        <updated>2020-06-08T13:35:15+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://yarmo.eu/blog/nuc-fan-cleaning/"/>
        <id>https://yarmo.eu/blog/nuc-fan-cleaning/</id>
        
        <content type="html" xml:base="https://yarmo.eu/blog/nuc-fan-cleaning/">&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.intel.com&#x2F;content&#x2F;www&#x2F;us&#x2F;en&#x2F;products&#x2F;boards-kits&#x2F;nuc.html&quot;&gt;Intel NUCs&lt;&#x2F;a&gt; make for some great low-entry-barrier low-power-consumption servers and homelabs. I have three NUCs at home, two of which have played a server role. They span several generations: a 5i3, a 7i7 and a 8i5.&lt;&#x2F;p&gt;
&lt;p&gt;And they all have one thing in common: sooner or later, their fans clog up with dust, they heat up, they make more noise and perform worse.&lt;&#x2F;p&gt;
&lt;p&gt;If you haven&#x27;t cleaned the fan in a while, your best bet is to open the NUC up and clean the fan and the exhaust.&lt;&#x2F;p&gt;
&lt;p&gt;To prevent having to open a NUC up too often, I bought a few cans of compressed air and regularly blow air through the device. I&#x27;m also looking into placing air filters near the air intake.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;img&#x2F;blog&#x2F;nuc_temp_fan_cleaning.png&quot; alt=&quot;NUC cools down when fan is cleaned&quot; &#x2F;&gt;&lt;br &#x2F;&gt;
&lt;em&gt;Can you tell when compressed air was applied to the NUC?&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Introduction to PiHole</title>
        <published>2020-05-10T23:24:04+00:00</published>
        <updated>2020-05-10T23:24:04+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://yarmo.eu/blog/pihole/"/>
        <id>https://yarmo.eu/blog/pihole/</id>
        
        <content type="html" xml:base="https://yarmo.eu/blog/pihole/">&lt;p&gt;&lt;code&gt;#100DaysToOffload &amp;gt;&amp;gt; 2020-05-10 &amp;gt;&amp;gt; 016&#x2F;100&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;pi-hole.net&#x2F;&quot;&gt;PiHole&lt;&#x2F;a&gt; is almost ubiquitously present on every list of services people could&#x2F;should selfhost. And rightfully so, it is easy to set up and extremely useful on a daily basis. It blocks ads on almost all websites on all the devices in your home without the necessity of installing anything on them. It will also stop some devices from communicating with their parent companies behind your back.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;How_it_works&quot;&gt;How it works&lt;&#x2F;h2&gt;
&lt;p&gt;To understand how PiHole does its thing, we need a quick introduction into how DNS works, the system that makes sure we can visit websites even if they are located on the other side of the world. The problem DNS solves is that the URL you use to visit a website doesn&#x27;t tell your device anything about the physical location or IP address of the server that hosts the website.&lt;&#x2F;p&gt;
&lt;p&gt;If you wish to visit a website, say &lt;a href=&quot;https:&#x2F;&#x2F;yarmo.eu&quot;&gt;yarmo.eu&lt;&#x2F;a&gt;, you enter that address in the top bar and hit enter. Your browser will then ask your router to get this website for you. If this is the first time you visit this website, your router doesn&#x27;t know yet where the server is located, so it asks a DNS server in geographical proximity, usually the DNS server of your ISP.&lt;&#x2F;p&gt;
&lt;p&gt;If this DNS server knows the IP address of the server, it will be relayed back to your device which will now ask that server directly for the content of the website. If the DNS server doesn&#x27;t have this information, it will ask another and so forth until the IP address of the host server is found.&lt;&#x2F;p&gt;
&lt;p&gt;As we established above, your router contains a DNS router. However, this can almost always be delegated to another DNS server in your home. That&#x27;s where PiHole comes in. Instead of your router trying to figure out where the website server is located, it will ask PiHole to do so.&lt;&#x2F;p&gt;
&lt;p&gt;But PiHole has a trick up its sleeve: it has a built-in database of hundreds of thousands of URLs that are associated with ads and when they are requested, PiHole simply ignores them.&lt;&#x2F;p&gt;
&lt;p&gt;So you want to visit &lt;code&gt;coolsite.com&lt;&#x2F;code&gt;? Fine, PiHole will get you that website. Now, &lt;code&gt;coolsite.com&lt;&#x2F;code&gt; suddenly wants to load an ad from &lt;code&gt;ads.gafam.com&lt;&#x2F;code&gt;? The computer asks the router, the router asks PiHole, PiHole knows this URL is used to serve ads and will block that request, giving you a website without ads. Awesome!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;Something_you_want_to_say?&quot;&gt;Something you want to say?&lt;&#x2F;h2&gt;
&lt;p&gt;Meanwhile, you are listening to music using a wireless speaker in your living room from a made-up brand &amp;quot;NOSON&amp;quot;. What you don&#x27;t know is that this device is continuously sending messages to the company containing information about the music you play and more. PiHole knows this and as soon as the speaker requests to send a message to &lt;code&gt;metrics.noson.com&lt;&#x2F;code&gt;, PiHole says no.&lt;&#x2F;p&gt;
&lt;p&gt;That&#x27;s how PiHole blocks ads AND protects your privacy.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;Dedicated_hardware&quot;&gt;Dedicated hardware&lt;&#x2F;h2&gt;
&lt;p&gt;Dedicating hardware to PiHole is advised but the hardware can be as simple as a &lt;a href=&quot;https:&#x2F;&#x2F;www.raspberrypi.org&#x2F;products&#x2F;raspberry-pi-zero&#x2F;&quot;&gt;Raspberry Pi Zero&lt;&#x2F;a&gt;. The reason it is advised to use dedicated hardware is because if your PiHole crashes, there&#x27;s no more internet in the home until you get the PiHole working again. It way to prevent this situation from happening is to always have two PiHoles running on separate hardware and telling the router about both PiHoles.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;Second_DNS_server?&quot;&gt;Second DNS server?&lt;&#x2F;h2&gt;
&lt;p&gt;Oh, and while we&#x27;re on the subject: do not put any &amp;quot;fallback&amp;quot; DNS servers like Google&#x27;s or Cloudflare&#x27;s in the second DNS server field on your router. Unfortunately, it doesn&#x27;t work like a fallback, all routers will simply divide the workload over the two DNS servers. This means that if an outside DNS server is put in second place, it will receive DNS calls even if the PiHole is fully functional.&lt;&#x2F;p&gt;
&lt;p&gt;Having a proper DNS fallback server is difficult to set up, so best would be to use two different PiHole instances. Unless, of course, you don&#x27;t mind a small period of internet loss and you are always nearby to fix the situation.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;Caveats&quot;&gt;Caveats&lt;&#x2F;h2&gt;
&lt;p&gt;Unfortunately, ads on video platforms like YouTube will not be blocked. This is because they serve the ads on the same domains as they serve the main content, meaning that they don&#x27;t have a &lt;code&gt;ads.youtube.com&lt;&#x2F;code&gt; or something similar. Therefore, PiHole cannot block the ads. As there are a few of these edge cases, it is always recommended to use PiHole in conjunction with on-device ad blockers like &lt;a href=&quot;https:&#x2F;&#x2F;getublock.com&#x2F;&quot;&gt;uBlock Origin&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;Final_words&quot;&gt;Final words&lt;&#x2F;h2&gt;
&lt;p&gt;Really, there are few reasons to not get PiHole into your home and the benefits vastly outweigh the challenges (IMHO). It is also a great start on a journey of selfhosting more services and realising that one can be independent of major corporations to some degree.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>My homelab crashed, time for a break?</title>
        <published>2020-05-07T19:53:23+00:00</published>
        <updated>2020-05-07T19:53:23+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://yarmo.eu/blog/homelab-crashed/"/>
        <id>https://yarmo.eu/blog/homelab-crashed/</id>
        
        <content type="html" xml:base="https://yarmo.eu/blog/homelab-crashed/">&lt;p&gt;&lt;code&gt;#100DaysToOffload &amp;gt;&amp;gt; 2020-05-07 &amp;gt;&amp;gt; 013&#x2F;100&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;It&#x27;s not the first time my homelab has crashed and it won&#x27;t be the last time. Something with the hard drives. I&#x27;ll figure it out, no doubt. But despite needing it for various services throughout my daily routine, I have decided to let the homelab rest for a few days maybe.&lt;&#x2F;p&gt;
&lt;p&gt;It has been running almost non-stop since I started it about two years ago, I never made major changes, always gradually improved upon it. Now, the time may have come to take a hard look at what I started with, what I ended up with, learn a few valuable lessons and perhaps start over. My homelab could use a 2.0 moment.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>IMPUC #1 &amp;middot; Homelab overview</title>
        <published>2020-01-05T09:32:21+00:00</published>
        <updated>2020-01-05T09:32:21+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://yarmo.eu/blog/homelab-overview/"/>
        <id>https://yarmo.eu/blog/homelab-overview/</id>
        
        <content type="html" xml:base="https://yarmo.eu/blog/homelab-overview/">&lt;p&gt;&amp;quot;In My Particular Use Case&amp;quot; (or IMPUC) is a series of short posts describing how I setup my personal homelab, what worked, what failed and what techniques I eventually was able to transfer to an academic setting for my PhD work.&lt;&#x2F;p&gt;
&lt;!--more--&gt;
&lt;h2 id=&quot;Why_a_homelab?&quot;&gt;Why a homelab?&lt;&#x2F;h2&gt;
&lt;p&gt;I started my homelab about a year after I started my PhD. My academic work was challenging in a technical way, with new data generated every day, managing raw data, processed data, metadata. I built a number of tools that would aid me on my daily basis for my work but I needed a place to just try out every technology I could possibly need for my job. It eventually turned out that the homelab was destined to do far greater things than simply serve as a testbed but that&#x27;s how it started and what provided me the knowledge and experience to solve important issues in my academic work.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;The_central_server&quot;&gt;The central server&lt;&#x2F;h2&gt;
&lt;p&gt;So one day, I ordered myself an Intel nuc with a 5th generation i3 processor, 8 GB of RAM, an m.2 drive and got started. Container solutions caught my attention before I even had the machine so I first installed docker and later, docker-compose. This setup hasn&#x27;t changed a bit today as it still allows me to launch new services very easily by changing a single yaml file with minimal impact on the hosting machine. The first things I would install were several databases and gitea, a self hosted git service. The services sit behind a reverse proxy (traefik) to allow them to be accessed by using (sub)domains. Configuration of the machine is managed by a folder of dotfiles backed up in a git repo and &lt;code&gt;stow&lt;&#x2F;code&gt;ed as necessary, but I am currently looking into ansible for this purpose. A 4-bay JBOD USB3 device provides the storage that the nuc then also (partly) makes available over the local network via smb.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;The_peripheral_Pi&#x27;s&quot;&gt;The peripheral Pi&#x27;s&lt;&#x2F;h2&gt;
&lt;p&gt;Floating around the central server are several raspberry pi&#x27;s. Back when I first started, the central server would sometimes crash or soft-lock and since my entire system monitoring system (telegraf+influxdb+grafana) was also installed on there, there was not a whole lot of investigating and fixing I could immediately do. Now, the central server and the pi&#x27;s all run telegraf and a single pi now hosts the influxdb+grafana stack and only that. Another pi is acting as a media center (Kodi) and finally, two redundant pi&#x27;s function as DNS forwarders (Pi-Hole), one of which also hosts my VPN solution (wireguard).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;The_out-of-house_computing&quot;&gt;The out-of-house computing&lt;&#x2F;h2&gt;
&lt;p&gt;I have two permanent VPS&#x27;s running: a website server (Cloudways) and a mail server (mailcow). Both could be hosted on the central server but as long as I cannot guarantee a perfectly stable Internet connection (which my house does not have) nor stable computing (personal budget issue), I choose to host these outside of the house.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;Final_words&quot;&gt;Final words&lt;&#x2F;h2&gt;
&lt;p&gt;Thanks for reading this, more posts will come soon explaining with more depth some of the elements described above. If you have questions, you can find several ways to contact on &lt;a href=&quot;https:&#x2F;&#x2F;yarmo.eu&quot;&gt;yarmo.eu&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
