In this context, configuring an application refers to setting up an Apache virtual host, granting database privileges, writing application config files, etc. Deployment refers to checking out the latest sources from version control, building the application, and installing it on all the nodes. Chef is the perfect tool to configure a web application, and in some cases it can be appropriate for deployment as well.
The infrastructure created in this tutorial is pretty basic, with the production environment running initially on a single server instance. This is a useful setup for rapid prototyping of web apps, sharing a single server among multiple applications to minimize cost and complexity. Once you’re comfortable with this basic configuration, it’s relatively simple to scale it out, separating the roles onto multiple server instances.
This is the first article in a three-part series on managing LAMP environments (Linux, Apache, MySQL, and PHP) with Chef (a configuration management tool).
The series covers using Chef to provision a development environment on a virtual machine with Vagrant and VirtualBox, and a production environment in the cloud with Amazon EC2. Prior knowledge of how to manually configure a LAMP stack is assumed–this tutorial shows how to automate the process, but doesn’t explain the configuration options in any detail.
I want to make sure I get an automatic heads up the next time something like this happens. But since it’s hardly a mission critical service, I don’t want to bother with setting up Nagios or paying for anything. So I’m giving Pingdom a try.
Pingdom offers a free account that lets you monitor exactly one service, with alerts sent via email, Twitter, and mobile apps. (It can send a few SMS alerts too, but you have to pay for those eventually.) The reports look pretty nice, with some nifty details like average response times. Checks seem to be run from several locations around the US, and at least one in Europe.
This is more than enough for my needs right now. Let’s see how it works out.
This blog is built on WordPress, installed on a Micro instance of the Amazon Web Services (AWS) Elastic Compute Cloud (EC2). This post describes how to set one up yourself. It’s a nice way to get started experimenting with EC2.
AWS offers a free usage tier, providing a free Amazon EC2 Micro Instance for a year, along with free usage of S3, Elastic Block Store, Elastic Load Balancing, and AWS data transfer. (If that sounded like a jumble of nonsense, you can learn more about the AWS services here.) After the first year is up you could expect to spend around $15-$20 a month to maintain the Micro instance, depending on usage.
The whole process should take less than 30 minutes. Let’s get started.