Posts tagged Windows Azure

Fabrikam Shipping SaaS Sample

My good friend Vittorio Bertocci has just posted a new demo that shows how you can build multi-tenant applications on Windows Azure called Fabrikam Shipping.

FabrikamShipping SaaS is a complete subscription based solution running on the Windows Azure platform and publicly available thru www.fabrikamshipping.com. It offers a web-based customer onboarding UI, which anybody can use for creating test subscriptions and obtain their very own application instance, dynamically provisioned by a simple but powerful provisioning engine. Thanks to our partnership with our friends evangelists at PayPal, it even demonstrates how to integrate payments and billing via an external provider!

Find out more at Vittorio’s blog – http://blogs.msdn.com/b/vbertocci/archive/2010/10/07/new-online-demo-introducing-fabrikamshipping-saas.aspx.

THIS POSTING IS PROVIDED “AS IS” WITH NO WARRANTIES, AND CONFERS NO RIGHTS

How to deploy an ASP.NET web site to Windows Azure!

Note I say web site – rather than web application.

If you have a web site, which is just a folder of files and stuff rather than a full blown VS project, you can easily deploy into Windows Azure without having to convert to a web app. (Of course you should really think about converting it because you get a better tool experience, debugging etc.)

I’m going to assume you have the Windows Azure SDK installed.

So the first thing is to get your files laid out on disk correctly. For our purposes I have a really simple web site containing a single default.aspx file. This is in a folder named ASPNetRole.

image

Next you need to create the cscfg and csdef files that Windows Azure requires to build a package. In the folder above I created the 2 files:

image

ServiceConfig.cscfg looks like this:

   1: <?xml version="1.0"?>

   2: <ServiceConfiguration serviceName="myaspapp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">

   3:   <Role name="ASPNetRole">

   4:     <ConfigurationSettings/>

   5:     <Instances count="2" />

   6:   </Role>

   7: </ServiceConfiguration>

ServiceDefinition.csdef looks like this

   1: <?xml version="1.0" encoding="utf-8"?>

   2: <ServiceDefinition name="myaspapp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">

   3:   <WebRole name="ASPNetRole" vmsize="Small">

   4:     <InputEndpoints>

   5:       <!-- Must use port 80 for http and port 443 for https when running in the cloud -->

   6:       <InputEndpoint name="HttpIn" protocol="http" port="80" />

   7:     </InputEndpoints>

   8:     <ConfigurationSettings/>

   9:   </WebRole>

  10: </ServiceDefinition>

 

Make sure the role names match what you want to call your role.

Now you have these 2 files you are all ready to go!

There are 3 tasks you may want to do.

1. Package the web site to run in the local developer fabric.

   1: "c:\Program Files\Windows Azure SDK\v1.2\bin\cspack.exe" "ServiceDefinition.csdef" /role:ASPNetRole;ASPNetRole; /copyOnly

2. Run the local developer fabric package:

   1: "C:\Program Files\Windows Azure SDK\v1.2\bin\csrun.exe" "ServiceDefinition.csx" "ServiceConfig.cscfg" /launchBrowser

3. Package ready to deploy to Windows Azure.

   1: "c:\Program Files\Windows Azure SDK\v1.2\bin\cspack.exe" "ServiceDefinition.csdef" /role:ASPNetRole;ASPNetRole;

When you run the last script it will generate the package you need to deploy to Windows Azure. I usually pop the above into 3 script files named prefabric.cmd, runfabric.cmd and buildpackage.cmd.

Have fun.

THIS POSTING IS PROVIDED “AS IS” WITH NO WARRANTIES, AND CONFERS NO RIGHTS

Getting Started with Windows Azure

A few folks today have been asking about how to get started with Windows Azure and/or SQL Azure. So here is my quick 3 steps to get you going.

  1. Make sure you have an OS that supports development!
    You can use Vista, Windows 7, Server 2008 or Server 2008 R2. My recommendation is Windows 7 64bit.
  2. Install the Microsoft Web Platform Installer from http://www.microsoft.com/web/downloads/platform.aspx .
  3. Once the installer loads – click Options:
    image
  4. Click Developer Tools:
    image
  5. Then click OK. You should now have the Developer Tools Tab:
    image
  6. Under Visual Studio Tools, click Customize, then click Windows Azure Tools for Microsoft Visual Studio 2010 v1.2 and Visual Web Developer 2010 Express:
    image
  7. Now click the Web Platform tab, and under database, click customize. Make sure SQL Server 2008 R2 Management Studio Express is clicked:
    image
  8. Now Click install and confirm any options. Not only will the tools you selected be installed, the installer will also install any dependant bits too!
  9. While that is installing, navigate to here http://hmbl.me/1ITJKZ or here, download and install the latest version of the Windows Azure Platform Training Kit. There are some cool videos to watch to give you an overview.
  10. Once everything is installed, open the training kit and work through both the Introduction to Windows Azure and Introduction to SQL Azure lab.

Once you have that, the top resources to keep an eye on are http://www.microsoft.com/windowsazure, the awesome http://channel9.msdn.com/shows/Cloud+Cover/ and http://blogs.msdn.com/b/windowsazure/.

THIS POSTING IS PROVIDED “AS IS” WITH NO WARRANTIES, AND CONFERS NO RIGHTS

Go to Top