<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Devops on sugar, spice, &amp;terminal? nice</title>
    <link>https://terminal.space/tag/devops/</link>
    <description>Recent content in Devops on sugar, spice, &amp;terminal? nice</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 09 Dec 2024 14:57:12 +0000</lastBuildDate>
    <atom:link href="https://terminal.space/tag/devops/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Backing up docker volumes</title>
      <link>https://terminal.space/tech/backing-up-docker-volumes/</link>
      <pubDate>Mon, 09 Dec 2024 14:57:12 +0000</pubDate>
      <guid>https://terminal.space/tech/backing-up-docker-volumes/</guid>
      <description>&lt;p&gt;In today&amp;rsquo;s I-can&amp;rsquo;t-believe-I&amp;rsquo;m-doing-this-in-2024&lt;/p&gt;&#xA;&lt;p&gt;I needed to re-build my webserver because it kept hard-freezing every week (another post for another day). Since I use a docker setup for this, my setup is pretty turnkey - I just needed to copy over my docker volumes from the old host to the new host.&lt;/p&gt;&#xA;&lt;p&gt;That turned out to be a lot more annoying than what I wanted. See, this functionality hasn&amp;rsquo;t existed for a long time. You had to use some DIY &lt;a href=&#34;https://stackoverflow.com/questions/38298645/how-should-i-backup-restore-docker-named-volumes&#34;&gt;StackOverflow&lt;/a&gt; scripts. Apparently, this functionality is now built into Docker Desktop, but A. I&amp;rsquo;m ssh&amp;rsquo;d into a server and B. Docker Desktop is the trojan horse where they extort people for licenses. In either case, I just have access to the docker daemon.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automatic recovery using lvm-autosnap</title>
      <link>https://terminal.space/tech/automatic-recovery-using-lvm-autosnap/</link>
      <pubDate>Wed, 12 Oct 2022 20:00:17 +0000</pubDate>
      <guid>https://terminal.space/tech/automatic-recovery-using-lvm-autosnap/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/automatic-recovery-using-lvm-autosnap/images/dietmar-becker-8Zt0xOOK4nI-unsplash.jpg&#34;&#xA;    alt=&#34;Two vintage cars side-by-side. The one on the left is rusted out and missing headlights. The one on the right has been restored to good condition &#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;Two vintage cars side-by-side. The one on the left is rusted out and missing headlights. The one on the right has been restored to good condition&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;TL;DR: &lt;a href=&#34;https://github.com/intentionally-left-nil/lvm-autosnap&#34;&gt;https://github.com/intentionally-left-nil/lvm-autosnap&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Running linux is an adventure. About a year ago, I switched from MacOS to Ubuntu (eww snaps), then Fedora (fine), then Manjaro (yeah that was a mistake) until finally landing on the final boss, Arch linux. Honestly, Arch is great. It does what I want, which is to spend an inordinate amount of time fixing things that used to work.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Initramfs with systemd &amp; LUKS</title>
      <link>https://terminal.space/tech/initramfs-with-systemd-luks/</link>
      <pubDate>Sun, 31 Jul 2022 02:20:45 +0000</pubDate>
      <guid>https://terminal.space/tech/initramfs-with-systemd-luks/</guid>
      <description>&lt;h2 id=&#34;tldr&#34;&gt;TL;DR&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[me@mycomputer]# cat /etc/sbupdate.conf | grep &amp;#34;^CMDLINE_DEFAULT&amp;#34;&#xA;CMDLINE_DEFAULT=&amp;#34;rd.luks.uuid=c1f995f5-a8f7-47f0-b085-6d3a159e1874 rd.luks.allow-discards resume=UUID=51384ac6-f197-41d9-b8c8-c9607d7e01c8 rd.udev.log-priority=3 nvme.noacpi=1 quiet splash root=UUID=a645810c-ef87-4a9a-9239-afdeaf292e6e rw&amp;#34;&#xA;&#xA;[me@mycomputer]# cat /etc/mkinitcpio.conf | grep &amp;#34;^HOOKS&amp;#34;&#xA;HOOKS=(systemd keyboard autodetect sd-vconsole modconf block sd-encrypt lvm2 filesystems fsck)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;My old boot process looks like this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;UEFI (with secure boot on)&lt;/li&gt;&#xA;&lt;li&gt;systemd-boot&lt;/li&gt;&#xA;&lt;li&gt;unified kernel.efi (initramfs + kernel params + kernel all rolled into one efi and signed)&lt;/li&gt;&#xA;&lt;li&gt;initramfs (busybox)&lt;/li&gt;&#xA;&lt;li&gt;encrypt hook: detects that a password is needed -&amp;gt; prompt for password&lt;/li&gt;&#xA;&lt;li&gt;Unlock LUKS partition&lt;/li&gt;&#xA;&lt;li&gt;LVM hook detects the LUKS partition and loads the logical volume groups/volumes&lt;/li&gt;&#xA;&lt;li&gt;The root partition is loaded and control gets passed off to the real kernel&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Which was set up via the following configs:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Secure DNS</title>
      <link>https://terminal.space/tech/secure-dns/</link>
      <pubDate>Thu, 30 Dec 2021 08:06:19 +0000</pubDate>
      <guid>https://terminal.space/tech/secure-dns/</guid>
      <description>&lt;p&gt;TL;DR: Use a VPN if you really care.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://imgs.xkcd.com/comics/networking%5Fproblems.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Hey, you over there! Want to take something that works perfectly well and make it more complicated? Sure ya do! Oh, need a little more convincing?&lt;/p&gt;&#xA;&lt;p&gt;Okay - here&amp;rsquo;s the rundown. We use &lt;code&gt;https&lt;/code&gt; to keep the baddies from seeing what we browse on the internet. So far, so good. However, there&amp;rsquo;s a problem - DNS. DNS isn&amp;rsquo;t encrypted for &amp;hellip;. reasons (see the above webcomic). And if you don&amp;rsquo;t change any of your settings, then you&amp;rsquo;re probably getting your DNS records from your ISP. Which means your ISP knows everything about what you try to visit.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Matching socks: Nginx &#43; php = Wordpress (Part 3)</title>
      <link>https://terminal.space/tech/matching-socks-nginx-php-wordpress-part-3/</link>
      <pubDate>Wed, 02 Jun 2021 11:01:09 +0000</pubDate>
      <guid>https://terminal.space/tech/matching-socks-nginx-php-wordpress-part-3/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/matching-socks-nginx-php-wordpress-part-3/images/alfred-rowe-1zTetyivDYE-unsplash.jpg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&#34;https://terminal.space/tech/wordpress-hosting-docker-style-part-1/&#34;&gt;Part 1: Wordpress hosting, docker style&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://terminal.space/tech/cron-letsencrypt-docker-style-part-2/&#34;&gt;Part 2: Cron + LetsEncrypt, docker style&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://terminal.space/tech/matching-socks-nginx-php-wordpress-part-3/&#34;&gt;Part 3: Matching socks: Nginx + php = Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Previously, we&amp;rsquo;ve covered terminating SSL connections and running cron jobs. Now it&amp;rsquo;s time to actually set up a wordpress installation. The two main ingredients are a web server, and a php server. All requests go through the web server (nginx, again in this case). If the filepath ends in a .php extension, then the request gets forwarded to the php-fpm (basically php with a &lt;a href=&#34;https://stackoverflow.com/a/2089297/3029173&#34;&gt;FastCGI&lt;/a&gt; implementation) to do the server-side processing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ad Blocking w/Raspberry Pi</title>
      <link>https://terminal.space/tech/ad-blocking-w-raspberry-pi/</link>
      <pubDate>Mon, 10 May 2021 23:53:27 +0000</pubDate>
      <guid>https://terminal.space/tech/ad-blocking-w-raspberry-pi/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/ad-blocking-w-raspberry-pi/images/harrison-broadbent-bw5a4zQMRCI-unsplash.jpg&#34;&#xA;    alt=&#34;Image of a Raspberry Pi&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;Image of a Raspberry Pi&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;I&amp;rsquo;ve used different technologies to block ads for a long time. I remember my first computer used &lt;a href=&#34;https://en.wikipedia.org/wiki/Proxomitron&#34;&gt;Proxomitron&lt;/a&gt; to great success in the early web. (HTTPS wasn&amp;rsquo;t much of a thing back then which made MITM proxies a lot easier to set up!)&lt;/p&gt;&#xA;&lt;p&gt;My Pi-Hole recently started acting more and more strangely, so I decided it was time to start fresh - and document it this time. I have three goals for this project:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cron &#43; LetsEncrypt, docker style (Part 2)</title>
      <link>https://terminal.space/tech/cron-letsencrypt-docker-style-part-2/</link>
      <pubDate>Mon, 15 Mar 2021 20:49:50 +0000</pubDate>
      <guid>https://terminal.space/tech/cron-letsencrypt-docker-style-part-2/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/cron-letsencrypt-docker-style-part-2/images/glenn-carstens-peters-piNf3C4TViA-unsplash.jpg&#34;&#xA;    alt=&#34;Cornfield&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;Cornfield&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&#34;https://terminal.space/tech/wordpress-hosting-docker-style-part-1/&#34;&gt;Part 1: Wordpress hosting, docker style&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://terminal.space/tech/cron-letsencrypt-docker-style-part-2/&#34;&gt;Part 2: Cron + LetsEncrypt, docker style&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://terminal.space/tech/matching-socks-nginx-php-wordpress-part-3/&#34;&gt;Part 3: Matching socks: Nginx + php = Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Today, I&amp;rsquo;m going to talk about running background jobs with docker. On a non-docker system, you can set up a server to do many things at once - for example run nginx AND update your SSL certs periodically. However, with Docker, you have to choose. You either need to run each process as a separate docker container, or you need to use some sort of supervisor process (supervisord, &lt;a href=&#34;https://laptrinhx.com/docker-containers-running-alpine-linux-and-s6-for-process-management-solid-reliable-containers-3512281510/&#34;&gt;s6&lt;/a&gt;, systemd, etc) which will in-turn kick off the other processes you&amp;rsquo;re interested in.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Wordpress hosting, docker style (Part 1)</title>
      <link>https://terminal.space/tech/wordpress-hosting-docker-style-part-1/</link>
      <pubDate>Tue, 09 Mar 2021 07:07:32 +0000</pubDate>
      <guid>https://terminal.space/tech/wordpress-hosting-docker-style-part-1/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/wordpress-hosting-docker-style-part-1/images/beanca-du-toit-pCNiuZ8lvpc-unsplash.jpg&#34;&#xA;    alt=&#34;A whale, coming out of the water&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;A whale, coming out of the water&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&#34;https://terminal.space/tech/wordpress-hosting-docker-style-part-1/&#34;&gt;Part 1: Wordpress hosting, docker style&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://terminal.space/tech/cron-letsencrypt-docker-style-part-2/&#34;&gt;Part 2: Cron + LetsEncrypt, docker style&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://terminal.space/tech/matching-socks-nginx-php-wordpress-part-3/&#34;&gt;Part 3: Matching socks: Nginx + php = Wordpress&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Those &lt;a href=&#34;https://terminal.space/tech/wordpress-hosting-from-scratch/&#34;&gt;segfaults&lt;/a&gt; I mentioned? Yeah, they proved unsolvable. Nginx Unit seems to be having a rough time and un-extracting Nginx Unit from the install script was more difficult than expected too.&lt;/p&gt;&#xA;&lt;p&gt;Instead, I spent more time than that setting up my &lt;a href=&#34;https://github.com/AnilRedshift/www_docker/&#34;&gt;own cluster of docker containers&lt;/a&gt;. The benefit is that I can now run a whole copy locally, test changes, and then push to production. It also allows me to track what changes to all the various .conf files I&amp;rsquo;ve been making. Today, I&amp;rsquo;ll talk about setting up a SSL-terminating reverse-proxy, and how to host it with docker-compose.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Wordpress hosting from scratch</title>
      <link>https://terminal.space/tech/wordpress-hosting-from-scratch/</link>
      <pubDate>Fri, 26 Feb 2021 11:58:43 +0000</pubDate>
      <guid>https://terminal.space/tech/wordpress-hosting-from-scratch/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/wordpress-hosting-from-scratch/images/vilmar-simion-ffREEWWVimk-unsplash-1.jpg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Alternative title: Why it&amp;rsquo;s worth it to pay for wordpress hosting.&lt;br&gt;&#xA;Alternative title 2: Why is Ansible so complicated?&lt;/p&gt;&#xA;&lt;p&gt;I have no idea why someone would scan the outside of a PSU, but it makes for a segue to this lede - which promises to be the best part of this post:&lt;/p&gt;&#xA;&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/bOfpQt4KFCc?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;&lt;p&gt;Just your typical barcode jam sesh&lt;/p&gt;</description>
    </item>
    <item>
      <title>Goodbye, AWS; hello, world!</title>
      <link>https://terminal.space/tech/goodbye-aws-hello-world/</link>
      <pubDate>Sun, 21 Feb 2021 05:51:07 +0000</pubDate>
      <guid>https://terminal.space/tech/goodbye-aws-hello-world/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://terminal.space/tech/goodbye-aws-hello-world/images/hello-i-m-nik-r22qS5ejODs-unsplash.jpg&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Let me start at the end - Hello, world! Welcome to my new blog. This is the first time I&amp;rsquo;ve revamped the &lt;a href=&#34;https://terminal.space&#34;&gt;terminal.space&lt;/a&gt; domain since its inception. It was previously, well, just a terminal, and not a very good one at that. But now, I have an actual (w/root!) webserver and a motivation to write.&lt;/p&gt;&#xA;&lt;p&gt;As I&amp;rsquo;m going through the incantations to configure everything (probably incorrectly), I wanted to take a moment to pay homage to &lt;a href=&#34;https://web.archive.org/web/20090217050544/http://spyware-free.us/&#34;&gt;my very first website&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
