Windows Azure – Cool

October 30, 2008

Greetings

By recommendation of a co-worker who is at PDC, I immediately signed up for AZURE and download all of the associated files. I also had to update this machine to 3.5 SP1 and VS2008 SP1.

The following is just running commentary on what I’m doing as I do it.

Once everything was in, I opened up VS2008 and found the new CLOUD SERVICE project options. I can only guess what a worker is, so kept it simple and started with just a simple WEB CLOUD SERVICE.

This creates 2 projects: The service itself and a webrole. Again, I can only speculate on how we’ll use WEB ROLE based on the name. The service project has a ROLES folder with a refernece to the ROLE project. Swell.

The role project looks like a website. It has a web.config, Default.aspx, Default.aspx.cs, and Default.aspx.designer.cs. (I think that last file is new too. If its been in 2008, then I never noticed it. Don’t know if its an AZURE thing or a SP1 thing.) The service file has two configuration files: a csdef and a cscfg. One defines the service, the other configures it. The cscfg defines the endpoint name, port and protocol. It notes that the port must be 80 in the actual cloud environment, though you can use whatever you want in the dev environment.

I didn’t make any changes since I really have no idea what I’m doing yet. I hit the RUN button to see what happened.

The status bar reports “Initializaing Local Development Service”, or something like that. VS seems to hang for a while, then reports that it can’t find .\SQLEXPRESS. That’s fine. I don’t have SQLEXPRESS. Then it hangs some more, and eventually says that the service timed out.

For kicks, I started downloading sqlexpress 2008. I haven’t used 2008 yet, so now’s as good a time as any. In the meantime, though, there must be a way to switch the database info.

I found the answer in C:\Program Files\Windows Azure SDK\v1.0\bin\DevelopmentStorage.exe.config. I changed the setting, then hit run in VS2008 again. It reports that DEVELOPMENT STORAGE IS ALREADY RUNNING. ONLY ONE INSTANCE OF THE APPLICATION CAN BE RUN AT THE SAME TIME. Then it hangs again, and eventually comes back the SERVICE TIME OUT ERROR.

I looked in Task Manager/Processes, and services.msc for any sign of this thing. No luck. That’s not to say its not there, but I didn’t see it short of looking at each process individually. I checked for things like AZURE and DEVELOPMENT, etc. (In retrospect, I should have looked through the vs2008 menus and icons. There’s probably something there)

Oh well. Time to restart vs2008. This time, when clicking run, it asks me if its ok to do some initialization as an administrator. Fine with me; go for it.

It reports this:
Added reservation for ‘http://127.0.0.1:10000/’ for user account ‘jayavst690\jaya’
Added reservation for ‘http://127.0.0.1:10001/’ for user account ‘jayavst690\jaya’
Added reservation for ‘http://127.0.0.1:10002/’ for user account ‘jayavst690\jaya’

Checking if database ‘DevelopmentStorageDb’ exists on server ‘.\personal’
Creating database DevelopmentStorageDb

Granting database access to user ‘jayavst690\jaya’
The login already has an account under a different user name.
Changed database context to ‘DevelopmentStorageDb’.
Adding database role for user jayavst690\jaya
User or role ‘jaya’ does not exist in this database.
Changed database context to ‘DevelopmentStorageDb’.

Initialization successful. The development storage is now ready for use.

Now, there’s a DEVELOPMENT STORAGE icon in my system tray. Was that there before? Didn’t notice. This time, it gave me a baloon to let me know it was up and running. There wasn’t one when it failed.

The development storage app shows that there are 3 services: Blob, Queue, Table. Table is stopped, the other 2 are running. The menu bar doesn’t gives us a whole lot to do.

I closed it and ran it again. This time, vs2008 hung. It gave me the “vs2008 is waiting for an internal process” message. Swell. I see that in sql server management studio 2005 all the time (usually when working with diagrams), but this is the first time for vs2008.

I got tired of waiting, so killed it from the task manager. While in there, guess what I noticed: DevelopmentStorage.exe. That definitely wasn’t there when I checked earlier.

I restarted vs2008, and ran the project again. Development Storage started, but vs2008 is hanging again.

So far: Lots of hanging.

Now I’m just trying to get it to do something. I read a blog entry that tells me WEB ROLE isn’t what I thought it would be (I was guessing just based on the word role). My goal is to get a silly DvdFriend service going. I’ll keep you posted.