Improving UX with Makefiles

Recently I updated the code for this website to use Makefiles and rely less on one-off shell scripts. The reason for this change was to improve my write-test-release workflow. I figured make is available on all of my computers and it serves as a perfect minimal orchestration tool. I now type make deploy instead of ./deploy.sh to push a new version of my website up to production. While this may not seem like a lot, it reduced the number of files in my directory. ...

October 27, 2015 · 3 min · 541 words · Scott Brown

Terraform File Organization

At Unbounce, we have recently started using Terraform for creating our AWS infrastructure. It is working well for our needs but it does have some sharp edges, which is expected as it is a young project. The other configuration tooling we use is Cloudformation, and we provide its templates to the software development teams to use because its commands are fairly simple (and documentation is plentiful). Until our team can come up with a good user experience when working with Terraform, we will keep it for our internal infrastructure projects. That being said, we have put together some best practices for working with Terraform and keeping its scripts organized. ...

October 24, 2015 · 6 min · 1201 words · Scott Brown

Simple Per-User Bash Profile Configuration

While creating Ansible scripts to automate the configuration of servers, I frequently stumble across an issue where I need to setup a user’s profile on the server that has a custom path. The issue that arises is that the .bash_profile file is a single file where any number of PATH exports can be provided. Any step in a provisioning tool like Ansible should be aware that this only adds state. I have seen other DevOps workers use modules like lineinfile, which I abhor because you can never be certain that the module will work. You will always ask yourself, “did the PATH on line 5 get set correctly, or did someone change one character (or perhaps add a comment) that now breaks the lineinfile module task?” ...

November 6, 2014 · 3 min · 483 words · Scott Brown

More Freedom with GNU Stow

In honour of our friends down South celebrating their independence, let’s look at installing a local version of ruby onto a POSIX machine without requiring wrappers like rvm or rbenv. We want to be free to install things where we want, when we want, and how we want. Now that’s true freedom. Install GNU Stow Okay, you are going to need to install stow system wide for this step. This requires administrative permissions. I promise it’s the only thing. ...

July 4, 2014 · 3 min · 525 words · Scott Brown

Allowing Java WARs to Play Well with Others

You’re a software developer or an Operations person that is working with a Java application. Here are some questions for you. Do you have a WAR that you need to deploy? Do you know if it comes to you preconfigured or a blank slate? Do you know what happens if you deploy the WAR to an application server and not realize that it is preconfigured? I’ve now seen this many times and I’m here to get up on my soapbox and say something. Java was originally intended to be write once, run anywhere but I have repeatedly seen where the configuration is embedded within the WAR container. This embedding now renders the WAR file useless to run anywhere but the exact machine/platform/environment where the configuration is for. ...

June 6, 2014 · 3 min · 552 words · Scott Brown

Simple Scripts Are Better

I’m currently building my new product, Storigible, and where I get stuck is the marketing component of the website. Specifically, the difficult part for me is getting the design right because I don’t see myself as a designer 1. All of that aside, what I’m writing about today is the usage of shell scripts versus more complex scripts to automate things like deployment. Storigible’s marketing website is a static website served by Amazon S3. I created it this way because the marketing component can be fully decoupled from the application component (which resides at another subdomain). I needed a good way to deploy the website files onto S3, which is basically saying, I needed a good way to upload the files to S3’s server. Deployment isn’t much more than a simple copy when you are dealing with a static website. ...

March 26, 2014 · 4 min · 783 words · Scott Brown

Quickly Validating a Load-Balanced Website Architecture

I am in the process of consolidating a number of websites that I use into a smaller set of servers. This is partly being done to reduce costs as well as support less resources, but it also provides me with a chance to try out new things. In particular, I wanted to test out a load balanced architecture that will work within any VPS environment. Before I begin provisioning “real” servers and having companies bill me, I wanted to test that my ideal architecture works. I’m using the word “real” here to denote servers that will be public-facing and acting in a production-like capacity, as well as incurring billing charges. ...

February 2, 2014 · 7 min · 1310 words · Scott Brown

Making Ansible and Vagrant Play Nice on OSX Mountain Lion

Here I was learning the ins and outs of Ansible so that I can provision my Vagrant installation with a modicum of scripting, when lo and behold it decides to abruptly fail on me. Searching around the Interwebs using the error I received didn’t help much, except to tie bits and pieces together. So I’m writing this in case (a) I ever forget the issue again, or (b) someone else gets tripped up on this. It isn’t in Ansible’s docs, so I’m guessing they are a Linux-only shop. ...

August 30, 2013 · 1 min · 200 words · Scott Brown