GoGrid user Mitch Denny created an outstanding use of the GoGrid API using Windows PowerShell. For the uninitiated, Windows PowerShell is a command line shell and scripting language designed to help IT professionals achieve greater control and productivity through the use of of an admin-focused scripting language, complete with 130 standard command line tools, consistent syntax and utilities (paraphrased from the PowerShell product page). PowerShell runs on Windows XP, Vista, Server 2003 and Server 2008 and is a great way for sysadmins to control existing IT infrastructure through scripting.
The GoGrid API has been available for some time now and I have been waiting for a stellar use of it to showcase. (I’m still waiting for a very resourceful developer to use it either to create an iPhone web application or stand-alone application…hint, hint.) Mitch, who is an avid .NET developer from Australia and Senior Consultant at Readify, created a PowerShell Snap-in for GoGrid which uses the GoGrid API. His project, documented here, is open-source, hosted at CodePlex, and seems like will continue to evolve. Currently a Beta2 release, the “PowerShell Snap-in for GoGrid” was designed to “demonstrate how useful it can be for infrastructure-level SaaS providers to expose an API for their customers to use.” Mitch has some good visions on how and why API’s should be available, including:
- Configure applications for performance testing.
- Run load agents for performance testing.
- Test disaster recovery scenarios.
- Provision hardware for project work (i.e. development teams).
- Support instructor led training with virtualised labs.
- Host demonstration environments for presentations.
- Controlling scale of your underling SaaS infrastructure.
Mitch’s code seems to work quite well. Following his instructions, I actually used it to provision a new load balancer within my GoGrid instance. It simply worked and took just a few minutes to set up. It’s actually fun executing the commands within PowerShell and watching devices magically appear within the GoGrid GUI.
What you need to get started:
- A GoGrid account – sign up now!. You will need access to the GoGrid portal in order to create an API Key.
- Windows PowerShell – download it from the Microsoft website here. Be sure to select the proper version for your OS. Have it fully installed before you start.
- The PowerShell Snap-In for GoGrid – this is the CodePlex project page, current version is “GoGrid 1.0 (BETA2)”. As of this writing, some of the Wiki pages describing some of the actions have not been fully built out but I expect that to change over time. The Snap-In is available for download in the upper right of the project page.