darron froese

System administration, tricks and tips from an old school web-hacker.

How octohost uses Consul watches

I’ve been working on octohost lately, updating and upgrading some of the components. One of the things I’ve been looking for a chance to play with has been Consul watches - and I think I’ve found a great use for them. As background, when you git push to an octohost, it builds a Docker container from the source code and the Dockerfile inside the repository. Once the container is built and ready to go, it does a few specific things:

Monitoring Apache Processes with Datadog

At nonfiction, we hosted the sites we built using a number of different hosting providers. The vast majority of the sites are hosted on some Rackspace Cloud instances - they have been very reliable for our workloads. One of those servers had been acting up recently and had been becoming unresponsive for no obvious reason, so we took a quick look one morning when we had been woken up at 5AM.

Consul exec is a whole lot of fun.

I’ve been setting up a Consul cluster lately and am pretty excited about the possibilities with consul exec consul exec allows you to do things like this: consul exec -node {node-name} chef-client You can also target a service: consul exec -service haproxy service haproxy restart i-f6b46b1a: * Restarting haproxy haproxy i-f6b46b1a: ...done. i-f6b46b1a: ==> i-f6b46b1a: finished with exit code 0 i-24dae4c9: * Restarting haproxy haproxy i-24dae4c9: ...done. i-24dae4c9: ==> i-24dae4c9: finished with exit code 0 i-78f37694: * Restarting haproxy haproxy i-78f37694: .

Aloak is the worst domain registrar I have ever used.

TLDR: If you’re having problems with a .ca domain name, reach out to CIRA - they may be able to help! Late last year, I started to move 4 domain names off of Aloak - a registrar I had used for years. I was concerned: They weren’t responsive to any request I had made in the last few years. I always had to ask and re-ask and continue to ask for small changes.

TestKitchen, Dropbox and Growl - a remote build server

I’ve been working on a lot of Chef cookbooks lately. We’ve been upgrading some old ones, adding tests, integrating them with TestKitchen and generally making them a lot better. As such, there have been a ton of integration tests run. Once you add a few test suites a cookbook that tests 3 different platforms now turns into a 9 VM run. While it doesn’t take a lot of memory, it certainly takes a lot of horsepower and time to launch 9 VM’s, converge and then run the integration tests.

The recent octohost changes - where we're headed.

Late last year, octohost was created as a system to host websites: With no or minimal levels of manual intervention. With very little regard to underlying technology or framework. As a personal mini-PaaS modeled after Heroku with a git push interface to deploy these sites. Using disposable, immutable and rebuildable containers of source code. What have we found? Docker is and incredible tool to take containers on Linux to the next level.

Getting Apache basic authorization working using mod_authn_dbd and MySQL on Ubuntu 14.04LTS (Trusty).

I’m converting a number of old websites that were using mod_auth_mysql - which doesn’t work anymore - and was having a hard time finding clear, concise and working information. First off - DO NOT INSTALL libapache2-mod-auth-mysql - it doesn’t work. I’m not even sure why it’s in Ubuntu anymore, it doesn’t even work with Apache 2.4. Here’s how to do get Apache 2.4 / mod_authn_dbd and MySQL to play nice together:

Using logspout to get Docker container logs into Papertrail.

Two days ago, Jeff Lindsay released logspout - a Docker container that is: A log router for Docker container output that runs entirely inside Docker. It attaches to all containers on a host, then routes their logs wherever you want. As soon as I saw it, I knew that I had to see how I could get the logs out of my Docker containers and into something like Papertrail. With our current Docker setup, we see the logs come into the HTTP proxy server and then out - but there wasn’t a great way to see the logs from inside each Docker container.

When bandwidth fails you - building a remote Test Kitchen development environment.

Last week, I was in a hotel with incredibly brutal internet and I really wanted to update my Consul cookbook. I tried for a while, but when it looked pretty hopeless I started to try some remote cloud providers to see if I could speed things up. Rackspace and AWS were no go since they use Xen behind the scenes - which doesn’t work with VirtualBox - so I tried Digital Ocean - and it got farther than anybody else.

Looking for a new challenge.

Last year, after a lot of soul searching, I realized that it was time to move on from nonfiction - it was time for a change. However when you’ve founded and built a company over 12 years, moving on isn’t so simple, so my business partner and I have been working a for the last few months to simplify and streamline my exit from day-to-day operations. nonfiction is a great company that I’m proud to have built, it will be in my business partner’s capable hands and I couldn’t be prouder of the team that we built together.