devops Posts

Setting up SSL on your site with Cloudflare.


You've got a new site on that is basically at the end of its development stage, and you're preparing to go live. You've decided on Cloudflare to host your DNS. Cloudflare is a good choice for smaller sites, and I recommend it often. Is has a few things going for it -

  • It has a free tier, which gives you pretty much everything you really need for a personal or small business site.
  • it has a very robust and modern global network.

One of the main features that a... from scratch, part 0 - explaining Platform as simply as possible.

Hello, and welcome to " from Scratch". In this prologue to the series, I'll go over some of the very highest level concepts of so that you'll have a clearer understanding of what this product is and why it came to be. is a "Platform as a Service", commonly referred to in this age of acronyms as a "PaaS". The platform that we provide is essentially a suite of development and hosting tools to make developing software applications a smoother end-to-end...

My pipe dream for syncing files between environments


We recently migrated from using a local Drupal filesystem (Gluster) to using S3 to house our uploaded site assets. This was relatively simple, and killed at least two birds for us, metaphorically speaking. Some of my findings are chronicled in the previous post linked above.

We are loving that we don't have to worry about syncing files between environments anymore, which means that when we are developing a site locally, the image sources are all pointing to their S3 URLs and...

Drupal logstash syslog config

This one really took longer than it needed to.

If you're here, hopefully you've already been through this lesson on setting up the full ELK stack with Logtash-Forwarder thrown in to boot. For me it pretty much ran as intended from top to bottom, so hopefully you're already getting data into Elasticsearch and are flummoxed by how every single other logstash config out there to parse your syslog data doesn't seem to do the job and is still just treating it like every other syslog...

Memcached - a really interesting piece of gear

So this is just another letter to my younger self, straightening out some mental inconsistencies with how I used to think Memcached worked. Much of this will be in the context of Drupal, since much of my work experience is in the context of Drupal. Memcached is obviously not a Drupal specific construct though.


The first time I ever installed it was at the behest of my senior dev, who suggested just installing it on my laptop and giving it 64M of memory. Drupal is slow as...

Intermediate Drush Hacking - Drush Aliases

There are other articles on this topic around the internet, but for some reason I could never completely make the mental connection on how Drush aliases worked until recently. It's actually really simple to get started, but most other articles tend to throw all the options into their examples so it kind of muddies the waters when you're trying to set yours up. By "you/yours", of course I mean "I/mine".


My work is an Acquia hosting client, and we have a multisite setup. Aliases...

What is my $PATH?

I remember being very confused by this one early on. There were boatloads of tutorials on how to change your $PATH, but what that even means in the first place I just kinda had to figure out over the course of it all. It's actually pretty simple. Here's my attempt.

If you're coming from a Windows background, and you were in the habit of being really fussy about where you installed software on the hard drive, you may have just known how to fire up any old piece of software on your system....

Setting up JMX on Mule ESB

The goal - trying to setup Datadog monitoring of a community Mule server that we have. Using configs from the old server weren't working so I had to learn more about Java infrastructure than I intended. It's simple, but it took me several hours of Googling. Basically you do this --

But dudeman's code is broken, presumably because dzone autolinks everything in that xsi:schemaLocation block. I changed the host to and the...

Brain Dump - Drupal and Fastly


Fastly is a CDN (content deliver network). A CDN makes your site faster by acting as a caching layer between the world wide web and your webserver. It does this by having a globally distributed network of servers and by using some DNS trickery to make sure that when someone puts in the address of your website they're actually requesting that page from the nearest server in that network.

$ host is an alias for...

The absolute bare minimum you need to know on the command line

GUIs change, but the command line is eternal. Memorize these 5 commands and a long and happy life awaits.

$cd change directory. This is how you move around the file system. $ls List, or tell me what's in this directory. This has a huge list of useful modifying flags, such as -l (long, tell me the size, ownership, and permissions on each thing in here too), or -a (all, as in, show me hidden dotfiles as well) $mv Move, this is how you move something from here to there. This is...

Cool Nginx feature of the week

Nginx configs

So I recently had a couple of seemingly disparate tasks come across my desk. We recently launched a HMTL mobile app, an Angular front end to our Drupal sites. We decided to completely decouple the mobile app from the Drupal codebase after a fairly long exploratory period trying out different approaches.

When launch day finally came, we set up the mobile app at app.$, with our main sites at www.$ Acquia has this cool feature in their Varnish layer that...

Where is the Homebrew Memcached config file?

I've finally been getting around to using Redis for caching on this blog and other Rails projects I've got laying around, and I've finally gotten around to Homebrewing PHP 5.5 to use for my local set up at work. Jose's default PHP 5.5 brew doesn't install the new Opcache, so look around and make sure you install that version because it screams.

I guess you could fairly say that caching has been on my mind a lot lately as I also finally got around to installing and using Memcached here in...

Compiling Nginx

Because I have to look this up every. single. time.

pcre ---

apt-get install libpcre3 libpcre3-dev

zlib ---

apt-get install zlibc zlib1g zlib1g-dev

init script

#! /bin/sh

# Provides:          nginx
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the nginx web server
# Description:       starts nginx using start-stop-daemon
### END INIT...

Getting up to speed with Rails 4 "russian doll" caching and Redis

Russian Doll caching

