Azure

All posts relating to Microsoft Azure services including information about new services and features as well as deep dives on configuring and using the services.

Windows Azure to Overtake Amazon as Cloud Computing Leader

My attention was brought to a greenbutton.com (http://www.greenbutton.com/blog/index.php/2013/10/30/why-windows-azure/) today when it was tweeted by @WindowsAzure (https://twitter.com/WindowsAzure/status/400669888823697408) in which the author, Dave Fellows speaks of how they believe Windows Azure is going to overtake Amazon as the leader in cloud computing within two to three years.

My personal feeling is that I agree with what Dave is saying. Windows Azure has been gaining steam and momentum significantly over the last year as Microsoft has increased the amount of work and effort it’s putting into virtualisation and cloud for the on premise private, mash-up hybrid and all out public cloud software architectures.

Microsoft are traditionally late to a party but when they arrive, they do it well and they do it big. As I’ve made public knowledge recently on my blog here, I worked on a Windows Azure project recently to deliver my companies public website on the Platform as a Service public cloud infrastructure using a CMS product called Sitecore. The experience was really good both when dealing with pre-sales to engage with Microsoft and discuss the opportunity of Windows Azure, and also with Premier Support Services who were really good at helping us get to where we needed to be on the couple of occasions we ran into issues. For clarity, we ran into issues because of soft limits imposed on Azure subscriptions to prevent customers from inflicting giant bills on themselves by provisioning lots of service without considering the ramifications, not because of any practical issues such as performance or loss of service.

As the integration with products and services like System Center Data Protection Manager, System Center Virtual Machine Manager and AppController all improve as I’m sure they will beyond the 2012 R2 releases, this story is only going to get better. The Azure VPN feature already allows customers to expand their on premise networks and private clouds into Azure and future services of this nature, allowing customers to adopt public cloud but in a private and secure manner will promote adoption for those customers who aren’t quite ready to take the leap of faith into public-public.

 

Configuring the Windows Azure Alerts Preview Feature

As part of the project I’ve been working on for the last six months to deliver a new public website (hint www.primark.com) using Windows Azure we needed to be able to monitor the site performance and alert on warning and critical thresholds for certain counters. At the start of the project, our intention was to use SCOM (System Center Operations Manager) as the cleanest way to get data out of Windows Azure but by the time we went live two weeks’ ago, Microsoft had made available the Windows Azure Alerts feature preview.

Under normal circumstances, SCOM would’ve been a no brainer decision for us as our operational teams use and rely on SCOM already so they are familiar and comfortable using it however with the website, we had a challenge – the third-party.

Setting up SCOM 2007 R2 to monitor Windows Azure sounds really complicated when you read the TechNet article for it at http://technet.microsoft.com/en-us/library/gg276377.aspx however it’s actually pretty simple, something which I’ll cover in a later post on the subject, however as I mentioned, our project involved a third-party development partner who needed to receive the alerts also once we went live. In SCOM, you configure this using an SMTP Subscription to email the alerts raised by the management pack to those who need it, but this would result in our Exchange platform joining the critical path for the monitoring of the website, something which I didn’t want ideally as the architect for the project. Imagine the conversation explaining how you missed a website outage or performance degradation because Exchange was down 😮

Fortunately for me, Microsoft came up trumps with the Windows Azure Alerts preview feature just weeks before I was about to go live with the SCOM management pack configuration for production although I had already configured it for our staging environment by this point.

Windows Azure Alerts allows you to configure SCOM like thresholds and evaluation periods for usage counters and metrics from your Azure services and in turn, generate email alerts for them. This has allowed me to remove Exchange from our critical path for website monitoring because the email alerts are generated directly at source in Windows Azure.

To get started with Windows Azure Alerts, firstly, open your Cloud Service, Web Site, SQL Azure Database or whatever you’d like to monitor in the Windows Azure Management Portal. Once open, select the Monitor tab from the Windows Azure Dashboard.

Azure Cloud Service Monitor

Once you’re on the Monitor tab, select the monitor that you would like to generate alerts for. If the monitor you want to use is not listed then you need to update, amend or possibly even start the configuration of diagnostics. Look at the MSDN page, Collect Logging Data by Using Windows Azure Diagnostics to get started.

Azure Cloud Service Add Rule

With the monitor highlighted, the contextual bottom navigation now shows an option Add Rule. Click this to open the rule definition wizard.

Azure Alert Define Rule

In this rule, I’m configuring monitoring for high CPU utilization on a Cloud Service. Give the rule a name and a description. These are included in the email alert you are sent in the event that the rule is triggered so make sure that it’s something you or people receiving the alert can relate to. Once entered, click the arrow to go to page two.

Azure Alert Define Conditions

On page two as shown above, you configure the conditions for the rule. In the case of CPU usage, I’m going to monitor on CPU usage over 80%. Rules are evaluated over a time period before they breach. This is ideal for CPU and memory counters as it means that you won’t be alerted for momentary peaks in demand due to activity occurring in the service but will be alerted for sustained period of high draw. Here, I am setting the evaluation period to the default option of five minutes.

Under the sub-heading Actions, you define whether a single email address (which could be a distribution list) or all of your Azure administrators and co-administrators receive the email alert from the rule. As we have a number of people such as project deployment engineers and developers accessing Azure and the only people who need to receive the alerts are the operational teams, I elected to enter an email address for a distribution list and not all of the subscription administrators and co-administrators.

The last option is the tick box to enable the rule which is checked by default. Click the success tick button to complete the two step wizard and the rule will be created.

Azure Management Services View Alerts

Switching context to the Management Services pane in Azure allows you to see a list of all of the alerts configured for the subscription be they for Web Sites, Cloud Services, SQL Azure Databases or more. Here, I only have one configured but in our production subscription we currently have 10.

There is currently an imposed limit of 10 alert rules per subscription while the feature is in preview. I’ve been meaning to call Microsoft Azure PSS (Premier Support Services) for a week now to see if we can get this limit raised as we would like to create a few additional rules but I haven’t got round to it yet. If I manage to do this, I’ll be sure to let you all know.

So there you have it. How to create email alerts for performance thresholds as you would do with SCOM, directly in Windows Azure removing the need to configure an extra management pack in your SCOM environment and removing critical path dependencies from your internal systems to receive alerts for Windows Azure services. I’m looking forward to this feature coming out of preview and into production service hopefully with a few extra bells and whistles.

Google Sitemaps XML Plugin on Windows Azure

On the blog here, I use the great Google Sitemaps XML plugin for WordPress by Arne Brachold (available from his site at http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/) to automatically generate my sitemaps. Since moving to Windows Azure for my hosting I’d been having a problem with it automatically building the file on site changes. The fix was actually really simple but I completely overlooked it initially.

First off, this plugin is great for two reasons and credit to the author. It’s really customizable allowing you to configure what is included in the sitemap and what is not such as categories, tags, archives, search page and you can even specify individual post IDs. This is all so that you can match your sitemap.xml to your robots.txt configuration to help Google and Bing (and yourself for SEO) but more importantly longer term because it automatically rebuilds and notifies Google and Bing when it is updated by means of new or updated posts being published. As a blogger, all I have to worry about is finding the time amongst work and life to think of something awesome to post and for you all to read.

It goes without saying that Windows Azure web instances are running on IIS and in counter, the plugin is designed primarily for Apache installations. The reason I hadn’t thought of this previous before now is that my last host was running IIS too and I had no problems with it there.

Google Sitemaps XML Plugin Path

Head over to the settings panel for the XML-Sitemaps plugin in your WordPress admin site and scroll down to the area titled Location of your Sitemap File. The installation tries to select an automatic location from the web server paths. Credit to it, it got the paths right, but the direction of the slashes wrong and it turns out that this was the problem.

Change the setting to Custom Location and simply replace all of the forward slashes in the path with backslashes. Hit the Update Options button at the bottom and you’re done. I submitted a very short hello world post after the change to test it and once published, go to the XML-Sitemaps panel and I was given a message to show that the sitemap will be rebuilt in 10 seconds and sure enough after 10 seconds, it rebuilt and notified Google and Bing as designed of the changes.

One Week in Azure

My blog has been running in Windows Azure now for one week so I thought I’d post an update on how the billing is coming along and also the usage of the platform.

I’ve just dived into my subscription summary and here are the charges thus far:
Data Transfer Out (GB) – Zone 1 – 0.6GB (5GB Free)
Compute Hours for Cloud Services – 21.28hrs / £1.08

If the above holds true to the remaining three weeks of my billing cycle then I am looking at having consumed 2.4GB of egress data transfer which is less than half of the free allowance and I will have consumed 85.12hrs of compute time producing a bill of £4.32. As I predicted in my original post, the number of compute hours my blog is consuming is much less than the hours consumption shown on the Windows Azure Pricing Calculator.

At this rate of consumption, my annual bill for the site will be £51.84. When you consider that I was previously paying around £150 a year for a hosting plan with lower quality hosting providers offering much more clunky and cumbersome management interfaces and inferior billing transparency, I think I’m getting an amazing deal.

I am paying more than I had originally hoped for the Backup Recovery Services feature which I use to backup my Windows Server 2012 Essentials server to the cloud, protecting all of mine and my wife’s documents and files along with all of our family pictures of the kids growing up but. For the peace of mind having that data properly protected I’m happy to pay it. I actually made a change to the retention period for my backups in Azure earlier this week so fingers crossed that, that will reduce my bills going forwards a little.

Aside from billing, what else is there to show? Below is a screenshot of the Windows Azure Monitor page for the blog. As you can see, there is a huge spike at the beginning of the week. This was caused by me doing the deployment and maintenance of the site including uploading all of the WordPress files, doing the WordPress upgrade and then upgrading all of the plugins. As you can see though, it settles down nicely after this. All of this is running on a Shared Website Mode single instance. I don’t generate enough traffic to consider adding a second instance and scaling out the site although I might do it one day just to test it.

Blog on Windows Azure

Setting Up Shop in Windows Azure

Several months ago after numerous outages with my old American web host, I moved some of my sites over to a UK hosting company. For this reason and that reason, I didn’t complete the migration of all of my sites over to the UK host and the time is upon me that the agreement with the old American host is up for renewal in a couple of weeks.

After some persuasion, I’ve managed to convince a the other half that some of the sites could be dropped as they just weren’t used anymore – Just one site left to sort and that’s in the hands of a friend to arrange.

This left me in a position where I only had one site of my own left, this blog. When I was first reviewing options for moving to a new host, I looked at Windows Azure. I’m working with Azure heavily in a project at work so I was comfortable with the environment enough to want to deploy a multi-language enterprise site there so why not my own sites? Well at the time, cost was an issue. To run all of my sites in Windows Azure Web Sites Shared mode would have cost about three times as much as the hosting agreement elsewhere. This is down to the fact that in Windows Azure to use a custom domain name you need to be on either the Shared or Standard tier; the Free service tier limits you to using *.azurewebsites.net addresses.

So with just one site left my thoughts returned to Azure. I did some sums and it looked like it was going to cost about the same for Windows Azure as it was going to, to renew the UK plans but on a way more solid platform which tonnes more features, scalability and support. Not to mention that Windows Azure services outperform those of its competitors up to 3x if you believe the hype (I do for the record). I’m hedging my bets actually on my costs being lower. The Windows Azure Pricing Calculator puts a Shared Web Site at £6.16 per month but that’s based on 684 hours (28 days @ 24 hours per day) of compute time as Windows Azure now calculates billing based on hours of compute time. As my blog isn’t visited that heavily and I’m using the amazing WP Super Cache plugin for WordPress, I think I can do it for about half of this actually but month one will tell – I’ve always got the bug out option with Azure as I’m on pay as you go monthly with no upfront commitment.

So after migrating the MySQL database in the ClearDB free 20MB database service which fits perfectly for my MySQL WordPress instance database at a wee 9MB and after copying over all my files and doing some WordPress PHP magic to move some of the URLs I had it working. Makes you realise how quickly WordPress moves though! I was already two versions behind the latest and all of my plugins were out of date so first job was to fix those which I did in quick order.

Custom Domain registration is a simple case of configuring a few CNAME records and updating my domain root A record and done. My registrar FastHosts have a great interface for updating DNS and they use a 1 hour TTL which means that the updates happen really quick although one thing I think Microsoft are doing actually is that they are performing live queries each time and not relying on cached DNS entries and potentially long TTL times. I updated my A record and Azure knew about it within about a minute of the change.

So surely I did more than just move host and upgrade? Damn right I did 🙂

I’ve finally fixed the Twitter hook on the blog which means my latest tweet is now actually shown. This was fixed by replacing the Twitter plugin I am using with one which actually works with the new Twitter oAuth developer framework. I’m now using Advanced Twitter Feed Integration if anyone else out there is looking for a Twitter plugin that works. I’ve removed the old jQuery Lightbox plugin as the new version of WordPress has improved this functionality so renders it pointless. In a more functional space, I’ve fixed the CSS which was causing issues with the collapsible navigation from working properly so you’ll now actually be able to read the text as well as see the pretty Windows Phone inspired plus and minus buttons. I’ve also updated my permalink structure to drop the year/month/day element. My URLs are now simply the domain plus the post name. Much cleaner and the chances of me wanting to recycle a post name are slim to zero so it shouldn’t come back to haunt me.

The coolest thing I’ve setup is the Windows Azure Storage for WordPress plugin. I’m not sure what my mileage with this but I’ll give it a month or two and see – purely a cost factor though, not functional.

This plugin connects to a Windows Azure Storage Account and stores content that you upload to the blog into Windows Azure Storage BLOBs instead of directly into the Web Site instance. This is good news in theory because it offloads transactional tasks and storage from the web instance giving me the potential to reduce my compute time on the web instance and it also allows me to use the Azure CDN feature for even more massively improved performance if I wish (although the performance is pretty awesome already). Configuration of the plugin is super simple thanks to the fact that the plugin is actually written by Microsoft and once connected to the Storage Account Container and enabled, anything you upload either in the web interface as media or via a third-party editor like pictures, videos or other post content get’s stored out in the Storage Account Container. Simples.

How to Delete a VHD BLOB on for an Azure VM

A while ago I signed up for a 3 month trial for Microsoft Azure to allow me to continue to use the Azure Backup service after Microsoft moved it from Windows Azure Online Backup Preview into a more mainstream service.

Last night I decided to have a play whilst I’m still on the trial to see how quickly I could stand up a Windows Server 2012 VM instance. The answer is quickly by the way. Within five minutes, I was able to download the .rdp file and connect to the machine, but I digress.

After I was finished, I deleted the VM, but the disk remains in the event that you want to reattach it to another VM. When I tried to delete the .vhd file I got an error that it was still in-use. I wasn’t able to find the answer initially, but after a post on TechNet someone came straight back with the solution in an Azure Technical Support (WATS) blog post at http://blogs.msdn.com/b/windows_azure_technical_support_wats_team/archive/2013/02/05/iaas-unable-to-delete-vhd-there-is-currently-a-lease-on-the-blob.aspx.

In a nutshell, although the VM is deleted, it leaves behind a disk mount resource which is used to link the VM to the VHD BLOB. Follow the steps in the post to delete the link an you will be given an option to delete the actual .vhd file as well as the link. Job Done.

Azure Online Backup Service Outage

So I came home today to check up on my trusty Essentials 2012 server and I was confused to see on the Online Backup tab for my free six month trial of Azure Online Backup reported absolutely nothing, no data, no stats or anything. I closed the Dashboard and headed over to the Azure Online Backup MMC console to see some more ‘direct’ information. Again, nothing.

I logged into the Azure Online Backup Portal to check up on my account to make sure that my trial hadn’t accidently been suspended or cancelled for some reason and spotted this:

Uh oh. Looks like the whole worldwide Azure Online Backup service is down, so this will be effecting Server 2012 Essentials, System Center DPM 2012 SP1 as well as conventional Azure Online Backup customers. Hopefully the service gets restored okay without anyone having to re-register their servers.