summaryrefslogtreecommitdiff
path: root/gemfeed
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-27 23:05:54 +0300
committerPaul Buetow <paul@buetow.org>2025-07-27 23:05:54 +0300
commit30db7379ba631618f58bef2dc3b91feef7397437 (patch)
tree05fea6d326ec02e7a1fd7a21aeb4aa689066f634 /gemfeed
parentccfc02cdb52becd46e7ed0dc903e1e44fab5b0da (diff)
Update content for html
Diffstat (limited to 'gemfeed')
-rw-r--r--gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html23
-rw-r--r--gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html632
-rw-r--r--gemfeed/DRAFT-totalrecall.html300
-rw-r--r--gemfeed/atom.xml25
4 files changed, 967 insertions, 13 deletions
diff --git a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html
index 374ec9a2..7963fb4d 100644
--- a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html
+++ b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.html
@@ -1611,6 +1611,22 @@ STATE_FILE=<font color="#808080">"/var/run/nfs-mount.state"</font>
touch <font color="#808080">"$LOCK_FILE"</font>
<b><u><font color="#000000">trap</font></u></b> <font color="#808080">"rm -f $LOCK_FILE"</font> EXIT
+mount_it () {
+ <b><u><font color="#000000">if</font></u></b> mount <font color="#808080">"$MOUNT_POINT"</font>; <b><u><font color="#000000">then</font></u></b>
+ echo <font color="#808080">"NFS mount fixed at $(date)"</font> | systemd-cat -t nfs-monitor -p info
+ rm -f <font color="#808080">"$STATE_FILE"</font>
+ <b><u><font color="#000000">else</font></u></b>
+ echo <font color="#808080">"Failed to fix NFS mount at $(date)"</font> | systemd-cat -t nfs-monitor -p err
+ <b><u><font color="#000000">exit</font></u></b> <font color="#000000">1</font>
+ <b><u><font color="#000000">fi</font></u></b>
+}
+
+<i><font color="silver"># Quick check - ensure it's actually mounted</font></i>
+<b><u><font color="#000000">if</font></u></b> ! mountpoint -q <font color="#808080">"$MOUNT_POINT"</font>; <b><u><font color="#000000">then</font></u></b>
+ echo <font color="#808080">"NFS mount not found at $(date)"</font> | systemd-cat -t nfs-monitor -p err
+ mount_it
+<b><u><font color="#000000">fi</font></u></b>
+
<i><font color="silver"># Quick check - try to stat a directory with a very short timeout</font></i>
<b><u><font color="#000000">if</font></u></b> timeout 2s stat <font color="#808080">"$MOUNT_POINT"</font> &gt;/dev/null <font color="#000000">2</font>&gt;&amp;<font color="#000000">1</font>; <b><u><font color="#000000">then</font></u></b>
<i><font color="silver"># Mount appears healthy</font></i>
@@ -1634,12 +1650,7 @@ echo <font color="#808080">"Attempting to fix stale NFS mount at $(date)"</font>
umount -f <font color="#808080">"$MOUNT_POINT"</font> <font color="#000000">2</font>&gt;/dev/null
sleep <font color="#000000">1</font>
-<b><u><font color="#000000">if</font></u></b> mount <font color="#808080">"$MOUNT_POINT"</font>; <b><u><font color="#000000">then</font></u></b>
- echo <font color="#808080">"NFS mount fixed at $(date)"</font> | systemd-cat -t nfs-monitor -p info
- rm -f <font color="#808080">"$STATE_FILE"</font>
-<b><u><font color="#000000">else</font></u></b>
- echo <font color="#808080">"Failed to fix NFS mount at $(date)"</font> | systemd-cat -t nfs-monitor -p err
-<b><u><font color="#000000">fi</font></u></b>
+mount_it
EOF
[root@r0 ~]<i><font color="silver"># chmod +x /usr/local/bin/check-nfs-mount.sh</font></i>
</pre>
diff --git a/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html b/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html
new file mode 100644
index 00000000..7a359b19
--- /dev/null
+++ b/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html
@@ -0,0 +1,632 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>f3s: Kubernetes with FreeBSD - Part 7: First pod deployments</title>
+<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
+<link rel="stylesheet" href="../style.css" />
+<link rel="stylesheet" href="style-override.css" />
+</head>
+<body>
+<p class="header">
+<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.gmi">Gemini</a>
+</p>
+<h1 style='display: inline' id='f3s-kubernetes-with-freebsd---part-7-first-pod-deployments'>f3s: Kubernetes with FreeBSD - Part 7: First pod deployments</h1><br />
+<br />
+<span>This is the seventh 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.</span><br />
+<br />
+<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br />
+<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br />
+<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br />
+<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br />
+<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br />
+<a class='textlink' href='./2025-07-14-f3s-kubernetes-with-freebsd-part-6.html'>2025-07-14 f3s: Kubernetes with FreeBSD - Part 6: Storage</a><br />
+<br />
+<a href='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png'><img alt='f3s logo' title='f3s logo' src='./f3s-kubernetes-with-freebsd-part-1/f3slogo.png' /></a><br />
+<br />
+<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
+<br />
+<ul>
+<li><a href='#f3s-kubernetes-with-freebsd---part-7-first-pod-deployments'>f3s: Kubernetes with FreeBSD - Part 7: First pod deployments</a></li>
+<li>⇢ <a href='#introduction'>Introduction</a></li>
+<li>⇢ <a href='#updating'>Updating</a></li>
+<li>⇢ <a href='#installing-k3s'>Installing k3s</a></li>
+<li>⇢ ⇢ <a href='#generating-k3stoken-and-starting-first-k3s-node'>Generating <span class='inlinecode'>K3S_TOKEN</span> and starting first k3s node</a></li>
+<li>⇢ ⇢ <a href='#adding-the-remaining-nodes-to-the-cluster'>Adding the remaining nodes to the cluster</a></li>
+<li>⇢ <a href='#test-deployments'>Test deployments</a></li>
+<li>⇢ ⇢ <a href='#test-deployment-to-kubernetes'>Test deployment to Kubernetes</a></li>
+<li>⇢ ⇢ <a href='#test-deployment-with-persistent-volume-claim'>Test deployment with persistent volume claim</a></li>
+<li>⇢ <a href='#make-it-accessible-from-the-public-internet'>Make it accessible from the public internet</a></li>
+<li>⇢ <a href='#failure-test'>Failure test</a></li>
+</ul><br />
+<h2 style='display: inline' id='introduction'>Introduction</h2><br />
+<br />
+<h2 style='display: inline' id='updating'>Updating</h2><br />
+<br />
+<span>On all three Rocky Linux 9 boxes <span class='inlinecode'>r0</span>, <span class='inlinecode'>r1</span>, and <span class='inlinecode'>r2</span>:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>dnf update -y
+reboot
+</pre>
+<br />
+<span>On the FreeBSD hosts, upgrading from FreeBSD 14.2 to 14.3-RELEASE, running this on all three hosts <span class='inlinecode'>f0</span>, <span class='inlinecode'>f1</span> and <span class='inlinecode'>f2</span>:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>paul@f0:~ % doas freebsd-update fetch
+paul@f0:~ % doas freebsd-update install
+paul@f0:~ % doas reboot
+.
+.
+.
+paul@f0:~ % doas freebsd-update -r <font color="#000000">14.3</font>-RELEASE upgrade
+paul@f0:~ % doas freebsd-update install
+paul@f0:~ % doas freebsd-update install
+paul@f0:~ % doas reboot
+.
+.
+.
+paul@f0:~ % doas freebsd-update install
+paul@f0:~ % doas pkg update
+paul@f0:~ % doas pkg upgrade
+paul@f0:~ % doas reboot
+.
+.
+.
+paul@f0:~ % uname -a
+FreeBSD f0.lan.buetow.org <font color="#000000">14.3</font>-RELEASE FreeBSD <font color="#000000">14.3</font>-RELEASE
+ releng/<font color="#000000">14.3</font>-n<font color="#000000">271432</font>-8c9ce319fef7 GENERIC amd64
+</pre>
+<br />
+<h2 style='display: inline' id='installing-k3s'>Installing k3s</h2><br />
+<br />
+<h3 style='display: inline' id='generating-k3stoken-and-starting-first-k3s-node'>Generating <span class='inlinecode'>K3S_TOKEN</span> and starting first k3s node</h3><br />
+<br />
+<span>Generating the k3s token on my Fedora Laptop with <span class='inlinecode'>pwgen -n 32</span> and selected one. And then on all 3 <span class='inlinecode'>r</span> hosts (replace SECRET_TOKEN with the actual secret!! before running the following command) run:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>[root@r0 ~]<i><font color="silver"># echo -n SECRET_TOKEN &gt; ~/.k3s_token</font></i>
+</pre>
+<br />
+<span>The following steps are also documented on the k3s website:</span><br />
+<br />
+<a class='textlink' href='https://docs.k3s.io/datastore/ha-embedded'>https://docs.k3s.io/datastore/ha-embedded</a><br />
+<br />
+<span>So on <span class='inlinecode'>r0</span> we run:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>[root@r0 ~]<i><font color="silver"># curl -sfL https://get.k3s.io | K3S_TOKEN=$(cat ~/.k3s_token) \</font></i>
+ sh -s - server --cluster-init --tls-san=r0.wg0.wan.buetow.org
+[INFO] Finding release <b><u><font color="#000000">for</font></u></b> channel stable
+[INFO] Using v1.<font color="#000000">32.6</font>+k3s1 as release
+.
+.
+.
+[INFO] systemd: Starting k3s
+</pre>
+<br />
+<h3 style='display: inline' id='adding-the-remaining-nodes-to-the-cluster'>Adding the remaining nodes to the cluster</h3><br />
+<br />
+<span>And we run on the other two nodes <span class='inlinecode'>r1</span> and <span class='inlinecode'>r2</span>:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>[root@r1 ~]<i><font color="silver"># curl -sfL https://get.k3s.io | K3S_TOKEN=$(cat ~/.k3s_token) \</font></i>
+ sh -s - server --server https://r<font color="#000000">0</font>.wg0.wan.buetow.org:<font color="#000000">6443</font> \
+ --tls-san=r1.wg0.wan.buetow.org
+
+[root@r2 ~]<i><font color="silver"># curl -sfL https://get.k3s.io | K3S_TOKEN=$(cat ~/.k3s_token) \</font></i>
+ sh -s - server --server https://r<font color="#000000">0</font>.wg0.wan.buetow.org:<font color="#000000">6443</font> \
+ --tls-san=r2.wg0.wan.buetow.org
+.
+.
+.
+
+</pre>
+<br />
+<span>Once done, we&#39;ve got a 3 node Kubernetes cluster control plane:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>[root@r0 ~]<i><font color="silver"># kubectl get nodes</font></i>
+NAME STATUS ROLES AGE VERSION
+r0.lan.buetow.org Ready control-plane,etcd,master 4m44s v1.<font color="#000000">32.6</font>+k3s1
+r1.lan.buetow.org Ready control-plane,etcd,master 3m13s v1.<font color="#000000">32.6</font>+k3s1
+r2.lan.buetow.org Ready control-plane,etcd,master 30s v1.<font color="#000000">32.6</font>+k3s1
+
+[root@r0 ~]<i><font color="silver"># kubectl get pods --all-namespaces</font></i>
+NAMESPACE NAME READY STATUS RESTARTS AGE
+kube-system coredns-5688667fd4-fs2jj <font color="#000000">1</font>/<font color="#000000">1</font> Running <font color="#000000">0</font> 5m27s
+kube-system helm-install-traefik-crd-f9hgd <font color="#000000">0</font>/<font color="#000000">1</font> Completed <font color="#000000">0</font> 5m27s
+kube-system helm-install-traefik-zqqqk <font color="#000000">0</font>/<font color="#000000">1</font> Completed <font color="#000000">2</font> 5m27s
+kube-system local-path-provisioner-774c6665dc-jqlnc <font color="#000000">1</font>/<font color="#000000">1</font> Running <font color="#000000">0</font> 5m27s
+kube-system metrics-server-6f4c6675d5-5xpmp <font color="#000000">1</font>/<font color="#000000">1</font> Running <font color="#000000">0</font> 5m27s
+kube-system svclb-traefik-411cec5b-cdp2l <font color="#000000">2</font>/<font color="#000000">2</font> Running <font color="#000000">0</font> 78s
+kube-system svclb-traefik-411cec5b-f625r <font color="#000000">2</font>/<font color="#000000">2</font> Running <font color="#000000">0</font> 4m58s
+kube-system svclb-traefik-411cec5b-twrd<font color="#000000">7</font> <font color="#000000">2</font>/<font color="#000000">2</font> Running <font color="#000000">0</font> 4m2s
+kube-system traefik-c98fdf6fb-lt6fx <font color="#000000">1</font>/<font color="#000000">1</font> Running <font color="#000000">0</font> 4m58s
+</pre>
+<br />
+<span>In order to connect with <span class='inlinecode'>kubect</span> from my Fedora Laptop, I had to copy <span class='inlinecode'>/etc/rancher/k3s/k3s.yaml</span> from <span class='inlinecode'>r0</span> to <span class='inlinecode'>~/.kube/config</span> and then replace the value of the server field with <span class='inlinecode'>r0.lan.buetow.org</span>. kubectl can now manage the cluster. Note this step has to be repeated when we want to connect to another node of the cluster (e.g. when <span class='inlinecode'>r0</span> is down).</span><br />
+<br />
+<h2 style='display: inline' id='test-deployments'>Test deployments</h2><br />
+<br />
+<h3 style='display: inline' id='test-deployment-to-kubernetes'>Test deployment to Kubernetes</h3><br />
+<br />
+<span>Let&#39;s create a test namespace:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ kubectl create namespace <b><u><font color="#000000">test</font></u></b>
+namespace/test created
+
+&gt; ~ kubectl get namespaces
+NAME STATUS AGE
+default Active 6h11m
+kube-node-lease Active 6h11m
+kube-public Active 6h11m
+kube-system Active 6h11m
+<b><u><font color="#000000">test</font></u></b> Active 5s
+
+&gt; ~ kubectl config set-context --current --namespace=<b><u><font color="#000000">test</font></u></b>
+Context <font color="#808080">"default"</font> modified.
+</pre>
+<br />
+<span>And let&#39;s also create an apache test pod:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ cat &lt;&lt;END &gt; apache-deployment.yaml
+<i><font color="silver"># Apache HTTP Server Deployment</font></i>
+apiVersion: apps/v<font color="#000000">1</font>
+kind: Deployment
+metadata:
+ name: apache-deployment
+spec:
+ replicas: <font color="#000000">1</font>
+ selector:
+ matchLabels:
+ app: apache
+ template:
+ metadata:
+ labels:
+ app: apache
+ spec:
+ containers:
+ - name: apache
+ image: httpd:latest
+ ports:
+ <i><font color="silver"># Container port where Apache listens</font></i>
+ - containerPort: <font color="#000000">80</font>
+END
+
+&gt; ~ kubectl apply -f apache-deployment.yaml
+deployment.apps/apache-deployment created
+
+&gt; ~ kubectl get all
+NAME READY STATUS RESTARTS AGE
+pod/apache-deployment-5fd955856f-4pjmf <font color="#000000">1</font>/<font color="#000000">1</font> Running <font color="#000000">0</font> 7s
+
+NAME READY UP-TO-DATE AVAILABLE AGE
+deployment.apps/apache-deployment <font color="#000000">1</font>/<font color="#000000">1</font> <font color="#000000">1</font> <font color="#000000">1</font> 7s
+
+NAME DESIRED CURRENT READY AGE
+replicaset.apps/apache-deployment-5fd955856f <font color="#000000">1</font> <font color="#000000">1</font> <font color="#000000">1</font> 7s
+</pre>
+<br />
+<span>Let&#39;s also create a service: </span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ cat &lt;&lt;END &gt; apache-service.yaml
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: apache
+ name: apache-service
+spec:
+ ports:
+ - name: web
+ port: <font color="#000000">80</font>
+ protocol: TCP
+ <i><font color="silver"># Expose port 80 on the service</font></i>
+ targetPort: <font color="#000000">80</font>
+ selector:
+ <i><font color="silver"># Link this service to pods with the label app=apache</font></i>
+ app: apache
+END
+
+&gt; ~ kubectl apply -f apache-service.yaml
+service/apache-service created
+
+&gt; ~ kubectl get service
+NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
+apache-service ClusterIP <font color="#000000">10.43</font>.<font color="#000000">249.165</font> &lt;none&gt; <font color="#000000">80</font>/TCP 4s
+</pre>
+<br />
+<span>And also an ingress:</span><br />
+<br />
+<span class='quote'>Note: I&#39;ve modified the hosts listed in this example after I&#39;ve published this blog post. This is to ensure that there aren&#39;t any bots scarping it.</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ cat &lt;&lt;END &gt; apache-ingress.yaml
+
+apiVersion: networking.k8s.io/v<font color="#000000">1</font>
+kind: Ingress
+metadata:
+ name: apache-ingress
+ namespace: <b><u><font color="#000000">test</font></u></b>
+ annotations:
+ spec.ingressClassName: traefik
+ traefik.ingress.kubernetes.io/router.entrypoints: web
+spec:
+ rules:
+ - host: f3s.foo.zone
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: apache-service
+ port:
+ number: <font color="#000000">80</font>
+ - host: standby.f3s.foo.zone
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: apache-service
+ port:
+ number: <font color="#000000">80</font>
+ - host: www.f3s.foo.zone
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: apache-service
+ port:
+ number: <font color="#000000">80</font>
+END
+
+&gt; ~ kubectl apply -f apache-ingress.yaml
+ingress.networking.k8s.io/apache-ingress created
+
+&gt; ~ kubectl describe ingress
+Name: apache-ingress
+Labels: &lt;none&gt;
+Namespace: <b><u><font color="#000000">test</font></u></b>
+Address: <font color="#000000">192.168</font>.<font color="#000000">1.120</font>,<font color="#000000">192.168</font>.<font color="#000000">1.121</font>,<font color="#000000">192.168</font>.<font color="#000000">1.122</font>
+Ingress Class: traefik
+Default backend: &lt;default&gt;
+Rules:
+ Host Path Backends
+ ---- ---- --------
+ f3s.foo.zone
+ / apache-service:<font color="#000000">80</font> (<font color="#000000">10.42</font>.<font color="#000000">1.11</font>:<font color="#000000">80</font>)
+ standby.f3s.foo.zone
+ / apache-service:<font color="#000000">80</font> (<font color="#000000">10.42</font>.<font color="#000000">1.11</font>:<font color="#000000">80</font>)
+ www.f3s.foo.zone
+ / apache-service:<font color="#000000">80</font> (<font color="#000000">10.42</font>.<font color="#000000">1.11</font>:<font color="#000000">80</font>)
+Annotations: spec.ingressClassName: traefik
+ traefik.ingress.kubernetes.io/router.entrypoints: web
+Events: &lt;none&gt;
+</pre>
+<br />
+<span>Notes: </span><br />
+<br />
+<ul>
+<li>I&#39;ve modified the ingress hosts after I&#39;d published this blog post. This is to ensure that there aren&#39;t any bots scarping it.</li>
+<li>In the ingress we use plain http (web) for the traefik rule, as all the "production" traefic will routed through a WireGuard tunnel anyway as we will see later.</li>
+</ul><br />
+<span>So let&#39;s test the Apache webserver through the ingress rule:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ curl -H <font color="#808080">"Host: www.f3s.foo.zone"</font> http://r<font color="#000000">0</font>.lan.buetow.org:<font color="#000000">80</font>
+&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h<font color="#000000">1</font>&gt;&lt;/body&gt;&lt;/html&gt;
+</pre>
+<br />
+<h3 style='display: inline' id='test-deployment-with-persistent-volume-claim'>Test deployment with persistent volume claim</h3><br />
+<br />
+<span>So let&#39;s modify the Apache example to serve the <span class='inlinecode'>htdocs</span> directory from the NFS share we created in the previous blog post. We are using the following manifests. The majority of the manifests are the same as before, except for the persistent volume claim and the volume mount in the Apache deployment.</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ cat &lt;&lt;END &gt; apache-deployment.yaml
+<i><font color="silver"># Apache HTTP Server Deployment</font></i>
+apiVersion: apps/v<font color="#000000">1</font>
+kind: Deployment
+metadata:
+ name: apache-deployment
+ namespace: <b><u><font color="#000000">test</font></u></b>
+spec:
+ replicas: <font color="#000000">1</font>
+ selector:
+ matchLabels:
+ app: apache
+ template:
+ metadata:
+ labels:
+ app: apache
+ spec:
+ containers:
+ - name: apache
+ image: httpd:latest
+ ports:
+ <i><font color="silver"># Container port where Apache listens</font></i>
+ - containerPort: <font color="#000000">80</font>
+ volumeMounts:
+ - name: apache-htdocs
+ mountPath: /usr/local/apache<font color="#000000">2</font>/htdocs/
+ volumes:
+ - name: apache-htdocs
+ persistentVolumeClaim:
+ claimName: example-apache-pvc
+END
+
+&gt; ~ cat &lt;&lt;END &gt; apache-ingress.yaml
+apiVersion: networking.k8s.io/v<font color="#000000">1</font>
+kind: Ingress
+metadata:
+ name: apache-ingress
+ namespace: <b><u><font color="#000000">test</font></u></b>
+ annotations:
+ spec.ingressClassName: traefik
+ traefik.ingress.kubernetes.io/router.entrypoints: web
+spec:
+ rules:
+ - host: f3s.buetow.org
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: apache-service
+ port:
+ number: <font color="#000000">80</font>
+ - host: standby.f3s.buetow.org
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: apache-service
+ port:
+ number: <font color="#000000">80</font>
+ - host: www.f3s.buetow.org
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: apache-service
+ port:
+ number: <font color="#000000">80</font>
+END
+
+&gt; ~ cat &lt;&lt;END &gt; apache-persistent-volume.yaml
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: example-apache-pv
+spec:
+ capacity:
+ storage: 1Gi
+ volumeMode: Filesystem
+ accessModes:
+ - ReadWriteOnce
+ persistentVolumeReclaimPolicy: Retain
+ hostPath:
+ path: /data/nfs/k3svolumes/example-apache-volume-claim
+ <b><u><font color="#000000">type</font></u></b>: Directory
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: example-apache-pvc
+ namespace: <b><u><font color="#000000">test</font></u></b>
+spec:
+ storageClassName: <font color="#808080">""</font>
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 1Gi
+END
+
+&gt; ~ cat &lt;&lt;END &gt; apache-service.yaml
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: apache
+ name: apache-service
+ namespace: <b><u><font color="#000000">test</font></u></b>
+spec:
+ ports:
+ - name: web
+ port: <font color="#000000">80</font>
+ protocol: TCP
+ <i><font color="silver"># Expose port 80 on the service</font></i>
+ targetPort: <font color="#000000">80</font>
+ selector:
+ <i><font color="silver"># Link this service to pods with the label app=apache</font></i>
+ app: apache
+END
+</pre>
+<br />
+<span>And let&#39;s apply the manifests:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ kubectl apply -f apache-persistent-volume.yaml
+&gt; ~ kubectl apply -f apache-service.yaml
+&gt; ~ kubectl apply -f apache-deployment.yaml
+&gt; ~ kubectl apply -f apache-ingress.yaml
+</pre>
+<br />
+<span>So looking at the deployment, it failed now, as the directory doesn&#39;t exist yet on the NFS share:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ kubectl get pods
+NAME READY STATUS RESTARTS AGE
+apache-deployment-5b96bd6b6b-fv2jx <font color="#000000">0</font>/<font color="#000000">1</font> ContainerCreating <font color="#000000">0</font> 9m15s
+
+&gt; ~ kubectl describe pod apache-deployment-5b96bd6b6b-fv2jx | tail -n <font color="#000000">5</font>
+Events:
+ Type Reason Age From Message
+ ---- ------ ---- ---- -------
+ Normal Scheduled 9m34s default-scheduler Successfully
+ assigned test/apache-deployment-5b96bd6b6b-fv2jx to r2.lan.buetow.org
+ Warning FailedMount 80s (x12 over 9m34s) kubelet MountVolume.SetUp
+ failed <b><u><font color="#000000">for</font></u></b> volume <font color="#808080">"example-apache-pv"</font> : hostPath <b><u><font color="#000000">type</font></u></b> check failed:
+ /data/nfs/k3svolumes/example-apache is not a directory
+</pre>
+<br />
+<span>This is on purpose! We need to create the directory on the NFS share first, so let&#39;s do that (e.g. on <span class='inlinecode'>r0</span>):</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>[root@r0 ~]<i><font color="silver"># mkdir /data/nfs/k3svolumes/example-apache-volume-claim/</font></i>
+
+[root@r0 ~ ] cat &lt;&lt;END &gt; /data/nfs/k3svolumes/example-apache-volume-claim/index.html
+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+ &lt;title&gt;Hello, it works&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+ &lt;h1&gt;Hello, it works!&lt;/h<font color="#000000">1</font>&gt;
+ &lt;p&gt;This site is served via a PVC!&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+END
+</pre>
+<br />
+<span>The <span class='inlinecode'>index.html</span> file was also created to serve content along the way. After deleting the pod, it recreates itself, and the volume mounts correctly:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ kubectl delete pod apache-deployment-5b96bd6b6b-fv2jx
+
+&gt; ~ curl -H <font color="#808080">"Host: www.f3s.buetow.org"</font> http://r<font color="#000000">0</font>.lan.buetow.org:<font color="#000000">80</font>
+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+ &lt;title&gt;Hello, it works&lt;/title&gt;
+&lt;/head&gt;
+&lt;body&gt;
+ &lt;h1&gt;Hello, it works!&lt;/h<font color="#000000">1</font>&gt;
+ &lt;p&gt;This site is served via a PVC!&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+<br />
+<h2 style='display: inline' id='make-it-accessible-from-the-public-internet'>Make it accessible from the public internet</h2><br />
+<br />
+<span>Next, this should be made accessible through the public internet via the <span class='inlinecode'>www.f3s.foo.zone</span> hosts. As a reminder, refer back to part 1 of this series and review the section titled "OpenBSD/relayd to the rescue for external connectivity":</span><br />
+<br />
+<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br />
+<br />
+<span class='quote'>All apps should be reachable through the internet (e.g., from my phone or computer when travelling). For external connectivity and TLS management, I&#39;ve got two OpenBSD VMs (one hosted by OpenBSD Amsterdam and another hosted by Hetzner) handling public-facing services like DNS, relaying traffic, and automating Let&#39;s Encrypt certificates.</span><br />
+<br />
+<span class='quote'>All of this (every Linux VM to every OpenBSD box) will be connected via WireGuard tunnels, keeping everything private and secure. There will be 6 WireGuard tunnels (3 k3s nodes times two OpenBSD VMs).</span><br />
+<br />
+<span class='quote'>So, when I want to access a service running in k3s, I will hit an external DNS endpoint (with the authoritative DNS servers being the OpenBSD boxes). The DNS will resolve to the master OpenBSD VM (see my KISS highly-available with OpenBSD blog post), and from there, the relayd process (with a Let&#39;s Encrypt certificate—see my Let&#39;s Encrypt with OpenBSD and Rex blog post) will accept the TCP connection and forward it through the WireGuard tunnel to a reachable node port of one of the k3s nodes, thus serving the traffic.</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>&gt; ~ curl https://f3s.foo.zone
+&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h<font color="#000000">1</font>&gt;&lt;/body&gt;&lt;/html&gt;
+
+&gt; ~ curl https://www.f3s.foo.zone
+&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h<font color="#000000">1</font>&gt;&lt;/body&gt;&lt;/html&gt;
+
+&gt; ~ curl https://standby.f3s.foo.zone
+&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h<font color="#000000">1</font>&gt;&lt;/body&gt;&lt;/html&gt;
+</pre>
+<br />
+<h2 style='display: inline' id='failure-test'>Failure test</h2><br />
+<br />
+<span>Shutting down <span class='inlinecode'>f0</span> and let NFS failing over for the Apache content.</span><br />
+<br />
+<br />
+<span>TODO: include k9s screenshot</span><br />
+<span>TODO: include a diagram again?</span><br />
+<br />
+<span>Other *BSD-related posts:</span><br />
+<br />
+<a class='textlink' href='./2025-07-14-f3s-kubernetes-with-freebsd-part-6.html'>2025-07-14 f3s: Kubernetes with FreeBSD - Part 6: Storage</a><br />
+<a class='textlink' href='./2025-05-11-f3s-kubernetes-with-freebsd-part-5.html'>2025-05-11 f3s: Kubernetes with FreeBSD - Part 5: WireGuard mesh network</a><br />
+<a class='textlink' href='./2025-04-05-f3s-kubernetes-with-freebsd-part-4.html'>2025-04-05 f3s: Kubernetes with FreeBSD - Part 4: Rocky Linux Bhyve VMs</a><br />
+<a class='textlink' href='./2025-02-01-f3s-kubernetes-with-freebsd-part-3.html'>2025-02-01 f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts</a><br />
+<a class='textlink' href='./2024-12-03-f3s-kubernetes-with-freebsd-part-2.html'>2024-12-03 f3s: Kubernetes with FreeBSD - Part 2: Hardware and base installation</a><br />
+<a class='textlink' href='./2024-11-17-f3s-kubernetes-with-freebsd-part-1.html'>2024-11-17 f3s: Kubernetes with FreeBSD - Part 1: Setting the stage</a><br />
+<a class='textlink' href='./2024-04-01-KISS-high-availability-with-OpenBSD.html'>2024-04-01 KISS high-availability with OpenBSD</a><br />
+<a class='textlink' href='./2024-01-13-one-reason-why-i-love-openbsd.html'>2024-01-13 One reason why I love OpenBSD</a><br />
+<a class='textlink' href='./2022-10-30-installing-dtail-on-openbsd.html'>2022-10-30 Installing DTail on OpenBSD</a><br />
+<a class='textlink' href='./2022-07-30-lets-encrypt-with-openbsd-and-rex.html'>2022-07-30 Let&#39;s Encrypt with OpenBSD and Rex</a><br />
+<a class='textlink' href='./2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html'>2016-04-09 Jails and ZFS with Puppet on FreeBSD</a><br />
+<br />
+<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span></span><br />
+<br />
+<a class='textlink' href='../'>Back to the main site</a><br />
+<br />
+<br />
+<span>Note, that I&#39;ve modified the hosts after I&#39;d published this blog post. This is to ensure that there aren&#39;t any bots scarping it.</span><br />
+<p class="footer">
+Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> |
+served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> |
+<a href="https://foo.zone/site-mirrors.html">Site Mirrors</a>
+</p>
+</body>
+</html>
diff --git a/gemfeed/DRAFT-totalrecall.html b/gemfeed/DRAFT-totalrecall.html
new file mode 100644
index 00000000..ee639103
--- /dev/null
+++ b/gemfeed/DRAFT-totalrecall.html
@@ -0,0 +1,300 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>TotalRecall: Learning Bulgarian with AI and Anki</title>
+<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
+<link rel="stylesheet" href="../style.css" />
+<link rel="stylesheet" href="style-override.css" />
+</head>
+<body>
+<p class="header">
+<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/DRAFT-totalrecall.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/DRAFT-totalrecall.gmi">Gemini</a>
+</p>
+<h1 style='display: inline' id='totalrecall-learning-bulgarian-with-ai-and-anki'>TotalRecall: Learning Bulgarian with AI and Anki</h1><br />
+<br />
+<span class='quote'>Published at 2025-01-22T10:30:00+02:00</span><br />
+<br />
+<span>Learning a new language is hard. Learning Bulgarian? That&#39;s a special kind of challenge. The Cyrillic script, the complex grammar, the pronunciation - it all adds up. But what if we could leverage AI to make flashcard creation instant and effortless? That&#39;s where TotalRecall comes in.</span><br />
+<br />
+<a class='textlink' href='https://github.com/yourusername/totalrecall'>TotalRecall on GitHub</a><br />
+<br />
+<pre>
+ ╔══════════════════════════════╗
+ ║ 🇧🇬 TOTALRECALL 🧠 ║
+ ║ ┌─────────┐ ┌─────────┐ ║
+ ║ │ ябълка │→ │ 🍎 │ ║
+ ║ │ [audio] │ │ "apple" │ ║
+ ║ └─────────┘ └─────────┘ ║
+ ╚══════════════════════════════╝
+</pre>
+<br />
+<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
+<br />
+<ul>
+<li><a href='#totalrecall-learning-bulgarian-with-ai-and-anki'>TotalRecall: Learning Bulgarian with AI and Anki</a></li>
+<li>⇢ <a href='#why-totalrecall-exists'>Why TotalRecall exists</a></li>
+<li>⇢ ⇢ <a href='#learning-bulgarian'>Learning Bulgarian</a></li>
+<li>⇢ ⇢ <a href='#practicing-agentic-coding'>Practicing agentic coding</a></li>
+<li>⇢ <a href='#how-it-works'>How it works</a></li>
+<li>⇢ ⇢ <a href='#the-ai-pipeline'>The AI pipeline</a></li>
+<li>⇢ ⇢ <a href='#why-openai-for-everything'>Why OpenAI for everything?</a></li>
+<li>⇢ <a href='#the-science-of-memorable-flashcards'>The science of memorable flashcards</a></li>
+<li>⇢ ⇢ <a href='#no-english-on-the-front'>No English on the front</a></li>
+<li>⇢ ⇢ <a href='#the-power-of-personal-connection'>The power of personal connection</a></li>
+<li>⇢ ⇢ <a href='#sound-comes-first'>Sound comes first</a></li>
+<li>⇢ ⇢ <a href='#images-over-translations'>Images over translations</a></li>
+<li>⇢ ⇢ <a href='#ipa-for-precision'>IPA for precision</a></li>
+<li>⇢ <a href='#spaced-repetition-the-secret-sauce'>Spaced repetition: The secret sauce</a></li>
+<li>⇢ ⇢ <a href='#start-small-stay-consistent'>Start small, stay consistent</a></li>
+<li>⇢ ⇢ <a href='#review-first-add-new-cards-second'>Review first, add new cards second</a></li>
+<li>⇢ ⇢ <a href='#trust-the-algorithm'>Trust the algorithm</a></li>
+<li>⇢ ⇢ <a href='#quality-over-quantity'>Quality over quantity</a></li>
+<li>⇢ <a href='#the-technical-bits'>The technical bits</a></li>
+<li>⇢ <a href='#agentic-coding-insights'>Agentic coding insights</a></li>
+<li>⇢ ⇢ <a href='#clear-communication-is-crucial'>Clear communication is crucial</a></li>
+<li>⇢ ⇢ <a href='#ai-excels-at-boilerplate-and-testing'>AI excels at boilerplate and testing</a></li>
+<li>⇢ ⇢ <a href='#the-scaling-challenge'>The scaling challenge</a></li>
+<li>⇢ ⇢ <a href='#code-duplication-becomes-a-real-problem'>Code duplication becomes a real problem</a></li>
+<li>⇢ ⇢ <a href='#tests-are-your-safety-net'>Tests are your safety net</a></li>
+<li>⇢ ⇢ <a href='#the-context-window-problem'>The context window problem</a></li>
+<li>⇢ <a href='#my-learning-workflow'>My learning workflow</a></li>
+<li>⇢ ⇢ <a href='#morning-routine'>Morning routine</a></li>
+<li>⇢ ⇢ <a href='#encountering-new-words'>Encountering new words</a></li>
+<li>⇢ ⇢ <a href='#weekly-maintenance'>Weekly maintenance</a></li>
+<li>⇢ <a href='#future-plans'>Future plans</a></li>
+<li>⇢ <a href='#tips-for-language-learners'>Tips for language learners</a></li>
+<li>⇢ ⇢ <a href='#focus-on-frequency'>Focus on frequency</a></li>
+<li>⇢ ⇢ <a href='#use-memory-palaces'>Use memory palaces</a></li>
+<li>⇢ ⇢ <a href='#study-before-sleep'>Study before sleep</a></li>
+<li>⇢ ⇢ <a href='#embrace-the-mess'>Embrace the mess</a></li>
+<li>⇢ <a href='#try-it-yourself'>Try it yourself</a></li>
+</ul><br />
+<h2 style='display: inline' id='why-totalrecall-exists'>Why TotalRecall exists</h2><br />
+<br />
+<span>Two motivations drove me to create this tool:</span><br />
+<br />
+<h3 style='display: inline' id='learning-bulgarian'>Learning Bulgarian</h3><br />
+<br />
+<span>I&#39;ve been fascinated by the Bulgarian language for a while now. It&#39;s the oldest written Slavic language, and Sofia has become quite the tech hub. But finding good learning materials? That&#39;s tough. Most apps focus on the big languages - Spanish, French, German. Bulgarian gets the short end of the stick.</span><br />
+<br />
+<span>AnkiDroid has been my go-to for spaced repetition learning. It&#39;s powerful, customizable, and works offline. But creating cards manually? That&#39;s tedious. Type the word, find an image, record audio, format everything... By the time you&#39;ve made 10 cards, you&#39;re exhausted.</span><br />
+<br />
+<h3 style='display: inline' id='practicing-agentic-coding'>Practicing agentic coding</h3><br />
+<br />
+<span>The second reason is more technical. I wanted to explore agentic coding - letting AI assistants help write and refactor code. TotalRecall became my playground for this experiment. Could I build something useful while learning how to effectively collaborate with AI coding assistants?</span><br />
+<br />
+<span>Turns out, yes. The combination of human creativity and AI assistance is powerful. I set the architecture, made design decisions, and the AI helped with implementation details, test writing, and refactoring.</span><br />
+<br />
+<h2 style='display: inline' id='how-it-works'>How it works</h2><br />
+<br />
+<span>TotalRecall is beautifully simple:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>totalrecall <font color="#808080">"ябълка"</font>
+</pre>
+<br />
+<span>That&#39;s it. One command, and you get a complete flashcard with everything you need. But there&#39;s sophisticated AI magic happening behind the scenes.</span><br />
+<br />
+<h3 style='display: inline' id='the-ai-pipeline'>The AI pipeline</h3><br />
+<br />
+<span>When you run that command, TotalRecall orchestrates multiple OpenAI API calls:</span><br />
+<br />
+<span>1. **Translation** - Bidirectional translation (Bulgarian ↔ English) to understand the word&#39;s meaning</span><br />
+<span>2. **Phonetic transcription** - IPA notation for precise pronunciation guidance</span><br />
+<span>3. **Scene description** - AI generates a culturally appropriate scene description for the image</span><br />
+<span>4. **Image generation** - DALL-E creates a memorable visual based on the scene description</span><br />
+<span>5. **Audio synthesis** - High-quality TTS pronunciation that can be regenerated with different voices</span><br />
+<br />
+<span>All this happens in seconds. The result? A rich, multi-sensory flashcard that engages visual, auditory, and linguistic memory systems.</span><br />
+<br />
+<h3 style='display: inline' id='why-openai-for-everything'>Why OpenAI for everything?</h3><br />
+<br />
+<span>I could have used Google Translate for translations, or pulled IPA from Wiktionary. But OpenAI&#39;s models understand context. When you input "банка", it knows whether you mean "bank" (financial) or "jar" based on usage patterns. The scene descriptions are culturally aware - Bulgarian bread looks different from American bread, and the AI knows this.</span><br />
+<br />
+<h2 style='display: inline' id='the-science-of-memorable-flashcards'>The science of memorable flashcards</h2><br />
+<br />
+<span>After reading extensively about language learning and memory techniques, I&#39;ve built TotalRecall to create cards that stick. Here&#39;s why our approach works:</span><br />
+<br />
+<h3 style='display: inline' id='no-english-on-the-front'>No English on the front</h3><br />
+<br />
+<span>The cards show only Bulgarian text and images - no English translations on the front. This forces your brain to recall meaning from context and imagery, creating stronger neural pathways. When you see "ябълка" with an apple image, your brain learns to connect the Bulgarian word directly to the concept, not to the English word "apple."</span><br />
+<br />
+<h3 style='display: inline' id='the-power-of-personal-connection'>The power of personal connection</h3><br />
+<br />
+<span>The best flashcards include personal context. While TotalRecall generates generic images, I recommend adding your own notes about where you first encountered the word. Did you see "хляб" (bread) at a Bulgarian bakery? Add that story. Personal connections make memories stick. So at will, a custom image prompt (not AI generated) can be specified.</span><br />
+<br />
+<h3 style='display: inline' id='sound-comes-first'>Sound comes first</h3><br />
+<br />
+<span>Native pronunciation from day one is crucial. That&#39;s why every card includes audio. Your brain needs to hear the rhythm and melody of Bulgarian, not your English-accented approximation. The OpenAI voices aren&#39;t perfect, but they&#39;re leagues better than text-to-speech engines of the past. Plus, you can regenerate audio with different voices if one doesn&#39;t sound quite right.</span><br />
+<br />
+<h3 style='display: inline' id='images-over-translations'>Images over translations</h3><br />
+<br />
+<span>A picture of bread teaches "хляб" better than the word "bread" ever could. Images bypass linguistic processing and create direct conceptual links. DALL-E generates contextually appropriate images - Bulgarian bread looks different from Wonder Bread, and these cultural nuances matter.</span><br />
+<br />
+<h3 style='display: inline' id='ipa-for-precision'>IPA for precision</h3><br />
+<br />
+<span>The phonetic transcriptions are gold for pronunciation. Bulgarian has sounds that don&#39;t exist in English. The IPA shows you exactly where to place your tongue, how to shape your lips. It&#39;s the difference between sounding foreign and sounding fluent.</span><br />
+<br />
+<h2 style='display: inline' id='spaced-repetition-the-secret-sauce'>Spaced repetition: The secret sauce</h2><br />
+<br />
+<span>Anki&#39;s algorithm is based on the spacing effect - we remember things better when we review them at increasing intervals. Here&#39;s how to maximize it:</span><br />
+<br />
+<h3 style='display: inline' id='start-small-stay-consistent'>Start small, stay consistent</h3><br />
+<br />
+<span>Don&#39;t add 100 words on day one. Start with 10-15 new cards daily. Consistency beats intensity. Your brain needs time to consolidate memories during sleep.</span><br />
+<br />
+<h3 style='display: inline' id='review-first-add-new-cards-second'>Review first, add new cards second</h3><br />
+<br />
+<span>Always clear your review queue before adding new cards. Reviews are where the real learning happens. New cards are just seeds - reviews make them grow.</span><br />
+<br />
+<h3 style='display: inline' id='trust-the-algorithm'>Trust the algorithm</h3><br />
+<br />
+<span>When Anki says to review a card in 4 months, trust it. The urge to over-review is strong, but it actually weakens memory formation. Let your brain struggle a bit - that&#39;s where learning happens.</span><br />
+<br />
+<h3 style='display: inline' id='quality-over-quantity'>Quality over quantity</h3><br />
+<br />
+<span>One well-made card beats ten mediocre ones. TotalRecall ensures quality with:</span><br />
+<span>- Clear, native audio with regeneration options</span><br />
+<span>- Relevant, memorable images from scene-aware descriptions</span><br />
+<span>- IPA transcriptions for pronunciation precision</span><br />
+<span>- Clean, distraction-free formatting</span><br />
+<br />
+<h2 style='display: inline' id='the-technical-bits'>The technical bits</h2><br />
+<br />
+<span>Written in Go because I wanted something fast and portable. The architecture is clean:</span><br />
+<br />
+<pre>
+internal/
+├── audio/ # OpenAI TTS integration
+├── image/ # DALL-E image generation
+├── anki/ # Card formatting
+├── phonetic/ # IPA transcription fetching
+├── translation/ # Bidirectional translation
+└── config/ # YAML configuration
+</pre>
+<br />
+<span>Each package has a single responsibility. The audio package doesn&#39;t know about images. The image package doesn&#39;t know about Anki. Clean interfaces everywhere.</span><br />
+<br />
+<h2 style='display: inline' id='agentic-coding-insights'>Agentic coding insights</h2><br />
+<br />
+<span>Working with AI assistants taught me several valuable lessons:</span><br />
+<br />
+<h3 style='display: inline' id='clear-communication-is-crucial'>Clear communication is crucial</h3><br />
+<br />
+<span>Vague requests get vague results. "Make it better" doesn&#39;t work. "Refactor this 80-line function into smaller functions, each handling one responsibility" does. The AI needs specific, actionable instructions.</span><br />
+<br />
+<h3 style='display: inline' id='ai-excels-at-boilerplate-and-testing'>AI excels at boilerplate and testing</h3><br />
+<br />
+<span>Writing comprehensive test suites? Perfect AI task. Implementing error handling patterns? Also great. Creative architecture decisions? Still very much a human job. The AI is your implementation partner, not your architect.</span><br />
+<br />
+<h3 style='display: inline' id='the-scaling-challenge'>The scaling challenge</h3><br />
+<br />
+<span>Here&#39;s the hard truth about agentic coding: it gets exponentially harder as your codebase grows. When TotalRecall was 500 lines, the AI could keep everything in context. At 2000 lines? Not so much.</span><br />
+<br />
+<span>Features start colliding in unexpected ways. You add batch processing, and suddenly the GUI breaks because it assumes single-word input. You change the default output directory, and it updates in the GUI but not in the CLI batch mode. The AI doesn&#39;t see these connections because it can&#39;t hold your entire codebase in memory.</span><br />
+<br />
+<h3 style='display: inline' id='code-duplication-becomes-a-real-problem'>Code duplication becomes a real problem</h3><br />
+<br />
+<span>The AI tends to solve problems locally. Need to validate Bulgarian input? It&#39;ll write a validation function right where you need it. Need it again elsewhere? It&#39;ll write another one. Before you know it, you have three different ways to validate Cyrillic text.</span><br />
+<br />
+<span>This isn&#39;t the AI being dumb - it&#39;s optimizing for the local context you&#39;ve given it. The burden of architectural consistency falls on you, the human.</span><br />
+<br />
+<h3 style='display: inline' id='tests-are-your-safety-net'>Tests are your safety net</h3><br />
+<br />
+<span>The larger the codebase, the more critical comprehensive tests become. Every time the AI touches code, it might break something three files away. Without tests, you won&#39;t know until a user complains.</span><br />
+<br />
+<span>My rule: before any AI-assisted refactoring, ensure test coverage. The AI is great at writing tests, so use it! Have it write tests for existing code before modifying anything. Then, when it inevitably breaks something, you&#39;ll know immediately.</span><br />
+<br />
+<h3 style='display: inline' id='the-context-window-problem'>The context window problem</h3><br />
+<br />
+<span>Modern AI assistants have impressive context windows, but they&#39;re not infinite. As TotalRecall grew, I had to become strategic about what context to provide. The entire codebase? Too much. Just the current file? Too little.</span><br />
+<br />
+<span>The sweet spot: provide the interface definitions, the specific module you&#39;re working on, and any directly dependent code. Let the AI know about the broader architecture through comments and documentation, not by dumping everything into context.</span><br />
+<br />
+<span>So after every feature, clear the context window and/or compact it to start fresh.</span><br />
+<br />
+<h2 style='display: inline' id='my-learning-workflow'>My learning workflow</h2><br />
+<br />
+<span>Here&#39;s how I use TotalRecall in practice:</span><br />
+<br />
+<h3 style='display: inline' id='morning-routine'>Morning routine</h3><br />
+<br />
+<ul>
+<li>Review all due cards in Anki (usually 50-100)</li>
+<li>which includes the review of failed cards</li>
+<li>Add 10-15 new words I encountered yesterday</li>
+</ul><br />
+<h3 style='display: inline' id='encountering-new-words'>Encountering new words</h3><br />
+<br />
+<span>When I find a new Bulgarian word (in articles, videos, conversations):</span><br />
+<br />
+<span>1. Immediately run <span class='inlinecode'>totalrecall "word"</span></span><br />
+<span>2. Add personal context in Anki notes</span><br />
+<span>3. Tag it with source (e.g., #news, #conversation)</span><br />
+<br />
+<h3 style='display: inline' id='weekly-maintenance'>Weekly maintenance</h3><br />
+<span>- Delete cards for words I&#39;ll never use</span><br />
+<span>- Suspend cards I&#39;ve truly mastered</span><br />
+<span>- Adjust ease factors for consistently hard cards</span><br />
+<br />
+<h2 style='display: inline' id='future-plans'>Future plans</h2><br />
+<br />
+<span>TotalRecall already packs a lot of features, but I&#39;m planning more:</span><br />
+<span>- Batch processing for word lists</span><br />
+<span>- Support for phrases and sentences</span><br />
+<span>- Grammar pattern recognition</span><br />
+<span>- Integration with Bulgarian dictionaries</span><br />
+<span>- Automatic difficulty scoring based on word frequency</span><br />
+<span>- Multiple image generation options per word</span><br />
+<span>- Voice selection preferences per word</span><br />
+<br />
+<span>But the real goal? Building a comprehensive Bulgarian deck for AnkiDroid. One command at a time, one word at a time.</span><br />
+<br />
+<h2 style='display: inline' id='tips-for-language-learners'>Tips for language learners</h2><br />
+<br />
+<h3 style='display: inline' id='focus-on-frequency'>Focus on frequency</h3><br />
+<span>Learn the most common 1000 words first. In any language, the top 1000 words cover ~80% of everyday conversation. TotalRecall will eventually include frequency data to help prioritize.</span><br />
+<br />
+<h3 style='display: inline' id='use-memory-palaces'>Use memory palaces</h3><br />
+<span>Assign Bulgarian words to locations in your home. Put "хладилник" (refrigerator) on your actual fridge. Spatial memory is incredibly powerful.</span><br />
+<br />
+<h3 style='display: inline' id='study-before-sleep'>Study before sleep</h3><br />
+<span>Review your hardest cards right before bed. Your brain consolidates memories during sleep, especially from the last hour before sleeping.</span><br />
+<br />
+<h3 style='display: inline' id='embrace-the-mess'>Embrace the mess</h3><br />
+<span>Language learning is messy. You&#39;ll mix up cases, forget words you "knew" yesterday, and butcher pronunciation. That&#39;s normal. TotalRecall makes it easy to try again tomorrow.</span><br />
+<br />
+<h2 style='display: inline' id='try-it-yourself'>Try it yourself</h2><br />
+<br />
+<span>If you&#39;re learning Bulgarian (or want to experiment with agentic coding), give TotalRecall a spin:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>go install github.com/yourusername/totalrecall@latest
+<b><u><font color="#000000">export</font></u></b> OPENAI_API_KEY=<font color="#808080">"your-key"</font>
+totalrecall <font color="#808080">"котка"</font> <i><font color="silver"># cat</font></i>
+totalrecall <font color="#808080">"куче"</font> <i><font color="silver"># dog</font></i>
+totalrecall <font color="#808080">"вода"</font> <i><font color="silver"># water</font></i>
+</pre>
+<br />
+<span>Learning languages should be fun, not tedious. Let&#39;s make better tools.</span><br />
+<br />
+<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br />
+<br />
+<span>Other related posts are:</span><br />
+<br />
+<br />
+<a class='textlink' href='../'>Back to the main site</a><br />
+<p class="footer">
+Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> |
+served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> |
+<a href="https://foo.zone/site-mirrors.html">Site Mirrors</a>
+</p>
+</body>
+</html>
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index 311b5eda..db00b626 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2025-07-20T09:06:35+03:00</updated>
+ <updated>2025-07-27T23:04:32+03:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="https://foo.zone/gemfeed/atom.xml" rel="self" />
@@ -1618,6 +1618,22 @@ STATE_FILE=<font color="#808080">"/var/run/nfs-mount.state"</font>
touch <font color="#808080">"$LOCK_FILE"</font>
<b><u><font color="#000000">trap</font></u></b> <font color="#808080">"rm -f $LOCK_FILE"</font> EXIT
+mount_it () {
+ <b><u><font color="#000000">if</font></u></b> mount <font color="#808080">"$MOUNT_POINT"</font>; <b><u><font color="#000000">then</font></u></b>
+ echo <font color="#808080">"NFS mount fixed at $(date)"</font> | systemd-cat -t nfs-monitor -p info
+ rm -f <font color="#808080">"$STATE_FILE"</font>
+ <b><u><font color="#000000">else</font></u></b>
+ echo <font color="#808080">"Failed to fix NFS mount at $(date)"</font> | systemd-cat -t nfs-monitor -p err
+ <b><u><font color="#000000">exit</font></u></b> <font color="#000000">1</font>
+ <b><u><font color="#000000">fi</font></u></b>
+}
+
+<i><font color="silver"># Quick check - ensure it's actually mounted</font></i>
+<b><u><font color="#000000">if</font></u></b> ! mountpoint -q <font color="#808080">"$MOUNT_POINT"</font>; <b><u><font color="#000000">then</font></u></b>
+ echo <font color="#808080">"NFS mount not found at $(date)"</font> | systemd-cat -t nfs-monitor -p err
+ mount_it
+<b><u><font color="#000000">fi</font></u></b>
+
<i><font color="silver"># Quick check - try to stat a directory with a very short timeout</font></i>
<b><u><font color="#000000">if</font></u></b> timeout 2s stat <font color="#808080">"$MOUNT_POINT"</font> &gt;/dev/null <font color="#000000">2</font>&gt;&amp;<font color="#000000">1</font>; <b><u><font color="#000000">then</font></u></b>
<i><font color="silver"># Mount appears healthy</font></i>
@@ -1641,12 +1657,7 @@ echo <font color="#808080">"Attempting to fix stale NFS mount at $(date)"</font>
umount -f <font color="#808080">"$MOUNT_POINT"</font> <font color="#000000">2</font>&gt;/dev/null
sleep <font color="#000000">1</font>
-<b><u><font color="#000000">if</font></u></b> mount <font color="#808080">"$MOUNT_POINT"</font>; <b><u><font color="#000000">then</font></u></b>
- echo <font color="#808080">"NFS mount fixed at $(date)"</font> | systemd-cat -t nfs-monitor -p info
- rm -f <font color="#808080">"$STATE_FILE"</font>
-<b><u><font color="#000000">else</font></u></b>
- echo <font color="#808080">"Failed to fix NFS mount at $(date)"</font> | systemd-cat -t nfs-monitor -p err
-<b><u><font color="#000000">fi</font></u></b>
+mount_it
EOF
[root@r0 ~]<i><font color="silver"># chmod +x /usr/local/bin/check-nfs-mount.sh</font></i>
</pre>