Fri, Apr 5, 2013
We’re using and EBS-backed RAID10 array for MongoDB. This is the only way to get reliable iops on AWS at the moment. Start by creating the volumes. For this example I’ll be creating 5 volumes of 10GB each. EBS volumes can only be attached to instances in the same region and AZ as the volume. Once the volumes are created attach them to the instance. I’ll be using /dev/sd[i-m], though the sd is the only important part.

Sat, Mar 30, 2013

Another one I never remember the exact syntax for (nor how to spell privileges correctly). Simple thing - creating a user for MySQL and grant privileges. Less is more.

CREATE USER '%USER%'@'%HOST%' IDENTIFIED BY '%PASSWORD%';
GRANT %PRIVILEGES% ON %DATABASE%.* TO '%USER%'@'%HOST%';
FLUSH PRIVILEGES

Sat, Mar 23, 2013
You want to set a canonical address for your site. For example, I chose www.rabblemedia.net and I want rabblemedia.net to redirect to www.rabblemedia.net. Google likes this, though doesn’t care which one you choose. It’s a quick redirect for Apache or nginx, but I can never remember the syntax. Apache: <VirtualHost *:80> ServerName domainname.com Redirect 301 / http://www.domainname.com </VirtualHost> <VirtualHost *:80> ServerName www.domainname.com DocumentRoot /path/to/content CustomLog /path/to/logs/domainname.com/access.log combined ErrorLog /path/to/logs/domainname.com/error.log </VirtualHost>

Mon, May 14, 2012
I’ve been working a lot with nginx and Chef lately. As I work through applications I thought I’d share what I come up with - I’ll be posting a number of articles on how to configure nginx for various platforms -Phusion Passenger, Play Framework, and others. When I have the time I’ll put together the Chef cookbook, otherwise just the nginx configuration files. The first is for Passenger. I’ve written about installing Phusion Passenger before - with RVM and Apache on CentOS 6.

Thu, Apr 19, 2012
This is one of those things I always forget and spend half an hour poking around context, relationships, and nids. If you want to create a link from a field back to the originating content in Views in Drupal 7 you can add a field ‘Content:Path’ and throw it at the top. Exclude it from display and choose ‘Use absolute link’ under ‘Rewrite Rules’. Then, for the field you want to create the link for, go to ‘Rewrite rules’, click ‘Output this field as a link’, and use path as the ‘Link Path’.

Mon, Mar 19, 2012
I’ve used a number of different tools over the years for local development. Like most people, I started with MAMP. I didn’t like it, but I didn’t hate it enough to make switching worthwhile. I dabbled in Mac Ports, but never spent the time to learn it well. Lately I’ve been using VMware Fusion to run a linux server closely mimicing my production environment. It’s a pain, though, to keep permissions straight and it feels like a waste of memory.

Tue, Jan 31, 2012
Edit (2013/08/07): Debian now has an official account on the Amazon Marketplace and has Squeeze and Wheezy AMIs available. I haven’t used them yet, but will try them out for my next project. Recently I needed to create a “custom” AMI based on an existing Debian AMI. Debian links to some semi-official AMIs on their wiki- images created by RightScale and tom @ punch.net. I’ve been using the punch.net Squeeze EBS versions for a few weeks and been happy with them.

Mon, Jan 16, 2012
2013-03-23: This is an updated version of a post I wrote a little over a year ago. There have been some security issues with Rails in that time, and some updated versions of nearly all the software involved. Installing RVM Multi-user on CentOS can be a bit tricky. Here’s my documentation - mostly so I remember, but hopefully it helps someone else as well. A quick note - the people behind RVM are clear that tutorials outside their siteare not supported.