Azure: How to activate the MSDN Premium Special Account

When setting up your Azure account, one thing you’ll need to do is select an Azure product to add to your shopping cart. Currently there’s only one product type available to the general public: Azure Platform Introductory Special. This is essentially a pay-per-use account, with a 25 free monthly compute-hours, one SQL Azure database for 3 months,  and 500MB in/500MB out per month. Beyond that, you’re paying standard Azure rates. You can see the rate breakdowns here.

If you’re an MSDN Premium subscriber, you have a significantly-better offer available: Windows Azure Platform MSDN Premium. This plan offers 750 monthly compute-hours, 3 SQL Azure databases, and 7GB in/14GB out per month, for 8 months (see all details here).  However, it’s not exactly easy to get this offer activated. Here’s how:

 

MSDN Subscription Portal

First, navigate to your MSDN subscription at http://msdn.microsoft.com. Sign in and click My Account:

MSDN-myaccount

Now you should see your full account details, along with all available services. Select the Azure service option:

azure-benefit

 

Microsoft Online Services Customer Portal

This will take you to the Microsoft Online Services Customer Portal. Login with the same Live ID as your MSDN subscription. If this is your first time here, you’ll need to fill out some profile information:

wizard1 wizard2 wizard3 wizard4

. Once that’s done, you’ll see the MSDN Premium subscription offer in your cart:

shoppingcart-no-addr

Now all that’s left is to agree to the terms and checkout. You’ll have to provide your credit card information, but this is only used for covering charges beyond those provided for free.

Once you complete this step, you should now have the MSDN Premium Azure product. Select the Subscription tab to confirm:

msdn-in-subscriptions

Note: It’s possible that the status is pending, which simply means the account is still being provisioned. Chances are, if you refresh this page in a few minutes, it should be active.

If you made it this far, congratulations! You should now have Azure activated with your MSDN Premium benefits.

 

Azure Developer Portal

Now it’s time to visit the Azure portal, at www.azure.com:

azureportal

Click Account (in the top-right corner). This will show you the various portal links:

portal-options

Click Go to the Windows Azure Developer Portal.

At this point, simply login with your Live ID. Since its your first time, you’ll be asked to create an Azure project. Once you do, you’ll see it listed in My Projects:

MyProjects-blurred

Finish Line

And… you should now be all ready to add an Azure application service to your account! Now go run to Visual Studio, build your Hello Azure World! (a rite of passage), deploy it to your new Azure service, and go brag to all your friends!

Don’t Delete That Azure Service!

I’m having some serious fun with Azure these days. I have my own pet project, but I also have several small “demo” projects where I’m demonstrating something for various clients. Each of these demos has its own Azure service.

