KML_FLASHEMBED_PROCESS_SCRIPT_CALLS
 

Control GoGrid Cloud Programmatically Using Windows PowerShell

October 13th, 2008 by - 7,874 views

MSpowershell 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:

  1. A GoGrid accountsign up now!. You will need access to the GoGrid portal in order to create an API Key.
  2. 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.
  3. 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.

I definitely recommend watching Mitch’s screencast before or while you are doing this yourself. The screencast clearly outlines what you need to do and has good on-screen documentation of the commands you should issue. It demonstrates creating a load balancer and two servers which is an excellent starting point. The screencast can also be viewed below:

Have you used GoGrid or the GoGrid API in a different way? If so, be sure to contact me so that I can showcase your work! Great job Mitch!

The following two tabs change content below.

Michael Sheehan

Michael Sheehan, formerly the Technology Evangelist for GoGrid, is a recognized technology, social media, and cloud computing pundit and blogger who writes regularly about technology news and trends.

Leave a reply