Contents

Why You Should Never Experiment with 3 New Tools at Once- My Adventure Deploying Kasm on Google Cloud with Terraform

Contents

This idea first came about when my niece asked me how she could play Roblox on her school Chromebook since that’s the only laptop she had. That was like three years ago, and honestly, I kinda forgot about it until recently. Safe to say, I eventually got around to it.

I somehow got $300 in Google Cloud credit. Never used Google Cloud before. Thought maybe it’s a good excuse to mess around and try something new. I bounced around a few ideas at first. I really wanted to try setting up some type of cloud gaming thing, that’s been a project I’ve been meaning to figure out for months now. But turns out, with the free trial you don’t get any GPU access, which basically made that idea dead before it started.

I thought about doing some AI stuff too but nothing really excited me enough to dive in. Plus, I still have a lot to learn there.

As an IT project manager, I like understanding all the moving pieces that go into projects, especially infrastructure. So I said screw it, let’s make this complicated for no reason. I’ll try Terraform for the first time, I’ll use Google Cloud for the first time, and I’ll finally figure out a way to help my niece three years late. Originally, years ago, I was thinking about setting up a Guacamole server with some VMs she could remote into. But technology moves fast. Lately, I kept hearing about Kasm Workspaces and figured it would be even better.

So the chaos began.

First time logging into Google Cloud’s console, absolutely terrible experience. Horrible UI. I didn’t understand where anything was. Maybe it’s because of the trial version, maybe not, but either way I couldn’t stand it. I lasted maybe five minutes before I said nope, I’m downloading the SDK on my Mac and doing this from the terminal. Way easier to deal with once you get it set up.

I installed Terraform using Homebrew and started building out the main.tf file. Originally I thought this would be like a nice, quick Sunday night project. Two hours max. Instead, it turned into a two week odyssey.

Everything that could go wrong, went wrong.

First, I had issues getting the service account set up right for Terraform to even talk to Google Cloud. I couldn’t figure out how to download the JSON key file at first. Then I hit permission errors when trying to spin up resources. Then I realized the VM I made didn’t even have enough RAM and was crashing Docker containers before they even got a chance to start. So I had to tear it all down and rebuild it again with bigger specs.

And yeah, everything from spinning up the VM, to installing Docker, to deploying Kasm itself was done through Terraform. I didn’t SSH in and install anything manually like a peasant. The whole point of this was automation.

Eventually, after a lot of trial and error, I got Terraform to successfully build everything. VM spun up. Docker installed. Kasm containers running. Felt like I conquered Mount Everest.

But of course, it wasn’t that simple.

When I first tried to access Kasm through the browser, the login page loaded but every time I tried to open a workspace it would get stuck on “Creating Secure Connection.” After a ton of troubleshooting, I figured out it was a TLS issue. I was tunneling the server through Cloudflare, and there was some mismatch between the SSL settings. Had to adjust the Cloudflare Tunnel configuration and disable some strict checks temporarily to get it working.

After that, the Kasm UI started working but I ran into another problem.

I could only launch one workspace at a time. And Kasm kept throwing weird resource errors. I was confused because every guide I found online showed people launching a bunch of sessions at once with no issues.

Turns out I was reading old documentation. Newer versions of Kasm, like 1.16, use Pools and Docker Agents. And my Docker Agent wasn’t properly linked to a Pool. Once I figured that out and connected them the right way, everything finally started working the way it should.

A couple hours of extra testing later and boom, Kasm was running smooth.

All five of my nieces and nephews were able to log in and mess around with different apps and games. If anyone asks from a legal standpoint, this is all completely hypothetical, obviously. lol.

Looking back, biggest lesson learned is do not try to take on three completely new tools at once. Between Google Cloud’s weird quirks, Terraform’s steep learning curve, and Kasm’s evolving setup guides, I was troubleshooting like a madman every step of the way.

Next time I’m only going to introduce one new thing into a project at a time. It’s just not worth the headache otherwise.

Overall, Google Cloud was okay but honestly, I still prefer Digital Ocean for the simplicity and AWS for the massive range of services. I doubt I’ll continue with Google Cloud once the free trial ends.

But on the bright side, this whole experience made me fall in love with Infrastructure as Code. I’m definitely going to start doing more Terraform projects moving forward.

Thanks for reading. And if you’re thinking about trying Google Cloud, Terraform, and Kasm at the same time… maybe don’t.

Thanks for reading,

Seif Juban

Contact Me

Want to connect? Whether it’s about a project, collaboration, or just to talk tech, feel free to reach out.

[email protected]

LinkedIn