I only speak OpenAI API now. Plus with logging. Why I Needed This I’ve been using different AI providers’ APIs for various projects, but I faced two main challenges: Each provider has their own SDK and API format, requiring different code paths in my applications I wanted better visibility into what was happening with my requests across all providers Cloudflare’s AI Gateway…
Seriously give me the spans. A waht? I’ve been working on a rust project to mess with LLMs. Both using LLM APIs and exploring using various AI coders (Cursor, Trae, Gemini). Since the AI writes a lot of the code, I needed an easy way to debug it. I also want to get structured input I can give back to the AI and berate it for mistakes. Tracing seems like a nice way to get exactly what’s…
The images are too damn big! 📈 Let’s use a sane project manager and build an image with minimal dependences. Tooling This will assume you use uv to manage your python project. It’s really made me actually consider using python now… Uv has a pretty nice docker tutorial on GitHub that we’re going to base off. You can find that here . It’s an example fastapi project…
Switching to a Kubernetes OS… Make the machine manage itself 🤖. You what I’ve now migrated just about everything from my old k3s cluster to a cluster run by Talos . From the Talos website, “Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal.” It has only what is needed for kubernetes and nothing else. Talos also claims to manage kubernetes…
I’ve given in to hoarding and got 20TB of storage 🫢. Previous Setup I had been using an external USB hard drive as my storage. It’s attached to one of my kubernetes nodes which also runs NFS so other nodes can reach the storage. There’s actually a very similar setup in Wisconsin which acted as a backup. This worked pretty well, but I’d have issues with clients…
I needed more trend in my dev environment setup. Now more reproducible and declarative. Nix? Nix gets to be many things. There’s an expression language, package manager, and operating system built around it. You can learn more at nixos.org . I was mostly interested in using NixOS the operating system. It hopes to enable declarative and reproducible builds. I had seen Mitchell…
Almost 3 years later, I’ve done nothing with my place data. Google changed where to find it though 😢. At the beginning of 2020, I made a post about Exporting Google Saved Places . I get a lot of questions about it. People definitely want to get their place data and do more with it than what Google provides. Recently, I’ve been getting emails that the process I had outlined is no…
Azure CLI had a breaking change that brew autoupdated me to. Time to install differently. What’s asdf? asdf claims to let you “manage multiple runtime versions with a single CLI tool”. It was originally intended to replace nvm , rvm and such tools where you need multiple versions of nodejs and ruby . It’s based on a plugin system though so there are many things you can…
I was sick of my hour long ARM docker builds. A 15x speedup using existing infrastructure isn’t bad. The Problem I build my feedreader for ARM in Github Actions. The workflow builds a multi-arch docker image on push. The x86 build was pretty quick, but the ARM build was using qemu which made it take around an hour. QEMU certainly didn’t help, but the Github Actions runners aren’t…
I wasn’t ready to add auth to my new feedreader. So I built a moat with Tailscale. What does that mean ? I added a kubernetes pod to my tailnet so it’s accessible from anywhere that can route to Tailscale nodes. It also gets a nice domain name so http://feedreader works. Tailscale actually has a blog post and example for how to set this up. I wanted it to be mildly different so…
I had stood up a cluster in the cloud before moving. Now, I’ve added some nodes at home to round it out. Maybe I’m just in it for the buzzwords. Why not just the cloud? As previously mentioned in moving my cluster to the cloud , I run a VM for the control plane and then a free Oracle ARM 4x24 VM as a worker. You might think this is more than enough (and you’d probably be right),…
Interfacing with a blockchain can seem intimidating, but this dapp has a nice javascript sdk. What’s it do? I made a script that will check your collateral positions in Mirror Protocol . Mirror is an app on the Terra blockchain that lets you trade stocks, but in reality they are tokens that try to stay pegged to the real life equivalent. There’s an option to short an asset in Mirror.…
I was going to move and didn’t want to be without my rss reader (which I self host). To the cloud ☁️ it is. Searching for Free VMs I had been thinking of using the generous Oracle free-tier to run a k3s cluster. Especially since they recently announced a free 4x24 ARM node. The entrypoint to my homelab has already been moved from Linode to a free Oracle VM. I wasn’t able to get the…
I want to move my miniflux database to a managed service. Spoilers… it didn’t go well. Current setup I currently have miniflux running in my raspberry pi kubernetes cluster . Miniflux requires a Postgresql database. I haven’t had great experiences running persistent storage on the Raspberry Pis so I opted to run the database on my thinkcentre instead. It’s running as a…
I recently got an M1 Macbook Air. I wanted to try out a new development setup and track my dotfiles in git. The Machine I got the standard config with the 7-core GPU. I went with the standard one largely because bumping to more RAM meant it wouldn’t arrive for two weeks and I’m impatient. I don’t plan to use this for anything too intensive so hopefully the 8GB will be enough. So…
My stack of Raspberry PIs was getting a little tippy… A bracket from Germany and some 3D printing later and it’s good to go. There are affiliate links below that I may earn a commission from. Previously My Raspberry PIs had been just sitting on a shelf in the server rack. They were mounted together, but the stack of them would often slide around on the shelf. The stack can be seen…
The SD card died in the server node of my cluster 😢. Time to start again. Tragedy The SD card in blueberry died taking down the kubernetes api with it. The workloads were still running so it didn’t matter too much, but I couldn’t do anything new. I didn’t have a backup for the SD card… so was going to have to start again. I took the opportunity to try out some new things.…
My OpenEBS install seemingly stopped working. 🔥 Discovery I actually didn’t really notice it had stopped working until two days later. I have monitoring set up for some sites, but it was only testing that the page loaded, not that data loaded. Lesson learned there I guess. The pods showed as having the storage attached, but it didn’t work. Looking for the status of the various OpenEBS…
I wanted to build a multi-arch docker image for media transcoding. Time to get the dependencies from someone who already did it. The Goal I wanted a multi-arch image to run mdhiggins/sickbeard_mp4_automator . I just needed the manual.py script not the radarr integration. The images published by mdhiggins are based on images like the linuxserver/radarr image and aren’t multi-arch. You can…
I’ve wanted to move away from Feedly for awhile and finally found my alternative in Miniflux. Why the move I had been having issues with the Feedly app where it would suddenly sign me out and take a while to log back in. Apparently that’s all it takes for me to drop a service… I also wanted to run something myself and possibly build on top of it. I had contemplated moving to…
I wanted a simple backup of some OpenEBS volumes. Why not just copy them out. Why bother I run a number of things on my Raspberry Pi kubernetes cluster that require storage. The main one I actually care about is my fathom instance. It has the website analytics for my site joshkasuboski.com . It’s certainly not the end of the world to lose this information, but I’d really rather not.…
I have my beer can working as a buy button, but what if you want to add products to a cart first. But Why If you’re trying to sell things easily (and cheaply) you can connect Stripe directly to a product page. You can see an example of this from the stripe beer money article. The main downside is that a customer would have to buy one thing at a time. We can add a cart, but still don’t…
Scanning the container images deployed to my cluster used to be manual. Now it happens automatically every night. 🐱🏍 How to Scan I use Trivy to scan container images. I wrote about scanning my GitOps repo for images earlier here . Basically, there’s a fancy grep that matches image: (<name>) and that name is sent to Trivy. My GitOps repo is on GitHub at kasuboski/k8s-gitops . It seemed…
I wanted to explore Stripe Payments, but didn’t want to mess with a server. You can see the result as the little beer can in the footer 😉. How It Works Stripe has a Checkout option where you redirect to their page and it has your product and a payment form. This means you don’t have to deal with PCI anything and basically just have to redirect correctly. They have a library to handle…
I want to start adding tests for this site so that I don’t break it 😢. htmltest is first. Setup htmltest I went with htmltest mainly because it’s just a go binary. I’ve seen other options in the past that required a Ruby environment and generally don’t like dealing with that. Installing htmltest into the current directory can be as simple as curl https://htmltest.wjdp.uk |…
I previously had been scanning images ad-hoc using Trivy. Now I can scan everything in my GitOps repo. The previous post about Trivy is here . Finding the Images to Scan Since I track all of my deployments in git at kasuboski/k8s-gitops , I can find all of the images from the files in that repo. For the simple case of just finding it from Kubernetes objects, I can use the command below which finds…
I wanted to have some peace of mind when running random container images. Trivy let’s me scan them for common vulnerabilities. Installing Trivy You can find the Trivy repo on GitHub at aquasecurity/trivy . Installing with Homebrew is just brew install aquasecurity/trivy/trivy . Trivy is written in Golang so you just need to get the binary. They also have a magic script you can use curl -sfL…
I wanted to add stats to a site, but I already capture them in a GitHub Repo. Let’s just pull from there. The Stats Repo I made a repo that pulls in stats ( kasuboski/stats ). It uses a GitHub Action I made for a Dev.to Hackathon that pulls post stats from Dev.to. The repo gets periodically updated with a stats/dev-to.json file. GitHub lets you browse the contents of files at…
I wanted to know when my personal site was deployed and decided to get push notifications. I make changes to my site locally and then push to GitHub so it is automatically deployed using GitHub Pages. I went over that in Deploying this site with GitHub Actions . After I pushed though, I would often have to keep checking to see when it should be available. Now I get notified. Setting up Pushover In…
I set up my Raspberry Pi cluster to be accessible from the internet without configuring a port-forward on my router. Tailscale Tailscale will create a private network using Wireguard . Wireguard isn’t really that difficult to configure on its own, but you do have to manually generate and distribute keys. Tailscale will take care of that for you and they also have some fallbacks for difficult…
I got tired of editing my resume in HTML and then printing a PDF from Chrome. I now use GitHub Actions and a json resume to generate both formats. Defining a JSON Resume There’s a jsonresume project that defines a JSON Schema for a resume. You can find the schema repo here . I wanted to define my resume like this so I could easily generate multiple formats of it. My file can be found here .…
I got my desktop mounted in the rack and added wheels. It’s really moving 😏 You can see the previous server rack start here , where I had just gotten it. Making it mobile Moving the rack back and forth was pretty rough. It was definitely scratching the concrete and since I was planning to put my desktop in, the rack was about to get much heavier. The rack I purchased came with a…
I had to manually apply changes to my cluster, but now a lot of it is controlled from git thanks to ArgoCD. Managed with a cluster repo The cluster state is kept in kasuboski/k8s-gitops . Each folder is a different function for the cluster. The gitops folder is special. It has the ArgoCD manifests and the apps folder. ArgoCD will sync manifests from a git repo to the cluster. It continuously…
I kept track of how I set up my Raspberry Pi cluster along the way, but hadn’t committed it to git. Today that changed. GitOps and the repo If you’re not familiar with GitOps, the people at weaveworks have a nice article . I pushed my setup to kasuboski/k8s-gitops . It should have everything that’s deployed on my cluster. Each folder at the top level is basically a namespace…
My cluster was falling behind the latest k3s version. Time to upgrade. Enter the System Upgrade Controller I basically just did the instructions linked here . It deploys the system upgrade controller into its own namespace where it won’t do anything yet. You have to give it some plans. It will read Plans in that same namespace and run the specified image. I used the plan linked above.…
My network setup was starting to be a mess of a corner. The natural thing to do is to get a server rack to contain everything 😉 The Mess The network corner was already a mess, but adding my Raspberry Pi cluster definitely didn’t help. You can see the following items if you look closely: Linksys Router 5-port switch for the Raspberry Pi cluster Raspberry Pi Cluster Raspberry Pi 3B+…
My cluster monitoring prometheus kept falling over because it was running out of disk space. After finally getting annoyed having to restart it, I decided it was time for persistent storage. I did have the local-path-provisioner running, but I didn’t feel great about using the SD card for general storage. I bought 2 USB drives to add to my workers. In hindsight, I probably should have gotten…
I recently had to remove a long gone helm release that left behind a bunch of resources. This conflicted when reinstalling, so I needed to find them. A magic command I’m mainly putting this here because it seemed non obvious to me. kubectl api-resources --verbs=list -o name | xargs -n 1 kubectl get -o name -l release=prometheus-operator That will find all api-resources that have the label…
I wanted to use fathom on my Raspberry Pi k3s cluster, but they didn’t publish a compatible ARM image. Not to be deterred I forked the repo and built my own. How does one build for multiple architectures easily Docker has a tool called buildx. It acts as a frontend to buildkit and allows building images for multiple platforms at once. I followed this guide to create a GitHub Actions workflow…
The cluster is alive and well and exposed to the internet 😱 In a previous post , I put out my plan for the cluster. I mostly followed along, but did end up getting this switch and these ethernet cables. I ended up with this set-up which is described in more detail below. Hardware and Monitoring The cluster is set up with Raspbian Lite on 3 Raspberry Pi 4 4gb boards. Raspbian Lite seems to…
A platform to deploy my self-hosted services onto with almost $0 recurring costs. Previously, I was running a few things on a Raspberry Pi 3B+. Mainly, Blocky as an ad-blocking local dns cache and some adventures with Home Assistant . A Kubernetes cluster will enable me to easily set up new things and have proper monitoring as well. Hardware Acquisition I bought 3 Raspberry Pi 4 4GB boards from…
GitHub pages is a free static hosting provider that unsurprisingly works well with a git workflow. It enables git push to deploy type workflows. This site itself is a static site built with hugo and deployed to GitHub Pages using GitHub Actions. GitHub Pages Repo GitHub Pages expects that you have a repo named something like user.github.io that has static files you want deployed. However, if your…
Dark Sky is discontinuing their API and Android app after joining Apple . It was my favorite weather app, both from a data and UX perspective. They apparently aggregate from many different sources to have the best predictions and world wide coverage. I’m not sure I actually need all of that and am curious to make my own solution. Making my own app This seems like a great opportunity to learn…
I’ve made use of Google Saved Places for a while now. I have the standard ⭐ “Starred”, 🚩 “Want to go”, and ❤️ “Favorites” lists as well as some specific to cities. Saved places is really convenient when you’re deciding where to go. My want to go list helps me remember the places I want to try and the favorites list often…
I use Feedly to manage my content subscriptions, which include a number of bigger sites and personal blogs. Feedly is nice, but I would like to be able to save and use the data from there in other ways. So, I’ve been looking for an open source setup that I can tweak. I’ve been trying to utilize IndieWeb pieces more and more. Their why really resonates with some of my frustrations with…
A now page inspired by Derek Sivers’ My current interests are: Decentralized Services Self Hosting Quantified Self IndieWeb My Tech Setup is: Pixel 4a 2020 M1 Macbook Air Custom Desktop (Ryzen 5 1600, 32gb, 1060) You can find more on my kit.co profile
Kubernetes is a great way to deploy your services in a scalable and reliable way. However, it’s a pretty complex system to manage yourself. Thankfully, cloud providers are offering managed versions where you only pay for the worker nodes. We’ll use GKE , Google’s managed kubernetes offering, to deploy a cluster so we can test out kubernetes. We’ll use Terraform to make sure…
Hi there My name is Josh and I’m a software engineer. I work on all manner of things across mobile, web, and backend apps. Right now, my main interest is improving the developer experience and making development more accessible to take code from laptop to production. This involves making pipelines, eliminating boilerplate, and sending messages to make sure it’s painless to deploy your…