Posted on

Updating your AWS Auto-Scaling AMI to a new version

In this post I’ll run through the quick steps required to update your AWS Auto-Scaling group to use a new EC2 AMI. This post builds on the guide covered in my earlier post on setting up an Auto scaling group for an elastic load balancer, which in turn was built on the WordPress clustering guide. You could say this is part 3 in a rather long-running series.

There’s not much too this process thankfully.

Step 1: Create your new AMI

The easiest way I have found to do this is actually via the EC2 console. All I do is start a new instance on my current AMI, log into it and make any changes required (install/update packages etc) and then from the EC2 console, select the instance.

You don’t often need to log into the slave nodes, so if you need a refresher on how to do it, this command is all you should need:

ssh -i path/to/your/key.pem user@your-public-ip-of-the-node.compute-1.amazonaws.com

Continue reading Updating your AWS Auto-Scaling AMI to a new version

Posted on

Using AWS Auto Scaling with an Elastic Load Balancer cluster on EC2

Back in June last year I wrote about creating a WordPress cluster on Amazon’s EC2. In this post I’ll run through a couple of the problems with that cluster, I’ve experienced, and how I solved them with Amazon’s Auto Scaling service.

The problems with the cluster

A couple of things were not ideal with the cluster that I’ve been putting up with for far too long but finally set aside some time this afternoon to fix.

1) The price of micro-sized spot instances spikes, to crazy prices, sometimes.
This has meant that although the price of micro instances while they’re running is cheap, when the price spikes they all die off and leave the cluster vulnerable. Unfortunately to set up auto-scaling in combination with spot-priced micro instances would require coding up a hybrid solution with shell scripts, and although I enjoy tinkering with this setup, I can’t justify that much effort when an out-of-the-box solution exists, Auto Scaling.
Continue reading Using AWS Auto Scaling with an Elastic Load Balancer cluster on EC2

Posted on

How to Edit and Disable Checkout Fields in Woocommerce

This is just a quick post that shows you how to edit or disable the checkout fields in Woothemes WordPress shopping cart Woocommerce. It may make all the Magento developers jealous to see how nearly trivial it is – but I couldn’t see a good blog post explaining it, so here goes.

Disabling and Editing Checkout

To use the WordPress API, I made a simple little plugin that listens for the filter event and then makes some changes to the arrays.

The anatomy of a plugin is really just a class definition, in the constructor you listen for events and bind them to functions of that class. In those functions, you do the real grunt work. In this case, that’s where I weed out disabled fields, and swap in my edited field definitions.

Hopefully the way the code is laid out makes the actual editing/disabling is performed self-evident. To see the full range of available fields and options, please see the underlying array declaration in the core file woocommerce/classes/checkout.class.php.

My class looks like this:
Continue reading How to Edit and Disable Checkout Fields in Woocommerce

Posted on

Clustering WordPress on Amazon EC2 micro instances

If you are reading this, you are an unwitting participant in my latest experiment: clustering my blog on Amazon EC2 – thanks! You will be connecting to my blog on one of several Amazon EC2 micro instances, cobbled together in a quick and dirty solution that was more knee-jerk reaction to some downtime, than well thought out project.

This post serves as a chance for me to test if the cluster works, and a summary of the architecture I have set up using several EC2 micro instances and WordPress. It’s a quick and dirty little WordPress cluster using spot-request micro instances at $0.007/hour – how fun!
Continue reading Clustering WordPress on Amazon EC2 micro instances

Posted on

Magento vs Wp-E-Commerce: a comparison case study

Being a computer programmer typically means all of your friends and family immediately assume you a) can fix their wireless router and b) want to. For the same reason we often get asked to help make a website, blog, webstore, killer web 2.0 app or all of the above – which in the most part I can’t help with through lack of spare time. But I did manage to fit a WordPress + WP-E-Commerce project in, and this is a case study of that development project in particular, comparing WP-E-Commerce to Magento.

My girlfriend Cindy asked me to help with her latest venture, Cheap Titles – so naturally I helped whip up a site. Despite spending most of my time developing Magento, I actually thought I’d give the WordPress + WP-E-Commerce combo a try. I’ll summarize my rationale for that in the next section – suffice to say it made some things a lot easier.

So this is a little blog post that summarizes my experiences making the site with WP-E-Commerce, what I noticed different about the platform, as compared to Magento – and in particular how I found the underlying code quality of WP-E-Commerce measured against Magento.

Continue reading Magento vs Wp-E-Commerce: a comparison case study