Building Your First Azure Cloud Service

by mheydt 8. November 2008 23:31 >
This is the first post is a series of posts that I will be making about using the windows Azure cloud computing services.  This first post will be about making your first cloud service that runs locally on your computer.  Over the series of posts I'll explain moving the code into the actual azure cloud, adding storage to your application, using the cloud services as a bus between various distributed applications, providing scalability and reliability, and I'm sure other things that come up along the way.

The first this to do to get started is go to http://www.azure.com:


Click on try it now and download and install the SDKs:



While you are at it, I'd suggest registering for the services.  I did this at the PDC and got registered almost immediately.  I don't know how long it will take at this point, but in the worst case you can still develop and run locally.

Once the SDKs are installed, open visual studio and create a new web cloud service project / solution:



The solution will open and look as follows:



This is the service configuration file.  It is used by the cloud fabric to determine the roles and # of instances of each role to run.

There is another configuration file, the service definition file.  This file informs the fabric how external applications are to talk to the role.  In this case we are defining normal http access:



The project also has a web page added to it, and I've added a little bit of text to it:



You can then run this application with ctrl-f5.  Thing will appear a little different during the build and start up process.  You'll notice some messages about initializing the development storage system, which is basically the local cloud fabric and its data storage.  What's going on is the that application is being packaged and installed into the local fabric.  Once that is done, IE will open and you will see your application:




All in all, this does not seem too exciting as it's a real simple ASP.NET app.  The difference here is that it is running on a local development fabric, not just on a local copy of IIS.  If you look in your task bar, you will notice the following icon (it looks like a couple of azure colored gears):



Click on the icon and select the "show development fabric UI" menu item, and you will see the following user interface:



This UI is showing you the current applications being hosted in the cloud fabric on your local system.  This is a really cool tool, as when you run multiple instances, you will see multiple consoles.  When we actually get around to running .net console apps in the fabric, information that you write to the console will actually be shown here.  In a way this tool is a viewport into what can be many virtualized .net instances running on your system (or in the cloud).

One last thing in this lesson.  Click on service details, and you will get information about the service:



Notice that this information matches the information in the service configuration file that I showed before as part of the solution.

And voila, you are running in the cloud, albeit a cloud on your local system.  Very easy so far, but not too exciting.

In my next post, I'll show you how to move this into the actual cloud.  I have not actually done this yet, so it will be a discussion of my experience learning how to do it.



Tags:

Azure

blog comments powered by Disqus

about the author

I'm a .NET, XAML, and iOS polyglot that loves playing with new things and making cool and innovative stuff.  I am also a Mac junkie.

I am Principal Technologist for SunGard Global Services in NYC, in their Advanced Technologies practice, and I work extensively with SunGard's energy and financial customers.

Note the the posting on this blog are my own and do not represent the position, strategies or opinions of SGS.

twitter

I can't stop thinking big!
Sunday 1:08AM via WindowsLive
Just watched Moneyball. That's my pick for best movie this year.
Saturday 3:51PM via WindowsLive
@vincebelpiede: Report: Skype For Windows Phone Beta Imminent http://t.co/KYNjgg1L#mhtnd
Wednesday 8:39AM via Twitter for Mac
@mashable: Kinect Fusion Will Turn Gaming (and More) Into a 3D Fun House - http://t.co/Ihrq2fY2#mhtnd
Wednesday 8:39AM via Twitter for Mac
New Kinect SDK: http://t.co/57MvA5L5 #mhtnd
Wednesday 8:39AM via Twitter for Mac
Follow me on Twitter

recent comments

None

month list