In a previous post, I walked through using AWS CloudFormation and a user data script to spin up a vanilla Ubuntu instance, install Chef, and direct Chef to create a WordPress server. Once you get the hang of it, CloudFormation templates, user data scripts and bootstrapping start to become ‘easy’, but there’s no denying this sort of thing isn’t for the casual observer.
Cato, Cloud Sidekick’s automation platform, strives to shield the already overworked SA from any unnecessary complexity. Cato’s drag-and-drop task editor is a refreshing change from staring all day at a console. Besides, if you’re like me, for every three keys I press, one is backspace!
So, let’s take a look at how easy it is to create a WordPress server using a Cato Task. Believe it or not, I’m gonna do this in one step. You heard me … one step.
Here’s a screenshot of the single Cato command we execute to spin up an EC2 instance.
As you can see, all the important values are populated: the AMI image id, the Security Group, a KeyPair, and the instance type.
So, this simple command will start up a new Ubuntu image in the us-east-1 region. Where’s the rest? It’s in the User Data field.
User Data is Amazon’s boilerplate mechanism for bootstrapping an image. It’s basically just a series of commands that get executed once the server is up and running.
Of course this is a simple example, but it doesn’t take much to make it very powerful. A one line task like this would probably be run in an automated manner, for example after another task determines more capacity is needed.
Also, if it were me I probably wouldn’t even bother with the user data. Once the instance is up and running, Cato can interact with it without needing an agent, executing each of those commands individually, with full logging of each command available in the Cato UI. Yep, that means you can troubleshoot without having to open an ssh session and dig around /var/log looking for errors.
Cato will email you, and can even send a Tweet if your Task has issues. Just a few of the many things you can easily do with Cato!