An Azure Service is the place where you upload an application to: your web roles, your worker roles, storage. It has all your regional settings (such as geographic affinity), and manages how many instances you want to run for each web role and worker role. And, of course, the Azure service gets its own name within the cloudapp.net domain (e.g. http://YourServiceName.cloudapp.net).

Once you upload code to an instance, you start incurring usage metering. However, you may create an Azure services without deploying any code,  which means no cost incurred. This lets you get things all set up, and eventually upload something for testing. Then, when you’re moving back to the development fabric to continue development, you can simply delete the deployment (but leave the Azure service definition intact). This lets you save those precious monthly compute-hours for when you really need ‘em (see my post here for more details about monthly hours).

Up until today, you were able to create up to 20 hosted services within your account. Maybe that seems like a lot, but imagine you’re a consultant working on several Azure projects, maybe some for clients, some for yourself. And maybe you’re trying out a few demos based on some training material. Or you’re testing out a demo for a user group talk. Suddenly, that 20-service limit seems pretty reasonable. It’s nice to get things all set up for each project, and not have to worry about configuring them again. It’s also nice to not worry about setting up cloudapp.net names (or losing the one you found, because someone else snagged it after you deleted it).

Well… as of today, each account is now capped at six Azure services. Don’t panic! If you currently have more than six configured services, they will not be deleted by Azure; you’re grandfathered. But… if you delete them, you won’t be able to re-add them until you’re below the six-service limit.

For more details about today’s Azure service changes, see this blog post by the Azure team.

So my words of wisdom today are, simply: Don’t delete that Azure service!

Azure Migration Strategies and Architecture Video

Dr Z. and I sat down to have a discussion around migrating existing enterprise applications into the Azure AppFabric, it's now been posted over at Channel 9 so take a look here.


Here's the synopsis:

"In this episode, Damon Squires, principal architect at RDA, discusses with Zhiming Xue where in a typical enterprise solution Microsoft Azure AppFabric -- consisting of the Service Bus and the Access Control Service -- may be used, how on-premise data are communicated with these services running in the cloud and what benefits such a hybrid solution may bring to enterprise customers."

RIA Services RC, Deployment Guide, and Azure

At the MIX conference this week, Scott Guthrie announced a Release Candidate of WCF RIA Services, along with a new RIA Services Toolkit, both available here.

Saurabh Pant has a great blog post about deploying RIA Services to your server. This post specifically targets .NET 4, Silverlight 4, and Visual Studio 2010, and even announces some hosting companies that now provide RIA Services RC support.

While I won't rehash all of the deployment details, I wanted to draw attention to Azure deployments. Saurabh points out that RIA Services RC only supports .NET 4. Currently, Azure only supports .NET 3.5. This means the “server” side of your RIA Services app cannot yet be used in Azure (although you can develop it locally and run with the Development Fabric).

I haven’t heard or seen any official statement about .NET 4 support on Azure, but my gut feeling (read: educated guess) is that we’ll see an Azure Virtual Machine upgrade at the same time .NET 4 is RTM, currently slated for April 12. Hopefully this will all be cleared up in the next month.

If you need to deploy a RIA Services application to Azure today, continue working with the RIA Services Beta which was announced at PDC in November. The Beta works with both .NET 3.5 and .NET 4.

Silverlight 4 RC Announced, Plays Nice with Visual Studio Again

At PDC In November, we were treated to the announcement of Silverlight 4 and its sheer number of enhancements over version 3 (you can look at Tim Heuer’s blog post to see all the new features explained). Silverlight 4 Beta worked great with Visual Studio 2010 Beta 2.

Then we were treated to yet another announcement in February: Visual Studio 2010 RC, with many bug fixes and serious performance speed-up. Of course, I immediately uninstalled VS2010 Beta 2 and installed the RC before reading all the twitter traffic about Silverlight 4 being incompatible with Visual Studio 2010 RC!

Since then, we’ve heard nothing about the re-integration of SL4 with VS2010 except that it would “eventually happen.” Ever since, I’ve been working with two VM’s: One with VS2010 Beta 2 for SL4 development, and one with VS2010 RC for Azure development (the new Azure SDK requires VS2010 RC).

Well… as of this morning’s MIX keynote, the two are reunited again! The new Silverlight 4 Release Candidate is now available for download at www.silverlight.net, and is fully compatible with VS2010 RC. This release also includes an update to RIA Services RC as well.

While I haven’t had time to convert any projects, I did have time to install Silverlight 4 RC, out of curiosity. Sure enough, SL4 is now an option when creating a new Silverlight project:

sl4-vs2010rc

Before installing, I did need to uninstall the SL4 Beta tools. After that, the installation went very smoothly.

Time to delete my VS2010 Beta 2 VM…

Azure: The true cost of web and worker roles

Since February 1, Azure customers are now being billed for their consumption of Azure resources. If you were an early adopter, you might have been spoiled by the free usage during CTP over the past year, or even during January of this year, when “mock bills” were generated but no actual costs accrued.

Recently I’ve been fielding questions about the true expense of running Azure web roles and worker roles, including questions about Microsoft’s “free” account for MSDN Premium developers. Let me share a few tidbits here that will, hopefully, help you manage your Azure costs.

 

Roles and Virtual Machines

First things first: web and worker roles are hosted in virtual machines (VMs). Each role deploys to its own VM. So, if you have a web role for your Silverlight application, and a worker role for some background tasks (like periodically fetching data from an external source and storing it in SQL Azure), you will actually consume two VMs, one for each role.

Virtual Machines and Instances

Ok, next up: instances. At the most basic level, you could view a VM as synonymous with an instance, and in the example above, you’d have two instances. Things take a twist, though, when you consider that Azure offers multiple VM sizes. The smallest size sets the baseline, and is equivalent to 1 instance:

Type Instance count Cost per hour
Small 1 0.12
Medium 2 0.24
Large 4 0.48
Extra Large 8 0.96

Each of the VMs vary by number of CPU cores, RAM and disk space. The price scales along with the instance count, so an Extra Large VM costs 8x what a Small VM costs.

Instances running ‘round-the-clock effectively cost 24 hours x 0.12 x 30 days = $86 monthly for a Small VM, up to about $690 monthly for an Extra large VM.

Microsoft bills in instance-hours. So you might be billed 48 instance-hours on a given 24-hour period, which either means you had two Small VM running for 24 hours or one Medium VM running for 24 hours.

Instances and Lifetimes

Now we’re getting to the fun part. Let’s say you just created a brand new Azure service, setting up a new name (like MyCoolApp.cloudapp.net). You just finished your first code iteration, and you publish your code to that new service of yours. Just two roles, both set up with one Small VM each.

You might notice that it takes a few minutes to deploy your code to that new service. Why? Because Azure is spinning up new VMs for you. Why is that important? Hold that thought a moment…

Ok, you’re done uploading and deploying, and finally, the Azure dashboard tells you your app is running. You are officially on the clock. You are now being billed for your two instances.

Now let’s get back to the point about your two new VMs. You might decide that, after your first set of tests, you’re going to suspend your new service. That is, leave everything uploaded (so you can show off your new app to the Boss later today). Guess what: You are still officially on the clock. The simple truth is, Azure is still hosting two VMs for you, each taking up a “slot” in the cloud fabric. So you’re still being billed for it, whether the web and worker roles are running or suspended.

Lifetimes and Clock time

Alright – if you’ve gotten this far, you’ve realized that your newly-deployed app, even in a suspended state, is going to burn through hours pretty quickly. And if you’re an MSDN Premium subscriber, with 750 free compute-hours monthly, you might have just done some quick math:

2 instances x 24 hours x 30 days = 1,440 hours !!!

Essentially, your MSDN account is good for one Small VM (equal to 1 instance) running ‘round the clock, as that 1 instance burns just under 750 compute-hours.

So you quickly scramble to delete your deployment from your service (don’t worry, your service definition, and fancy URL, stay in place; just your code and VMs get deleted). Lucky for you, your app was only live for about 10 minutes before you discovered this. So You can afford to deploy several times daily with little-to-no risk, as long as you delete the deployment after each test / demo cycle. Right?

Well, not quite right. When you deploy a VM, you are billed hourly. So even if the VM is up for 10 minutes, you are billed for a compute-hour. Since our example is using two instances, we’ve consumed 2 compute-hours in a very short time.

Clock time vs CPU time

This final per-instance tidbit might be obvious by now, but I’ll call it out anyway, just for good measure. Each VM, whether suspended or active, is costing you in compute-hours. And to take that one step further: Even VMs sitting around mostly idle still consume compute-hours at the same rate. Let’s go back and think about that worker role we have. Maybe it wakes up every 24 hours and fetches temperature data, and stores it in your local database. Maybe that service call takes, oh, 10 seconds to retrieve all needed data, and another few seconds to store it. Then it goes to sleep for 23.99 hours. You are still running at 0.12 cents per instance-hour.

Cost-based architecture

What to do today

So here we are, fully armed with the true cost of these web and worker roles. And here we are, with our elegant Azure application architecture, with a web role for our Silverlight app, a WCF web role for our service tier, and one worker role for each 3rd-party service we want to interact with (that way, we have a very modular system, with each role doing only what it needs to). You probably see where I’m going with this: While our web role is going to be super-busy (and we might need to scale it up to handle our web traffic), and our WCF web role might have to be scaled up as well, our worker roles will likely remain at 1 instance per 3rd-party service.

From a cost perspective, each of those worker roles, sitting almost-completely idle, is burning $86 monthly. Just three external services and you’re up to $250 per month.

Going back to the MSDN Premium accounts, you would require 5 instances running, in order to test your application. That means you’d burn through your 750 hours in about 6 days.

You will want to consider Azure’s pricing model when developing your architecture. The cost structure associated with instances and their lifetimes may mean making compromises such as rolling all of your 3rd-party integration code into a single worker role, and managing your polling intervals accordingly.

Future-thinking

The Azure team is reaching out to the community, asking for input about future ideas, where you can suggest a new idea or vote on someone else’s idea  (check out the voting site here). I want to draw your attention to a few ideas that could really help reduce cost:

 

What other great ideas would you add, to help create a more cost-effective model for your Azure rollout?