From 07920d17ce75e84100842fb6b367bd2e5233635a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 4 Apr 2025 23:22:09 +0300 Subject: Update content for gemtext --- about/novels.gmi | 19 +- about/resources.gmi | 184 +- ...-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi | 1 + ...022-07-30-lets-encrypt-with-openbsd-and-rex.gmi | 1 + .../2024-01-13-one-reason-why-i-love-openbsd.gmi | 1 + ...4-04-01-KISS-high-availability-with-OpenBSD.gmi | 1 + ...24-11-17-f3s-kubernetes-with-freebsd-part-1.gmi | 6 +- ...1-17-f3s-kubernetes-with-freebsd-part-1.gmi.tpl | 2 +- ...24-12-03-f3s-kubernetes-with-freebsd-part-2.gmi | 2 + ...25-02-01-f3s-kubernetes-with-freebsd-part-3.gmi | 11 +- ...2-01-f3s-kubernetes-with-freebsd-part-3.gmi.tpl | 8 +- gemfeed/2025-02-08-random-weird-things-ii.gmi | 4 +- ...25-04-05-f3s-kubernetes-with-freebsd-part-4.gmi | 513 + ...4-05-f3s-kubernetes-with-freebsd-part-4.gmi.tpl | 477 + .../DRAFT-f3s-kubernetes-with-freebsd-part-4.gmi | 368 - ...RAFT-f3s-kubernetes-with-freebsd-part-4.gmi.tpl | 368 - gemfeed/atom.xml | 1010 +- gemfeed/f3s-kubernetes-with-freebsd-part-4/1.png | Bin 0 -> 27977 bytes gemfeed/f3s-kubernetes-with-freebsd-part-4/2.png | Bin 0 -> 239096 bytes gemfeed/f3s-kubernetes-with-freebsd-part-4/3.png | Bin 0 -> 180064 bytes gemfeed/f3s-kubernetes-with-freebsd-part-4/4.png | Bin 0 -> 28387 bytes gemfeed/helix-gpt.log | 12330 +++++++++++++++++++ gemfeed/index.gmi | 1 + helix-gpt.log | 2532 ++++ index.gmi | 3 +- uptime-stats.gmi | 60 +- 26 files changed, 16635 insertions(+), 1267 deletions(-) create mode 100644 gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi create mode 100644 gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi.tpl delete mode 100644 gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-4.gmi delete mode 100644 gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-4.gmi.tpl create mode 100644 gemfeed/f3s-kubernetes-with-freebsd-part-4/1.png create mode 100644 gemfeed/f3s-kubernetes-with-freebsd-part-4/2.png create mode 100644 gemfeed/f3s-kubernetes-with-freebsd-part-4/3.png create mode 100644 gemfeed/f3s-kubernetes-with-freebsd-part-4/4.png create mode 100644 gemfeed/helix-gpt.log create mode 100644 helix-gpt.log diff --git a/about/novels.gmi b/about/novels.gmi index 97cbf0a3..d4bcea74 100644 --- a/about/novels.gmi +++ b/about/novels.gmi @@ -13,10 +13,7 @@ * ⇢ ⇢ ⇢ Dan Simmons * ⇢ ⇢ ⇢ Other authors * ⇢ ⇢ Currently reading -* ⇢ ⇢ ⇢ Andreas Brandhorst * ⇢ ⇢ Unread books already in my shelf -* ⇢ ⇢ ⇢ Alastair Reynolds -* ⇢ ⇢ ⇢ Andreas Brandhorst ## Introduction @@ -90,6 +87,7 @@ _-" . ' + . . ,//////0\ | /00HHHHHHHMMMMM * 2022 - Ruf der Unendlichkeit (german), Audiobook * 2024 - Infinitia (german), Audiobook * 2024 - Zeta (german), Andreas Brandhorst, Audiobook +* 2024 - Der Riss (german), Andreas Brandhorst ### David Reimer (german) @@ -120,20 +118,13 @@ _-" . ' + . . ,//////0\ | /00HHHHHHHMMMMM ## Currently reading -### Andreas Brandhorst - -* 2023 - Oxygen: Welt ohne Sauerstoff, Audiobook (german) -* 2024 - Der Riss (german) +* 2005 - Diamond Dogs, Turquoise Days / Träume von Unendlichkeit, Alastair Reyonlds (german) +* 2015 - The Three-Body Problem, Liu Cixin, Audiobook +* 2023 - Oxygen: Welt ohne Sauerstoff, Andreas Brandhorst, Audiobook (german) ## Unread books already in my shelf -### Alastair Reynolds - -* 2004 - Träume von Unendlichkeit (german) - -### Andreas Brandhorst - -* 2021 - Die Tiefe der Zeit (german) +* 2021 - Die Tiefe der Zeit, Andreas Brandhorst (german) Do you recommend a good Science Fiction Novel? E-Mail at paul at buetow dot org! :-) diff --git a/about/resources.gmi b/about/resources.gmi index f70ead04..c680f981 100644 --- a/about/resources.gmi +++ b/about/resources.gmi @@ -36,102 +36,102 @@ You won't find any links on this site because, over time, the links will break. In random order: -* Raku Fundamentals; Moritz Lenz; Apress -* Funktionale Programmierung; Peter Pepper; Springer -* 97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly -* DNS and BIND; Cricket Liu; O'Reilly -* Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly +* Concurrency in Go; Katherine Cox-Buday; O'Reilly +* Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt +* Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly * 100 Go Mistakes and How to Avoid Them; Teiva Harsanyi; Manning Publications -* Ultimate Go Notebook; Bill Kennedy -* Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly +* 97 things every SRE should know; Emil Stolarsky, Jaime Woo; O'Reilly +* Terraform Cookbook; Mikael Krief; Packt Publishing +* Effective awk programming; Arnold Robbins; O'Reilly +* Higher Order Perl; Mark Dominus; Morgan Kaufmann * The KCNA (Kubernetes and Cloud Native Associate) Book; Nigel Poulton -* Systemprogrammierung in Go; Frank Müller; dpunkt -* Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers -* The Pragmatic Programmer; David Thomas; Addison-Wesley -* The Kubernetes Book; Nigel Poulton; Unabridged Audiobook -* Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press -* The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress -* Hands-on Infrastructure Monitoring with Prometheus; Joel Bastos, Pedro Araujo; Packt -* DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible * Developing Games in Java; David Brackeen and others...; New Riders -* Higher Order Perl; Mark Dominus; Morgan Kaufmann -* Pro Puppet; James Turnbull, Jeffrey McCune; Apress +* Raku Fundamentals; Moritz Lenz; Apress +* Effective Java; Joshua Bloch; Addison-Wesley Professional +* Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press +* Funktionale Programmierung; Peter Pepper; Springer +* Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers +* The Docker Book; James Turnbull; Kindle +* Data Science at the Command Line; Jeroen Janssens; O'Reilly +* 21st Century C: C Tips from the New School; Ben Klemens; O'Reilly * Modern Perl; Chromatic ; Onyx Neon Press +* Perl New Features; Joshua McAdams, brian d foy; Perl School +* Raku Recipes; J.J. Merelo; Apress * Leanring eBPF; Liz Rice; O'Reilly -* The Docker Book; James Turnbull; Kindle -* Effective awk programming; Arnold Robbins; O'Reilly -* Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly -* Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson -* Learn You a Haskell for Great Good!; Miran Lipovaca; No Starch Press +* Think Raku (aka Think Perl 6); Laurent Rosenfeld, Allen B. Downey; O'Reilly * Object-Oriented Programming with ANSI-C; Axel-Tobias Schreiner -* Raku Recipes; J.J. Merelo; Apress -* Effective Java; Joshua Bloch; Addison-Wesley Professional +* Go Brain Teasers - Exercise Your Mind; Miki Tebeka; The Pragmatic Programmers +* The Pragmatic Programmer; David Thomas; Addison-Wesley * Programming Perl aka "The Camel Book"; Tom Christiansen, brian d foy, Larry Wall & Jon Orwant; O'Reilly -* Site Reliability Engineering; How Google runs production systems; O'Reilly -* The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional +* Pro Puppet; James Turnbull, Jeffrey McCune; Apress +* The Practise of System and Network Administration; Thomas A. Limoncelli, Christina J. Hogan, Strata R. Chalup; Addison-Wesley Professional Pro Git; Scott Chacon, Ben Straub; Apress +* DevOps And Site Reliability Engineering Handbook; Stephen Fleming; Audible +* Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications +* Learn You Some Erlang for Great Good; Fred Herbert; No Starch Press +* DNS and BIND; Cricket Liu; O'Reilly +* The Kubernetes Book; Nigel Poulton; Unabridged Audiobook * Programming Ruby 3.3 (5th Edition); Noel Rappin, with Dave Thomas; The Pragmatic Bookshelf -* Data Science at the Command Line; Jeroen Janssens; O'Reilly -* Concurrency in Go; Katherine Cox-Buday; O'Reilly -* Tmux 2: Productive Mouse-free Development; Brain P. Hogan; The Pragmatic Programmers -* 21st Century C: C Tips from the New School; Ben Klemens; O'Reilly +* Polished Ruby Programming; Jeremy Evans; Packt Publishing +* The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible +* The Go Programming Language; Alan A. A. Donovan; Addison-Wesley Professional +* Ultimate Go Notebook; Bill Kennedy +* Systemprogrammierung in Go; Frank Müller; dpunkt * Java ist auch eine Insel; Christian Ullenboom; -* Perl New Features; Joshua McAdams, brian d foy; Perl School +* Kubernetes Cookbook; Sameer Naik, Sébastien Goasguen, Jonathan Michaux; O'Reilly +* Systems Performance Tuning; Gian-Paolo D. Musumeci and others...; O'Reilly * C++ Programming Language; Bjarne Stroustrup; -* Amazon Web Services in Action; Michael Wittig and Andreas Wittig; Manning Publications -* The DevOps Handbook; Gene Kim, Jez Humble, Patrick Debois, John Willis; Audible -* Terraform Cookbook; Mikael Krief; Packt Publishing -* Polished Ruby Programming; Jeremy Evans; Packt Publishing -* Clusterbau mit Linux-HA; Michael Schwartzkopff; O'Reilly +* Distributed Systems: Principles and Paradigms; Andrew S. Tanenbaum; Pearson +* Site Reliability Engineering; How Google runs production systems; O'Reilly ## Technical references I didn't read them from the beginning to the end, but I am using them to look up things. The books are in random order: +* BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley +* Relayd and Httpd Mastery; Michael W Lucas +* Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly * Groovy Kurz & Gut; Joerg Staudemeier; O'Reilly * The Linux Programming Interface; Michael Kerrisk; No Starch Press -* Understanding the Linux Kernel; Daniel P. Bovet, Marco Cesati; O'Reilly -* Relayd and Httpd Mastery; Michael W Lucas * Implementing Service Level Objectives; Alex Hidalgo; O'Reilly * Algorithms; Robert Sedgewick, Kevin Wayne; Addison Wesley -* BPF Performance Tools - Linux System and Application Observability, Brendan Gregg; Addison Wesley ## Self-development and soft-skills books In random order: +* The Good Enough Job; Simone Stolzoff; Ebury Edge +* Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing +* Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly +* Stop starting, start finishing; Arne Roock; Lean-Kanban University +* Getting Things Done; David Allen +* Soft Skills; John Sommez; Manning Publications +* The Bullet Journal Method; Ryder Carroll; Fourth Estate +* Digital Minimalism; Cal Newport; Portofolio Penguin +* 101 Essays that change the way you think; Brianna Wiest; Audible +* The Off Switch; Mark Cropley; Virgin Books (RE-READ 1ST TIME) +* Ultralearning; Scott Young; Thorsons +* The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books +* Atomic Habits; James Clear; Random House Business * Consciousness: A Very Short Introduction; Susan Blackmore; Oxford Uiversity Press -* The Joy of Missing Out; Christina Crook; New Society Publishers -* So Good They Can't Ignore You; Cal Newport; Business Plus -* Eat That Frog; Brian Tracy +* Eat That Frog!; Brian Tracy; Hodder Paperbacks +* Influence without Authority; A. Cohen, D. Bradford; Wiley * Who Moved My Cheese?; Dr. Spencer Johnson; Vermilion -* The Off Switch; Mark Cropley; Virgin Books * Ultralearning; Anna Laurent; Self-published via Amazon -* The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd * Search Inside Yourself - The Unexpected path to Achieving Success, Happiness (and World Peace); Chade-Meng Tan, Daniel Goleman, Jon Kabat-Zinn; HarperOne -* 101 Essays that change the way you think; Brianna Wiest; Audible -* The Bullet Journal Method; Ryder Carroll; Fourth Estate -* The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select * Staff Engineer: Leadership beyond the management track; Will Larson; Audible * Never Split the Difference; Chris Voss, Tahl Raz; Random House Business -* Ultralearning; Scott Young; Thorsons -* Influence without Authority; A. Cohen, D. Bradford; Wiley -* Time Management for System Administrators; Thomas A. Limoncelli; O'Reilly -* Solve for Happy; Mo Gawdat -* Eat That Frog!; Brian Tracy; Hodder Paperbacks -* Digital Minimalism; Cal Newport; Portofolio Penguin +* Slow Productivity; Cal Newport; Penguin Random House +* Solve for Happy; Mo Gawdat (RE-READ 1ST TIME) +* So Good They Can't Ignore You; Cal Newport; Business Plus +* The Phoenix Project - A Novel About IT, DevOps, and Helping your Business Win; Gene Kim and Kevin Behr; Trade Select * The 7 Habits Of Highly Effective People; Stephen R. Covey; Simon & Schuster UK -* Buddah and Einstein walk into a Bar; Guy Joseph Ale, Claire Bloom; Blackstone Publishing * The Power of Now; Eckhard Tolle; Yellow Kite -* The Daily Stoic; Ryan Holiday, Stephen Hanselman; Profile Books +* Eat That Frog; Brian Tracy +* The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook +* The Obstacle Is The Way; Ryan Holiday; Profile Books Ltd * Psycho-Cybernetics; Maxwell Maltz; Perigee Books +* The Joy of Missing Out; Christina Crook; New Society Publishers * Deep Work; Cal Newport; Piatkus -* Soft Skills; John Sommez; Manning Publications -* The Good Enough Job; Simone Stolzoff; Ebury Edge -* The Complete Software Developer's Career Guide; John Sonmez; Unabridged Audiobook -* Slow Productivity; Cal Newport; Penguin Random House -* Stop starting, start finishing; Arne Roock; Lean-Kanban University -* Getting Things Done; David Allen -* Atomic Habits; James Clear; Random House Business => ../notes/index.gmi Here are notes of mine for some of the books @@ -139,30 +139,30 @@ In random order: Some of these were in-person with exams; others were online learning lectures only. In random order: -* AWS Immersion Day; Amazon; 1-day interactive online training -* Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training -* Functional programming lecture; Remote University of Hagen +* Ultimate Go Programming; Bill Kennedy; O'Reilly Online +* Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need) +* Apache Tomcat Best Practises; 3-day on-site training +* MySQL Deep Dive Workshop; 2-day on-site training * The Well-Grounded Rubyist Video Edition; David. A. Black; O'Reilly Online -* The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online +* Functional programming lecture; Remote University of Hagen +* Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online * F5 Loadbalancers Training; 2-day on-site training; F5, Inc. +* Scripting Vim; Damian Conway; O'Reilly Online +* AWS Immersion Day; Amazon; 1-day interactive online training * Protocol buffers; O'Reilly Online * Structure and Interpretation of Computer Programs; Harold Abelson and more...; -* Apache Tomcat Best Practises; 3-day on-site training -* Scripting Vim; Damian Conway; O'Reilly Online -* Ultimate Go Programming; Bill Kennedy; O'Reilly Online -* Algorithms Video Lectures; Robert Sedgewick; O'Reilly Online -* Red Hat Certified System Administrator; Course + certification (Although I had the option, I decided not to take the next course as it is more effective to self learn what I need) -* MySQL Deep Dive Workshop; 2-day on-site training -* Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon * Developing IaC with Terraform (with Live Lessons); O'Reilly Online +* Linux Security and Isolation APIs Training; Michael Kerrisk; 3-day on-site training +* The Ultimate Kubernetes Bootcamp; School of Devops; O'Reilly Online +* Cloud Operations on AWS - Learn how to configure, deploy, maintain, and troubleshoot your AWS environments; 3-day online live training with labs; Amazon ## Technical guides These are not whole books, but guides (smaller or larger) which I found very useful. in random order: * How CPUs work at https://cpu.land -* Raku Guide at https://raku.guide * Advanced Bash-Scripting Guide +* Raku Guide at https://raku.guide ## Podcasts @@ -170,55 +170,55 @@ These are not whole books, but guides (smaller or larger) which I found very use In random order: +* Maintainable * Deep Questions with Cal Newport * The ProdCast (Google SRE Podcast) -* Hidden Brain -* Backend Banter -* The Changelog Podcast(s) * Dev Interrupted -* BSD Now -* Cup o' Go [Golang] +* The Changelog Podcast(s) * Fallthrough [Golang] * Fork Around And Find Out * The Pragmatic Engineer Podcast -* Maintainable +* Backend Banter +* Cup o' Go [Golang] +* BSD Now +* Hidden Brain ### Podcasts I liked I liked them but am not listening to them anymore. The podcasts have either "finished" (no more episodes) or I stopped listening to them due to time constraints or a shift in my interests. +* FLOSS weekly * CRE: Chaosradio Express [german] -* Ship It (predecessor of Fork Around And Find Out) * Modern Mentor -* Java Pub House -* FLOSS weekly * Go Time (predecessor of fallthrough) +* Java Pub House +* Ship It (predecessor of Fork Around And Find Out) ## Newsletters I like This is a mix of tech and non-tech newsletters I am subscribed to. In random order: -* byteSizeGo -* Monospace Mentor -* The Valuable Dev -* The Pragmatic Engineer -* Register Spill * Ruby Weekly -* VK Newsletter * Golang Weekly -* Changelog News +* The Valuable Dev * Andreas Brandhorst Newsletter (Sci-Fi author) +* The Pragmatic Engineer +* Changelog News +* Monospace Mentor +* VK Newsletter * Applied Go Weekly Newsletter +* Register Spill * The Imperfectionist +* byteSizeGo ## Magazines I like(d) This is a mix of tech I like(d). I may not be a current subscriber, but now and then, I buy an issue. In random order: -* freeX (not published anymore) -* Linux Magazine * Linux User * LWN (online only) +* Linux Magazine +* freeX (not published anymore) # Formal education diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi index 9e337116..02ce49c0 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi @@ -397,6 +397,7 @@ E-Mail your comments to `paul@nospam.buetow.org` :-) Other *BSD related posts are: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage diff --git a/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi b/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi index 2015a0a4..2a6e72b1 100644 --- a/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi +++ b/gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi @@ -676,6 +676,7 @@ E-Mail your comments to `paul@nospam.buetow.org` :-) Other *BSD related posts are: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage diff --git a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.gmi b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.gmi index 63c48f9c..90af3915 100644 --- a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.gmi +++ b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.gmi @@ -51,6 +51,7 @@ E-Mail your comments to `paul@nospam.buetow.org` :-) Other *BSD related posts are: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage diff --git a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.gmi b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.gmi index 51e60c82..d15b3d7b 100644 --- a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.gmi +++ b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.gmi @@ -300,6 +300,7 @@ E-Mail your comments to `paul@nospam.buetow.org` :-) Other *BSD and KISS related posts are: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage diff --git a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi index a915ea77..894f0e6d 100644 --- a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi +++ b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi @@ -8,6 +8,7 @@ I will post a new entry every month or so (there are too many other side project These are all the posts so far: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage (You are currently reading this) @@ -33,7 +34,7 @@ Let's begin... * ⇢ ⇢ Monitoring: Keeping an eye on everything * ⇢ ⇢ ⇢ Prometheus and Grafana * ⇢ ⇢ ⇢ Gogios: My custom alerting system -* ⇢ ⇢ What's after this all? +* ⇢ ⇢ Conclusion ## Why this setup? @@ -142,7 +143,7 @@ Alerts generated by Prometheus are forwarded to Alertmanager, which I will confi Ironically, I implemented Gogios to avoid using more complex alerting systems like Prometheus, but here we go—it integrates well now. -## What's after this all? +## Conclusion This setup may be just the beginning. Some ideas I'm thinking about for the future: @@ -159,6 +160,7 @@ Read the next post of this series: Other *BSD-related posts: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage (You are currently reading this) diff --git a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi.tpl b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi.tpl index 330c3437..6c4b6050 100644 --- a/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi.tpl +++ b/gemfeed/2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi.tpl @@ -125,7 +125,7 @@ Alerts generated by Prometheus are forwarded to Alertmanager, which I will confi Ironically, I implemented Gogios to avoid using more complex alerting systems like Prometheus, but here we go—it integrates well now. -## What's after this all? +## Conclusion This setup may be just the beginning. Some ideas I'm thinking about for the future: diff --git a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi index de0e5b8a..5c4fd787 100644 --- a/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi +++ b/gemfeed/2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi @@ -8,6 +8,7 @@ We set the stage last time; this time, we will set up the hardware for this proj These are all the posts so far: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this) => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage @@ -298,6 +299,7 @@ Read the next post of this series: Other *BSD-related posts: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation (You are currently reading this) => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage diff --git a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi index 9c101a7e..2babbc19 100644 --- a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi +++ b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi @@ -7,6 +7,7 @@ This is the third blog post about my f3s series for my self-hosting demands in m => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this) +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./f3s-kubernetes-with-freebsd-part-1/f3slogo.png f3s logo @@ -27,6 +28,7 @@ This is the third blog post about my f3s series for my self-hosting demands in m * ⇢ ⇢ Power outage simulation * ⇢ ⇢ ⇢ Pulling the plug * ⇢ ⇢ ⇢ Restoring power +* ⇢ ⇢ Conclusion ## Introduction @@ -348,10 +350,17 @@ Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd exiting, signal 15 Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd shutdown succeeded ``` -All good :-) See you in the next post of this series! +All good :-) + +## Conclusion + +I have the same UPS (but with a bit more capacity) for my main work setup, which powers my 28" screen, music equipment, etc. It has already been helpful a couple of times during power outages here, so I am sure that the smaller UPS for the F3s setup will be of great use. + +See you in the next post of this series! Other BSD related posts are: +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs => ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts (You are currently reading this) => ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation => ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage diff --git a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi.tpl b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi.tpl index ec091b5f..36105406 100644 --- a/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi.tpl +++ b/gemfeed/2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi.tpl @@ -330,7 +330,13 @@ Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd exiting, signal 15 Jan 26 17:36:32 f2 apcupsd[2159]: apcupsd shutdown succeeded ``` -All good :-) See you in the next post of this series! +All good :-) + +## Conclusion + +I have the same UPS (but with a bit more capacity) for my main work setup, which powers my 28" screen, music equipment, etc. It has already been helpful a couple of times during power outages here, so I am sure that the smaller UPS for the F3s setup will be of great use. + +See you in the next post of this series! Other BSD related posts are: diff --git a/gemfeed/2025-02-08-random-weird-things-ii.gmi b/gemfeed/2025-02-08-random-weird-things-ii.gmi index b9cff06e..617f5eb5 100644 --- a/gemfeed/2025-02-08-random-weird-things-ii.gmi +++ b/gemfeed/2025-02-08-random-weird-things-ii.gmi @@ -59,7 +59,7 @@ I found it interesting and/or weird, as Go is a programming language. Why should ### 13. Go functions can have methods -Functions on struct types? Well, know. Functions on types like `int` and `string`? It's also known of, but a bit lesser. Functions on function types? That sounds a bit funky, but it's possible, too! For demonstration, have a look at this snippet: +Functions on struct types? Well known. Functions on types like `int` and `string`? It's also known of, but a bit lesser. Functions on function types? That sounds a bit funky, but it's possible, too! For demonstration, have a look at this snippet: ```go package main @@ -99,7 +99,7 @@ For personal computing, I don't use Apple, but I have to use it for work. ### 14. ß and ss are treated the same -Know German? In German, the letter "sarp s" is written as ß. ß is treated the same as ss on macOS. +Know German? In German, the letter "sharp s" is written as ß. ß is treated the same as ss on macOS. On a case-insensitive file system like macOS, not only are uppercase and lowercase letters treated the same, but non-Latin characters like the German "ß" are also considered equivalent to their Latin counterparts (in this case, "ss"). diff --git a/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi b/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi new file mode 100644 index 00000000..7b7b56ec --- /dev/null +++ b/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi @@ -0,0 +1,513 @@ +# f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs + +> Published at 2025-04-04T23:21:01+03:00 + +This is the fourth blog post about the f3s series for self-hosting demands in a home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution used on FreeBSD-based physical machines. + +=> ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage +=> ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation +=> ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs (You are currently reading this) + +=> ./f3s-kubernetes-with-freebsd-part-1/f3slogo.png f3s logo + +## Table of Contents + +* ⇢ f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs +* ⇢ ⇢ Introduction +* ⇢ ⇢ Check for `POPCNT` CPU support +* ⇢ ⇢ Basic Bhyve setup +* ⇢ ⇢ Rocky Linux VMs +* ⇢ ⇢ ⇢ ISO download +* ⇢ ⇢ ⇢ VM configuration +* ⇢ ⇢ ⇢ VM installation +* ⇢ ⇢ ⇢ Increase of the disk image +* ⇢ ⇢ ⇢ Connect to VNC +* ⇢ ⇢ After install +* ⇢ ⇢ ⇢ VM auto-start after host reboot +* ⇢ ⇢ ⇢ Static IP configuration +* ⇢ ⇢ ⇢ Permitting root login +* ⇢ ⇢ ⇢ Install latest updates +* ⇢ ⇢ Stress testing CPU +* ⇢ ⇢ ⇢ Silly FreeBSD host benchmark +* ⇢ ⇢ ⇢ Silly Rocky Linux VM @ Bhyve benchmark +* ⇢ ⇢ ⇢ Silly FreeBSD VM @ Bhyve benchmark +* ⇢ ⇢ Benchmarking with `ubench` +* ⇢ ⇢ ⇢ FreeBSD host `ubench` benchmark +* ⇢ ⇢ ⇢ FreeBSD VM @ Bhyve `ubench` benchmark +* ⇢ ⇢ ⇢ Rocky Linux VM @ Bhyve `ubench` benchmark +* ⇢ ⇢ Conclusion + +## Introduction + +In this blog post, we are going to install the Bhyve hypervisor. + +The FreeBSD Bhyve hypervisor is a lightweight, modern hypervisor that enables virtualization on FreeBSD systems. Bhyve's strengths include its minimal overhead, which allows it to achieve near-native performance for virtual machines. It's efficient and lightweight, leveraging the capabilities of the FreeBSD operating system for performance and network management. + +Bhyve supports running various guest operating systems, including FreeBSD, Linux, and Windows, on hardware platforms that support hardware virtualization extensions (such as Intel VT-x or AMD-V). In our case, we are going to virtualize Rocky Linux, which will later in this series be used to run k3s. + +## Check for `POPCNT` CPU support + +POPCNT is a CPU instruction that counts the number of set bits (ones) in a binary number. CPU virtualization and Bhyve support for the POPCNT instruction are important because guest operating systems utilize this instruction to perform various tasks more efficiently. If the host CPU supports POPCNT, Bhyve can pass this capability to virtual machines for better performance. Without POPCNT support, some applications might not run or perform sub-optimally in virtualized environments. + +To check for `POPCNT` support, run: + +```sh +paul@f0:~ % dmesg | grep 'Features2=.*POPCNT' + Features2=0x7ffafbbf +``` + +So it's there! All good. + +## Basic Bhyve setup + +For managing the Bhyve VMs, we are using `vm-bhyve`, a tool not part of the FreeBSD operating system but available as a ready-to-use package. It eases VM management and reduces a lot of overhead. We also install the required package to make Bhyve work with the UEFI firmware. + +=> https://github.com/churchers/vm-bhyve + +The following commands are executed on all three hosts `f0`, `f1`, and `f2`, where `re0` is the name of the Ethernet interface (which may need to be adjusted if your hardware is different): + +```sh +paul@f0:~ % doas pkg install vm-bhyve bhyve-firmware +paul@f0:~ % doas sysrc vm_enable=YES +vm_enable: -> YES +paul@f0:~ % doas sysrc vm_dir=zfs:zroot/bhyve +vm_dir: -> zfs:zroot/bhyve +paul@f0:~ % doas zfs create zroot/bhyve +paul@f0:~ % doas vm init +paul@f0:~ % doas vm switch create public +paul@f0:~ % doas vm switch add public re0 +``` + +Bhyve stores all it's data in the `/bhyve` of the `zroot` ZFS pool: + +```sh +paul@f0:~ % zfs list | grep bhyve +zroot/bhyve 1.74M 453G 1.74M /zroot/bhyve +``` + +For convenience, we also create this symlink: + +```sh +paul@f0:~ % doas ln -s /zroot/bhyve/ /bhyve + +``` + +Now, Bhyve is ready to rumble, but no VMs are there yet: + +```sh +paul@f0:~ % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +``` + +## Rocky Linux VMs + +As guest VMs I decided to use Rocky Linux. + +Using Rocky Linux 9 as a VM-based OS is beneficial primarily because of its long-term support and stable release cycle. This ensures a reliable environment that receives security updates and bug fixes for an extended period, reducing the need for frequent upgrades. Rocky Linux is community-driven and aims to be fully compatible with enterprise Linux, making it a solid choice for consistency and performance in various deployment scenarios. + +=> https://rockylinux.org/ + +### ISO download + +We're going to install the Rocky Linux from the latest minimal iso: + +```sh +paul@f0:~ % doas vm iso \ + https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.5-x86_64-minimal.iso +/zroot/bhyve/.iso/Rocky-9.5-x86_64-minimal.iso 1808 MB 4780 kBps 06m28s +paul@f0:/bhyve % doas vm create rocky +``` +### VM configuration + +The default Bhyve VM configuration looks like this now: + +```sh +paul@f0:/bhyve/rocky % cat rocky.conf +loader="bhyveload" +cpu=1 +memory=256M +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +uuid="1c4655ac-c828-11ef-a920-e8ff1ed71ca0" +network0_mac="58:9c:fc:0d:13:3f" +``` + +The `uuid` and the `network0_mac` differ for each of the three VMs. + +But to make Rocky Linux boot it (plus some other adjustments, e.g. as we intend to run the majority of the workload in the k3s cluster running on those Linux VMs, we give them beefy specs like 4 CPU cores and 14GB RAM). So we run `doas vm configure rocky` and modified it to: + +``` +guest="linux" +loader="uefi" +uefi_vars="yes" +cpu=4 +memory=14G +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +graphics="yes" +graphics_vga=io +uuid="1c45400b-c828-11ef-8871-e8ff1ed71cac" +network0_mac="58:9c:fc:0d:13:3f" +``` + +### VM installation + +To start the installer from the downloaded ISO, we run: + +```sh +paul@f0:~ % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +Starting rocky + * found guest in /zroot/bhyve/rocky + * booting... + +paul@f0:/bhyve/rocky % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +rocky default uefi 4 14G 0.0.0.0:5900 No Locked (f0.lan.buetow.org) + +paul@f0:/bhyve/rocky % doas sockstat -4 | grep 5900 +root bhyve 6079 8 tcp4 *:5900 *:* +``` + +Port 5900 now also opens for VNC connections, so I connected it with a VNC client and ran through the installation dialogues. This could be done unattended or more automated, but there are only three VMs to install, and the automation doesn't seem worth it as we do it only once a year or less often. + +### Increase of the disk image + +By default, the VM disk image is only 20G, which is a bit small for our purposes, so I stopped the VMs again, ran `truncate` on the image file to enlarge them to 100G, and re-started the installation: + +```sh +paul@f0:/bhyve/rocky % doas vm stop rocky +paul@f0:/bhyve/rocky % doas truncate -s 100G disk0.img +paul@f0:/bhyve/rocky % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +``` + +### Connect to VNC + +For the installation, I opened the VNC client on my Fedora laptop (GNOME comes with a simple VNC client) and manually ran through the base installation for each of the VMs. Again, I am sure this could have been automated a bit more, but there were just three VMs, and it wasn't worth the effort. The three VNC addresses of the VMs were `vnc://f0:5900`, `vnc://f1:5900`, and `vnc://f0:5900`. + +=> ./f3s-kubernetes-with-freebsd-part-4/1.png + +=> ./f3s-kubernetes-with-freebsd-part-4/2.png + +I primarily selected the default settings (auto partitioning on the 100GB drive and a root user password). After the installation, the VMs were rebooted. + +=> ./f3s-kubernetes-with-freebsd-part-4/3.png + +=> ./f3s-kubernetes-with-freebsd-part-4/4.png + +## After install + +We perform the following steps for all 3 VMs. In the following, the examples are all executed on `f0` (the VM `r0` running on `f0`): + +### VM auto-start after host reboot + +To automatically start the VM on the servers, we add the following to the `rc.conf` on the FreeBSD hosts: + +```sh + +paul@f0:/bhyve/rocky % cat <>/etc/hosts +192.168.1.120 r0 r0.lan r0.lan.buetow.org +192.168.1.121 r1 r1.lan r1.lan.buetow.org +192.168.1.122 r2 r2.lan r2.lan.buetow.org +END +```` + +Whereas: + +* `192.168.1.120` is the IP of the VM itself (here: `r0.lan.buetow.org`) +* `192.168.1.1` is the address of my home router, which also does DNS. + +### Permitting root login + +As these VMs aren't directly reachable via SSH from the internet, we enable `root` login by adding a line with `PermitRootLogin yes` to `/etc/sshd/sshd_config`. + +Once done, we reboot the VM by running `reboot` inside the VM to test whether everything was configured and persisted correctly. + +After reboot, I copied my public key from my Laptop to the 3 VMs: + +```sh +% for i in 0 1 2; do ssh-copy-id root@r$i.lan.buetow.org; done +``` + +Then, I edited the `/etc/ssh/sshd_config` file again on all 3 VMs and configured `PasswordAuthentication no` to only allow SSH key authentication from now on. + +### Install latest updates + +```sh +[root@r0 ~] % dnf update +[root@r0 ~] % reboot +``` + +## Stress testing CPU + +The aim is to prove that bhyve VMs are CPU efficient. As I could not find an off-the-shelf benchmarking tool available in the same version for FreeBSD as well as for Rocky Linux 9, I wrote my own silly CPU benchmarking tool in Go: + +```go +package main + +import "testing" + +func BenchmarkCPUSilly1(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = i * i + } +} + +func BenchmarkCPUSilly2(b *testing.B) { + var sillyResult float64 + for i := 0; i < b.N; i++ { + sillyResult += float64(i) + sillyResult *= float64(i) + divisor := float64(i) + 1 + if divisor > 0 { + sillyResult /= divisor + } + } + _ = sillyResult // to avoid compiler optimization +} +``` + +You can find the repository here: + +=> https://codeberg.org/snonux/sillybench + +### Silly FreeBSD host benchmark + +To install it on FreeBSD, we run: + +```sh +paul@f0:~ % doas pkg install git go +paul@f0:~ % mkdir ~/git && cd ~/git && \ + git clone https://codeberg.org/snonux/sillybench && \ + cd sillybench +``` + +And to run it: + +```sh +paul@f0:~/git/sillybench % go version +go version go1.24.1 freebsd/amd64 + +paul@f0:~/git/sillybench % go test -bench=. +goos: freebsd +goarch: amd64 +pkg: codeberg.org/snonux/sillybench +cpu: Intel(R) N100 +BenchmarkCPUSilly1-4 1000000000 0.4022 ns/op +BenchmarkCPUSilly2-4 1000000000 0.4027 ns/op +PASS +ok codeberg.org/snonux/sillybench 0.891s +``` + +### Silly Rocky Linux VM @ Bhyve benchmark + +OK, let's compare this with the Rocky Linux VM running on Bhyve: + +```sh +[root@r0 ~]# dnf install golang git +[root@r0 ~]# mkdir ~/git && cd ~/git && \ + git clone https://codeberg.org/snonux/sillybench && \ + cd sillybench +```` + +And to run it: + +```sh +[root@r0 sillybench]# go version +go version go1.22.9 (Red Hat 1.22.9-2.el9_5) linux/amd64 +[root@r0 sillybench]# go test -bench=. +goos: linux +goarch: amd64 +pkg: codeberg.org/snonux/sillybench +cpu: Intel(R) N100 +BenchmarkCPUSilly1-4 1000000000 0.4347 ns/op +BenchmarkCPUSilly2-4 1000000000 0.4345 ns/op +``` +The Linux benchmark is slightly slower than the FreeBSD one. The Go version is also a bit older. I tried the same with the up-to-date version of Go (1.24.x) with similar results. There could be a slight Bhyve overhead, or FreeBSD is just slightly more efficient in this benchmark. Overall, this shows that Bhyve performs excellently. + +### Silly FreeBSD VM @ Bhyve benchmark + +But as I am curious and don't want to compare apples with bananas, I decided to install a FreeBSD Bhyve VM to run the same silly benchmark in it. I am not going through the details of how to install a FreeBSD Bhyve VM here; you can easily look it up in the documentation. + +But here are the results running the same silly benchmark in a FreeBSD Bhyve VM with the same FreeBSD and Go versions as the host system (I have the VM 4 vCPUs and 14GB of RAM; the benchmark won't use as many CPUs anyway): + +```sh +root@freebsd:~/git/sillybench # go test -bench=. +goos: freebsd +goarch: amd64 +pkg: codeberg.org/snonux/sillybench +cpu: Intel(R) N100 +BenchmarkCPUSilly1 1000000000 0.4273 ns/op +BenchmarkCPUSilly2 1000000000 0.4286 ns/op +PASS +ok codeberg.org/snonux/sillybench 0.949s +``` + +It's a bit better than Linux! I am sure that this is not really a scientific benchmark, so take the results with a grain of salt! + +## Benchmarking with `ubench` + +Let's run another, more sophisticated benchmark using `ubench`, the Unix Benchmark Utility available for FreeBSD. It was installed by simply running `doas pkg install ubench`. It can benchmark CPU and memory performance. Here, we limit it to one CPU for the first run with `-s`, and then let it run at full speed in the second run. + +### FreeBSD host `ubench` benchmark + +Single CPU: + +```sh +paul@f0:~ % doas ubench -s 1 +Unix Benchmark Utility v.0.3 +Copyright (C) July, 1999 PhysTech, Inc. +Author: Sergei Viznyuk +http://www.phystech.com/download/ubench.html +FreeBSD 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64 +Ubench Single CPU: 671010 (0.40s) +Ubench Single MEM: 1705237 (0.48s) +----------------------------------- +Ubench Single AVG: 1188123 + +``` + +All CPUs (with all Bhyve VMs stopped): + +```sh +paul@f0:~ % doas ubench +Unix Benchmark Utility v.0.3 +Copyright (C) July, 1999 PhysTech, Inc. +Author: Sergei Viznyuk +http://www.phystech.com/download/ubench.html +FreeBSD 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64 +Ubench CPU: 2660220 +Ubench MEM: 3095182 +-------------------- +Ubench AVG: 2877701 +``` + +### FreeBSD VM @ Bhyve `ubench` benchmark + +Single CPU: + +```sh +root@freebsd:~ # ubench -s 1 +Unix Benchmark Utility v.0.3 +Copyright (C) July, 1999 PhysTech, Inc. +Author: Sergei Viznyuk +http://www.phystech.com/download/ubench.html +FreeBSD 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64 +Ubench Single CPU: 672792 (0.40s) +Ubench Single MEM: 852757 (0.48s) +----------------------------------- +Ubench Single AVG: 762774 +``` + +All CPUs: + +```sh +root@freebsd:~ # ubench +Unix Benchmark Utility v.0.3 +Copyright (C) July, 1999 PhysTech, Inc. +Author: Sergei Viznyuk +http://www.phystech.com/download/ubench.html +FreeBSD 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64 +Ubench CPU: 2652857 +swap_pager: out of swap space +swp_pager_getswapspace(27): failed +swap_pager: out of swap space +swp_pager_getswapspace(18): failed +Apr 4 23:02:43 freebsd kernel: pid 862 (ubench), jid 0, uid 0, was killed: failed to reclaim memory +swp_pager_getswapspace(6): failed +Apr 4 23:02:46 freebsd kernel: pid 863 (ubench), jid 0, uid 0, was killed: failed to reclaim memory +Apr 4 23:02:47 freebsd kernel: pid 864 (ubench), jid 0, uid 0, was killed: failed to reclaim memory +Apr 4 23:02:48 freebsd kernel: pid 865 (ubench), jid 0, uid 0, was killed: failed to reclaim memory +Apr 4 23:02:49 freebsd kernel: pid 861 (ubench), jid 0, uid 0, was killed: failed to reclaim memory +Apr 4 23:02:51 freebsd kernel: pid 839 (ubench), jid 0, uid 0, was killed: failed to reclaim memory +``` + +The multi-CPU benchmark in the Bhyve VM ran with almost identical results to the FreeBSD host system. However, the memory benchmark failed with out-of-swap space errors. I am unsure why, as the VM has 14GB RAM, but I am not investigating further. + +Also, during the benchmark, I noticed the `bhyve` process on the host was constantly using 399% of the CPU (all 4 CPUs). + +``` + PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND + 7449 root 14 20 0 14G 78M kqread 2 2:12 399.81% bhyve +``` + +Overall, Bhyve has a small overhead, but the CPU performance difference is negligible. The FreeBSD host is slightly faster than the FreeBSD VM running on Bhyve, but the difference is small enough for our use cases. The memory benchmark seems slightly off, but I don't know whether to trust it. Do you have an idea? + +### Rocky Linux VM @ Bhyve `ubench` benchmark + +Unfortunately, I wasn't able to find `ubench` in any of the Rocky Linux repositories. So, I skipped this test. + +## Conclusion + +Having Linux VMs running inside FreeBSD's Bhyve is a solid move for future F3s hosting in my home lab. Bhyve provides a reliable way to manage VMs without much hassle. With Linux VMs, I can tap into all the cool stuff (e.g., Kubernetes) in the Linux world while keeping the steady reliability of FreeBSD. + +Future uses (out of scope for this blog series) would be additional VMs for different workloads. For example, how about a Windows or NetBSD VM to tinker with? + +This flexibility is great for keeping options open and managing different workloads without overcomplicating things. Overall, it's a nice setup for getting the most out of my hardware and keeping things running smoothly. + +See you in the next blog post of this series. Maybe we will be installing highly available storage with HAST or we start setting up k3s on the Rocky Linux VMs. + +Other *BSD-related posts: + +=> ./2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi 2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs (You are currently reading this) +=> ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts +=> ./2024-12-03-f3s-kubernetes-with-freebsd-part-2.gmi 2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation +=> ./2024-11-17-f3s-kubernetes-with-freebsd-part-1.gmi 2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage +=> ./2024-04-01-KISS-high-availability-with-OpenBSD.gmi 2024-04-01 KISS high-availability with OpenBSD +=> ./2024-01-13-one-reason-why-i-love-openbsd.gmi 2024-01-13 One reason why I love OpenBSD +=> ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD +=> ./2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi 2022-07-30 Let's Encrypt with OpenBSD and Rex +=> ./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi 2016-04-09 Jails and ZFS with Puppet on FreeBSD + +E-Mail your comments to `paul@nospam.buetow.org` + +=> ../ Back to the main site diff --git a/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi.tpl b/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi.tpl new file mode 100644 index 00000000..9cb7cf4b --- /dev/null +++ b/gemfeed/2025-04-05-f3s-kubernetes-with-freebsd-part-4.gmi.tpl @@ -0,0 +1,477 @@ +# f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs + +> Published at 2025-04-04T23:21:01+03:00 + +This is the fourth blog post about the f3s series for self-hosting demands in a home lab. f3s? The "f" stands for FreeBSD, and the "3s" stands for k3s, the Kubernetes distribution used on FreeBSD-based physical machines. + +<< template::inline::index f3s-kubernetes-with-freebsd-part + +=> ./f3s-kubernetes-with-freebsd-part-1/f3slogo.png f3s logo + +<< template::inline::toc + +## Introduction + +In this blog post, we are going to install the Bhyve hypervisor. + +The FreeBSD Bhyve hypervisor is a lightweight, modern hypervisor that enables virtualization on FreeBSD systems. Bhyve's strengths include its minimal overhead, which allows it to achieve near-native performance for virtual machines. It's efficient and lightweight, leveraging the capabilities of the FreeBSD operating system for performance and network management. + +Bhyve supports running various guest operating systems, including FreeBSD, Linux, and Windows, on hardware platforms that support hardware virtualization extensions (such as Intel VT-x or AMD-V). In our case, we are going to virtualize Rocky Linux, which will later in this series be used to run k3s. + +## Check for `POPCNT` CPU support + +POPCNT is a CPU instruction that counts the number of set bits (ones) in a binary number. CPU virtualization and Bhyve support for the POPCNT instruction are important because guest operating systems utilize this instruction to perform various tasks more efficiently. If the host CPU supports POPCNT, Bhyve can pass this capability to virtual machines for better performance. Without POPCNT support, some applications might not run or perform sub-optimally in virtualized environments. + +To check for `POPCNT` support, run: + +```sh +paul@f0:~ % dmesg | grep 'Features2=.*POPCNT' + Features2=0x7ffafbbf +``` + +So it's there! All good. + +## Basic Bhyve setup + +For managing the Bhyve VMs, we are using `vm-bhyve`, a tool not part of the FreeBSD operating system but available as a ready-to-use package. It eases VM management and reduces a lot of overhead. We also install the required package to make Bhyve work with the UEFI firmware. + +=> https://github.com/churchers/vm-bhyve + +The following commands are executed on all three hosts `f0`, `f1`, and `f2`, where `re0` is the name of the Ethernet interface (which may need to be adjusted if your hardware is different): + +```sh +paul@f0:~ % doas pkg install vm-bhyve bhyve-firmware +paul@f0:~ % doas sysrc vm_enable=YES +vm_enable: -> YES +paul@f0:~ % doas sysrc vm_dir=zfs:zroot/bhyve +vm_dir: -> zfs:zroot/bhyve +paul@f0:~ % doas zfs create zroot/bhyve +paul@f0:~ % doas vm init +paul@f0:~ % doas vm switch create public +paul@f0:~ % doas vm switch add public re0 +``` + +Bhyve stores all it's data in the `/bhyve` of the `zroot` ZFS pool: + +```sh +paul@f0:~ % zfs list | grep bhyve +zroot/bhyve 1.74M 453G 1.74M /zroot/bhyve +``` + +For convenience, we also create this symlink: + +```sh +paul@f0:~ % doas ln -s /zroot/bhyve/ /bhyve + +``` + +Now, Bhyve is ready to rumble, but no VMs are there yet: + +```sh +paul@f0:~ % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +``` + +## Rocky Linux VMs + +As guest VMs I decided to use Rocky Linux. + +Using Rocky Linux 9 as a VM-based OS is beneficial primarily because of its long-term support and stable release cycle. This ensures a reliable environment that receives security updates and bug fixes for an extended period, reducing the need for frequent upgrades. Rocky Linux is community-driven and aims to be fully compatible with enterprise Linux, making it a solid choice for consistency and performance in various deployment scenarios. + +=> https://rockylinux.org/ + +### ISO download + +We're going to install the Rocky Linux from the latest minimal iso: + +```sh +paul@f0:~ % doas vm iso \ + https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.5-x86_64-minimal.iso +/zroot/bhyve/.iso/Rocky-9.5-x86_64-minimal.iso 1808 MB 4780 kBps 06m28s +paul@f0:/bhyve % doas vm create rocky +``` +### VM configuration + +The default Bhyve VM configuration looks like this now: + +```sh +paul@f0:/bhyve/rocky % cat rocky.conf +loader="bhyveload" +cpu=1 +memory=256M +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +uuid="1c4655ac-c828-11ef-a920-e8ff1ed71ca0" +network0_mac="58:9c:fc:0d:13:3f" +``` + +The `uuid` and the `network0_mac` differ for each of the three VMs. + +But to make Rocky Linux boot it (plus some other adjustments, e.g. as we intend to run the majority of the workload in the k3s cluster running on those Linux VMs, we give them beefy specs like 4 CPU cores and 14GB RAM). So we run `doas vm configure rocky` and modified it to: + +``` +guest="linux" +loader="uefi" +uefi_vars="yes" +cpu=4 +memory=14G +network0_type="virtio-net" +network0_switch="public" +disk0_type="virtio-blk" +disk0_name="disk0.img" +graphics="yes" +graphics_vga=io +uuid="1c45400b-c828-11ef-8871-e8ff1ed71cac" +network0_mac="58:9c:fc:0d:13:3f" +``` + +### VM installation + +To start the installer from the downloaded ISO, we run: + +```sh +paul@f0:~ % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +Starting rocky + * found guest in /zroot/bhyve/rocky + * booting... + +paul@f0:/bhyve/rocky % doas vm list +NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE +rocky default uefi 4 14G 0.0.0.0:5900 No Locked (f0.lan.buetow.org) + +paul@f0:/bhyve/rocky % doas sockstat -4 | grep 5900 +root bhyve 6079 8 tcp4 *:5900 *:* +``` + +Port 5900 now also opens for VNC connections, so I connected it with a VNC client and ran through the installation dialogues. This could be done unattended or more automated, but there are only three VMs to install, and the automation doesn't seem worth it as we do it only once a year or less often. + +### Increase of the disk image + +By default, the VM disk image is only 20G, which is a bit small for our purposes, so I stopped the VMs again, ran `truncate` on the image file to enlarge them to 100G, and re-started the installation: + +```sh +paul@f0:/bhyve/rocky % doas vm stop rocky +paul@f0:/bhyve/rocky % doas truncate -s 100G disk0.img +paul@f0:/bhyve/rocky % doas vm install rocky Rocky-9.5-x86_64-minimal.iso +``` + +### Connect to VNC + +For the installation, I opened the VNC client on my Fedora laptop (GNOME comes with a simple VNC client) and manually ran through the base installation for each of the VMs. Again, I am sure this could have been automated a bit more, but there were just three VMs, and it wasn't worth the effort. The three VNC addresses of the VMs were `vnc://f0:5900`, `vnc://f1:5900`, and `vnc://f0:5900`. + +=> ./f3s-kubernetes-with-freebsd-part-4/1.png + +=> ./f3s-kubernetes-with-freebsd-part-4/2.png + +I primarily selected the default settings (auto partitioning on the 100GB drive and a root user password). After the installation, the VMs were rebooted. + +=> ./f3s-kubernetes-with-freebsd-part-4/3.png + +=> ./f3s-kubernetes-with-freebsd-part-4/4.png + +## After install + +We perform the following steps for all 3 VMs. In the following, the examples are all executed on `f0` (the VM `r0` running on `f0`): + +### VM auto-start after host reboot + +To automatically start the VM on the servers, we add the following to the `rc.conf` on the FreeBSD hosts: + +```sh + +paul@f0:/bhyve/rocky % cat <>/etc/hosts +192.168.1.120 r0 r0.lan r0.lan.buetow.org +192.168.1.121 r1 r1.lan r1.lan.buetow.org +192.168.1.122 r2 r2.lan r2.lan.buetow.org +END +```` + +Whereas: + +* `192.168.1.120` is the IP of the VM itself (here: `r0.lan.buetow.org`) +* `192.168.1.1` is the address of my home router, which also does DNS. + +### Permitting root login + +As these VMs aren't directly reachable via SSH from the internet, we enable `root` login by adding a line with `PermitRootLogin yes` to `/etc/sshd/sshd_config`. + +Once done, we reboot the VM by running `reboot` inside the VM to test whether everything was configured and persisted correctly. + +After reboot, I copied my public key from my Laptop to the 3 VMs: + +```sh +% for i in 0 1 2; do ssh-copy-id root@r$i.lan.buetow.org; done +``` + +Then, I edited the `/etc/ssh/sshd_config` file again on all 3 VMs and configured `PasswordAuthentication no` to only allow SSH key authentication from now on. + +### Install latest updates + +```sh +[root@r0 ~] % dnf update +[root@r0 ~] % reboot +``` + +## Stress testing CPU + +The aim is to prove that bhyve VMs are CPU efficient. As I could not find an off-the-shelf benchmarking tool available in the same version for FreeBSD as well as for Rocky Linux 9, I wrote my own silly CPU benchmarking tool in Go: + +```go +package main + +import "testing" + +func BenchmarkCPUSilly1(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = i * i + } +} + +func BenchmarkCPUSilly2(b *testing.B) { + var sillyResult float64 + for i := 0; i < b.N; i++ { + sillyResult += float64(i) + sillyResult *= float64(i) + divisor := float64(i) + 1 + if divisor > 0 { + sillyResult /= divisor + } + } + _ = sillyResult // to avoid compiler optimization +} +``` + +You can find the repository here: + +=> https://codeberg.org/snonux/sillybench + +### Silly FreeBSD host benchmark + +To install it on FreeBSD, we run: + +```sh +paul@f0:~ % doas pkg install git go +paul@f0:~ % mkdir ~/git && cd ~/git && \ + git clone https://codeberg.org/snonux/sillybench && \ + cd sillybench +