Hosting my WordPress blog on Azure

Last month I moved my blog from AWS hosting to Azure, as I mentioned in my blog Moving my blog from AWS to Azure.  My blog is currently hosted on WordPress and when I migrated it I chose to build a IaaS (Infrastructure as a Service) virtual machine.  Maybe not the most "modern" solution for hosting with the public cloud however I wanted to try IaaS as a first step so I could brush up on my Linux skills.   So let's talk about what I've implemented, the cost, and the advantages and any disadvantages I've encountered over the last month.

The Solution

The solution I have within Azure is:

  • A Virtual Machine
    • Which has as you'd expect a network interface and Static Public IP address
  • A Virtual Network
  • A Premium Managed Disk (attached to the VM)
  • Blob Storage Account
  • Network Security Group
  • Recovery Services Vault
  • Operations Management Suite

Digging deeper into that the virtual machine is a Standard B1ms machine with 1vCPU and 2GB of memory.  It is running Ubuntu as the operating system.   It has a network interface and static IP address attached to it. In terms of disk space I have attached a 30GB Premium LRS (locally redundant storage) disk for the OS and storage. I have locked down the machine using a Network Security Group (NSG) that only allows traffic via the required posts for management or access to the blog. To protect the system I have created a Recovery Service Vault and have set it up to backup the virtual machine every Sunday and keep the backups for 2 weeks.  These backups are file system consistent so I have the ability to restore a file if needed. The Blog Storage Account that is within the solution is used to store boot diagnostics. The Operations Management Suite  is used to monitor what is going on with my virtual machine.

The Cost

I've used Azure Cost Management (formally Cloudyn) to detail the cost of the solution as detailed above from the 25th March to the 27th April. Applications|Free - £0.00 Network|In - £0.00 Network|Out  - £0.65 Other|Locally Redundant Storage - £0.07 Recovery|Protected - £2.22 Storage|Premium - £4.06 VM|Linux/Unix  - £11.53 Total - £18.53 When my blog was hosted in AWS I was being charged around £8.40 a month, however that solution didn't have the Backup component that I have within Azure.  Undeniably though it is still more expensive.

Learnings

I initially thought I could use a smaller VM to host the blog on a B1s which has 1vCPUs and 1GB of RAM, however this wasn't quite powerful enough as the blog had quite a few outages when it was on that size.  There were times when traffic and activities maxed out the VM resources and brought the blog down.  The current VM doesn't have that issue. When I hosted my blog at AWS as an IaaS solution I never logged onto it an patched it or reboot it, so there was the potential there for vulnerabilities.  Thankfully it wasn't an issue.  The same applies here I need to maintain the operating system. Which does mean that I need to remember to check on it every so often, so that "cost" does need to be taken into consideration when going down the IaaS route.

Overview

It's been an interesting experiment building an IaaS solution from scratch to host my blog, that has been the most challenging part.  The Azure side of things has been fairly easy and straight forward.  And there is so much more I could be using within Azure to give my VM a bit more bells and whistles and redundancy. I'd like to try and run WordPress on a PaaS (Platform as a Service) to see how it fairs and compares costs etc. A project for another day! ;-) If you'd like to talk to me about deploying WordPress as an IaaS solution within Azure please reach out to me on Twitter @TechieLass