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.