KUBERNETES RASPBERRY PI LAB ENVIRONMENT SETUP USING ANSIBLE
After manually setting up a Lightweight Kubernetes cluster on a few of my Raspberry Pi’s I decided to tear it all down, and rebuild it from scratch using Ansible, and an infrastructure as code strategy.
This gives me a chance to catchup a bit on ansible, and keep my documentation and notes for this project in a replay-able Github repository. The project at the moment is rough, and contains sensitive details; however, this is a local lab environment that will most likely be trashed later on, so I’m not worried.
RASPBERRY PI KUBERNETES CLUSTER
I figured now the perfect time for me to explore the lightweight Kubernetes project k3s.
The documentation was really solid, plus I found Alex Ortner’s Medium blog post very helpful.
I dusted of a Raspberry Pi 4, and three Raspberry Pi 3’s for this setup.
I’m still in the mists of my kubernetes journey, but I wanted to share some of the early primitives, and some of the notes I’ve written for myself.
DECIPHERING NOSTR AND IT'S PRIVATE KEYS
I’ve heard of https://nostr.com for about a year, but not until recently have I experimenting with it.
This post consists of my rough notes as I progressed to sending a nostr message. If you are interested in a bare minimum way to post events to nostr, read on.
Generate a new private key
$ openssl ecparam -name secp256k1 -genkey -out ec-priv.pem
The output here as the file extension notes is PEM:
RASPBERRY PI PICO WIRELESS & CIRCUITPYTHON
Was lucky enough to get my hands on a couple Raspberry Pi Pico W recently, and just finished up initial exploration.
I started with a by flashing the CircuitPython .UT2
to the pico, like always Adafruit has a phenomenal write up on just that.
Next I added copied in modules from the 8.x bundle, simply toss the following into your pico’s /lib/
directory:
$ ls -1 /Volumes/CIRCUITPY
boot_out.txt
code.py
lib
$ ls -1 /Volumes/CIRCUITPY/lib/
adafruit_httpserver.mpy
adafruit_requests.mpy
I also needed a .env
file for wireless connections.
RASPBERRY PI PICO AND 433MHZ DATA RADIO
Well its been a minute since I’ve toyed around with electronics, but a $4 Raspberry Pi Pico board arriving in the mail changed that.
This board packs a boat load of utility for $4, just check out the data sheet and check out all them I2C and SPI pins!
I dusted off the last components I tinkered with, along with a handful of wires. After a couple days of tinkering, I ended up with a 433MHz radio packet receiver.
UNITY USER INTERFACE AND DIABLO STYLE INVENTORY
Well seems I forgot to share the most recent demo of my Unity project, I’m taking a break on it, but what I managed to accomplish makes me feel all warm and fuzzy.
DIABLO RPG STYLE INVENTORY SYSTEM IN UNITY
This weekend felt like a good time to tackle something new.
After successfully prototyping a 3D Disc Golf Game , and then a Game of Life-Simulation , I wanted to explore more of the user interface side.
I decided to build an Inventory management system, also decided it best to create a new project, this way I can build the Inventory as a re-usable module for more than one project.
It didn’t take much time for me to decide on a Diablo-style inventory where each item needs to fix within like a puzzle piece.
A GAME OF LIFE IN UNITY
Took a little break from my Disc Golf Game to do a bit of AI programming in Unity .
What I ended up with was a simple Game of Life with rabbits trying to survive. Each rabbit has a growing hunger and thirst which if not addressed will result in death. The population is also broken into male and female rabbits which can reproduce.
Check out a couple minutes of the simulation running at realtime speed:
3D DISC GOLF GAME IN UNITY PART 2
Put a little bit more effort into my Unity Disc Golf game. I’ve now got ambient sounds and footstep, plus throwing is much easier with only a single click input.
3D DISC GOLF GAME IN UNITY
Still working with Unity and Blender, now I’m use some of the knowledge I’ve gained to construct a physics based disc golf game.
At the moment I have 3 settings that effect the disc in flight ( fade , lift and power ), these settings can be seen at the lower corner of the screen, and can be changed using keyboard inputs. My thought is to use these as thresholds on different disc, then implement some sort of click game on each throw.