Design Crazy?

One of the perks of traveling for business is the time I get to catch up on some reading while flying between locations. Last week I had the chance to travel to Missouri to visit some customers and was able to reread a couple of books I’ve found interesting. The one I want to write about now is an interesting look at Apple’s approach to selecting, designing, and bringing products to market. The book, Design Crazy, is very short and a quick read, it is really a large collection of quotes from people involved in the work arranged around certain themes and events.

Here are a few of the items I highlighted while reading:

“The competitors, like Commodore and Kaypro, were all doing speeds and feeds, whereas Steve always wanted things like “What is the significance in the world? How might this change things?” – Steve Hayden

 

“He was thinking about the problem very holistically, saying, “Can we unify this experience?” – Don Lindsay

 

“The challenge in delivering simplicity is, marketing wants to bring more functionality to bear, engineering wants to bring more options to bear—and all of that just adds to confusion and clutter.” – Don Lindsay

 

“Jony’s funny. He’s an artist, which made him very different from the engineers. We would have arguments about stuff, but the best products come when there’s creative tension.” – Jon Rubinstein

 

“The compromises Apple took on design were legendary: you didn’t have copy/paste, you didn’t have multi-tasking, you didn’t have apps. Apple said, “We just want to have a cool phone.” They focused on making people love the product. And that’s the distinction at the end of the day. Everybody else was focusing on being smart. Apple focused on being loved.” – Horace Dediu

 

“There had always been products that had been beautifully designed. But they were high-end, and very few people actually owned them. Apple was the first company that took high design and made it mainstream. It taught the world taste.” – Phil Libin

The author, Max Chafkin, uses selection and organization of the quotes to share the story rather than trying to clumsily imposing a more explicit narrative on top.

SRM, PowerCLI, and custom functions

One of the important benefits of the new PowerCLI release is that it exposes SRM’s public API in a relatively easy to consume manner. Having said that calling SRM API methods directly via PowerCLI is not exactly idiomatic. Here’s the example from the PowerCLI user guide on how to protect a VM.

# Connect to the vCenter Server system that the SRM server is registered with.
 Connect-VIServer -Server vc3.example.com -User 'MyAdministratorUser' -Password 'MyPassword'

 # Establish a connection to the local SRM server by providing credentials to the remote SRM site.
 $srm = Connect-SrmServer -RemoteUser 'MyRemoteUser' -RemotePassword 'MyRemotePassword'

 # List all protection groups associated with the SRM server.
 $srmApi = $srm.ExtensionData
 $protectionGroups = $srmApi.Protection.ListProtectionGroups()

 # Associate the TestVM virtual machine with the ProtGroup1 protection group and enable the protection for that virtual machine.
 $vmToAdd = Get-VM "TestVM"
 $targetProtectionGroup = $protectionGroups | where {$_.GetInfo().Name -eq "ProtGroup1" }
 $targetProtectionGroup.AssociateVms(@($vmToAdd.ExtensionData.MoRef)) # VR specific call

 # Enable protection for that virtual machine
 $protectionSpec = New-Object VMware.VimAutomation.Srm.Views.SrmProtectionGroupVmProtectionSpec
 $protectionSpec.Vm = $vmToAdd.ExtensionData.MoRef
 $protectTask = $targetProtectionGroup.ProtectVms($protectionSpec)
 while(-not $protectTask.IsComplete()) { sleep -Seconds 1 }

While the code is reasonably straightforward to follow along it doesn’t follow the PowerShell style and we can certainly try and simplify it.

What I am going to show is how you can create custom functions that make it easier to hide this complexity when you are trying to get stuff done. For example how about we replace all that API wrangling with a couple of custom functions? Something like this perhaps:

# Connect to the vCenter Server system that the SRM server is registered with.
 Connect-VIServer -Server vc3.example.com -User 'MyAdministratorUser' -Password 'MyPassword'

 # Establish a connection to the local SRM server by providing credentials to the remote SRM site.
 Connect-SrmServer -RemoteUser 'MyRemoteUser' -RemotePassword 'MyRemotePassword'

 # Find the protection group
 $pg = Get-ProtectionGroup -Name 'ProtGroup1'

 # Protect the Virtual Machine
 Get-VM -Name 'TestVM' | Protect-VM -ProtectionGroup $pg

In this example we’ve reduced 11 lines of API heavy code into 4 fairly simple lines by creating a couple of custom functions Get-ProtectionGroup and Protect-VM. These custom functions enable us to hide the complexity of calling the API directly. Here’s a quick video demonstrating this in action.

But we don’t have to stop there! SRM’s API exposes a lot of operations so there is plenty to automate. Let’s say you wanted a list of Virtual Machines that are included in a recovery plan, with custom functions this could be as easy as chaining together cmdlets to retrieve the recovery plan, find any associated protection groups and then the retrieve the VMs associated with those groups, e.g.:

Get-RecoveryPlan -Name 'Failover Site A' | Get-ProtectionGroup | Get-ProtectedVm

…much simpler than having to call into the SRM API directly!

I’ve got very limited experience with PowerCLI but it wasn’t too difficult for me to knock up a few PowerCLI functions to do this. I’ve shared my SRM custom functions on Github (for illustrative purposes) and it has certainly proven useful for me. Hopefully there are some PowerCLI gurus out there and the community who can fix all the obvious mistakes I’ve no doubt made and share something better with the community!

Please share your feedback and let me know what kind of SRM operations you’d like to be able to automate and why.

SRM, PowerCLI, and some imagination

One of the things I really enjoy about being a Product Manager for VMware’s Site Recovery Manager is listening to people tell their stories. It’s always great to hear how customers have increased capacity to cope with disasters through the improved recovery orchestration and non-disruptive testing SRM offers them. As well as listening to customers celebrate their successes, being a Product Manager is about digging deep into the customers experience to understand the sources of any frustrations and identify areas where we can further improve.

One area I know that is of interest to SRM customers is increasing the automation around SRM itself. For example: being able to query SRM to see what is being protected (and what isn’t); kicking off recovery plan tests; and automatically protecting virtual machines with SRM during provisioning. Knowing this I was really pleased to hear that the PowerCLI team were working on some SRM cmdlets and, with PowerCLI 5.5 R2, that team has delivered!

My colleague Ken Werneburg wrote up a good overview of the cmdlets with some useful links and during the recent #vBrownBag Alan Renouf gave a great intro as well as a live demo (see video below).

And We’re Full!

I was checking the attendance number for my VMworld 2013 session today and realized it was completely full! Now that’s intimidating.

Preparing for the session has certainly been taking up a lot more of my time than I originally envisioned. The session is BCO5652 – Three Quirky Ways to Simplify DR with Site Recovery Manager and I am definitely planning on erring towards the more technical content. One drawback to this kind of presentation is that there is always way to much information to fit into a single presentation. A corresponding advantage however is that I have some material for the next few blog posts after VMworld!