Setting Up a K3s Raspberry Pi Cluster with Ansible

Introduction In today’s world, the Raspberry Pi is not just a tool for hobbyists, but a robust, cost-effective, and scalable solution for a variety of tech projects. But have you ever wondered if there’s a way to harness multiple Raspberry Pis to operate in unison, multiplying their combined computational prowess? Welcome to the realm of Raspberry Pi clusters! In this guide, we’ll embark on an exciting journey, setting up a Raspberry Pi cluster comprising three nodes: one master and two workers....

September 1, 2023 · 8 min

RESTful Design: Best Practices with a .NET example

Introduction This is yet another blog post about how to build a REST API, however from my perspective and focusing on using Microsoft .NET technologies. Guidelines Consistency - While it’s not essential to adhere strictly to particular standards, it’s crucial to maintain consistency in your approach. Follow the OpenAPI spec, either generate the OpenAPI spec from your API or write the spec and generate your API. Having an OpenAPI spec means a client can be generated, documentation can be generated, contract testing tooling can be bootstrapped and more....

August 14, 2023 · 5 min

Using Docker Multi-Stage Builds to Optimise your build pipeline(s)

Quite recently I discovered the power of using multi-stage docker builds with the output argument. This was significant because it enabled me to remove a lot of duplication that occurred between my Dockerfile build process, and the processes that I ran on my build agents helping towards making a 75% time saving on a process where I wanted to get quicker feedback, the release and pull-request app build. My process looked something like this:...

March 9, 2023 · 4 min

Verticle Slice Architecture

Introduction Often we build abstractions into our projects around technology layers i.e. web, business, domain, data, etc. However this shouldn’t be our primary concern, it’s a secondary concern. We should focus on functional units of work, and we might choose to split these functional units of work by their respective technology layers, however not all functional units of work need to use the same underlying architecture. We want to primarily decouple features so that we’re able to scale in a way that can be supported by our organisational structure....

January 27, 2023 · 4 min

Common Vulnerabilities and Exposures (CVE) Detection

Introduction You might not be aware, but you could be at risk of a security incident due to a third-party library or component within your codebase having a vulnerability. This article will help you detect security vulnerabilities in third-party libraries using a free-to-use tool called Trivy. I’ve created a repo to demonstrate scanning a few types of apps here https://github.com/jtbuk/CVEDetection, it has a .NET app, and an angular spa, both of which run in docker, Trivy will scan the docker images, npm packages, and NuGet packages and we use the output to send a formatted slack message containing the results....

January 14, 2023 · 6 min

Setting up a reverse proxy for a better developer experience

Introduction Are you fed up with using localhost and a range of different ports when developing locally, having difficulty with testing content security policies, having to configure TLS for a range of different server applications, and using different URLs when running applications on your laptop natively vs in docker? Using a reverse proxy can solve all of the above. You can clone the code I’ve written for this article via this GitHub repository....

December 30, 2022 · 5 min