Architecture

Advancements in software architecture with emphasis on serverless and cloud. Examples include Lambda functions, Docker containers, Kubernetes, Heroku, etc.
MySQL, Google Cloud, and a REST API that Generates Itself

MySQL, Google Cloud, and a REST API that Generates Itself

Deploy a MySQL database that auto-creates endpoints for itself.

It wasn’t too long ago that I haphazardly forced us down a journey of exploring Google Cloud’s cloud SQL service. The focus of this exploration was Google’s accompanying REST API for all of its cloud SQL instances. That API turned out to be a relatively disappointing administrative API which did little to extend the features you’d expect from the CLI or console.

You see, I’ve had a dream stuck in my head for a while now. Like most of my utopian dreams, this dream is related to data, or more specifically simplifying the manner in

Working With Google Cloud Functions

Working With Google Cloud Functions

GCP scores a victory by trivializing serverless functions.

The more I explore Google Cloud's endless catalog of cloud services, the more I like Google Cloud. This is why before moving forward, I'd like to be transparent that this blog has become little more than thinly veiled Google propaganda, where I will henceforth bombard you with persuasive and subtle messaging to sell your soul to Google. Let's be honest; they've probably simulated it anyway.

It should be safe to assume that you're familiar with AWS Lambda Functions by now, which have served as the backbone of what we refer to as "serverless." These cloud code snippets have restructured entire

Creating an AMI with HashiCorp Packer

Creating an AMI with HashiCorp Packer

HashiCorp's version control for infrastructure .

Why use Packer? Infrastructure as code has become part of the buzzword bingo surrounding operational teams and their desired optimal workflows.

One could theoretically just start with a base AMI and manually update it and then re-save it as a new AMI, but this process is not repeatable.  We can check in our desired infrastructure states as code to version control.  This is good practice for change control management.  We can readily see what worked before and what was changed in the latest update.  If something catastrophic happens or we encounter unforeseen issues, we can always rollback to a previous

My First Experience with Docker

My First Experience with Docker

Reboot EC2 instances with Docker.

We have a .NET application that has been running for years, but once a week, the application fails to recover and needs the server needs to be rebooted.  To preemptively reboot the EC2 instance nightly we decided to use Docker and ECS  scheduled tasks.

Here is what the finished Dockerfile looks like:

FROM amazonlinux:latest

RUN yum -y update
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python get-pip.py
RUN pip install boto
COPY ./win_reboot.py /root/
RUN chmod +x /root/win_reboot.py

CMD ["/root/win_reboot.py"]

ECS has a

Connect to your Google Cloud Compute Engine

Connect to your Google Cloud Compute Engine

Configuring SSH and file transfers in Google Cloud.

So you've taken a leap and decided to host your VPS on Google Cloud: let me be the first to congratulate you on joining the clearly superior cloud platform of our modern era. I would apologize for being so openly opinionated, but so far I've only stated objective facts.

Now that you've joined the club, you may have found yourself asking the inevitable: "how do I connect to my damn instance?" If you're like me, you're probably not the kind of person who enjoys this as their main solution:

Google Cloud's in-browser terminal.

Luckily for us, there are a few

Cloud SQL: Relational Databases on Google Cloud

Cloud SQL: Relational Databases on Google Cloud

Create a database in Google Cloud using Cloud SQL, compare Cloud SQL to RDS, and learn the admin API.

I've found that the strength of Google Cloud's services comes from consistently delivering across a few key metrics, namely reliability and performance. When dealing with SQL databases, it's hard to imagine any metrics more important than these two things, and Google's Cloud SQL delivers.

To become familiar with Cloud SQL, we're going to walk through the creation of a SQL database and explore the advantages Google Cloud offers us when compared to other solutions. We'll also be dipping into the Cloud SQL API to see how we might manage our SQL database programmatically.

Cloud SQL Versus Alternatives

There aren't many

Create a VPS with Google Cloud: Introducing Compute Engine

Create a VPS with Google Cloud: Introducing Compute Engine

Compare the advantages of Google's Compute Engine to other cloud providers.

I've been a big fan of Google Cloud Platform from the beginning, and they aren't even paying me to say that. A lot of critics place GCP far enough behind AWS and Azure that most people haven't bothered to consider the "third option," but this leaves much of the story untold.

We engineers love to compare hard numbers, and the number we compare the most in the cloud space tends to be the number of services. AWS has 10 million services to date, and will always win in this category. AWS also considers SNS, SQS, and Kineses to be three

Creating Your First Flask Application

Creating Your First Flask Application

After achieving market dominance, Flask is a Python framework impossible to avoid.

Evidence of Flask’s rise to power has been all around us for a couple of years now. Anybody paying close attention to the technology stacks chosen by startups has undoubtedly noticed a flip: at some point, the industry standard flipped away from Django entirely.

Huge bets are being placed on Flask across the industry. Plotly’s famous Dash product is an extension of Flask which has seen significant success. Even major cloud providers, namely Google Cloud, are choosing to default to Flask for Python implementations of serverless apps. Google Cloud Functions and Google App Engine both ship with Flask

Using Pandas with AWS Lambda Functions

Using Pandas with AWS Lambda Functions

Use Python's Pandas library in your AWS Lambda functions.

In one corner we have Pandas: Python's beloved data analysis library. In the other, AWS: the unstoppable cloud provider we're obligated to use for all eternity. We should have known this day would come.

While not the prettiest workflow, uploaded Python package dependencies for usage in AWS Lambda is typically straightforward. We install the packages locally to a virtual env, package them with our app logic, and upload a neat CSV to Lambda. In some cases this doesn't always work: some packages result in a cryptic error message with absolutely no helpful instruction. Pandas is one of those packages.

Why

Preparing your AWS Project to Build an API

Preparing your AWS Project to Build an API

Configure your AWS account in preparation for building APIs using AWS API Gateway.

There comes a surreal moment in nearly every profession in which perspective violently forces itself into our self-awareness. People with cooler jobs probably have that moment when they save their first patient or launch their first rocket. For me, the idea of building an API was this moment in software development. All those past black boxes which spat out results your life depended on: we can make those now.

Feel free to remain unfazed by this as I'm sure most are... for those of us who can't remember how they became an "engineer" in the first place, API design feels

MySQL on the Cloud with AWS RDS

MySQL on the Cloud with AWS RDS

Spinning up a managed MySQL database instance with Amazon RDS.

Last time we became familiar with the handiwork of setting up MySQL locally, navigating databases via command line, and exposing your database to external access. While badass, it has come to my attention that most people don't bother doing things this way. Unless you're getting deep into some heavy architecture, most people opt to use cloud services such as AWS to set up databases which are intended to be interacted with by multiple services.

A perfect example is one we ran into over the weekend while working on this very blog. We're running a Ghost instance, which is respectably complex

Starting a Python Web App with Flask & Heroku

Starting a Python Web App with Flask & Heroku

Pairing Flask with zero-effort container deployments is a deadly path to addiction.

It's difficult to cover every cloud solution on the market without at least mentioning Heroku. Heroku contrasts nearly every cloud hosting solution by offering a clear purpose: make deploying apps of any kind as easy as possible. Deploying to a VPS requires knowledge of web servers and configurations. Deploying to containers requires knowledge of Docker or Kubernetes. Deploying to Heroku requires nearly no prior knowledge of anything.

Heroku is great for getting MVPs out the door, or for devs who want to jump into developing web applications with knowledge of a specific language. Even developers with advanced knowledge of how

PREV