<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>localhost - technology</title><link href="https://www.trog.dev/" rel="alternate"/><link href="https://www.trog.dev/feeds/technology.atom.xml" rel="self"/><id>https://www.trog.dev/</id><updated>2026-11-26T00:00:00-06:00</updated><subtitle>humanize technology in defense of the weekend</subtitle><entry><title>Getting Talos Linux onto bare metal</title><link href="https://www.trog.dev/getting-talos-linux-onto-bare-metal.html" rel="alternate"/><published>2026-11-26T00:00:00-06:00</published><updated>2026-11-26T00:00:00-06:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2026-11-26:/getting-talos-linux-onto-bare-metal.html</id><summary type="html">&lt;h2&gt;Goal&lt;/h2&gt;
&lt;p&gt;Get Talos Linux running on real hardware so you can start using it.&lt;/p&gt;
&lt;p&gt;You need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Some spare hardware.&lt;/strong&gt; An old x86 box, a NUC, a Raspberry Pi, whatever is sitting in the closet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A USB drive.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A Mac with &lt;a href="https://docs.siderolabs.com/talos/v1.14/getting-started/talosctl"&gt;talosctl&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;brew install siderolabs/tap/talosctl&lt;/code&gt;). I ran every step …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;h2&gt;Goal&lt;/h2&gt;
&lt;p&gt;Get Talos Linux running on real hardware so you can start using it.&lt;/p&gt;
&lt;p&gt;You need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Some spare hardware.&lt;/strong&gt; An old x86 box, a NUC, a Raspberry Pi, whatever is sitting in the closet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A USB drive.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A Mac with &lt;a href="https://docs.siderolabs.com/talos/v1.14/getting-started/talosctl"&gt;talosctl&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;brew install siderolabs/tap/talosctl&lt;/code&gt;). I ran every step in this post from my Mac, so everything here assumes macOS and &lt;a href="https://brew.sh"&gt;Homebrew&lt;/a&gt;. Other platforms are left as an exercise for the reader.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are two ways to get there. Flash the USB drive and boot from it. For one machine, that's the whole job. Or boot over the network. It takes more setup up front, but it scales: once it works, a new machine only needs a network cable and a power button. USB first, then network boot.&lt;/p&gt;
&lt;p&gt;Either way, we stop when Talos is running and answering &lt;code&gt;talosctl&lt;/code&gt;. Installing it to disk and building a cluster is the next post.&lt;/p&gt;
&lt;h2&gt;1. Get an image from the Image Factory&lt;/h2&gt;
&lt;p&gt;Stock Talos is very minimal. CPU microcode, GPU drivers, and similar bits come as system extensions. The &lt;a href="https://factory.talos.dev"&gt;Talos Image Factory&lt;/a&gt; builds an image with the extensions you pick and saves your choice as a &lt;strong&gt;schematic&lt;/strong&gt;, identified by a long hash. Same extensions, same hash, so you do this once per kind of hardware.&lt;/p&gt;
&lt;p&gt;On &lt;a href="https://factory.talos.dev"&gt;factory.talos.dev&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pick the hardware type. &lt;strong&gt;Bare-metal Machine&lt;/strong&gt; for x86 and most ARM boxes, &lt;strong&gt;Single Board Computer&lt;/strong&gt; for a Raspberry Pi.&lt;/li&gt;
&lt;li&gt;Pick the Talos version and the architecture (&lt;code&gt;amd64&lt;/code&gt; or &lt;code&gt;arm64&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Pick extensions. See below.&lt;/li&gt;
&lt;li&gt;Finish, and copy the schematic ID from the results page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Choosing the hardware type on the Image Factory" src="https://www.trog.dev/images/talos-bare-metal/factory-platform.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Picking system extensions" src="https://www.trog.dev/images/talos-bare-metal/factory-extensions.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="The schematic ID and download links" src="https://www.trog.dev/images/talos-bare-metal/factory-schematic.png"&gt;&lt;/p&gt;
&lt;h3&gt;Which extensions?&lt;/h3&gt;
&lt;p&gt;If the machine has it, add the extension for it. If it doesn't, leave it out.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CPU:&lt;/strong&gt; Intel gets &lt;code&gt;siderolabs/intel-ucode&lt;/code&gt;. AMD gets &lt;code&gt;siderolabs/amd-ucode&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Graphics:&lt;/strong&gt; Intel integrated graphics gets &lt;code&gt;siderolabs/i915&lt;/code&gt;. Otherwise, search the list for your GPU.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thunderbolt:&lt;/strong&gt; Thunderbolt ports get &lt;code&gt;siderolabs/thunderbolt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What you'll run on it:&lt;/strong&gt; some workloads need host tools. I run Longhorn, so I add &lt;code&gt;siderolabs/iscsi-tools&lt;/code&gt; and &lt;code&gt;siderolabs/util-linux-tools&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My NUCs get &lt;code&gt;i915&lt;/code&gt;, &lt;code&gt;intel-ucode&lt;/code&gt;, &lt;code&gt;iscsi-tools&lt;/code&gt;, &lt;code&gt;nvme-cli&lt;/code&gt;, &lt;code&gt;thunderbolt&lt;/code&gt;, and &lt;code&gt;util-linux-tools&lt;/code&gt;. Miss one and it's not a big deal. Changing extensions just means a new schematic.&lt;/p&gt;
&lt;h2&gt;2. Boot from USB&lt;/h2&gt;
&lt;p&gt;Download the ISO. I keep the version in the file name so they're easy to tell apart later:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;SCHEMATIC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;your&lt;span class="w"&gt; &lt;/span&gt;schematic&lt;span class="w"&gt; &lt;/span&gt;ID&amp;gt;
&lt;span class="nv"&gt;VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;v1.14.5

curl&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;talos-metal-amd64-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.iso&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://factory.talos.dev/image/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SCHEMATIC&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/metal-amd64.iso&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Use the latest Talos release for &lt;code&gt;VERSION&lt;/code&gt;. The versions in this post and its screenshots will be out of date by the time you read it.&lt;/p&gt;
&lt;p&gt;On ARM, swap &lt;code&gt;amd64&lt;/code&gt; for &lt;code&gt;arm64&lt;/code&gt;. A Raspberry Pi is different: it runs from a disk image rather than an ISO. Follow the &lt;a href="https://docs.siderolabs.com/talos/v1.14/platform-specific-installations/single-board-computers/rpi_generic"&gt;Talos Raspberry Pi docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Flash it with &lt;a href="https://etcher.balena.io"&gt;balenaEtcher&lt;/a&gt; (&lt;code&gt;brew install --cask balenaetcher&lt;/code&gt;): &lt;strong&gt;Flash from file&lt;/strong&gt;, pick the ISO, &lt;strong&gt;Select target&lt;/strong&gt;, pick the USB drive, &lt;strong&gt;Flash&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Plug the drive into the machine. In the BIOS, turn off Secure Boot (this guide doesn't cover it), then pick the USB drive from the one-time boot menu. Talos boots into &lt;strong&gt;maintenance mode&lt;/strong&gt;: nothing is installed to disk yet, and it's waiting for a config. The console shows the node's IP address.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The node's console in maintenance mode" src="https://www.trog.dev/images/talos-bare-metal/talos-maintenance-mode.png"&gt;&lt;/p&gt;
&lt;p&gt;Skip to step 4.&lt;/p&gt;
&lt;h2&gt;3. Boot from the network&lt;/h2&gt;
&lt;p&gt;The USB drive works, but every machine means walking over with the drive and a keyboard. Network boot replaces that. The machine powers on, asks the network what to boot, and gets Talos.&lt;/p&gt;
&lt;p&gt;I use &lt;a href="https://github.com/garybowers/bootimus"&gt;Bootimus&lt;/a&gt;, an open source (Apache-2.0) PXE and HTTP boot server. I skipped dnsmasq. It can do all of this, but I wanted a lab that stays simple and easy to maintain. Bootimus has a web UI instead of config files, and it can use &lt;a href="https://bootimus.com/docs/authentication"&gt;LDAP&lt;/a&gt; for logins if you have a directory.&lt;/p&gt;
&lt;p&gt;The feature that makes it easy to drop in is &lt;strong&gt;proxyDHCP&lt;/strong&gt;. Your router keeps handing out addresses, and Bootimus answers only the PXE part of the request. Nothing on the router changes.&lt;/p&gt;
&lt;h3&gt;Run Bootimus&lt;/h3&gt;
&lt;p&gt;For the examples:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Machine&lt;/th&gt;
&lt;th&gt;Address&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Router / DHCP&lt;/td&gt;
&lt;td&gt;192.168.1.1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mac running Bootimus&lt;/td&gt;
&lt;td&gt;192.168.1.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Talos node&lt;/td&gt;
&lt;td&gt;DHCP from the router&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The official &lt;a href="https://bootimus.com/docs/deployment"&gt;Bootimus deployment guide&lt;/a&gt; covers running it in Docker and logging in the first time. It changes as the project moves, so I'm not copying it here. Two things to get right:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Turn on proxyDHCP.&lt;/strong&gt; See the &lt;a href="https://bootimus.com/docs/dhcp"&gt;DHCP docs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Put Bootimus on the same network as the node.&lt;/strong&gt; PXE starts with a broadcast, and proxyDHCP only works within one broadcast domain.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Add the Talos image&lt;/h3&gt;
&lt;p&gt;Bootimus boots Linux from a kernel and initrd, and for Talos on x86 it can pull them out of the ISO. Download the &lt;code&gt;amd64&lt;/code&gt; ISO from step 2, then in the admin UI:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Upload ISO&lt;/strong&gt; and pick it.&lt;/li&gt;
&lt;li&gt;Open the image's properties.&lt;/li&gt;
&lt;li&gt;Change the boot method from SAN boot to kernel/initrd, and click &lt;strong&gt;Extract&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There's no built-in Talos profile, but the generic scanner finds the boot files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Generic scanner selected: kernel=/boot/vmlinuz initrd=/boot/initramfs.xz
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then set the kernel parameters to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;initrd=initrd talos.platform=metal slab_nomerge pti=on console=tty0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;a href="https://docs.siderolabs.com/talos/v1.14/platform-specific-installations/bare-metal-platforms/pxe"&gt;Talos PXE guide&lt;/a&gt; requires &lt;code&gt;talos.platform=metal&lt;/code&gt;, &lt;code&gt;slab_nomerge&lt;/code&gt;, and &lt;code&gt;pti=on&lt;/code&gt;. &lt;code&gt;initrd=initrd&lt;/code&gt; tells the kernel which of the files iPXE downloaded is the initrd, and &lt;code&gt;console=tty0&lt;/code&gt; puts the console on the screen.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Image properties with the boot method set to kernel/initrd" src="https://www.trog.dev/images/talos-bare-metal/bootimus-image-properties.png"&gt;&lt;/p&gt;
&lt;h3&gt;On ARM&lt;/h3&gt;
&lt;p&gt;Extract doesn't work on the &lt;code&gt;arm64&lt;/code&gt; ISO. It packs the kernel and initrd into a single EFI file, so there's nothing to pull out. Put the files in place by hand instead, as described in the Bootimus &lt;a href="https://bootimus.com/docs/images#kernel-extraction"&gt;kernel extraction docs&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;Download the netboot files from the factory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;vmlinuz&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://factory.talos.dev/image/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SCHEMATIC&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/kernel-arm64&amp;quot;&lt;/span&gt;
curl&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;initrd&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://factory.talos.dev/image/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SCHEMATIC&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/initramfs-arm64.xz&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upload the &lt;code&gt;arm64&lt;/code&gt; ISO.&lt;/li&gt;
&lt;li&gt;In Bootimus's ISO directory, make a folder named after the ISO, next to it, and drop both files in: &lt;code&gt;talos-metal-arm64-v1.14.5/vmlinuz&lt;/code&gt; and &lt;code&gt;talos-metal-arm64-v1.14.5/initrd&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set the boot method to kernel/initrd and the kernel parameters as above.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I tested this in a &lt;a href="https://mac.getutm.app"&gt;UTM&lt;/a&gt; VM on my Mac. Two things bit me. Give the VM 4 GB of RAM, because 256 MB wasn't enough to load the kernel and initrd. And set the VM's display to &lt;code&gt;virtio-gpu-pci&lt;/code&gt;. With the display I started with, UTM showed "display output is not active" once the kernel takes over.&lt;/p&gt;
&lt;h3&gt;Boot the node&lt;/h3&gt;
&lt;p&gt;In the BIOS, turn on network boot and turn off Secure Boot. Then boot from the network. Every BIOS does this differently, so I'll leave the menus to you.&lt;/p&gt;
&lt;p&gt;Power it on. The node gets an address from the router, loads the Bootimus menu, and boots Talos into maintenance mode, same as the USB drive. My NUCs and MS-01s booted fine. If yours don't, the &lt;strong&gt;PXE Debug&lt;/strong&gt; page in the admin UI lists every DHCP request Bootimus sees, so you can tell whether the node is reaching it at all.&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Bootimus menu with the Talos entry" src="https://www.trog.dev/images/talos-bare-metal/bootimus-menu.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Bootimus PXE Debug page" src="https://www.trog.dev/images/talos-bare-metal/bootimus-pxe-debug.png"&gt;&lt;/p&gt;
&lt;h2&gt;4. Check it&lt;/h2&gt;
&lt;p&gt;Grab the IP from the node's console. There are no certs yet, so talk to it with &lt;code&gt;--insecure&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;talosctl&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.1.123&lt;span class="w"&gt; &lt;/span&gt;get&lt;span class="w"&gt; &lt;/span&gt;disks&lt;span class="w"&gt; &lt;/span&gt;--insecure
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A disk list back means Talos is running and waiting for a config. One of those disks is where Talos gets installed, and that's the next post.&lt;/p&gt;</content><category term="technology"/><category term="kubernetes"/><category term="talos"/><category term="pxe"/><category term="homelab"/></entry><entry><title>Getting started with microk8s</title><link href="https://www.trog.dev/getting-started-with-microk8s.html" rel="alternate"/><published>2024-01-15T00:00:00-06:00</published><updated>2024-01-15T00:00:00-06:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2024-01-15:/getting-started-with-microk8s.html</id><summary type="html">&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;I built a k8s cluster on 3 Intel NUCs with microk8s that includes clustered storage using Mayastore (OpenEBS), snapshots, load balancing and control plane resilience.&lt;/p&gt;
&lt;h2&gt;Selecting Hardware&lt;/h2&gt;
&lt;p&gt;I chose Intel NUC devices specifically for their support of an extra 2.5" drive in addition to an NVMe OS drive …&lt;/p&gt;</summary><content type="html">&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;I built a k8s cluster on 3 Intel NUCs with microk8s that includes clustered storage using Mayastore (OpenEBS), snapshots, load balancing and control plane resilience.&lt;/p&gt;
&lt;h2&gt;Selecting Hardware&lt;/h2&gt;
&lt;p&gt;I chose Intel NUC devices specifically for their support of an extra 2.5" drive in addition to an NVMe OS drive. There are plenty of other options including a bunch of Thinkpads. I did quite a bit of CPU comparison to optimize cost to performance. The exact processor I ended up with was &lt;code&gt;Intel(R) Core(TM) i7-10710U CPU&lt;/code&gt; in a NUC10i7FNHN. This was great in my opinion because each processor has 6 cores and I was able to pick up 3 for about USD $500 a piece. I added a 256G NVMe drive for the OS, 32G of memory, and 1TB Samsung 860 SSD drive for data.&lt;/p&gt;
&lt;p&gt;Your mileage may vary but I'd recommend at least 4 cores and 16GB of memory per device.&lt;/p&gt;
&lt;p&gt;For network there is a Ubiquiti 24 port gig switch connecting the NUCs along with a Synology for NFS but any gig switch will work and the NFS mount is optional.&lt;/p&gt;
&lt;p&gt;Once you have the hardware in place and connected, you're ready for the next step - Initial config and OS installation.&lt;/p&gt;
&lt;h2&gt;Initial Config and OS Installation&lt;/h2&gt;
&lt;p&gt;Since I wanted to use microk8s I chose to use Ubuntu. Yes, you can run it on things other than Ubuntu but I didn't want to.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get a Ubuntu install on USB drive. I won't go into detail since there are many good guides on this process. I used BalenaEtcher.&lt;/li&gt;
&lt;li&gt;Boot to the BIOS and hit F9 for defaults. I found this was the fastest way to ensure my hardware was identically configured. If you have a different preference for configuration, just apply it before loading the OS.&lt;/li&gt;
&lt;li&gt;Perform a minimal Ubuntu install. This reduces the number of packages that need to be updated. &lt;ol&gt;
&lt;li&gt;I used the entire disk for Ubuntu with no special partitioning.&lt;/li&gt;
&lt;li&gt;Ensure that SSH Server is selected for installation.&lt;/li&gt;
&lt;li&gt;Set a static IP for the node.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Once the installation is complete, I installed a few packages.&lt;ol&gt;
&lt;li&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo apt install vim iputils-ping fwupd -y&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;I then upgraded the firmware on the devices with the following commands.&lt;ol&gt;
&lt;li&gt;&lt;code&gt;sudo fwupdmgr get-updates&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo fwupdmgr upgrade&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Update &lt;code&gt;/etc/hosts&lt;/code&gt; with entries to each node in the cluster. &lt;ol&gt;
&lt;li&gt;&lt;code&gt;sudo hostnamectl hostname nuc001&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;echo "192.168.1.100 nuc001 nuc001.local" | sudo tee -a /etc/hosts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;echo "192.168.1.101 nuc002 nuc002.local" | sudo tee -a /etc/hosts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;echo "192.168.1.102 nuc003 nuc003.local" | sudo tee -a /etc/hosts&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you didn't set a static IP during installation you can do so by editing the default netplan config file and restarting the service. Ensure that DNS is pointing to something that will generally always be valid. Not a DNS service running on your k8s cluster :).&lt;/p&gt;
&lt;p&gt;Example netplan config&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;network:
  ethernets:
    eno1:
      dhcp4: false
      addresses:
        - 192.168.1.100/24
      routes:
        - to: default
          via: 192.168.1.1
          metric: 100
          on-link: true
      nameservers:
          addresses:
            - 192.168.1.1
  version: 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Hugepages&lt;/h2&gt;
&lt;p&gt;Huges pages will be needed by Mayastor. This creates a bit of an issue for any container you may start that needs huge pages because Mayastor will consume everything allocated by default. You'll want to increase this but how much you increase it will depend on how much memory you have.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;#&lt;/span&gt; Check huge page config
&lt;span class="gh"&gt;#&lt;/span&gt; https://blog.nuvotex.de/running-postgres-in-kubernetes-with-hugepages/
&lt;span class="gh"&gt;#&lt;/span&gt; https://help.ubuntu.com/community/KVM%20-%20Using%20Hugepages
cat /proc/meminfo | grep Huge
&lt;span class="gh"&gt;#&lt;/span&gt; /etc/sysctl.conf:vm.nr_hugepages = 2560
&lt;span class="gh"&gt;#&lt;/span&gt; Reboot after changing
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once this is done you should have 3 computers that have static IPs and are able to ping each other by hostname. If you chose to add the extra SSD drive for storage, don't worry about it for now. That will be used once we install Mayastor.&lt;/p&gt;
&lt;h1&gt;blog&lt;/h1&gt;</content><category term="technology"/><category term="kubernetes"/><category term="containers"/></entry><entry><title>Install and configure microk8s</title><link href="https://www.trog.dev/install-and-configure-microk8s.html" rel="alternate"/><published>2024-01-15T00:00:00-06:00</published><updated>2024-01-15T00:00:00-06:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2024-01-15:/install-and-configure-microk8s.html</id><summary type="html">&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;You could of course do this with Ansible or any other orchestration tool. I didn't.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;newgrp&lt;span class="w"&gt; &lt;/span&gt;microk8s
sudo&lt;span class="w"&gt; &lt;/span&gt;snap&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;microk8s&lt;span class="w"&gt; &lt;/span&gt;--classic&lt;span class="w"&gt; &lt;/span&gt;--channel&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.26/stable
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;alias&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;mkctl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;microk8s&lt;span class="w"&gt; &lt;/span&gt;kubectl&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;~/.bash_aliases
sudo&lt;span class="w"&gt; &lt;/span&gt;usermod&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;-G&lt;span class="w"&gt; &lt;/span&gt;microk8s&lt;span class="w"&gt; &lt;/span&gt;ubuntu
sudo&lt;span class="w"&gt; &lt;/span&gt;chown&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;-R&lt;span class="w"&gt; &lt;/span&gt;ubuntu&lt;span class="w"&gt; &lt;/span&gt;~/.kube

&lt;span class="c1"&gt;# Dump the config to access …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;You could of course do this with Ansible or any other orchestration tool. I didn't.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;newgrp&lt;span class="w"&gt; &lt;/span&gt;microk8s
sudo&lt;span class="w"&gt; &lt;/span&gt;snap&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;microk8s&lt;span class="w"&gt; &lt;/span&gt;--classic&lt;span class="w"&gt; &lt;/span&gt;--channel&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.26/stable
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;alias&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;mkctl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;microk8s&lt;span class="w"&gt; &lt;/span&gt;kubectl&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;~/.bash_aliases
sudo&lt;span class="w"&gt; &lt;/span&gt;usermod&lt;span class="w"&gt; &lt;/span&gt;-a&lt;span class="w"&gt; &lt;/span&gt;-G&lt;span class="w"&gt; &lt;/span&gt;microk8s&lt;span class="w"&gt; &lt;/span&gt;ubuntu
sudo&lt;span class="w"&gt; &lt;/span&gt;chown&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;-R&lt;span class="w"&gt; &lt;/span&gt;ubuntu&lt;span class="w"&gt; &lt;/span&gt;~/.kube

&lt;span class="c1"&gt;# Dump the config to access the cluster remotely&lt;/span&gt;
microk8s&lt;span class="w"&gt; &lt;/span&gt;config
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once you have it installed you may want to copy the output of the config dump to your local machine to manage the cluster from there. On a mac the location would be &lt;code&gt;~/.kube/config&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After the install you have access to these commands:
- &lt;code&gt;sudo microk8s stop&lt;/code&gt;
- &lt;code&gt;sudo microk8s start&lt;/code&gt;
- &lt;code&gt;sudo microk8s status&lt;/code&gt;
- &lt;code&gt;sudo microk8s enable &amp;lt;plugin&amp;gt;&lt;/code&gt;
- &lt;code&gt;sudo microk8s disable &amp;lt;plugin&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Enable HA for the control plane&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo microk8s enable ha-cluster
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once this is done, you should see something similar to the following in the output of &lt;code&gt;sudo microk8s status&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;microk8s is running
high-availability: yes
  datastore master nodes: 192.168.1.100:19001 192.168.1.101:19001 192.168.1.102:19001
  datastore standby nodes: none
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If all went well then congrats! You have a basic running k8s cluster that can be accessed from a computer on your local network.&lt;/p&gt;</content><category term="technology"/><category term="kubernetes"/><category term="containers"/></entry><entry><title>Clear DNS cache on macOS</title><link href="https://www.trog.dev/clear-dns-cache-on-macos.html" rel="alternate"/><published>2021-11-17T08:37:09-06:00</published><updated>2021-11-17T08:37:09-06:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2021-11-17:/clear-dns-cache-on-macos.html</id><content type="html">&lt;p&gt;To clear your local DNS cache on macOS do the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;dscacheutil&lt;span class="w"&gt; &lt;/span&gt;-flushcache
sudo&lt;span class="w"&gt; &lt;/span&gt;killall&lt;span class="w"&gt; &lt;/span&gt;-HUP&lt;span class="w"&gt; &lt;/span&gt;mDNSResponder
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A simple wrapper for this (that might go in your bashrc) would be:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;clear_dns_cache&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Clearing local DNS cache...&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;dscacheutil&lt;span class="w"&gt; &lt;/span&gt;-flushcache
&lt;span class="w"&gt;  &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;killall&lt;span class="w"&gt; &lt;/span&gt;-HUP&lt;span class="w"&gt; &lt;/span&gt;mDNSResponder
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="technology"/><category term="macos"/><category term="shell"/><category term="dns"/></entry><entry><title>Testing Syslog from the CLI</title><link href="https://www.trog.dev/testing-syslog-from-the-cli.html" rel="alternate"/><published>2020-02-17T11:48:37-06:00</published><updated>2020-02-17T11:48:37-06:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2020-02-17:/testing-syslog-from-the-cli.html</id><summary type="html">&lt;h2&gt;Install a syslog server&lt;/h2&gt;
&lt;p&gt;This will get a basic rsyslog server running on UDP port 514.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;brew&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;rsyslog
mkdir&lt;span class="w"&gt; &lt;/span&gt;/tmp/rsyslog
rsyslogd&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;/usr/local/etc/rsyslog.conf&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;/usr/local/var/run/rsyslogd.pid
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Config file&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cat&lt;span class="w"&gt; &lt;/span&gt;/usr/local/etc/rsyslog.conf
&lt;span class="nv"&gt;$ModLoad&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;imudp
&lt;span class="nv"&gt;$UDPServerRun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;514&lt;/span&gt;
&lt;span class="nv"&gt;$template&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;RemoteLogs …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;h2&gt;Install a syslog server&lt;/h2&gt;
&lt;p&gt;This will get a basic rsyslog server running on UDP port 514.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;brew&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;rsyslog
mkdir&lt;span class="w"&gt; &lt;/span&gt;/tmp/rsyslog
rsyslogd&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;/usr/local/etc/rsyslog.conf&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;/usr/local/var/run/rsyslogd.pid
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Config file&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cat&lt;span class="w"&gt; &lt;/span&gt;/usr/local/etc/rsyslog.conf
&lt;span class="nv"&gt;$ModLoad&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;imudp
&lt;span class="nv"&gt;$UDPServerRun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;514&lt;/span&gt;
&lt;span class="nv"&gt;$template&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;RemoteLogs,&lt;span class="s2"&gt;&amp;quot;/tmp/rsyslog/%HOSTNAME%/%PROGRAMNAME%.log&amp;quot;&lt;/span&gt;
*.*&lt;span class="w"&gt; &lt;/span&gt;?RemoteLogs
&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;~
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Clients&lt;/h2&gt;
&lt;p&gt;Mac&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;brew&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;mlogger
mlogger&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;127&lt;/span&gt;.0.0.1&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;-P&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;514&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-t&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Does it work?&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Linux&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;logger&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;127&lt;/span&gt;.0.0.1&lt;span class="w"&gt; &lt;/span&gt;-U&lt;span class="w"&gt; &lt;/span&gt;-P&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;514&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-t&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Does it work?&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Output&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;user@host&lt;span class="w"&gt; &lt;/span&gt;%&lt;span class="w"&gt; &lt;/span&gt;ls&lt;span class="w"&gt; &lt;/span&gt;-T&lt;span class="w"&gt; &lt;/span&gt;/tmp/rsyslog
/tmp/rsyslog
├──&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;192&lt;/span&gt;.168.1.1
│&lt;span class="w"&gt;  &lt;/span&gt;└──&lt;span class="w"&gt; &lt;/span&gt;US8P60,fcecdad1e8c1,v4.0.80.10875.log
├──&lt;span class="w"&gt; &lt;/span&gt;host.domain.local
│&lt;span class="w"&gt;  &lt;/span&gt;└──&lt;span class="w"&gt; &lt;/span&gt;test.log
├──&lt;span class="w"&gt; &lt;/span&gt;firewall.domain.local
│&lt;span class="w"&gt;  &lt;/span&gt;└──&lt;span class="w"&gt; &lt;/span&gt;c413c641f5f0,udm-1.6.4.2306.log
└──&lt;span class="w"&gt; &lt;/span&gt;ubnt-ap.domain.local
&lt;span class="w"&gt;   &lt;/span&gt;└──&lt;span class="w"&gt; &lt;/span&gt;U7LR,802aa8963525,v4.0.80.10875.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="technology"/><category term="linux"/><category term="syslog"/></entry><entry><title>Build Unbound on ARM64</title><link href="https://www.trog.dev/build-unbound-on-arm64.html" rel="alternate"/><published>2020-02-17T10:48:02-06:00</published><updated>2020-02-17T10:48:02-06:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2020-02-17:/build-unbound-on-arm64.html</id><summary type="html">&lt;p&gt;I have a pretty cool little cluster of ARM64 based Fire3 LTS computers I use for mini kubernetes clusters and generally running support services. I wanted to implement encrypted DNS for my local network without deploying a pre-built solution like &lt;a href="https://pi-hole.net"&gt;pi-hole&lt;/a&gt;. This is the process I used to build package …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have a pretty cool little cluster of ARM64 based Fire3 LTS computers I use for mini kubernetes clusters and generally running support services. I wanted to implement encrypted DNS for my local network without deploying a pre-built solution like &lt;a href="https://pi-hole.net"&gt;pi-hole&lt;/a&gt;. This is the process I used to build package a newer version of Unbound than was available in the debian repos for deployment on the Fire3 cluster.&lt;/p&gt;
&lt;h1&gt;Build Unbound&lt;/h1&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;BUILD_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/usr/src/unbound&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/opt/unbound&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;LIBRESSL_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;3.3.3&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;LIBEVENT_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;2.1.12&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;UNBOUND_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;1.13.1&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;libexpat1-dev&lt;span class="w"&gt; &lt;/span&gt;build-essential&lt;span class="w"&gt; &lt;/span&gt;-y
wget&lt;span class="w"&gt; &lt;/span&gt;https://www.nlnetlabs.nl/downloads/unbound/unbound-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.tar.gz
wget&lt;span class="w"&gt; &lt;/span&gt;https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBRESSL_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.tar.gz
wget&lt;span class="w"&gt; &lt;/span&gt;https://github.com/libevent/libevent/releases/download/release-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBEVENT_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;-stable/libevent-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBEVENT_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;-stable.tar.gz
tar&lt;span class="w"&gt; &lt;/span&gt;xf&lt;span class="w"&gt; &lt;/span&gt;libressl-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBRESSL_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.tar.gz
tar&lt;span class="w"&gt; &lt;/span&gt;xf&lt;span class="w"&gt; &lt;/span&gt;libevent-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBEVENT_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;-stable.tar.gz
tar&lt;span class="w"&gt; &lt;/span&gt;xf&lt;span class="w"&gt; &lt;/span&gt;unbound-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;.tar.gz

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;libressl-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBRESSL_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
./configure&lt;span class="w"&gt; &lt;/span&gt;--prefix&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;-j6
make&lt;span class="w"&gt; &lt;/span&gt;install
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;libevent-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;LIBEVENT_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;-stable
&lt;span class="nv"&gt;CPPFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-I&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/include&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;LDFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-L&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/lib&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;./configure&lt;span class="w"&gt; &lt;/span&gt;--prefix&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;-j6
make&lt;span class="w"&gt; &lt;/span&gt;install
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;unbound-&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_VERSION&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
./configure&lt;span class="w"&gt; &lt;/span&gt;--with-libevent&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--with-ssl&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--prefix&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;-j6
make&lt;span class="w"&gt; &lt;/span&gt;install
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Copy the built code to usr/src&lt;/h1&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;rsync&lt;span class="w"&gt; &lt;/span&gt;-av&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;BUILD_DIR&lt;/span&gt;&lt;span class="si"&gt;}${&lt;/span&gt;&lt;span class="nv"&gt;UNBOUND_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Building the deb package&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Deploy the DEBIAN directory into ${BUILD_DIR} &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;BUILD_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/DEBIAN
&lt;span class="c1"&gt;# Deploy the contents of the control file to ${BUILD_DIR}/DEBIAN/control&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Deploy systemd files into ${BUILD_DIR}&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;BUILD_DIR&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/etc/systemd/system
&lt;span class="c1"&gt;# Deploy the contents of Systemd Unit File to ${BUILD_DIR}/etc/systemd/system/unbound.service&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Run the package command&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;dpkg-deb&lt;span class="w"&gt; &lt;/span&gt;--build&lt;span class="w"&gt; &lt;/span&gt;/usr/src/unbound
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Support files&lt;/h2&gt;
&lt;h3&gt;Control file&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Package:&lt;span class="w"&gt; &lt;/span&gt;unbound
Version:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.9.6-custom2
Section:&lt;span class="w"&gt; &lt;/span&gt;custom
Priority:&lt;span class="w"&gt; &lt;/span&gt;optional
Architecture:&lt;span class="w"&gt; &lt;/span&gt;arm64
Essential:&lt;span class="w"&gt; &lt;/span&gt;no
Maintainer:&lt;span class="w"&gt; &lt;/span&gt;trog.dev
Description:&lt;span class="w"&gt; &lt;/span&gt;Custom&lt;span class="w"&gt; &lt;/span&gt;build&lt;span class="w"&gt; &lt;/span&gt;of&lt;span class="w"&gt; &lt;/span&gt;unbound&lt;span class="w"&gt; &lt;/span&gt;statically&lt;span class="w"&gt; &lt;/span&gt;linked&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;libressl&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;libevent
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Systemd Unit File&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# etc/systemd/system/unbound.service&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;Unit&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="nv"&gt;Description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Unbound&lt;span class="w"&gt; &lt;/span&gt;recursive&lt;span class="w"&gt; &lt;/span&gt;DNS&lt;span class="w"&gt; &lt;/span&gt;service.
&lt;span class="nv"&gt;After&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;network-online.target
&lt;span class="nv"&gt;Wants&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;network-online.target

&lt;span class="o"&gt;[&lt;/span&gt;Service&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="nv"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;forking
&lt;span class="nv"&gt;PIDFile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/unbound/etc/unbound/unbound.pid
&lt;span class="nv"&gt;ExecStartPre&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/unbound/sbin/unbound-checkconf&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;/opt/unbound/etc/unbound/unbound.conf
&lt;span class="nv"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/unbound/sbin/unbound

&lt;span class="o"&gt;[&lt;/span&gt;Install&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="nv"&gt;WantedBy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;multi-user.target
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="technology"/><category term="DNS"/><category term="privacy"/></entry><entry><title>Configure a Pelican Theme</title><link href="https://www.trog.dev/configure-a-pelican-theme.html" rel="alternate"/><published>2018-08-30T21:47:22-05:00</published><updated>2018-08-30T21:47:22-05:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2018-08-30:/configure-a-pelican-theme.html</id><summary type="html">&lt;p&gt;Now that you've got the basic Pelican site up and running the next thing you'll probably want to do is modify the look and feel. There is a fairly large collection of themes available at &lt;a href="https://github.com/getpelican/pelican-themes"&gt;Pelican Themes Github&lt;/a&gt; and most work decently out of the box. My favorite is the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Now that you've got the basic Pelican site up and running the next thing you'll probably want to do is modify the look and feel. There is a fairly large collection of themes available at &lt;a href="https://github.com/getpelican/pelican-themes"&gt;Pelican Themes Github&lt;/a&gt; and most work decently out of the box. My favorite is the one I'm using here, &lt;a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3"&gt;pelican-bootstrap3&lt;/a&gt;, and you can preview the themes at &lt;a href="http://www.pelicanthemes.com"&gt;http://www.pelicanthemes.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are the highlevel steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clone the pelican-bootstrap3 repository&lt;/li&gt;
&lt;li&gt;Configure the site to use it by modifying pelicanconf.py&lt;/li&gt;
&lt;li&gt;Validate the look and feel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Clone the pelican-bootstrap3 repository&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;https://github.com/getpelican/pelican-themes&lt;span class="w"&gt; &lt;/span&gt;~/pelican-themes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I had some issues here and had to edit the .gitmodules file in ~/pelican-themes to remove &lt;em&gt;brutalist&lt;/em&gt;. Once that was removed, I ran &lt;code&gt;git submodule update --recursive&lt;/code&gt; and all files were checked out correctly. Since we're only interested in the pelican-bootstrap3 theme in this walkthrough, I don't checkout all the sub modules as the official howto shows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Move the theme you want into your site directory&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;~/pelican-site/themes
cp&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;~/pelican-themes/pelican-bootstrap3&lt;span class="w"&gt; &lt;/span&gt;themes/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Configure the site to use the theme&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most of the Pelican site configuration happens in &lt;strong&gt;pelicanconf.py&lt;/strong&gt; in the root of your site. Add the following line to yours.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;THEME&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;themes/pelican-bootstrap3&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If the dev server is still running then the site will automatically regenerate. If it doesn't, restart the dev server.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;
&lt;span class="normal"&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# Start the testing server&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;devserver
&lt;span class="c1"&gt;# Browse to http://localhost:8000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At this point you should see the new theme loaded. If you get errors, go back through the guide and compare your configuration.&lt;/p&gt;</content><category term="technology"/><category term="pelican"/><category term="python"/></entry><entry><title>Getting Started with Pelican</title><link href="https://www.trog.dev/getting-started-with-pelican.html" rel="alternate"/><published>2018-08-30T21:12:39-05:00</published><updated>2018-08-30T21:12:39-05:00</updated><author><name>Jared Trog</name></author><id>tag:www.trog.dev,2018-08-30:/getting-started-with-pelican.html</id><summary type="html">&lt;p&gt;I'm revisiting my blogging/documentation needs again. Some of my core desires are to have the whole thing neatly version controlled where I can come back to it in 6 months and publish an article without having to remember how it was all setup to begin with. I think it's …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm revisiting my blogging/documentation needs again. Some of my core desires are to have the whole thing neatly version controlled where I can come back to it in 6 months and publish an article without having to remember how it was all setup to begin with. I think it's best to start at the beginning.&lt;/p&gt;
&lt;p&gt;My primary computer is a 2017 Mac Pro without the touchbar. Yeah, I know... I probably should have dealt with the touchbar for the extra Thunderbolt ports. Well, we're not covering that here.&lt;/p&gt;
&lt;p&gt;As usual, make sure you have &lt;a href="http://brew.sh"&gt;Homebrew&lt;/a&gt; installed before beginning. It makes life good. Once you're good to go there, let's get the initial environment setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Track the project in source control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let's start by tracking this in source control. I'm going to use gitlab later on for continously publishing my blog but feel free to use what works for you. At a minimum you'll want to do the following.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;
&lt;span class="normal"&gt;3&lt;/span&gt;
&lt;span class="normal"&gt;4&lt;/span&gt;
&lt;span class="normal"&gt;5&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;~/pelican-blog&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;!$
touch&lt;span class="w"&gt; &lt;/span&gt;README.md
git&lt;span class="w"&gt; &lt;/span&gt;init
git&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;*
git&lt;span class="w"&gt; &lt;/span&gt;commit&lt;span class="w"&gt; &lt;/span&gt;-am&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Initial commit&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;TODO: setup the .gitignore&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Setting up the python environment&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pipenv.readthedocs.io/en/latest/"&gt;Pipenv&lt;/a&gt; is a pretty great tool. Instead of initializing the virtualenv, activating it, and managing requirements.txt, it handles all of that for you in a simple command. Coloring outside the lines can get a little wonky but for the most part it makes virtual environments nice.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;brew&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;pipenv
pipenv&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;pelican&lt;span class="w"&gt; &lt;/span&gt;markdown&lt;span class="w"&gt; &lt;/span&gt;beautifulsoup4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You'll notice that it drops a Pipfile and Pipfile.lock file in the current directory. This file tracks dependencies and helps set the environment back up when we copy all this code somewhere else.&lt;/p&gt;
&lt;p&gt;If you have another way you prefer to manage python virtual environments, go for it. You'll want to be on Python 3.7 for this guide.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting started with Pelican&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that you have Pelican installed, you can leverage the quickstart setup. This is one of the odd parts of working with pipenv I mentioned. To activate the environment use &lt;code&gt;pipenv shell&lt;/code&gt;. This will drop you off at a command prompt to do work within the virtual environment.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;
&lt;span class="normal"&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pipenv&lt;span class="w"&gt; &lt;/span&gt;shell
pelican-quickstart
&lt;span class="c1"&gt;# answer the questions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now at this point, Pelican won't do much until you create at least one page.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;
&lt;span class="normal"&gt;3&lt;/span&gt;
&lt;span class="normal"&gt;4&lt;/span&gt;
&lt;span class="normal"&gt;5&lt;/span&gt;
&lt;span class="normal"&gt;6&lt;/span&gt;
&lt;span class="normal"&gt;7&lt;/span&gt;
&lt;span class="normal"&gt;8&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cat&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;content/pelican-is-cool.md&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;EOF&lt;/span&gt;
&lt;span class="s"&gt;Title: Pelican is cool&lt;/span&gt;
&lt;span class="s"&gt;Date: 2018-08-30&lt;/span&gt;
&lt;span class="s"&gt;Category: Test&lt;/span&gt;

&lt;span class="s"&gt;Hello from Pelican!&lt;/span&gt;
&lt;span class="s"&gt;---&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Time to render the site and start a test server to see if it works...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;
&lt;span class="normal"&gt;3&lt;/span&gt;
&lt;span class="normal"&gt;4&lt;/span&gt;
&lt;span class="normal"&gt;5&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# Start the testing server&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;devserver
&lt;span class="c1"&gt;# Browse to http://localhost:8000&lt;/span&gt;
&lt;span class="c1"&gt;# Stop the testing server&lt;/span&gt;
make&lt;span class="w"&gt; &lt;/span&gt;stopserver
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you see your new page then CONGRATS! It worked!&lt;/p&gt;
&lt;p&gt;Next we'll take a look at using a theme other than the default!&lt;/p&gt;</content><category term="technology"/><category term="pelican"/><category term="python"/></entry></feed>