In my last blogpost I talked about different cloud computing providers, like Google, Amazon and Microsoft.
Today I want to describe Windows Azure more and show you how to use the Windows Azure CTP and how to publish a "Hello World" app in the "cloud".
Azure Service Platform
The Azure Service Platform use "Windows Azure" as it´s core:
Azure offers basic functionality, like resource sharing, monitoring and so on. You can host Web- or- Worker-Processes on it or use it as blob or table storage.
Everything on Azure can be accessed via REST interfaces.
Services on Azure
Microsoft itself build some services on top of Azure:
- Live Services - Live Framework & Live Mesh
- .NET Services - Workflows, Authentication & Services
- SQL Services - SQL Server in the cloud
- SharePoint & CRM
Information about Windows Azure
To learn more about Azure I recommend you to have a look at these videos:
(Even if this video player destroy the blog design - it´s worth ;))
Now have a look at the real Azure system. The whole Azure thing is currently only a CTP, but should be released at the end of the year.
My first application will be a "Hello-World" app (yeah, I know, this example sucks ;) )
Step 1: SDKs + Access Key
You can find the SDKs on the Windows Azure website (www.azure.com) and download it without having an access key.
- Windows Azure SDK (help files, concepts)
- Windows Azure Tools for Microsoft Visual Studio (dev environment)
You need the access key to upload projects to Azure. Register on MS Connect to get an access key.
All services (SQL Data, .NET Services...) needs a specific code.
Step 2: Create Web Cloud Service Project
After the installation of the "Windows Azure Tools for MS VS" you will see a new category "Cloud Services" - we want to create a "Web Cloud Service" project:
Visual Studio creates two projects in your solution:
- Contains configs for the "Cloud"
- A standard ASP.NET project
Step 3: First steps with the cloud-debugging environment / "Development Fabric"
If you hit F5, several processes will start. The development storage creates a SQL server database on your local SQL server (download SQL Express). The development storage simulate the Azure database:
A look inside the DevelopmentStorageDb:
You should see a new icon in your Windows Tray:
This is the "Development Fabric", which simulate the hosting environment of Azure:
Step 4: Add "Hello World" to your ASP.NET page
I add these lines to my default.aspx page:
<form id="form1" runat="server"> <div> Hello World @ Code Inside Blog <br /> http://code-inside.de </div> </form>
Step 5: Publish cloud service
In this step we publish your "WindowsAzureHello"-project. Just "publish" it via the context menu and you should get these two files:
Now *right click* on your "WindowsAzureHello" project and get the context menu with two additional buttons and go to the portal:
Step 6: Create a Hosted Service on Windows Azure
Now create a "Hosted Service" project on the Azure Service page:
Type the name of your project and type a (sub)-domain:
After your project is created, you see this website:
"Production" is your live app and "Staging" is just to test your app. At first you have to deploy your app on the "Staging" environment.
Step 8: Staging deployment
Select the two files, which we created in step 5 and upload it. After the upload processs is finished, the package will be deployed to the staging environment.
If this process finished you should see this:
Now you can click on the URL and test your app - here is my demo-app:
Step 8: Move it to "Production"
If you want to move your app to the "Product"-environment, just click on that button:
... and now the app is live under your own subdomain (remember: this is just a CTP) :
You can see my demo web page live at: Azure Link
This maybe sounds difficult, but it just takes 3 minutes:
The Visual Studio tools are great and I´m really interested in the future of Azure (and the pricing ;) ). You can now play with Windows Azure and don´t need to relearn everything from the ground.
But, of course, you have to be careful with session handling, because your application can run on many different maschines and each request goes to another maschine.