It's a well branded name for something that makes total sense after reading one blog post. The second half of this blog post will actually get you pretty much there.

If you're coming from a PHP/Drupal background like me, you might be surprised to find out that the database is not the bottleneck in Rails-land. Whereas on your typical Drupal page you might have anywhere from 50 to 1000 database queries being run, you'll be hard pressed to find a Rails app that comes...

Why doesn't 'authorized_keys' work?

For a while now I've been leaving my work computer on 24/7 and remoting in to do all my work when I'm out in the world. I have the same public key on both machines (perhaps not the safest thing in the world, true), so I was confused by why I needed to enter my password every time I logged in to my work computer. Not so confused that I took the time to figure it out until recently.

I had set permissions on the authorized_keys file to 400, but for some reason it needs to be 600.


First experiences with Drupal and HHVM

After reading the news about Fastcgi support landing in HHVM, I had to finally give it a try. I'll assume that you're at least familiar with HHVM and it's design goals, but if you aren't the HHVM wiki is a good place to start. In a nutshell, it's a new PHP runtime courtesy of Facebook that, if you can get it working, promises to run circles around any PHP interpreter currently on the market.

So I came into work on Wednesday fired up to give it a try. I wasn't expecting anything at all,...

A few things a Drupal dev should know about Ruby

Hi there, probably-front-end-dev-who's-met-and-used-Sass-and-likes-what-they-see. This is for you.


Sass is made out of Ruby - it's a very pleasant, general purpose programming language that's pretty easy to learn and like. Ruby has a package management system whereby libraries of Ruby code are bundled up into what's known as "Gems". Sass is a gem. When you install it, you get a couple of new executables to play with in the terminal, namely sass and sass-convert. The latter of...

Homebrew Postgres install issues, Mac OS X server

The program "postgres" was found by "/usr/local/Cellar/postgresql/9.2.4/bin/initdb"
but was not the same version as initdb.

I've been battling this for the last couple of hours, trying to figure out why I can't make Postgres run as easily on my desktop as I did on my laptop. Homebrew took care of it all, just leaving me with the agony of taking off the MySQL training wheels to figure out this new and scary Postgres admin syntax.

So I uninstalled the Homebrew version and went to the...

Nginx, Unicorn, Redmine, and my truncated attachment downloads

I'm the honcho in charge of our in-house bug tracker - Redmine. Redmine is a rather large Ruby on Rails project, thus nobody in house when I started here had any knowledge or interest in maintaining the thing, since Ruby servers have a bad rap for being kind of finicky to set up, at least in relation to PHP. So it goes.

I recently upgraded to the lastest stable release - 2.3.1 - and decided to 86 Passenger as our app server in favor of Unicorn. I've been setting up all my Ruby servers...

Finding that pesky Acquia host entry for your development environment

At my gig we host our sites on Acquia's dev cloud. The dev environment is pretty locked down, obviously, since you don't want multiple, publicly accessible copies of your sites floating around out there, especially when it could be in any state of brokenness at any given time. So the way we do it is to use .dev domains that aren't publicly routable via DNS. We have a big ole master hosts entry in the local network that takes any of those dev domains and routes them to the proper...

Converting mp3s to ogg files in the background with Sidekiq and FFmpeg

I have a friend for whom I'm building a site right now, and I chose Rails to do so. I think I'll probably reach for Rails for most sites I build until I get bored of it, which isn't going to happen any time soon. I also learned a few things about different browser's implementations of HTML5 audio, which I'll get into first.

My buddy is in a band, and so part of the functionality of the site is a photo gallery, and another part is a music player. Whereas in the past I'd have just reached...

Using the MySQL command line with Media Temple's grid server

I've been a Media Temple customer for a long while now, almost 4 years. The file system on my grid server is a timeline of my learning programming and systems administration. I mostly work on big-boy systems over the last 2 years or so, so my comfort level with working through SSH is pretty high now (much higher than working through GUI tools that want to hold your hand, actually). That's one thing that I always loved about MT - the fact that they give you a pretty decent command line...

Git and Dropbox

I've just recently started to discover what Dropbox is really good at. I've had one for at least a year and almost never used it. The only thing I'd ever really used it for was client assets like PSDs and the like. I just discovered the Dropbox secret weapon - the symlink.

A symlink (short for symbolic link), if you don't know, is basically like a pointer to a folder/directory. It's a really nifty way to help you organize your filesystem. Say you use iTunes and for some reason you like to...

How (and why) to set up your Mac for Rails development - part 1

The short version -

The longer version -

Setting up your Macintosh for Rails development is actually sort of like Rail development itself - you have to at least kind of know about a lot of different things before you can really get anywhere. I'd say I'm new to Rails development even though I've been poking at it since 2.1. 2.1 is the first version I remember after I first bought a Mac and started trying to teach myself to "program". It's taken me...

A quick trip to the panic room

I use Git. I'm relatively new to the party and it's all I've ever used. I tried to get SVN working for me back when I was first gettings started and it felt like hand-wiring a tube amplifier - slow, tedious, and you don't know if it's going to work until you're totally done. I've more recently taken on a client who uses a nifty issue tracker called Jira, but they have their source checked in to SVN. I thought I was going to to have to get familiar with it until I rediscovered a tool that...