Jeff Geerling's blog

Route local emails to another email address using Postfix on Linux

When I set up new servers, I like to make sure any system messages like cron failures, server issues, or emails that are routed to johndoe@example.com (where 'example.com' is the hostname of the server—meaning emails to that domain will get routed through the server itself and not hit an external MX server unless postfix/sendmail is configured correctly) are sent to my own email address.

It's relatively straightforward to route emails to internal users (like webmaster, root, etc.) to an external email address; you simply need to edit the /etc/aliases file, adding a rule like the one below, then run the command sudo newaliases:

webmaster: root

# Person who should get root's mail
root: youremail@example.com

By default, most internal users are routed to root as well (including webmaster), so setting an external email address (or a list of addresses, separated by comma) for the root account will allow you to more easily see what's happening on your server. Don't forget to run sudo newaliases to pick up the changes!

DrupalCon Austin 2014 - Notes on my First Timer's Guide

I wrote A First Timer's Guide to DrupalCon two years ago, and 99% of the advice in that post is still relevant. I've been preparing my presentation DevOps for Humans: Ansible for Drupal Deployment Victory! for a few months now, and since DrupalCon is less than a week away, I thought I'd take a few minutes to supplement the earlier post:

Simple Git-based multi-server deployments

Ansible is used to manage most of Midwestern Mac's infrastructure and deployments, and while it's extremely easy to use, there are a couple situations where a project just needs a little code to be updated across two or more servers, from a central Git repository, or from one master application server.

All Git repositories include a hooks folder, which contains sample git hook scripts. Inside this folder are a series of sample hook files like post-commit.sample and pre-rebase.sample. If you add a shell script of the same name as any of these files (excluding the .sample) to this folder, Git will run the script when the particular action runs (e.g. git will run a post-commit script after a commit).

Instead of deploying a codebase to multiple servers by copying it manually via SFTP or rsync, or by logging into the servers and pulling down changes from a remote Git server, you can add a post-receive script in the hooks folder of your main git remote repository, and have it synchronize the codebase with one or more remote servers:

Drupal and Node.js at STLJS Meetup - Thursday, May 15!

STL.JS Meetup LogoI'll be presenting Node.js and Drupal — Working Together at the STL.JS meetup this Thursday, May 15, at The Able Few in St. Louis.

In the presentation, I'll basically be covering how Server Check.in uses Drupal and Node.js to deliver a simple, fast, and stable server monitoring service. During the course of the presentation, I'll touch on why and how Server Check.in was built, how Ansible is used to maintain the infrastructure, and the effectiveness of lightweight marketing, blogging, and 'low end box' servers.

Join me and many JS developers in St. Louis on May 15, and after the presentation, we'll hack on some of the things mentioned in the presentation!

I'm also hard at work on my DevOps for Humans: Ansible for Drupal Deployment Victory! presentation, which I'll be giving at DrupalCon Austin 2014. I hope to see you there! (Slides from both presentations will be posted online after the respective events).

Diagnosing Disk I/O issues: swapping, high IO wait, congestion

One one small LEMP VPS I manage, I noticed munin graphs that showed anywhere between 5-50 MB/second of disk IO. Since the VM has an SSD instead of traditional spinning hard drive, performance wasn't too bad, but all that disk I/O definitely slowed things down.

I wanted to figure out what was the source of all the disk I/O, so I used the following techniques to narrow down the culprit (spoilers: it was MySQL, which was using some swap space because it was tuned to use a little too much memory).

iotop

First up was iotop, a handy top-like utility for monitoring disk IO in real-time. Install it via yum or apt, then run it with the command sudo iotop -ao to see an aggregated summary of disk IO over the course of the utility's run. I let it sit for a few minutes, then checked back in to find:

Drupal 8 - A Brief Introduction (DrupalCamp STL.14 Presentation)

I presented Drupal 8 - A Brief Introduction at DrupalCamp STL.14 on April 26, 2014.

Drupal 8 brings a lot of changes. Many standby contributed modules are now included with Drupal Core, and many small changes add up to the most exciting Drupal release yet! This presentation guides you through many of the biggest changes, highlighting how Drupal 8 will accelerate your web development and provide tools to make Drupal the best content management platform on any device.

View the slideshow below, or follow the links at the bottom of the post to view the full presentation and video.

Links for full slideshow/video:

Pages

Subscribe to RSS - Jeff Geerling's blog