***non-techie - personal post***
For those who don't know, I recently joined Microsoft and work on the World Wide Windows Azure Centre of Excellence team - a small team of highly skilled technical people, many of which have been at Microsoft for a number of years in different organisations. We are known internally as "Azure COE".
The team is based out of Redmond, WA but I live in the UK and my responsibility is the EMEA region but no doubt, I will get involved in other regions as well once I get settled in. This is no doubt the best job I have ever had, I know it is early days but that is my feeling right now. I am no longer billable, so my responsibilities are to help customers, internal employees and partners be successful in deploying Windows Azure as a technology solution from an architectural and technology perspective.
It is up to me to define what I will take ownership of, this truly excites me. I will take a few weeks to determine gaps, strategic direction and areas where I can focus more of my time and this is what I find the best thing about this role.
It is also a very exciting time for anyone in our industry to be involved in cloud computing. Everyone that is, ISV's, SI's (System Integrator's), CIO's, CTO's should at least consider a cloud platform as a tool to be used in the vast tool set for any business problem that can be solved using technology today. It might not be the correct technology to use in all cases but it should be considered like any other.
My first day, I arrived in Reading, Thames Valley Park, UK (known as Microsoft UK). I was quite tired when I arrived after a 3.5 hr drive due to the M25 London orbital motorway (known here as the car-park) being congested as ever. I actually found myself watching BBC News 24 on my Samsung Galaxy S2 device while parked up on the motorway! It saved me from extreme boredom.
After checking-in, I met up with Tim Furnell who was acting as "host manager" to bed me into Microsoft nicely. Tim did a good job of getting all the things I needed and getting connected to corp net.
The next day I worked from home and did a lot of NDA stuff that I can't talk about but you will eventually hear about in the future. This is another cool thing about the job. I get to hear about, work-on technology before it's even announced publicly. This enables me to make better decisions for our customers and to be more well informed in what's coming. I also get to address what is known as "whitespace" areas which are gaps in Microsoft products.
That's another thing they love here - home-working, office-working, coffee-shop wherever, it doesn't matter where you work so long as you get your work done. Not a 9-5 person? - doesn't matter! They promote the use of on-line conference calls all the time. I have calls pretty much every day over Lync (internal VoIP).
Then the next two days I spent time with my colleague Dennis Mulder from the Netherlands. After these two days my head was rather full of information. You don't realize just how big and how much information is at your finger-tips until you work here.
Think of the biggest library you have ever set foot-in, multiply it by about 1000 then you might come close to the vast quantity of information available here at Microsoft.
Microsoft are very supportive in pretty much every area you can think of. But the most important to me is learning, they totally promote it. You'd think this would be the same for all companies, but many other companies are interested in your billable time first and foremost and not you as an individual and your aspirations and career goals.
I'm also finding everything highly efficient and smooth running. It's because everything is automated - where it can be. Example, applying for a AMEX corp card, I applied using //... (DNS) is used for everything there is a name for everything i.e. //training //sqlsvr etc... then after applying, the next day the card turned up!
Booking travel, hotels, cars is automated and billed to your cost centre to reduce admin expense claims. So far the next 3 months will be fairly busy and a bit of international travel for some really interesting events.
Dennis and I will be running the Tech Ed 2012 EMEA Pre-Conference Azure bootcamp workshop in June, so if you're going we'll see you there!
And finally, if you're from Microsoft reading this and need the Azure CoE's help within EMEA, ping me internally (note we are free - non-UBI).
Saturday, April 28, 2012
Saturday, April 14, 2012
SQL Server setup does not support the language of the OS or does not have ENU localized files
I encountered a very strange error this morning when attempting to install Microsoft SQL Server R2 EN Standard Edition from my file server which I have successfully done many times before - mainly from VM's.
Today, when I attempted to run the SQL installer on a fairly new Windows 7 EN OS physical machine, I got the following error:
After reading about this problem on Connect here: http://connect.microsoft.com/SQLServer/feedback/details/556958/sql-server-setup-media-does-not-support-the-language-of-the-os
I tried some of the workarounds mentioned on Connect above, none worked. So as my machine is a dev machine, I'm happy to put the developer edition on which doesn't appear to be localized?!?
But before doing this I really wanted to figure out why I was getting this problem. I am running an English version of Windows that is set to the United Kingdom as the locale. Why is this not working for me!?
So then as I was attempting to install from a network file server, I thought I'd burn to disc and then try it from a DVD. So I fired up Windows 7 USB/DVD Download Tool (get the code from here: http://wudt.codeplex.com/). Ran it and I got this error:
So this is really weird as I have installed SQL Server from that ISO before (at least I think I have).
So in the end I downloaded a new fresh copy of SQL Server, ran it from the network server and it worked! So this error for me was a red hearing.
Tuesday, April 03, 2012
Windows Azure Traffic Manager to handle your public cloud DR strategy
I did a talk last month at the Windows Azure User Group in London. To be honest I had too much content to get through and part of my talk was to talk about drastic recovery otherwise known as disaster recovery (DR). I ran out of time and didn't get a chance to talk about it unfortunately.
What is Drastic (Disaster) Recovery
Some people say DR is not possible or difficult to implement in a Cloud Platform such as the PaaS model. This is in contrast to Cloud Platform IaaS as you have more control over hardware/configuration in a IaaS environment than you do in PaaS. But hopefully after you have read this article, you'll soon realise it is very easy now in Windows Azure.
For people not aware of DR, I'll explain it using a picture that illustrates the problem when using Windows Azure, consider figure 1 below:
In the above diagram we have some roles running in a Windows Azure data centre in both Europe and North Central US and a consumer that is consuming from 1 data centre, Europe.
The configuration depicted above is known as a failover or active/passive configuration which is very commonly found in drastic recovery configurations in the enterprise today. If the above were a private data centre whether this is private cloud or a traditional data centre, it would look almost identical.
When you deploy an application in an Azure data centre, you can't spread it across multiple data centres for resiliance or to implement DR. Well you can but you'll get a different URL for each data centre you deploy your application into. For example for the Europe data centre above, our full URL could be: http://myamazingapp-europe.cloudapp.net/
Then for the North Central US data centre, the URL has to be something different like: http://myamazingapp-us.cloudapp.net/
Because we have two different URL's this leads us to a problem because if the Europe data centre goes down, which in the above case is our active configuration, the users will not be able to use the application which affects availability unless the active configuration becomes the DR environment which is the USA data centre.
This means the Europe data centre is currently serving up the users requests all the time and the USA data centre is in passive/sleep state - in other words not being used unless of a failure in the Europe data centre. When/if this failure occurs, we need to switch from Europe to the USA data centre. This is not easy with the current configuration because the users/actors will have to switch URLs from Europe to the USA data centre - this is far from ideal as often the user/actor probably wouldn't know when to try the other URL, it really needs to be seamless.
So we really want to use a single URL that has the ability to reference both data centres when we need to without the users actually knowing.
A simple way to implement DR in Windows Azure
This is where DNS (Domain Name Service) play a very important role in hardware infrastructure and helps us solve this problem relatively easilly.
Now consider an amendment to the above diagram (figure 1) to now abstract the user from the *.cloudapp.net domain name using a internet DNS registrar and a CNAME record that resolves to the Azure data centre required. Remember, each cloudapp sub domain represents a single data centre region. When you design for a drastic recovery solution, you wouldn't normally use the same data centre as it kind of defeats the purpose of having a DR strategy.
With the amendment above, we can give url: http://myamazingapp.com to end users/actors. They are now completely unaware of where their application is being served up - which is how it should be.
Of course they could run a trace (TRACERT) on http://myamazingapp.com and see where it resolves to. In fact, I have made the above configuration on a application I have deployed in Azure right now. If I run TRACERT on my sub domain: http://remotemedia.simonrhart.com I get the following:
You can see from the above trace, my subdomain resolves to Microsoft's data centre DNS http://remotemedia.cloudapp.net IP address: 94.245.89.251.
We know that IP address is a real Azure data centre as it is registered to Microsoft. Here is the result from running a whois on the resolved IP address:
So that is wonderful isn't it? DR and failover problem sorted. Well kindof. It's not perfect as it's very manual. If the European data centre where my application is deployed goes down, I need to know about it so I can tell my DNS registrar to change the CNAME record to point to the application that is deployed in the DR data centre - North Central US.
This means I will have to log into my DNS registrar and change the CNAME when a failure occurs like so:
I don't really want my IT admins having to deal with this as it's expensive and adds complexity. I could automate it but then I'd have to put a load of process in place and write some custom code not to mention I'll need some infrastructure running on-premise (most probably).
Surely there is a better way?
Windows Azure Traffic Manager
Although what I have talked about above will work, it's fairly simple and I have done this for some time. But thankfully there is a better way. Microsoft has made available in Community Technical Preview (CTP) a feature called Windows Azure Traffic Manager.
Unlike the way the beta programmes work in Azure, you can start using the Traffic Manager right away. There is no request to make in order to start using it - as per the beta programme
Windows Azure Traffic Manager can solve you're failover DR strategy without having to touch any DNS server/registrar once it's setup and more. It supports the following:
So Traffic Manager will solve our problem of having to manually update the DNS registrar with the new Azure data centre DNS cloudapp domain name. Great, how do I do it?
Enabling Traffic Manager
To start using Traffic Manager you need to use the Windows Azure Management Portal to create a policy.
To do this navigate to the Windows Azure Management Portal and sign-in: http://windows.azure.com. Then click Virtual Network > Get Started With Traffic Manager.
See figure 5 below:
Notice how this is different from using the beta programmes in Windows Azure. With Traffic Manager you can start using it straight away and right now there is no cost to using it.
Once you click the Get Started with Traffic Manager button, you'll see a dialog box similar to the following popup:
Notice, there is a lab that you can do that covers all this setup of Traffic Manager here: http://msdn.microsoft.com/en-us/gg197529 but I have included here for the bigger picture of what specifically Traffic Manager is designed to solve and how you would solve these problems without it.
I have filled in the policy above as per the original high-level architecture diagram in figure 1 above. Note: DNS names are different from my diagram but the concept and design is the same.
In the above, as mentioned we select Failover as a load-balancing method. We specify Europe (remotemedia) as our primary active configuration and the North Central US (remotemedia-dr) namespace as the failover data centre. This one is our passive configuration, the application is there, deployed and waiting to be used should a failure occur.
Some data here is important, one piece is the DNS time to live (TTL). This is the maximum time users will have to wait until the DNS server gets updated with the new URL should a failure occur. The default is 5 minutes (300 seconds). The other important peice of information is the Traffic Manager DNS Prefix field.
Well, the Traffic Manager DNS Prefix field can be anything we want (so long as it hasn't been used already) as the users will never see it. Later we will reconfigure our DNS registrar to point to this DNS address.
Once I click OK, the policy is then created and it is active in Traffic Manager:
Figure 7 above shows how these policies look in Traffic Manager. There is 1 thing left to do though, and that is to configure our DNS registrar to point our custom DNS to our specified traffic manager policy URL we chose.
Figure 8 above shows our final DNS configuration. So what happened here?
We are simply handing the problem of failover over to Windows Azure. So in the above case, Azure will handle changing the DNS CNAME configuration should a failure occur.
Making Sure Traffic Manager is Working
What we now need to do is test that the Traffic Manager failover feature is working correctly.
If we now run a trace route on our new traffic manager URL it should resolve to the Europe data centre (in my case http://remotemedia.cloudapp.net) - remember I have two data centres 1 in Europe (active) and 1 in North Central US (passive):
So I'm happy with that, Traffic Manager's DNS configuration looks correct to me.
Now I want to force a failure so I can test the failover. This is easy, all I need to do is shutdown the Europe data centre services like so:
Now that my Europe data centre services are not running as per figure 10 above, I'll need to wait the 5 minutes (which is what I configured) before I test the failover.
Once 5 minutes has elapsed, I'll run the same trace route command via a command-prompt like so:
I think this is a success, notice the trace now resolves to our North Central US data centre (my URL: http://remotemedia-dr.cloudapp.net)
Also, if I run the trace one layer out from my custom domain: http://remotemedia.simonrhart.com, I get the expected failover data centre as above [remotemedia-dr.cloudapp.net]:
So now you can see how the actual Traffic Manager DNS that you pick can be anything you want, it doesn't really matter what it is.
How does all this look, consider the new amended high-level architecture diagram in figure 13 below:
Conclusion
What is Drastic (Disaster) Recovery
Some people say DR is not possible or difficult to implement in a Cloud Platform such as the PaaS model. This is in contrast to Cloud Platform IaaS as you have more control over hardware/configuration in a IaaS environment than you do in PaaS. But hopefully after you have read this article, you'll soon realise it is very easy now in Windows Azure.
![]() |
| Figure 1: Basic drastic recovery fail over configuration |
This means the Europe data centre is currently serving up the users requests all the time and the USA data centre is in passive/sleep state - in other words not being used unless of a failure in the Europe data centre. When/if this failure occurs, we need to switch from Europe to the USA data centre. This is not easy with the current configuration because the users/actors will have to switch URLs from Europe to the USA data centre - this is far from ideal as often the user/actor probably wouldn't know when to try the other URL, it really needs to be seamless.
So we really want to use a single URL that has the ability to reference both data centres when we need to without the users actually knowing.
A simple way to implement DR in Windows Azure
This is where DNS (Domain Name Service) play a very important role in hardware infrastructure and helps us solve this problem relatively easilly.
Now consider an amendment to the above diagram (figure 1) to now abstract the user from the *.cloudapp.net domain name using a internet DNS registrar and a CNAME record that resolves to the Azure data centre required. Remember, each cloudapp sub domain represents a single data centre region. When you design for a drastic recovery solution, you wouldn't normally use the same data centre as it kind of defeats the purpose of having a DR strategy.
![]() |
| Figure 2: Basic drastic recovery fail over configuration with DNS |
Of course they could run a trace (TRACERT) on http://myamazingapp.com and see where it resolves to. In fact, I have made the above configuration on a application I have deployed in Azure right now. If I run TRACERT on my sub domain: http://remotemedia.simonrhart.com I get the following:
![]() |
| Figure 3: Running TRACERT on my sample app hosted in Azure |
We know that IP address is a real Azure data centre as it is registered to Microsoft. Here is the result from running a whois on the resolved IP address:
WHOIS information for 94.245.89.251:
[Querying whois.arin.net] [Redirected to whois.ripe.net:43] [Querying whois.ripe.net] [whois.ripe.net] % This is the RIPE Database query service. % The objects are in RPSL format. % % The RIPE Database is subject to Terms and Conditions. % See http://www.ripe.net/db/support/db-terms-conditions.pdf % Note: this output has been filtered.
% To receive output for a database update, use the "-B" flag.
% Information related to '94.245.64.0 - 94.245.127.255'
inetnum: 94.245.64.0 - 94.245.127.255
descr: Microsoft Limited
org: ORG-MA42-RIPE
netname: UK-MICROSOFT-20081107
country: GB
admin-c: AS9763-RIPE
tech-c: EN603-RIPE
tech-c: BR329-ARIN
status: ALLOCATED PA
mnt-by: RIPE-NCC-HM-MNT
mnt-lower: MICROSOFT-MAINT
mnt-domains: MICROSOFT-MAINT
mnt-routes: MICROSOFT-MAINT
source: RIPE # Filtered
organisation: ORG-MA42-RIPE
org-name: Microsoft Limited
org-type: LIR
address: Microsoft
Darren Norman
One Microsoft Way
WA 98052 Redmond
UNITED STATES
phone: +1 (425) 703 6647
fax-no: +1 425 936 7329
e-mail: danorm@microsoft.com
admin-c: NORM1-RIPE
admin-c: NORM1-RIPE
admin-c: NORM1-RIPE
mnt-ref: MICROSOFT-MAINT
mnt-ref: RIPE-NCC-HM-MNT
mnt-by: RIPE-NCC-HM-MNT
source: RIPE # Filtered
person: Allie Settlemyre
address: Microsoft Limited
address: One Microsoft Way,
address: Redmond, WA 98052
address: USA
phone: +1 (425) 705 0516
phone: +1 (425) 936 7329
e-mail: iprrms@microsoft.com
nic-hdl: AS9763-RIPE
source: RIPE # Filtered
person: Bharat Ranjan
address: Microsoft Corporation
address: Redmond, WA, 98102
address: One Microsoft Way
address: USA
phone: +1 (425) 706 3230
fax-no: +1 (425) 936 7329
nic-hdl: BR329-ARIN
source: RIPE # Filtered
e-mail: bharatr@microsoft.com
person: Edet Nkposong
address: Microsoft, One Microsoft Way,Redmond, WA 98052
address: USA
e-mail: edetn@microsoft.com
phone: +14257071045
nic-hdl: EN603-RIPE
mnt-by: MICROSOFT-MAINT
source: RIPE # Filtered
So that is wonderful isn't it? DR and failover problem sorted. Well kindof. It's not perfect as it's very manual. If the European data centre where my application is deployed goes down, I need to know about it so I can tell my DNS registrar to change the CNAME record to point to the application that is deployed in the DR data centre - North Central US.
This means I will have to log into my DNS registrar and change the CNAME when a failure occurs like so:
![]() |
| Figure 4: Setting up a CNAME record |
Surely there is a better way?
Windows Azure Traffic Manager
Although what I have talked about above will work, it's fairly simple and I have done this for some time. But thankfully there is a better way. Microsoft has made available in Community Technical Preview (CTP) a feature called Windows Azure Traffic Manager.
Unlike the way the beta programmes work in Azure, you can start using the Traffic Manager right away. There is no request to make in order to start using it - as per the beta programme
Windows Azure Traffic Manager can solve you're failover DR strategy without having to touch any DNS server/registrar once it's setup and more. It supports the following:
- Performance – traffic is forwarded to the closest hosted service in terms of network latency
- Round Robin – traffic is distributed equally across all hosted services
- Failover – traffic is sent to a primary service and, if this service goes offline, to the next available service in a list
So Traffic Manager will solve our problem of having to manually update the DNS registrar with the new Azure data centre DNS cloudapp domain name. Great, how do I do it?
Enabling Traffic Manager
To start using Traffic Manager you need to use the Windows Azure Management Portal to create a policy.
To do this navigate to the Windows Azure Management Portal and sign-in: http://windows.azure.com. Then click Virtual Network > Get Started With Traffic Manager.
See figure 5 below:
![]() |
| Figure 5: Getting started with Windows Azure Traffic Manager |
Once you click the Get Started with Traffic Manager button, you'll see a dialog box similar to the following popup:
![]() |
| Figure 6: Creating a Traffic Manager Policy |
Notice, there is a lab that you can do that covers all this setup of Traffic Manager here: http://msdn.microsoft.com/en-us/gg197529 but I have included here for the bigger picture of what specifically Traffic Manager is designed to solve and how you would solve these problems without it.
I have filled in the policy above as per the original high-level architecture diagram in figure 1 above. Note: DNS names are different from my diagram but the concept and design is the same.
Some data here is important, one piece is the DNS time to live (TTL). This is the maximum time users will have to wait until the DNS server gets updated with the new URL should a failure occur. The default is 5 minutes (300 seconds). The other important peice of information is the Traffic Manager DNS Prefix field.
Well, the Traffic Manager DNS Prefix field can be anything we want (so long as it hasn't been used already) as the users will never see it. Later we will reconfigure our DNS registrar to point to this DNS address.
Once I click OK, the policy is then created and it is active in Traffic Manager:
![]() |
| Figure 7: Our policy in traffic manager |
![]() |
| Figure 8: That's it, our DNS configured and never needs to change again! |
We are simply handing the problem of failover over to Windows Azure. So in the above case, Azure will handle changing the DNS CNAME configuration should a failure occur.
Making Sure Traffic Manager is Working
What we now need to do is test that the Traffic Manager failover feature is working correctly.
If we now run a trace route on our new traffic manager URL it should resolve to the Europe data centre (in my case http://remotemedia.cloudapp.net) - remember I have two data centres 1 in Europe (active) and 1 in North Central US (passive):
![]() |
| Figure 9: Tracing traffic manager configuration |
Now I want to force a failure so I can test the failover. This is easy, all I need to do is shutdown the Europe data centre services like so:
![]() |
| Figure 10: Shutting down active node in Windows Azure |
Once 5 minutes has elapsed, I'll run the same trace route command via a command-prompt like so:
![]() |
| Figure 11: Tracing now that Europe services are down |
Also, if I run the trace one layer out from my custom domain: http://remotemedia.simonrhart.com, I get the expected failover data centre as above [remotemedia-dr.cloudapp.net]:
![]() |
| Figure 12: Running a trace route from my custom domain |
How does all this look, consider the new amended high-level architecture diagram in figure 13 below:
![]() |
| Figure 13: Complete high-level architecture diagram using Traffic Manager for DR |
Conclusion
So I think the Windows Azure Traffic Manager is a good solution at solving your Windows Azure failover needs. Checkout the Traffic Manager training lab for a hands-on exercise on how to use it in more detail.
In this article, I have also used a public DNS registrar, but if your users are within a corporate LAN but you want to make use of a public cloud platform like Windows Azure, the same concepts apply to an internal DNS server farm.
In this blog post, I wanted to show how DR can be done in a PaaS model like Windows Azure - hopefully you can see how easy it is with Windows Azure Traffic Manager.
Thursday, March 29, 2012
Buxton Sketch font for use with the patterns & practices style Visio stencil
I wrote a blog post recently that included a link where you can download a Microsoft Visio 2010 stencil that resembles the stencils the Microsoft patterns & practices team use here: http://www.simonrhart.com/2012/03/how-to-create-architecture-diagrams.html
You can download this stencil here: https://bitbucket.org/azurebook/windows-media-remote-control/src/2ec03aa26249/Artefacts/Diagramming/Templates/AzureBook.vss
I created it on a machine that runs the Windows 8 Consumer Preview build and used a font called Buxton Sketch as it looks like a handwritten font and looks quite good for a diagramming white board effect. It seems Windows 8 CP already has the needed Buxton Sketch font installed as part of the standard OS install. So if you haven't got that font installed on your machine when you fire up the stencil (and Windows 7 doesn't), Visio will just default to its default font which doesn't look very good.
So you need to download the Buxton Sketch font and install it from here: http://fontsforweb.com/font/generatezip/?id=1049 I will upload this to bitbucket in due course.
You can download this stencil here: https://bitbucket.org/azurebook/windows-media-remote-control/src/2ec03aa26249/Artefacts/Diagramming/Templates/AzureBook.vss
I created it on a machine that runs the Windows 8 Consumer Preview build and used a font called Buxton Sketch as it looks like a handwritten font and looks quite good for a diagramming white board effect. It seems Windows 8 CP already has the needed Buxton Sketch font installed as part of the standard OS install. So if you haven't got that font installed on your machine when you fire up the stencil (and Windows 7 doesn't), Visio will just default to its default font which doesn't look very good.
So you need to download the Buxton Sketch font and install it from here: http://fontsforweb.com/font/generatezip/?id=1049 I will upload this to bitbucket in due course.
Saturday, March 24, 2012
Git and remote branches
If you use Git as a source control system, and if you're anything like me, you might forget the commands to push a local branch to create a new remote branch on origin or to just create a remote branch from master or to delete remote branches etc..
There are a couple posts that I read periodically whenever I need to do those things as I simply don't use them enough in order to remember them unless I write scripts to do so (which I try to avoid as this obfuscates Git for other Git users).
The first one is here:
http://gitready.com/beginner/2009/02/02/push-and-delete-branches.html
and this one is very good:
http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/
There are a couple posts that I read periodically whenever I need to do those things as I simply don't use them enough in order to remember them unless I write scripts to do so (which I try to avoid as this obfuscates Git for other Git users).
The first one is here:
http://gitready.com/beginner/2009/02/02/push-and-delete-branches.html
and this one is very good:
http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/
Friday, March 23, 2012
Today is my last day at Smart421
Today is my last day at Smart421. It's been fairly short (1.5 yrs) but it's been a very memorable varied experience!
I blogged about joining Smart in November 2010 here: http://www.simonrhart.com/2010/11/smart421.html
As mentioned in that blog post I had hoped to become a TOGAF practitioner, I am not TOGAF certified (not taken the course or exams) but I have gained a much broader level of architecture experience and not just application architecture.
Being a Smartie (permie at Smart421) has been very different from most companies I have worked at. They have a very flat hierarchy and a very family feel to the place. For instance, the Managing Director - Neil Miles periodically buys everyone fish and chips from a fish and chip van that parks up outside the office on a Friday! how cool is that :) The CTO Robin Meehan often attends techie developer user group sessions in London in response to someone sending a message to one of the practises distribution lists! I can have a beer with the management team as if they were on my team on a project.
When you're out on a customers site and having to stay in a hotel, every few months, most of the management team will come down and take the whole team out for supper and drinks which last well into the night.
So why I am leaving? well I was contacted by Microsoft head hunter - Alina Burnus back in November regarding a World Wide Windows Azure CoE (Centre of Excellence) Solution Architect role (wow, what a mouthful). After reading the job specification for this role I jumped at the opportunity. Windows Azure, Solution Architecture and helping customers and the community to deliver business benefits using technology are what I want to do every day. I love writing code, but there is a time when you no longer code in your day job. I also love Technical Architecture and no doubt there will be an element of this in my new role. I will still stay current with language features, trends and patterns, I just won't be knee deep in code every day.
3 months, 9 interviews and n hours later, I was offered a job on this great team headed up by Steve Fox.
Having been a Microsoft Device Application Development MVP in the past, I have a fairly good idea what it is like at Microsoft. It's also not that my interests have changed in that I don't focus purely on mobility anymore, my job has lead me to be much broader in terms of Solution Architecture and less focused on the detail. I will always have a passion for mobile as I think it's one the most challenging and rewarding forms of software development today.
The team will be doing a full day pre-conference bootcamp at both TechEd EMEA and TechEd North America this year: TechEd EMEA: http://europe.msteched.com/PreCons TechEd USA: http://northamerica.msteched.com/preconferenceseminars#fbid=s9KpbHxjNTg
I start at Microsoft on the 10 April and no doubt you will hear about many cool and exciting things coming out of the cloud space in the form of Azure...stay tuned...
Wednesday, March 21, 2012
Windows 8 - not able to install Windows Identity Foundation
If you try to install Windows Identity Foundation (WIF) runtime system (pre-req for the WIF SDK) on Windows 8 Consumer Preview, you will get the error "The update is not applicable to your computer" in figure 1:
To fix this, the WIF runtime system is now part of Windows 8 and can be installed as a Windows feature like IIS, so the WIF runtime system doesn't need to be downloaded. To do this run Control Panel > Programs and Features > Turn Windows Features on or off.
Then check the Windows Identity Foundation 3.5 check box in the Windows Features dialogue box and click OK:
Once you have done that then you'll be able to install the WIF SDK.
Once the WIF SDK installer is complete, you'll be able to reference the WIF API's from Visual Studio and use WIF on Windows 8 for your federated identity needs.
![]() |
| Figure 1: Error when trying to install WIF on Windows 8 |
Then check the Windows Identity Foundation 3.5 check box in the Windows Features dialogue box and click OK:
![]() |
| Figure 2: Installing WIF on Windows 8 |
Once you have done that then you'll be able to install the WIF SDK.
![]() |
| Figure 3: Now able to install WIF SDK on Windows 8 |
Once the WIF SDK installer is complete, you'll be able to reference the WIF API's from Visual Studio and use WIF on Windows 8 for your federated identity needs.
Monday, March 19, 2012
How to create architecture diagrams like the Microsoft p&p team using Visio 2010
Have you ever wanted to create the same type of diagrams the patterns & practices team do at Microsoft in terms of the shapes and themes they use?
Well, as I am co-authoring a Windows Azure book, it is important we all use the same stencil for our architecture diagrams. So I decided to create a Microsoft Visio 2010 stencil that looks much like the one the p&p team uses.
Here is an example of a simple diagram from the chapter I am writing on Service Bus. This is the very first diagram in the book to explain the Windows Azure Service Bus Relay feature:
It would be great to hear some feedback on this stencil.
You can get this stencil here: https://bitbucket.org/azurebook/windows-media-remote-control/src/2ec03aa26249/Artefacts/Diagramming/Templates/AzureBook.vss
Well, as I am co-authoring a Windows Azure book, it is important we all use the same stencil for our architecture diagrams. So I decided to create a Microsoft Visio 2010 stencil that looks much like the one the p&p team uses.
Here is an example of a simple diagram from the chapter I am writing on Service Bus. This is the very first diagram in the book to explain the Windows Azure Service Bus Relay feature:
![]() |
| Figure 1: Example p&p like diagram in Visio 2010 |
It would be great to hear some feedback on this stencil.
You can get this stencil here: https://bitbucket.org/azurebook/windows-media-remote-control/src/2ec03aa26249/Artefacts/Diagramming/Templates/AzureBook.vss
Tuesday, March 13, 2012
Apache Hadoop on Windows Azure - Now in CTP
This is a huge subject - Big Data so I'm not going to attempt to explain what it is here. But what I will say is the Apache Hadoop project is now available in Azure as a CTP offering (which is one way to implement Big Data). You also have the opportunity to get on the Technical Adoption Programme (TAP) and work directly with the Microsoft Azure product group.
Being on the TAP enables you to give feedback on what you think of early drops of Microsoft software which in turn allows you to help shape Microsoft products.
Here is a snip from the Apache Hadoop project website on what it is:
To learn more about the Apache Hadoop project, see here: http://hadoop.apache.org/
For more information on Hadoop for Windows Azure, see here: https://www.hadooponazure.com/ and to register to be considered for this CTP, please see here: https://connect.microsoft.com/SQLServer/Survey/Survey.aspx?SurveyID=13697
Being on the TAP enables you to give feedback on what you think of early drops of Microsoft software which in turn allows you to help shape Microsoft products.
Here is a snip from the Apache Hadoop project website on what it is:
The Apache™ Hadoop™ project develops open-source software for reliable, scalable, distributed computing.
The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using a simple programming model. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-avaiability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-availabile service on top of a cluster of computers, each of which may be prone to failures.
To learn more about the Apache Hadoop project, see here: http://hadoop.apache.org/
For more information on Hadoop for Windows Azure, see here: https://www.hadooponazure.com/ and to register to be considered for this CTP, please see here: https://connect.microsoft.com/SQLServer/Survey/Survey.aspx?SurveyID=13697
Friday, March 09, 2012
Smart421 - UK Azure User Group Reference Architecture using Service Bus for pub/sub
UPDATE 12/03/12: Source code for my presentation is now available here: https://bitbucket.org/azurebook/windows-media-remote-control/overview You will need to edit various config files to include your X.509 certs, Service Bus and ACS namespaces and ACS Simple Web Token (SWT) symmetric keys. I will write a blog post on how to do all these things and get it running in due course.
I presented at the recent UK Windows Azure User Group on Tuesday 6th March. You can view my Prezi presentation here: http://t.co/FH4S03gL
My colleague Mark Want has written a post regarding this event on the Smart421 blog here: http://smart421.wordpress.com/2012/03/09/uk-windows-axure-user-group/
I'm really starting to like this group and getting to know the folks from this group is great fun. They are now starting to run events in Manchester as well as London.
I talked about a reference architecture that I have been working on in my spare time over the last few weeks. The code will be available soon and I will blog and tweet when made available.
The solution uses quite a few features of Azure such as: MVC 4 Web Role, ACS, SAML 2.0 and SWT tokens, Google as an identity provider, Service Bus Relay services, Topics and subscriptions, Castle Windsor with the Service Bus and Topics/Subscriptions for pub/sub, a DR strategy and global DNS to enable DR and hide the cloudapp.net domain.
Next I want to show ADFS as an STS over ACS, Idempotent messaging when using WCF with the Service Bus and load testing using VM Roles.
I presented at the recent UK Windows Azure User Group on Tuesday 6th March. You can view my Prezi presentation here: http://t.co/FH4S03gL
My colleague Mark Want has written a post regarding this event on the Smart421 blog here: http://smart421.wordpress.com/2012/03/09/uk-windows-axure-user-group/
I'm really starting to like this group and getting to know the folks from this group is great fun. They are now starting to run events in Manchester as well as London.
I talked about a reference architecture that I have been working on in my spare time over the last few weeks. The code will be available soon and I will blog and tweet when made available.
The solution uses quite a few features of Azure such as: MVC 4 Web Role, ACS, SAML 2.0 and SWT tokens, Google as an identity provider, Service Bus Relay services, Topics and subscriptions, Castle Windsor with the Service Bus and Topics/Subscriptions for pub/sub, a DR strategy and global DNS to enable DR and hide the cloudapp.net domain.
Next I want to show ADFS as an STS over ACS, Idempotent messaging when using WCF with the Service Bus and load testing using VM Roles.
Thursday, March 01, 2012
Getting the RSS feed from an iTunes podcast
Have you ever wanted to get the RSS feed URI from a iTunes podcast page because you don't want iTunes installed on your machine?
I found this website (http://itunes.so-nik.com/) that gives you the RSS XML URI from the passed iTunes URL:
Simply enter the iTunes podcast URL into the text box in the page and hit Submit. In my example I wanted the RSS feed to this podcast: http://itunes.apple.com/podcast/judge-jules-presents-judgement/id302973072
The tool (as if by magic) figures out what the RSS feed is so you can use it in other non-proprietary tools. I wanted the above for my Zune HD. Nice eh!?
I found this website (http://itunes.so-nik.com/) that gives you the RSS XML URI from the passed iTunes URL:
| Figure 1: Enter iTunes URL into the text box and hit submit |
| Figure 2: Result of the tool that greps the RSS URI |
Tuesday, February 28, 2012
Where is the "New Virtual Machine Role" menu option in Visual Studio 2010?
A while back I wrote about the new-ish VM Role feature in Windows Azure (still in beta right now). You can read that post here.
If you're not sure what the VM Role is, then this MSDN post should clear that up for you.
Once you have joined the VM Role beta programme, the status should have changed in the Azure Portal to Active, and you should have received an email with links to .reg files which alter relevant Azure Visual Studio registry keys which in turn enables this menu option in Visual Studio.
Unfortunately for me, I received no such email. So I searched the Internet for them and found the location where they can be downloaded.
For 64-bit operating systems see here: http://go.microsoft.com/fwlink/?LinkID=206860
For 32-bit operating systems see here: http://go.microsoft.com/fwlink/?LinkID=205313
Alternatively, you can simply use this key for 64-bit:
[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Windows Azure Tools for Microsoft Visual Studio 2010\1.0]
"VirtualMachineRoleEnabled"=dword:00000001
For 32-bit:
[HKEY_CURRENT_USER\Software\Microsoft\Windows Azure Tools for Microsoft Visual Studio 2010\1.0]
"VirtualMachineRoleEnabled"=dword:00000001
Once you have run either of those commands, or edited your registry manually, restart Visual Studio and you should now see the new menu option that will enable you to create a VM role to deploy to Windows Azure:
Enjoy!
If you're not sure what the VM Role is, then this MSDN post should clear that up for you.
Once you have joined the VM Role beta programme, the status should have changed in the Azure Portal to Active, and you should have received an email with links to .reg files which alter relevant Azure Visual Studio registry keys which in turn enables this menu option in Visual Studio.
![]() |
| Figure 1: Active VM Role feature |
For 64-bit operating systems see here: http://go.microsoft.com/fwlink/?LinkID=206860
For 32-bit operating systems see here: http://go.microsoft.com/fwlink/?LinkID=205313
Alternatively, you can simply use this key for 64-bit:
[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Windows Azure Tools for Microsoft Visual Studio 2010\1.0]
"VirtualMachineRoleEnabled"=dword:00000001
For 32-bit:
[HKEY_CURRENT_USER\Software\Microsoft\Windows Azure Tools for Microsoft Visual Studio 2010\1.0]
"VirtualMachineRoleEnabled"=dword:00000001
Once you have run either of those commands, or edited your registry manually, restart Visual Studio and you should now see the new menu option that will enable you to create a VM role to deploy to Windows Azure:
![]() |
| Figure 2: The new "New Virtual Machine Role" menu option |
Enjoy!
Thursday, February 16, 2012
Testing a Custom Filter Provider in ASP.NET MVC 3
There are many good articles published on how to write a custom Filter Provider in MVC 3 in order to make dependency injection possible on the web. So I'm not going to talk about that, but there doesn't seem to be many articles on how to test those custom filter providers.
The role of the filter provider is to simply return filters for a given controller, but this post assumes you know what a filter provider does so I'm going to skip the explaination. I've provided an MSDN link to the FilterProvider technical page for more information.
The FilterAttributeFilterProvider as provided by the ASP.NET MVC framework looks like the following: (I have the ASP.NET MVC source code on my machine, will show how to install and access this code in another post...)
So your custom filter provider might look something like the following (IoC container StructureMap specific):
In the above filter provider, we are getting a list of filters for the passed controller context, and then calling BuildUp on those instances using StructureMap IoC container. This is a neat feature of StructureMap that allows you to support property injection without having to use decorators in the filter classes. If you'd like to learn more about StructureMaps BuildUp feature, please see this link: http://codebetter.com/jeremymiller/2009/01/16/quot-buildup-quot-existing-objects-with-structuremap/
You probably know already that ideally you'd want to call the base.GetFilters(ControllerContext, ActionDescriptor) to be on an interface so it can be easilly stubbed out in out unit tests, but it's not, its part of the superclass that we are deriving from.
So we are going to have to construct a ControllerContext and ActionDescriptor in order to pass into our filter provider during testing. All we are really aiming to test here is that the container BuildUp method is called against the filter instance. Your requirement might be slightly different depending on what you are trying to achieve and perhaps the IoC container you might or might not be using. But the principles should be the same.
Before I show how to test the above we need some supporting code. The first being a mocked controller that is decorated with a filter:
So here we simply have a controller with an action named MockAction that includes a custom action and does nothing. Notice how the action is decorated with a CustomErorHandler attribute - which is a custom filter. It's this attribute that we want to inject our dependencies into. I've not shown the code for this as it's not important, what is important is to realise that this filter has dependencies that cannot be injected via the constructor due to limitations in .NET (i.e. it being an attribute).
First consider the actual test code (note: I'm using Moq as my mocking tool of choice - just because it's a change to Rhino):
I'm sure in later releases of ASP.NET MVC this will improve, but for now this is a work around to test your custom filter providers.
This sample code is up on BitBucket here if you want it: http://code.simonrhart.com/mvc-3-examples/src/5b122b445c86/Testing%20StructureMap%20Filter%20Provider
Enjoy!
The role of the filter provider is to simply return filters for a given controller, but this post assumes you know what a filter provider does so I'm going to skip the explaination. I've provided an MSDN link to the FilterProvider technical page for more information.
The FilterAttributeFilterProvider as provided by the ASP.NET MVC framework looks like the following: (I have the ASP.NET MVC source code on my machine, will show how to install and access this code in another post...)
public class FilterAttributeFilterProvider : IFilterProvider
{
private readonly bool _cacheAttributeInstances;
public FilterAttributeFilterProvider()
: this(true) {
}
public FilterAttributeFilterProvider(bool cacheAttributeInstances) {
_cacheAttributeInstances = cacheAttributeInstances;
}
protected virtual IEnumerable<filterattribute> GetActionAttributes(ControllerContext
controllerContext, ActionDescriptor actionDescriptor) {
return actionDescriptor.GetFilterAttributes(_cacheAttributeInstances);
}
protected virtual IEnumerable<filterattribute> GetControllerAttributes(ControllerContext
controllerContext, ActionDescriptor actionDescriptor) {
return actionDescriptor.ControllerDescriptor.GetFilterAttributes(_cacheAttributeInstances);
}
public virtual IEnumerable<filter> GetFilters(ControllerContext controllerContext,
ActionDescriptor actionDescriptor) {
ControllerBase controller = controllerContext.Controller;
if (controller == null) {
return Enumerable.Empty<filter>();
}
var typeFilters = GetControllerAttributes(controllerContext, actionDescriptor)
.Select(attr => new Filter(attr, FilterScope.Controller, null));
var methodFilters = GetActionAttributes(controllerContext, actionDescriptor)
.Select(attr => new Filter(attr, FilterScope.Action, null));
return typeFilters.Concat(methodFilters).ToList();
}
}
It is the GetFilters method we are interested in as this is the method we override in our custom filter provider to provide things like dependency injection support.So your custom filter provider might look something like the following (IoC container StructureMap specific):
public class StructureMapFilterProvider : FilterAttributeFilterProvider
{
private readonly IContainer container;
public StructureMapFilterProvider(IContainer container)
{
container = container;
}
public override IEnumerable<Filter> GetFilters(ControllerContext controllerContext,
ActionDescriptor actionDescriptor)
{
var filters = base.GetFilters(controllerContext, actionDescriptor);
if (filters != null)
{
foreach (var filter in filters)
{
container.BuildUp(filter.Instance);
}
return filters;
}
return default(IEnumerable<Filter>);
}
}
In the above filter provider, we are getting a list of filters for the passed controller context, and then calling BuildUp on those instances using StructureMap IoC container. This is a neat feature of StructureMap that allows you to support property injection without having to use decorators in the filter classes. If you'd like to learn more about StructureMaps BuildUp feature, please see this link: http://codebetter.com/jeremymiller/2009/01/16/quot-buildup-quot-existing-objects-with-structuremap/
You probably know already that ideally you'd want to call the base.GetFilters(ControllerContext, ActionDescriptor) to be on an interface so it can be easilly stubbed out in out unit tests, but it's not, its part of the superclass that we are deriving from.
So we are going to have to construct a ControllerContext and ActionDescriptor in order to pass into our filter provider during testing. All we are really aiming to test here is that the container BuildUp method is called against the filter instance. Your requirement might be slightly different depending on what you are trying to achieve and perhaps the IoC container you might or might not be using. But the principles should be the same.
Before I show how to test the above we need some supporting code. The first being a mocked controller that is decorated with a filter:
public class FilterProviderControllerMock : Controller
{
[CustomErrorHandler]
public void MockAction()
{
}
}
So here we simply have a controller with an action named MockAction that includes a custom action and does nothing. Notice how the action is decorated with a CustomErorHandler attribute - which is a custom filter. It's this attribute that we want to inject our dependencies into. I've not shown the code for this as it's not important, what is important is to realise that this filter has dependencies that cannot be injected via the constructor due to limitations in .NET (i.e. it being an attribute).
First consider the actual test code (note: I'm using Moq as my mocking tool of choice - just because it's a change to Rhino):
[TestFixture]
public class StructureMapFilterProviderTests
{
private Mock<IContainer> containerMock;
private StructureMapFilterProvider filterProvider;
private Filter customFilter;
private List<Filter> customFilterCollection;
private CustomErrorHandlerAttribute customActionFilter;
private Mock<HttpContextBase> httpContextMock;
[TestFixtureSetUp]
public void Setup()
{
customActionFilter = new CustomErrorHandlerAttribute();
customFilter = new Filter(customActionFilter, FilterScope.Action, 1);
customFilterCollection = new List<filter>();
customFilterCollection.Add(customFilter);
containerMock = new Mock();
filterProvider = new StructureMapFilterProvider(this.containerMock.Object);
httpContextMock = new Mock<HttpContextBase>();
}
[Test]
public void CanInterceptCreationOfFilters()
{
// Arrange
containerMock.Setup(x => x.BuildUp(customActionFilter));
var controllerMock = new FilterProviderControllerMock();
var routeData = new RouteData();
var controllerContext = new ControllerContext(this.httpContextMock.Object, routeData, controllerMock);
ControllerDescriptor controllerDescriptor = new
ReflectedControllerDescriptor(typeof(FilterProviderControllerMock));
var mockActionMethodInfo = controllerMock.GetType()
.GetMethods(BindingFlags.Public | BindingFlags.Instance)
.Where(x => x.Name.Equals("MockAction")).FirstOrDefault();
ActionDescriptor actionDescriptor = new
ReflectedActionDescriptor(mockActionMethodInfo, "MockAction", controllerDescriptor);
// Act
var filters = filterProvider.GetFilters(controllerContext, actionDescriptor);
// Assert
containerMock.Verify(x => x.BuildUp(this.customActionFilter), Times.Once());
}
}
So what's going on here, there seems to be a lot of code. There is because the superclass filter provider is hard to test due to how it was designed (using inheritance).
So the test above is simply creating a ControllerContext and an ActionDescriptor which is required in order to call the filter provider. Doing these things requires a bit of .NET reflection that would normally be done by the MVC framework at runtime.
Once reflection has been used and the correct action method has been identified, the provider can easily select the correct filter then our custom filter can build it up (inject all required dependencies into the filter). We then finally assert that the build up happens on our custom filter at least once otherwise the test will fail.I'm sure in later releases of ASP.NET MVC this will improve, but for now this is a work around to test your custom filter providers.
This sample code is up on BitBucket here if you want it: http://code.simonrhart.com/mvc-3-examples/src/5b122b445c86/Testing%20StructureMap%20Filter%20Provider
Enjoy!
Tuesday, January 31, 2012
MakeCert Error: Too many parameters
I was just reading this MSDN post on creating a self-signed certificate for use with ADFS: http://msdn.microsoft.com/en-us/library/bfsktky3.aspx
The command I need, looks like the following:
If you copy the sample command from the MSDN page above and run it via the command-line, you'll get error "Too many parameters". It turns out the dash used in the MSDN post above is actually character: \u2013 (DASH-EN) and not minus \u002D and it's the minus character that the tool is expecting.
So to make this work, simply replace the hyphen with the minus sign when keying in the command as defined above. In the above sample, I have replaced the incorrect character with the correct one so feel free to just copy and paste it.
I learned this from here http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/1e41910f-2f89-439c-93a6-57e5c391d7ca/
Thanks to Carlos Figueira for finding this.
The command I need, looks like the following:
Makecert -r
-pe
-n CN="www.example.com"
-b 05/10/2010
-e 12/22/2011
-eku 1.3.6.1.5.5.7.3.1
-ss my
-sr localmachine
-sky exchange
-sp "Microsoft RSA SChannel Cryptographic Provider"
-sy 12
If you copy the sample command from the MSDN page above and run it via the command-line, you'll get error "Too many parameters". It turns out the dash used in the MSDN post above is actually character: \u2013 (DASH-EN) and not minus \u002D and it's the minus character that the tool is expecting.
So to make this work, simply replace the hyphen with the minus sign when keying in the command as defined above. In the above sample, I have replaced the incorrect character with the correct one so feel free to just copy and paste it.
I learned this from here http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/1e41910f-2f89-439c-93a6-57e5c391d7ca/
Thanks to Carlos Figueira for finding this.
Wednesday, January 11, 2012
My Microsoft Windows Azure 2012 wish-list
UPDATE: Also I'd like to see a version of the Service Bus that's compiled against the .NET Framework v3.5 as not all consumers are able to move to .NET 4 right now.
I have come up with my Microsoft Windows Azure wish-list for 2012 below (hope the Azure product group read this :)
I have come up with my Microsoft Windows Azure wish-list for 2012 below (hope the Azure product group read this :)
- Auto scale compute instances (I know third-party tools exist)
- Allow for scheduled suspended instances that do not eat compute time and also allow for auto scaling out/in schedules without having to delete services from Azure
- Load balancing (F5) for compute instances not round robin
- Ability to configure topic/subscriptions rules via the Azure Management Portal
- Access Control Service support (or any type of federated security support) for SQL Azure for alternate additional security
- Out of the box storage editor for managing blobs, tables and queues (I know 3rd party tools exist and you can do this in Visual Studio)
- Developer fabric for Service Bus and Service Bus queues and topics (this would be awesome)
- Portal support for VM roles i.e. uploading VHD's (I know command-line tools exist)
- Out of the box support for viewing Service Bus queues and topics and verifying Service Bus endpoints without retrieving the ATOM service bus feed (I know open source code exists)
- Access Control Service support for storage, tables, blobs, and queues
- Support for Hadoop/Big Data on Azure or any type of high performance computing perhaps a instance that targets or VM role to support Windows Server HPC 2008
- An easy DR strategy for all Azure services i.e. compute, storage etc.
- Managed Service Management API
- Give MSDN subscription holders 12 month usage
There in no particular order, not asking much am I!
Thursday, January 05, 2012
VM Role custom VHD instance in Azure Compute - avoid the gotchas!
Background on the VM Role for Windows Azure
Even though I have a ultimate MSDN account which means I have 1500 hrs of free compute time on Azure, I'm using the free 3 month trial anyone can get regardless of whether you have an MSDN account or not.
I got this account (let me correct that) I received this Azure account from a colleague due to sickness and haven't given it back! since then I have been exploring many of the new features within Azure using this account. The thing that has caught my attention, is that, many people within the community is referring to the VM Role as IaaS or Microsoft's attempt at IaaS (which it is *not*).
Steve Plank DPE in Microsoft Reading UK has a very good post on this subject here just to clear up any confusion: (Windows Azure VMRole != IaaS) http://blogs.msdn.com/b/plankytronixx/archive/2010/10/29/windows-azure-vmrole-iaas.aspx
Remember, once your custom VM Role instance is deployed and you are running code on that image, the PaaS model works in the exact same way as a out-of-the-box Azure OS image does when using either Web Role or a Worker Role compute instance. Meaning that on reboot the image could be rebuilt and deployed in another rack or sector and any data you might have written to that particular instance will have been lost.
VM Role compliments the Worker and Web roles in Azure compute. All these services still fall under the standard PaaS compute model in Azure. It just so happens that you are in control of the actual image (OS image) that gets deployed to the instances you have specified. The image currently (as of Jan 2012) has to be Windows Server 2008 R2 Standard or Windows Server 2008 R2 Enterprise edition. In terms of licencing the OS, this is covered as part of the compute costs when you actually deploy your application to run on the custom image.
Today (Jan 2012) the VM Role feature is in beta and if you attempt to upload a custom VM VHD to Azure without being in the beta, it will fail - don't learn this the hard way like I did! instead simply request to be in the beta programme from the Azure Management Portal. You can do this by logging onto the Azure portal management web site: http://windows.azure.com/ then clicking Home. Then right at the top click Beta Programmes. You should then see the VM Role feature, simply click the check box then click Apply or OK. Once you do this you will normally be accepted within 1 day or so.
My Azure 3 month trial account has now been disabled so I can't show screen shots until I sign up using my MSDN account which I haven't done yet. Finding this beta programme link isn't hard though.
Types of VM technologies supported
Notice I keep saying VM Role VHD instance. Yes you are correct, Azure today only supports Hyper-V virtual images. I am unaware of any technology that will create these images other than a physical Windows Server machine running Hyper-V. I do happen to have a couple lying around so creating them wasn't an issue for me but I can see it being a problem for folks that do not have hardware lying around to use. I'm interested to hear any potential solutions around this. My desktop vitalisation technology of choice today is Oracle VirtualBox. VirtualBox can mount and run VHD's but I'm unaware of being able to actually create them using VirtualBox.
Uploading a VM Role image to Windows Azure
This post talks you through the entire process of creating a VHD and deploying to Azure, it's very good: http://msdn.microsoft.com/en-us/gg502178 This article also shows you how to target that custom image in Visual Studio.
The syntax is slightly wrong for the upload of a VHD image though. It is actually quite strange with the odd quotes and hyphens etc. Just to be clear, today, there is no support for uploading a VHD using the portal, you need to use the Azure SDK tool csupload. I am unaware of a RESTful API to do this, no doubt there is.
An example of it's usage is as follows:
csupload Add-VMImage -Connection "SubscriptionId=xxxxxxxx-388a-4304-90c7-d239c3843624;
CertificateThumbprint=xxxxxxxxxxxxxxxxxxxxA115BE5D35A45D4E18F7"
-Description "Base image Windows Server 2008 R2"
-LiteralPath "\\\nodes\baseimage.vhd"
-Name baseimage.vhd -Location "North Europe"
You'll need to run that command from an administrative Azure command-prompt.
Of course you need to use you're own Windows Azure Subscription ID and x.509 certificate thumbprint. Note, regarding certificates, even if you have the correct thumbprint, you will need the actual certificate installed in the certificate store from where you run this upload command.
The tool is quite clever in that it compresses the VM image before upload. The web site link above covers this process in quite nice detail and where you go from here.
Be patient though, this process takes a while to run - of course depending on your upload speed.
So why would I ever use a VM Role?
This has been talked about so much already in the community but I though I'd add my view on the subject.
There are many cases where you simply need custom code running within the standard image that would otherwise not be possible or installable as a start up custom task (the process of running custom installers when the instance is booted and comes out of sys-prep mode).
One example is performance testing. It could be that you setup a core base image with a tool such as LoadUI for performing performance testing in the cloud saving the need to run this testing on on-premise hardware. This could also include configuration for performance counters.
There are many other scenarios similar to the above. But remember, treat any data being written locally as transient data.
Saturday, December 31, 2011
The trust relationship between this workstation and the primary domain failed
This evening I encountered an error while attempting to log onto my Windows 7 client machine: The trust relationship between this workstation and the primary domain failed
I think it would be a good idea to raise a bug report for this.
Happy new year!
I have a Windows Server 2008 R2 domain controller running DHCP, DNS and of course ADDS.
I figured out the issue (although I would have never of suspected it) moments before the error, I was reconfiguring the DNS IP address for a scope against my DHCP server.
I figured out the issue (although I would have never of suspected it) moments before the error, I was reconfiguring the DNS IP address for a scope against my DHCP server.
Below is the DHCP scope editor for DHCP in Windows Server 2008 R2. This is a fairly old box which I haven't changed that much over 2 or so years and it is used by many devices/machines.
Searching the web didn't really give any firm solutions other than to rejoin to the domain. so I tried that and it worked.
I think it would be a good idea to raise a bug report for this.
Happy new year!
Thursday, December 08, 2011
London Windows Azure User Group LWAUG - first meeting update
LWAUG - what a mouthful! As mentioned in an earlier post, I attended the LWAUG first meeting on Tuesday night in London. I thoroughly enjoyed it and learned a lot from it. I also found it particularly useful talking to various folks during breaks and after the talks - as I do with most user groups, engaging with members and exchanging experiences/knowledge is one of the reasons I attend.
Sadly though, I could only stay for Richard Conway's talk on Service Management API's in Windows Azure. Service Management API's allow you to programmatically create and deploy services into Azure. I missed Andy Cross's talk on diagnostics as I had to get back to Norfolk, I didn't get home until 00:30am. Andy's slides can be obtained here: http://lwaugbe.blob.core.windows.net/talks/Fluent%20Diagnostics%20Dec%2011.pptx. (note the use of Azure blob storage to store the files!).
I am told some of the service management API's as demoed by Richard are undocumented. Everything talks via REST in Azure, sorry SOAP folks, nothing to see! REST is removing all the fluff you get with SOAP. SOAP just doesn't scale when you're trying to consume services over constrained low-bandwidth networks such as EDGE and GPRS. As we have a ever so increasing breadth of varied connected devices, i.e. net books, smart phones, laptops, PDAs, tablets etc this is a very big deal. So I'm glad the Microsoft Azure architects stuck with REST in Azure. Anyway, I think this is a big subject and one we could discuss at a future LWAUG event(s).
See here for documentation around Service Management REST API's in Azure: http://msdn.microsoft.com/en-us/library/windowsazure/ee460812.aspx it seems fairly extensive, those messages can easily be sent via Fiddler so you don't need to write anything to play around with the API.
You can download Richards slides here: http://lwaugbe.blob.core.windows.net/talks/Service%20Management%20Dec%2011.pptx (again from blob storage)
Also Richard has uploaded his code used in his demo's here: http://lwaugbe.blob.core.windows.net/talks/HostedServices.etc.zip definitely worth looking at if you want to auto-deploy your Windows Azure services into Azure Compute via mechanisms like continuous deployment for seamless integration for your testers and developers.
I'm looking forward to the next meet.
Sadly though, I could only stay for Richard Conway's talk on Service Management API's in Windows Azure. Service Management API's allow you to programmatically create and deploy services into Azure. I missed Andy Cross's talk on diagnostics as I had to get back to Norfolk, I didn't get home until 00:30am. Andy's slides can be obtained here: http://lwaugbe.blob.core.windows.net/talks/Fluent%20Diagnostics%20Dec%2011.pptx. (note the use of Azure blob storage to store the files!).
I am told some of the service management API's as demoed by Richard are undocumented. Everything talks via REST in Azure, sorry SOAP folks, nothing to see! REST is removing all the fluff you get with SOAP. SOAP just doesn't scale when you're trying to consume services over constrained low-bandwidth networks such as EDGE and GPRS. As we have a ever so increasing breadth of varied connected devices, i.e. net books, smart phones, laptops, PDAs, tablets etc this is a very big deal. So I'm glad the Microsoft Azure architects stuck with REST in Azure. Anyway, I think this is a big subject and one we could discuss at a future LWAUG event(s).
See here for documentation around Service Management REST API's in Azure: http://msdn.microsoft.com/en-us/library/windowsazure/ee460812.aspx it seems fairly extensive, those messages can easily be sent via Fiddler so you don't need to write anything to play around with the API.
You can download Richards slides here: http://lwaugbe.blob.core.windows.net/talks/Service%20Management%20Dec%2011.pptx (again from blob storage)
Also Richard has uploaded his code used in his demo's here: http://lwaugbe.blob.core.windows.net/talks/HostedServices.etc.zip definitely worth looking at if you want to auto-deploy your Windows Azure services into Azure Compute via mechanisms like continuous deployment for seamless integration for your testers and developers.
I'm looking forward to the next meet.
Monday, December 05, 2011
London Azure User Group first meeting - 6th December
Tomorrow night (6th December 2011) I'll be attending the new London Windows Azure User Group meeting near Liverpool Street.
I learn't about it when I attended the recent Windows Azure Bootcamp run by Steve Planky due to the fact that the person that was mean't to go couldn't due to sickness, so I went instead.
I plan to do future presentations for this group and looking forward to it.
There is another Azure user group called UK AzureNet that started in 2009. Lately it has been rather quiet so it's good to see some interest in Azure once again in the community.
If you are quick there seems to be a couple places left, register here: http://www.lwaug.net/
Sunday, December 04, 2011
Why I prefer BitBucket over GitHub
UPDATE 07/01/2012: Thanks to Atlassian for the free BitBucket T-Shirt! :)
I don't really care that GitHub has more repositories or has more traffic or is more popular than X in this case BitBucket. All I really care about is features, and I think BitBucket has more of them.
I wrote about how excited I was about BitBucket a few days ago on my other blog here: http://smart421.wordpress.com/2011/11/17/why-i-like-bitbucket/I don't really care that GitHub has more repositories or has more traffic or is more popular than X in this case BitBucket. All I really care about is features, and I think BitBucket has more of them.
I recently read this post: http://www.pocoo.org/~blackbird/github-vs-bitbucket/bitbucket.html that talks how GitHub is identical to BitBucket except according to Google, GitHub has a much larger community than BitBucket. I think that goes without saying. There is even support for GitHub in linkedin so you can link your repositories to your linkedin profile - I like that.
However with GitHub you have to pay for things like; disk space and private repositories. Well, you do get 300Mb free with GitHub - with BitBucket there is no limit. I need to elaborate on this a bit more. GitHub says these limits are "Soft Limits" and this is to prevent abuse, abuse from what!? adding everything I have ever written to a repository perhaps!
With GitHub the Web UI is just not very intuitive. For example, I was just trying to create a repository, and I'm still trying to figure out how to do it. This could be because I do not have a credit card on file. When clicking "Repositories" I'd expect some kind of link, or button to create a new repo or something.
With BitBucket this is so much finer, I find it a lot more intuitive and I don't have to enter a credit card unless I need to exceed the 5 free contributors I got when I signed up.
Another feature I really like with BitBucket (not sure if you can do this with GitHub) is import repositories from other source control systems such as Git, Mercurial or SVN. You can also create new repositories using Mercurial or Git.
And finally, I like that fact with BitBucket the ability to use a custom internet domain for all my repositories. For example I've set a CNAME record: http://code.simonrhart.com/ to resolve to bitbucket.org. And it just works, navigating to my above sub domain, resolves to my BitBucket account.
So remind me again why I'd use GitHub over BitBucket?
Subscribe to:
Posts (Atom)




























