A nerve racking morning
Today I woke up ready to start preparing for my GeekSpeak talk. You could argue that I severely procrastinated in waiting until today, and you would be right. I hadn’t done this particular demo before, but I had played with both the Diagnostics APIs and the Service Management APIs pretty extensively, so I was fairly confident. Even though I was starting at 7:30, I felt sure I would have a polished demo by 11:30. Let’s just say I now have an even healthier respect for good backup strategies.
Early on I made a couple of glitches that set me back, like pasting code from the 1.2 version of the Azure SDK that used the “DiagnosticsConnectionString”, because the new 1.3 version uses “Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString”. I was getting this completely unhelpful error message like: “Error on startup”. I managed to get though that, and I got the custom performance counter created.
Collecting was a bit tricky, because I was trying to demonstrate a product that I hadn’t used in a while called Cerebrata Azure Diagnostics Manager. I kept starting it up and trying to connect before the WADPerformanceCounterTable had been created. Once I learned patience, I was able to get it running successfully.
At this point it was about 9:30, and I was ready to start on the Service Management piece. I opened up a project I had used on numerous occasions on the past to eliminate all of the running instances on a list of subscription IDs. I had one little heart attack because I realized that out of all the APIs that I utilized, I hadn’t pulled out the configuration info, and I hadn’t called the Change Deployment Configuration. I managed to get the configuration extracted and base-64 decoded, fairly quickly. I used some X-Linq to modify the configuration XML and now its time to POST. And… It doesn’t work… WHAT! What do you mean can’t read the configuration information, I have a demo in 45 minutes! After a little searching I found that you have to prepend the XML preprocessing instruction
<?xml version="1.0" encoding="utf-8" ?>
Even though the instruction was there when I extracted it somehow gets removed during the transformation. With that – Voila! – it works. And I still have 15 minutes to spare. Whew! Not too bad for a mornings work.
And here was where the “benevolent being” thought, “Man this guy is cocky. I will teach him a lesson.” What happened next I still don’t clearly understand. I had done all of the work around extracting configuration information and updating it inside the CleanUpAzureDeployments solution. I wanted to move it over to the AutoScaling solution that I had done all of the performance work in. Three simple actions and I lost almost two hours worth of work.
1) I used Ctrl – X to remove the GetDeploymentConfiguration, AddAnotherInstanceToConfiguration, UpdateConfigurationInformation functions (about 100 lines of code)
2) Seeing that the code was removed successfully I assumed I had it in my buffer, so I closed that solution.
3) I used Ctrl-V to paste the information into the new project.
And nothing appeared…
I pressed it again, maybe I didn’t press it hard enough. Then at least a minute passes while I sit looking at the computer screen in a state of slowing growing terror. After the initial shock, I start cursing Visual Studio in the vilest sort of language for not supporting automatic backups like Eclipse does.
At this point it is time for the call, but I just lost my most important demo that it took me almost two hours to get working. I place the call to Glen explain the situation and start frantically trying to recreate the demo before everyone joins the call. Thank goodness for a weird form of the 80/20 rule which states that you can redo all of the work that you have recently done in about 20 percent of the time. During the sound checks and introductions I was coding away trying to recreate the 100 lines that I had lost, and I managed to finish them before the curtain came up.
I think the stress probably took a month of off my life expectancy. I am not sure that my nerves had time to recover by the time I finished the call.
The talk itself
The talk itself might have gone well. It was tough to tell from my perspective because I was so freaked out that I couldn’t think straight. Anyway thanks to everyone that was on the call. Here are the newly recreated auto scaling demos.
Also I had some questions:
1) What was the name of an easy Auto-Scaling product?
I should have remembered the name because it is similar to the name of the Amazon solution Azure Watch
2) Can we get a list of what built-in performance counters are available on Azure?
This one is a little tricky to answer, because any performance counter you can use on premises you can use in Azure. A better question might be: “Which performance counters can’t I use in Azure?” The short answer is none, but of course you can only use counters from software that is installed, so basically all the core Windows counters.
3) Can Azure monitor the security channel from the windows event log?
I understand that it is possible, although I have not done it myself. To read an event log that strongly ACLed though I am pretty sure you will need to include:
<Runtime executionContext="elevated"/>
in the ServiceDefinition.csdef file.
4) Can I get a full list of what’s in the DiagnosticMonitor namespace?
The best overall picture of what’s going on is found here, about midway down.
5) Where is the information on the Rest API for changing configuration settings, how the cert works, etc?
That can all be found in the normal MSDN documentation here.
Thanks again!