Beck’s Journey

Leaving the safe shores of C# for parts unknown...

Hello Beck!

Meet Beck.

This isn’t Beck the singer-songwriter or Jeff Beck the guitarist. This isn’t even Kent Beck the agile thought leader and creator of XP.

This much less famous Beck is a back-end C# programmer. He’s worked on high-volume mission-critical transaction-processing systems. He’s a proud practitioner of “test-driven development”, but for those in the know, his approach tends toward outside-in TDD or ATDD. He secretly covets BDD, but wonders if not using Gherkin disqualifies him. He also has ADHD, but that’s a different topic.

Beck believes in the Agile Manifesto. He gives a thumbs up to the SOLID principles, while privately wondering how many folks mean the same thing by “open-closed” or could use “Liskov substitution” in a sentence.

Beck’s a fan of DevOps — he’s experienced the joy of working in an environment with good CI/CD tooling — but while he’s benefited from that stuff, he hasn’t set it up himself. (This is bringing us closer to the point of our story.)

Another thing Beck hasn’t done is much front-end development. It wasn’t needed for his day-to-day, and the few things he did on the side were quickly out-of-date. WinForms, WPF, XAML, HTML, ASP, CSS, ASP.NET, ASPX (those last two are the same, right?), ASP.NET Core, HTML5, JavaScript, Silverlight, MVC, MVVM, Razor, IIS, Azure. And that’s just stuff that intersects the Microsoft space — we’ll get to the other guys later. All of those were potentially interesting at the time. Some are obsolete now. Some are downright disdained.

Yes, all learning is good learning… but for Beck there was never a compelling reason to devote spare time to learning those, as opposed to, say, guitar, or obscure history, or whatever.

One word changed that: Kubernetes.

We’ll kick off Beck’s journey next time.

Kubernetes changes everything

I introduced Beck last time. Today we’re going to learn why he decided to leave the comfortable world of C#.

One word: Kubernetes.

Beck wrote software that ran on beefy Windows VMs on beefy servers in corporate data centers. There were smart people who built and maintained those servers. Beck had no interest in learning their job. But from time to time he did think about the Big Idea. If the Big Idea struck, it’d probably need servers to run on. The thought of that hassle and expense threw cold water on his daydreams.

“But Dude! The Cloud!”, says the Voice.

Beck’s reply: “Yeah… but still, VMs, and patching, and load balancing, and, and… It still feels too Opsy and not enough Devy.”

“But dude…” The Voice drops to an excited yet conspiratorial whisper, “Kubernetes!”

A raised brow — “What is this Kubernetes of which you speak?”

“You write your service and put it in a container, which is like a light, maintenance free, micro VM. Kubernetes is this magical infrastructure that’ll take your containers, make as many copies as needed to handle load, scale up, scale down, etc. It handles the load balancing. You never have to think about servers again.”

“Whoa! The barriers are gone! Zero cost? The Big Idea has a chance!”

“Only catch is Kubernetes containers run Linux, but I suppose you could use .NET Core.”

“I’m going to take over the world!”

You’re Beck, aren’t you?

“Come on, man! You’re not fooling anybody. You’re Beck, aren’t you?”

Um, sort of… I too spent a long time in the back-end C# world, so Beck’s journey is my journey too. What I realized as I started down a new path is that there’s a unique but fleeting perspective you attain as you approach an “Aha” moment. A misconception is cleared away. A missing piece clicks into place. You’ve got it. In that moment you both know and remember clearly what it was like not to know.

As time passes the learner’s perspective fades. The knowledge gets baked in. Being where you are doesn’t necessarily mean being able tell someone else how to get there, especially if it’s been a while.

So I created Beck to try to preserve the journey to “Aha”. He’ll be naive. His insights may be exaggerated for effect. And some of his exploits will be fictional. I hope this record of his travels will aid some future explorers in theirs.

Gonna get me some Kubernetes, but DevOps first

The wheels were turning in Beck’s mind. Kubernetes was the key. Whatever the Big Idea turned out to be, writing code to do stuff wouldn’t be the problem. He was good at that. The only question remaining was how to get it out there.

I mentioned back in the first post that Beck was a fan of DevOps, but he’d never set up a CI/CD pipeline himself. Well, it was time to change that. They’d used TeamCity and Octopus Deploy at work, so he figured he’d go with those.

“But,” he thought, “let’s make things a little more interesting.”

He decided to do this project on his daughter’s MacBook Air. The Voice had mentioned Linux and .NET Core. Well MacOS is some kind of Linux, right? And there was VS Code and/or Visual Studio for Mac, so that wouldn’t be a problem.

First stop: the Octopus Deploy website.

“Hmm… there is a free trial, but then it’s $45 a month. Can’t say that’s unreasonable, but this is just a learning project, and just the first piece of a much bigger puzzle. Is there something cheaper? Or even free?”

One of the top hits on Google was Weaveworks. Their site had a ton of good information about CI/CD for Kubernetes, and their product, Weave Cloud, had a free tier when used in conjunction with Google Cloud Platform (GCP).

The fact is, GCP hadn’t been on Beck’s radar. He’d been thinking about either Azure or AWS. But what the heck? Setting up the GCP account was easy enough. Hooking it up to Weave Cloud wasn’t bad. He followed some tutorials to get a simple Hello World app running on Google Kubernetes Engine (GKE), which is part of GCP.

…and here comes a tangent. The first one? Maybe. But definitely not the last.

On the way to that first Hello World, Beck learned:

  • That you can run Kubernetes locally with Mikikube.
  • That the default hypervisor isn’t optimal, but you can tell Minikube to use a better one.
  • What a hypervisor is.
  • How to install things like hypervisors and minikube on a Mac using homebrew in a bash terminal.
  • That homebrew isn’t perfect, but “brew doctor” and Google-fu can get you there.
  • That you should use sudo.
  • That you shouldn’t use sudo.
  • That the cool people shorten Kubernetes to k8s.
  • That containers have been around longer than k8s. Docker is the big player when it comes to containerizing things. K8s makes managing containers easier, but you still build them with Docker.
  • And that you should delete your GKE cluster when you’re not using it so as not to waste any of the $300 credit Google gives new customers.

As this post draws to a close, many things were done, but…
There’s still no CI.
There’s still no CD.
Is Beck any closer to his goal?
What is his goal anyway?

We’ll get into that next time.