Home Lab: Part 1 - Cluster Setup

This article is part of the Home Lab series.

I recently setup a Kubernetes cluster home lab and wanted to do it the hard-way and share it with you. I setup a home lab so I could run my smart home software and learn more about different Kubernetes networking technologies. This blog post is broken up into several sections. Feel free to skip directly to the section that applies to you. When I started I had a few things already:

A precompiled almost-HAML engine in C#

Introduction This project is still a work in progress, so this article serves as an introduction to the problem space and walks through how the code works. In the past when I wrote different web applications, I used Ruby on Rails combined with the HAML template language. HAML is my favorite way to write HTML because it is an abstract representation of an HTML DOM combined with a hint of Python syntax.

Best Practices for Elasticsearch mappings

At first, Elasticsearch may appear to be schemaless since you can add new fields any time you want, but every field in a document must match the mapping. Dynamic Templates reduce boilerplate How many times have you opened up a mapping file to something like this where the same type definition is repeated over and over again? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "properties": { "foo": { "type": "keyword" }, "foo": { "type": "keyword" }, "foo": { "type": "keyword" }, "baz": { "type": "keyword" }, "other": { "type": "text" }, .

Query-level metrics for PostgreSQL/MySQL in Kubernetes with Packetbeat

MySQL and PostgreSQL can be a bit of a black box when running if you don’t take the time to configure metrics. How do you identify which queries are slow and need to be optimized? MySQL has the slow log, but that requires a time threshold to log queries that run for longer than >N seconds. What if you want to identify the most common queries even if they are fast?

Migrate Sprockets to Webpacker with React-rails

Ruby on Rails recently launched support for compiling static assets, such as JavaScript, using Webpack. Among other things, Webpack is more powerful at JS compilation when compared to the previous Rails default of Sprockets. Integration with Rails is provided by the Webpacker gem. Several features that I was interested in leveraging were tree shaking and support for the NPM package repository. With Sprockets, common JS libraries such as ReactJS had to be imported using Gems such as react-rails or classnames-rails.