At this past Monday’s Boston Azure meeting, I spoke about using Azure Automation Runbooks to automate your automation. I have a short overview to define the need, then mostly gave demos.
Here is the deck:
Add-AzureAccount : The data is invalid. At line:1 char:1 + Add-AzureAccount + ~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount
PS> (Get-Module Azure).Version Major Minor Build Revision ----- ----- ----- -------- 0 8 11 -1
-Verbosecommand line options, which are often useful. But no difference in the output. So this was failing pretty early!
gci "$env:APPDATA\Windows Azure Powershell\TokenCache.dat" ri "$env:APPDATA\Windows Azure Powershell\TokenCache.dat"
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
A couple of nights ago, I gave a guest lecture at Dino Konstantopoulos’ BU MET CS755 Cloud Computing class to a small group whose ability to stay awake and alert until 9:00 PM was impressive. My deck is attached.
For any of that class (or anyone else reading this), if interested in more Azure goodness, check out Boston Azure – www.bostonazure.org – a local user group that has now been meeting regularly (mostly at NERD) for around 4 1/2 years to learn about Azure, the cloud, architecting applications for the cloud, and more.
My book is available on Amazon: Cloud Architecture Patterns.
If you are trying to Embrace SSL During Development when authenticating with Azure Active Directory, you may run into a little glitch if you do so on one of those handy MSDN Dev/Test VMs in Azure.
The glitch is that when running SSL on the MSDN VM the digital certificate for the SSL cert isn’t quite right. Here is a description of what you might see, followed by a workaround (until fixed at the source in the VM image).
Visual Studio 2013 uses IIS Express by default and offers a very simple experience for HTTPS locally:
Using MSDN Visual Studio Azure VMs, this developer experience does not quite work out of the box. SSL Enabled is true automatically when creating an ASP.NET app that uses Azure Active Directory for org authentication. If you create a new web app, then simply click Change Authentication and select Organizational Accounts, set one up, and then proceed as normal, then hit F5. When your app runs, it will try to authenticate over HTTPS, and it fails as in the scenario above if running on one of these MSDN Visual Studio Azure VMs.
Follow these steps:
The above code will work in the default state of these VMs at this time which assumes only a single certificate with Subject of ‘CN=localhost’ is present in the certificate store.
A professional reality is looming: fear of obsolescence. Like so many of you, I worry about becoming obsolete (I work in cloud software which moves VERY FAST and getting faster), so I figured it was time to do something for a small (and shrinking) set of people supporting my profession. For these people, their job has groan increasingly difficult: I refer, of course, to the fine people who work inside of cloud data centers. The job is so difficult primarily because it is boring.
This is not because cloud data centers are not advancing – in fact that is the root of the problem – there are so few data center workers because of the growing efficiencies in cloud data centers simply means fewer people are needed to run them.
You may be wondering how you can help. It is very simple – remotely connect into a server on the data center of your choice, and just talk to the nice people in that data center through the speaker on the computer your’ve remoted into. But first you’ll need to enable the audio service on the operating system, since it is off by default in the cloud. But turning it on is fairly simple. This short video shows you how.
What will YOU say to the lonely cloud data center people?
Today I spoke at VirtG Boston’s annual Deep Dive Day. The title of my talk, Meet Windows Azure, Your Next Data Center, is probably descriptive enough to get the gist of it.
My slide deck follows.
[Ugh – editing 2nd week in a row after accidental early publishing.]
The original programming model for Windows Azure applications was to use Cloud Services (originally known as Hosted Services, but still the same thing). Of particular note, Cloud Services run on VMs with disks that are not-persistent – you can write data locally (some pointers here), but any locally stored data is not guaranteed to stick around. This is a powerful model for some scenarios, especially highly scalable applications. Another feature of Cloud Services has always been that it comes with an emulator you can run locally – on your laptop at 30,000 feet was a common way to hammer home the point. (Remember, Cloud Services were announced in 2008 – a long time before we had wifi on airplanes!) There are actually two emulators: Compute – which emulates the Cloud Service model by supporting Web Role and Worker Role abstractions, and Storage – which emulates Blob, Table, and [Storage] Queue Services. The rest of this post will focus specifically on the Storage Emulator.
Since their announcement in 2012, Windows Azure Web Sites and Virtual Machines have been taking on many of the common workloads that used to require Cloud Services. This diagram at least conceptually should capture the sense that the when to use which model decision has become blurred over time. This is good – with more choice comes the freedom to get started more simply – often a Virtual Machine is an easier onramp for existing apps, and a Web Site can be a great onramp for a website that adheres to some of the well-known programming stacks running on PHP, ASP.NET, Python, or Node.js. If you are a big success, consider upgrading to Cloud Services.
Notably absent from the diagram is the Storage Emulator. It should be in the middle of the diagram because while the local storage emulator is still useful for Cloud Services, you can also use it locally when developing applications targeting Windows Azure Web Sites or Virtual Machines.
This is awesome – of course, it will be popular to create applications destined for Windows Azure Web Sites or Virtual Machines that take advantage of the various Storage Services.
So that’s the trick – be sure to take advantage of the Storage Emulator, even when you are not targeting a Cloud Service. You need to know two things: how to turn it on, and how to address it.
If you create a regular old Web Site and run that in Visual Studio, the Storage Emulator is not turned on. Visual Studio only turns on the Storage Emulator for you when you debug using a Cloud Service, but this is not convenient.
It is easy to turn on. I have a whole post that explains how to start the storage emulator from a shortcut, but the keys are:
Here’s PowerShell script that will turn it on:
The other part is knowing how to set up your Storage Connection String so that it accesses local storage emulator instead of the cloud.
Here are the values to use to make it look like any other Storage Account, while still addressing local emulated storage rather than in the cloud:
Emulator Storage Account Name: devstoreaccount1 Emulator Storage Account Key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
The latest version of the Windows Azure Storage Emulator (v2.2.1) is in Preview. This release has support for “2013-08-15” version of Storage which adds CORS and JSON and still has all those features from years gone by…
A comparison of emulated and cloud storage services is also available. There are some differences.