Saturday Morning Geeking: And So It Begins
Been quite some time I posted anything here. Anyway I’ve started work on a personal coding project and it occurred to me might be useful / fun / get-something-out-of-my-yearly-Wordpress-subscription to write about how the project progresses. Finally, there’s the (probably vain) hope that starting a thread about the project will induce me to keep working the project. And hope is a fundamental aspect of programming, as anyone who has ever deployed to production can tell you, so here goes …
What is the project about? 2 things: My wife Kim (String-Or-Nothing) is an expert in textile arts like embroidery and knitting. Way, way back in the day I did a site for her, wiseneedle.com, that was a searchable catalog of yarn reviews. The data for that site is long-since sold, but we’ve often chatted about doing another textiles-related project. The second part comes from me recently taking a seminar at Google Cambridge where Google folks presented their latest cloud services and APIs. The machine-learning stuff got me thinking, and looping back to the textile-arts thing, I thought maybe there’s a fun learning opportunity here. So the overall goal of the project is to use Google Cloud and their APIs to make a site for some textile thing, that also uses machine-learning. I know you all thought that was were this was going from the start, right?
What do you need to start such a thing? past few years I’ve been doing a lot of Ruby on Rails, so that’s going to be my main framework. And I said I wanted to use Google Cloud Platform; you get an account with $300 credit and access to bags ‘o APIs. However, while tis all well and good to ordain yours tools and your platform, getting the twain to meet is another matter. Google has lots of ways to deploy and run stuff: App Engine, Kubernetes, and Compute Engine; here’s an overview for using these with Rails.
Scanning through the options, I wasn’t super-enthused by any of them. Well, as most coders will tell you, you Google enough you’ll find an answer. the answer I found is called Nanobox. Billed as “PaaS V2” it struck me as not unlike Heroku, a PaaS I was familiar with from my last job. This tutorial, on using Nanobox to deploy a Rails app to Google Cloud I was able to read in about 3 mins. In my experience that means I could probably complete and verify the actual steps in about 3 hours. Anyway what Nanobox does is it layers on Google Compute Engine (an IaaS service similar to AWS EC2) a deployment model that allows you – or , me – to de isolated from details of what VMs, what storage, what load-balancers, etc. are needed for your app. Well, I am all about isolation, so at about 10:30 I started in …
Long story short – it worked! The only hitch was, while I created a role for Nanobox to use that had all needed Compute Engine permissions (it had to create a lot of stuff on my behalf), I hadn’t enabled the Compute Engine API in my account. It in fact took a little digging to determine that was the root cause of stuff not working. Well, after fixing that Nanobox deployed “all the things” as we say and my Hello world app was running.
Next time … the wonders of Facebook plus OmniAuth. Booyah!