Running this Blog on Azure

One of the items that I get asked about a lot are for some real world examples of running workloads on Azure. Because this blog is hosted in my Azure subscription, I figured this would be a great place to start! And the number of resources (and the way I’ve deployed them) may give some other people ideas on their own deployments.

So to begin, here is what I have deployed across 3 different Resource Groups (RGs)

Resource Group #1 – Azure DevOps

DevOps Resource Group

This is the easiest so may as well start here. When I was doing some functional load testing, I didn’t have an Azure DevOps instance associated with my personal account. So I used an automatically generated one on Azure, which is deployed into its own Resource Group. That’s it, just a DevOps instance.

  • Total Resources in RG #1: 1
    • Azure DevOps Organization

Resource Group #2 – The Real Stuff

Main Resource Group

Now on to my second Resource Group, which is responsible for hosting the actual blog and directly required services. This is deployed on Azure Platform as a Service (PaaS) so there is not a server in sight! In fact, this is deployed 100% on containers, as most PaaS services are.

The blog itself is running on a single Azure App Service hosted in North Central US, hosted on a Linux App Service Plan, using the Basic tier (sorry for the performance). The Linux app service is running a WordPress container, which is hosting this site, and using an Azure DB for MySQL on the backend. I am also storing all my media straight in an Azure storage account, which gives me 5PB of storage (at this time of writing), versus the 10GB of local storage with the app service.

To monitor the environment I’ve got an App Insights workspace set up, with its shared dashboard resource, and an anomalous failures alert, all of which are separate resources.

The final item I have in this Resource Groups is the SSL certificate bound to the site, which we’ll discuss more in the next section.

  • Total Resources in RG #2: 8
    • Azure App Service
    • Azure App Service Plan
    • Azure Database for MySQL
    • Azure Storage Account
    • Application Insights Workspace
    • App Insights Shared Dashboard
    • App Insights anomalous failures alert
    • App Service Certificate

Resource Group #3 – Security is Kinda Important

Encryption Resource Group

The last item in the previous section is for an App Service certificate. You may or may not have noticed, but this site is currently using LetsEncrypt. LetsEncrypt is great because it’s free, but the certificates are only good for 3 months at a time, rather than the usual 1-3 years. Rather than going through and renewing this every 3 months manually, I’m automating the process using a great WebJob solution from Ohad Schneider called letsencrypt-webapp-renewer which is just a WebJob that runs in an Azure App Service, which itself has its own App Service Plan.

To allow for me to use the Free tier for this to keep costs low, I am triggering this WebJob to run with a Function (hooray for 1M free executions and 400k free GB/s), which also has its own consumption-based App Service Plan.

Finally, I’ve got an additional Storage Account to store required files and such for this solution.

  • Total Resources in RG #3: 5
    • Azure App Service
    • Azure Function
    • Azure App Service Plan x2
    • Azure Storage Account

Recap:

In total, I am running 14 resources in Azure to support this blog, for a total running cost of about $50/mo, spread across 3 different Resource Groups. I could consolidate, but I like having some separation between resources. This also allows me to view the cost of individual components, so that I can better track my costs and projections.

Leave a Reply

Your email address will not be published. Required fields are marked *