Entries categorized 'Windows Azure' ↓
Tuesday, December 16 2008
A few weeks back I had the pleasure of chatting with Carl and Richard again on the .Net Rocks Internet Audio Talk show (show 403!). This time the topic was the Azure Services platform. Its always great chatting with Carl and Richard, they do make it very easy and ask some great (if awkward) questions! Do download the show to your favorite music player device, and if you've never listened to .NET Rocks - take a look at the excellent show list and subscribe to the RSS.
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: .net-rocks, windows-azure, azure
Thursday, December 11 2008
Jim Nakashima wrote a great blog post on how to get at your Windows Azure logs via the PowerShell powered Cloud Drive. (see http://blogs.msdn.com/jnak/archive/2008/11/12/using-the-clouddrive-sample-to-access-windows-azure-logs.aspx).
I've been working on a project lately, and its required some examination of logs. Copying the logs from blob storage is great, but you still have to parse the logs, and if you are working with multiple instances, this can be time consuming.
I decided that I should have a tool that would parse the logs, and display the log output from all the logs. Enter my Windows Azure Online Log Reader. (and you can download the code at the bottom!)
When you need to view your logs, the first step is to navigate to the portal, then issue a copy logs command. This will copy your logs to the blob storage you name in the portal.
If you examine the folder structure created you will see nodes for WebRole and WorkerRole. Within each of these folders you will see a folder for each instance that is running. These instance folders contain the log files for each instance. Last time I copied the files there were 103 log files to process!
My Log reader is a quick and simple implementation - all you need to do to use it is feed in your storage account name, shared key and the container that you copied the logs too. What the reader does is enumerate all the blobs in that path, using the client storage SDK sample library, its a simple to enumerate all the blobs:
BlobContainer logContainer = blobStore.GetBlobContainer(txtSrcFolder.Text);
var blobs = logContainer.ListBlobs("", false);
Next I read all the blobs into memory one by one, loading the contents into an XmlDocument. The xml for a log file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<ServiceDiagnostics Service="DemoGroup" Role="WebRole" ServiceDeployment="1a3c641000111111b52388a4183ad693.0" RoleInstance="WebRole_IN_0" xmlns="http://www.microsoft.com/UtlityComputing/ServiceDiagnostics/2008-08-01">
<Events>
<Event Time="2008-12-09T07:41:28.2482737Z" ThreadId="2284" Name="Information" Severity="Info">
<EventProperty Name="Message">Web Role Initalized</EventProperty>
</Event>
<Event Time="2008-12-09T07:41:28.2488483Z" ThreadId="2284" Name="Information" Severity="Info">
<EventProperty Name="Message">Web Role Started</EventProperty>
</Event>
</Events>
</ServiceDiagnostics>
I created a new class to hold each event entry. I have a future idea that involves filtering, sorting and other nice-to-have features. The class today looks like this:
public class ServiceDiagnosticEvent
{
public string ServiceName { get; set; }
public string Role { get; set; }
public string DeploymentId { get; set; }
public int RoleInstance { get; set; }
public DateTime EventTime { get; set; }
public int ThreadId { get; set; }
public string EventType { get; set; }
public string EventSeverity { get; set; }
public string EventMessage { get; set; }
}
Can you guess the rest? Read the properties from each XML node and add a new ServiceDiagnosticEvent object to a list. Finally bind the List to a GridView for instant list action. The only other thing I did was to remove the GetHealth calls to the worker role.
Simple, but effective - I don't have to copy the logs anymore, and eventually I'll add some features that allow filtering, sorting aggregation etc.
Enjoy, and if you do make some changes - let me know what you did!
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: windows-azure, logging
Wednesday, November 19 2008
Sometimes you have messages in a queue, and you want to have a peek at them (or even read and remove them). The most obvious answer to this is to build a little utility that allows you to browse queues, peek messages etc. But did you already know the CloudDrive Windows PowerShell provider already lets you do it!
Here is how you can get at the queues.
- Extract samples.zip to a folder, and using the buildall cmd - build all the samples.
- Navigate into the samples\CloudDrive folder, and execute the runme.cmd. This will install the PowerShell provider ready for use.
You should now be in PowerShell, and be able to issue commands such as
and
you can even execute
and use dir etc. to navigate the blobs.
So now for the queue, my queue is called messages so executing
yields

as you can see i have a single message in the queue. To read the message, first I need a reference to a queue.
$q = (dir queue:\messagequeue)
I can now call get-member on the $q object and view a list of methods and properties available.

Note we have all the methods available in the queue, including PeekMessage. To read that first message I can call
Which gives:

Finally, I can view the contents of the message using
$q.PeekMessage().ContentAsString()
Which gives my message content.

Hopefully using this little starter, you will be able to figure out how to create and manipulate queues and messages.
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: windows-azure, winazure, windows-powershell, powershell
Thursday, November 13 2008
We've just published the latest Azure Services Training Kit to http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&displaylang=en. This contains updates and bug fixes to the original kit. The kit contains hands on labs for Windows Azure as well as .Net Services, SQL Services & Live Services.
The kit includes the following labs:
Windows Azure
- Building Windows Azure Services
In this lab, use the Visual Studio tools to build, package and execute a Windows Azure Service running on the local developer fabric. Also, learn about using Windows Azure configuration settings, local file storage as well as the logging API. Finally, use Visual Studio to debug your service.
- Getting Started with Windows Azure Storage
In this lab, examine each of the foundation storage capabilities of Windows Azure, Blobs, Tables and Queues. Discover how to create storage accounts; upload and retrieve blobs and blob metadata; create, update and query tables; and create a simple service that uses a message queue for communication.
- Using Windows Azure Tables
In this brief lab, you will perform the actions required to create, update and query tables in the Windows Azure Storage Service.
SQL Services
- Introduction to SQL Data Services
This lab introduces the basic data storage model for SQL Data Services (SDS), called the 'ACE' model (Authorities, Containers, and Entities). You will learn how to perform CRUD (create, read, update, delete) operations in SDS for blobs and flexible entities using the SOAP and REST protocols as well as how to perform basic query operations.
- Advanced SQL Data Services
Beyond the basics, developers will want to understand some of the more advanced features of SQL Data Services (SDS). In this lab, learn how to use the relational features, like JOIN, TOP, and OrderBy. Preview the new ADO.NET Services client interface to SDS and learn to manage concurrency with your applications.
- Working with Concurrency
In this Hands-On Lab, you will learn how to use the simple optimistic concurrency available to you with SQL Data Services. You will create a solution with two console applications: One to generate CRUD operations with concurrency using the REST interface and another identical application using the SOAP interface. Additionally, you will learn how to deal with managing concurrency for large entities or blobs using the HEAD operation.
.NET Services
- Introduction to the .NET Service Bus
This lab covers the basics of the .NET Service Bus in .NET Services. It shows how to connect clients and services via SOAP and REST over the Service Bus using the .NET Services SDK. It explores the different bindings you can use, shows how to expose a MEX endpoint, and also how to handle message security and binary data.
- Introduction to the .NET Access Control Service
This introductory hands-on lab walks you through the creation of a trust relationship with a sample third party, FederatedIdentity.net (a site used for interop testing with other identity management stacks). It then demonstrates how to leverage claims transformation rules provided by the .NET Access Control Service for implementing a simple but extremely effective access control strategy, one that in a more traditional scenario would entail a significant amount of resources.
- Introduction to the .NET Workflow Service
This lab demonstrates how the .NET Workflow Service can be used for service orchestration in the cloud. It covers the design of workflows using the specialized cloud-based activities and the deployment and management of workflow types and instances using both the .NET Services portal and the client-side management API.
Live Services
- Creating Mesh-enabled Web Applications
This introductory hands-on lab walks you through the creation of a trust relationship with a sample third party, FederatedIdentity.net (a site used for interop testing with other identity management stacks). It then demonstrates how to leverage claims transformation rules provided by the .NET Access Control Service for implementing a simple but extremely effective access control strategy, one that in a more traditional scenario would entail a significant amount of resources.
We are continuing to develop the Azure Services training Kit as the services evolve. Please post any feedback you may have to this blog.
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: windows-azure, hands-on-labs, azure-services, training-kit, winazure
Thursday, November 13 2008
Thanks to everyone who came to my TechEd talks. It was great to see so many people interested in the topic & the witty comments in the feedback. For those that attended the final session, I’ve attached the zip of the Guestbook, which you can download. I’ve took it down from Live today, but thanks to those who posted photos!
Update: In my haste, I added the wrong solution below is the correct solution!
Download the REAL solution
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Technorati Tags:
Windows Azure
Tagged as: windows-azure, teched-2008, winazure
Tuesday, November 11 2008
Welcome to Barcelona. I’m back in Barcelona again for TechEd EMEA Developer. I’m presenting 2 sessions on Windows Azure, as well as hosting a Q&A session. The Windows Azure sessions are:
PDC201 - A Lap Around Windows Azure – Wednesday 12th 9:00 – 10:15 – Rm 111
In this session I will give an overview of Windows Azure.
PDC201 - Developing and Deploying Your First Cloud Service – Wednesday 12th 17:30 – 18:45 – Rm114
In this session I will build an entire service using Windows Azure, starting from File, New project in visual studio and ending with deploying it to the cloud. Some if it will be written in C# and some in VB!
The Q&A session is currently scheduled for midday Wednesday
PDC02-IS - Microsoft Services Q&A – Wednesday 12th 13:30 – 14:45 – Rm 128
I’ll also be in the Ask the Experts area on Wednesday 12th – 12:45 – 13:15 & Thursday 13th 12:45 – 13:15. Drop by and say hello!
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: windows-azure, teched, barcelona, winazure
Friday, October 31 2008
Since we give out a pre-beta of Windows 7 at PDC and made the Windows Azure SDK available, its only a matter of time before someone would try them together. To save you lots of pain/time you should know this: current builds of Windows 7 do not support Windows Azure – hopefully this will be fixed soon, because Windows 7 is sweet!
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: winazure, windows-azure, windows-7
Thursday, October 30 2008
The Azure Services Training Kit will include hands-on labs, presentations, and samples to help you understand how to build applications that utilize the Azure Services Platform. This PDC preview release of the training kit includes 11 hands-on labs that cover the broad set of services including Windows Azure, .NET Services, SQL Services, and Live Services. These are the same hands on labs that was available to attendees at PDC!
You can download the Azure Services Training Kit from the Microsoft Download Center here.
Over the next few weeks we will also be releasing several samples and scenario-based demos that can be used to both demonstrate the value proposition of these services and understand how to use the SDKs, Tools, and Services themselves.
The Windows Azure hands-on labs can be used locally with the Windows Azure developer fabric that is included with the Windows Azure SDK. However, the .NET Services, SQL Services, and Live Services labs require a registered service account. Please see the section below about obtaining an invitation code.
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Tagged as: windows-azure, winazure
Wednesday, October 29 2008
Finally, i can write something in my blog! Over the last 9 months i have been working as the Windows Azure technical evangelist, working with early adopters such as Full Armor, Sentient, Lake Quincy & n/software.
You can see some of the results in the Ray Ozzy’s PDC keynote from Monday http://channel9.msdn.com/pdc2008/KYN01/ and on the Windows Azure Gallery at http://gallery.cloudapp.net/.
For a deeper view of Windows Azure, check out the channel 9 videos Charles Torre did with Manuvir Das Introducing Windows Azure, and Steve Marx Windows Azure for Developers. There are also a bunch of screencasts the team did on http://msdn.microsoft.com/en-us/azure/cc994380.aspx.
Look out for some cool demos, training kits and samples from the team in the next few weeks and months.
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS
Technorati Tags:
Windows Azure
Tagged as: windows-azure, winazure