This Week, In Brief
Highlights
- I set up this site (retrospectives.carlosnunez.me) in 30 minutes with
https-hugo-bloggen! Last
time I tried to stand up a blog from it, it took an hour. Very happy about
this.
Goals
- Kubernetes Developer Platform: Finish control center state management component
- Kubernetes Developer Platform: Start creating clusters through providers
- LinkedIn Learning: Get Learning Docker and Docker: Your First Project
Approved
Goal Grades
- Result: It got finished!
- Grade: A
Kubernetes Developer Platform can now keep track of control centers in lightweight state files! I
thought this would take a while due to unknown nuances, but I was pleasantly
surprised when it didn’t.
- Result: It’s started…mostly.
- Grade: B+
I got Kubernetes Developer Platform creating clusters through a simple
Kind provider, but had trouble getting the cluster
names to be correct. This was slightly frustrating, especially since it takes
quite a while (1-2 minutes per cluster) to get these end-to-end tests to pass.
LinkedIn Learning: Get TOC’s Approved
- Result: They’re approved, and I’ve created my script development schedule!
- Grade: A+
It took A WHILE to get the schedule done and dusted on my physical and Trello
boards, but it’s done!
I’m also happy that I got this course approved. I’m really excited to begin
recording it.
Other Thoughts
Scaffolding actually works
Kubernetes Developer Platform is a developer platform I’m writing that makes it easier to deploy
applications into Kubernetes without needing to learn Kubernetes. I’m writing
it entirely in Bash to maximize the number of contributors that can help scale
and improve it.
Because Bash was the langauge of choice here, I spent the first two weeks of
this project on nothing but scaffolding. By “scaffolding”, I mean:
- Creating libraries for stuff that I’ve needed to DRY in past projects, like
logging, option parsing, etc.
- Figuring out how configuring Kubernetes Developer Platform will work and building a library to
manage how it is read,
- Building the test framework,
- and more.
It’s been paying off IN DIVIDENDS for this project.
Generating consistent logs throughout the project couldn’t have been
easier. I can throw log_verbose
statements pretty much anywhere in the
codebase and see what’s going on through each component.
However, where it’s REALLY paid off is anytime I’ve needed to interact with
YAML anywhere.
Developers interact with Kubernetes Developer Platform primarily through things called “Orion’s
Belt specs.” They are similar to using Docker Compose manifests, but with more
defauls and fewer options. These are written in YAML, because that’s what The
Industryâ„¢ has decided upon.
Because this is the chief interface by which things are created and configured,
there’s lots and lots of YAML querying going on. Writing the commands for all of
these queries would have been an ABSOLUTE PAIN without the yaml.sh
library I
wrote during the first two weeks, and validating that everything is working
correctly would’ve been downright impossible without bats
and bats-mock
.
It was slow to start because of this, but like I predicted back then, I’m
getting a lot of speed now. It took me a month to get the schema validator
component done, but less than a week to create the cluster creator component.
Everything takes WAY longer than you think it does
I wanted to find a Trello CLI to automate creating cards for my new Learning
Docker course. Given that Trello has a really accessible
API, I thought there’d be
an ocean of options to choose from.
Well, there weren’t.
Witness how a task I thought would take 30 minutes took four friggin' hours
and cause minor havoc over my schedule:
- Find a Trello CLI (because the Trello API is so well documented…it must exist!)
- Discover that the pickings are incredibly slim
- Try and find a Trello CLI that has a Homebrew recipe
- Found
wrk
wrk
requires Java…great.
- Download openjdk@18.
- Try to set JAVA_HOME.
- After finally getting JAVA_HOME set, I discover that
wrk
doesn’t work with Java 18
- Read the source…find nothing
- Try installing openjdk@11 intsead.
- Now I have multiple versions of Java, so I need a version manager for Java. Fucking fantastic. Should have quit here.
- Install
jenv
and modify my dotfiles to configure it.
- After getting everything up and running…discover that
jenv
doesn’t take effect in your current session (which is LTIERALLY THE ENTIRE FUCKING POINT OF A VERSION MANAGER?)
- Update my alias for
wrk
to use JAVA_HOME at openjdk@11. That doesn’t work either.
- Browse issues.
- Learn that the error is due to a change in how Java does modules that took effect after Java 9…great. So now this thing is ancient and I need Java8.
- Can’t install Java8 on ARM. No Homebrew cask for it, and it won’t build from source. REALLY SHOUDL HAVE STOPPED HERE.
- Quit trying to make
wrk
work (ironic). Try to use trello-cli
.
- There’s only one Dockerfile for this tool (HOW?), and it requires more setup than I want, so I create my own Dockerfile.
- Spent ten minutes getting
trello-cli
in Docker working nicely with my alias.
- Got the alias working, authentication working, and the CLI working!
- Try moving some stale cards in my list…
objectId not found
- Look at source (again)
- Nothing on this issue
- Furiously give up, as I’ve just spent four hours trying to do what I thought would take 30 minutes and have basically nothing to show for it.
In the end, I landed up writing my own lightweight
wrapper
around their API documentation because, crazily, that was faster than trying to
not reinvent the wheel.