Personal tools
You are here: Home Blog feature

feature

2010-05-06

The new RESTful API *PREVIEW*

Filed Under:

For over a year, we've had an API available based on XML::RPC.  It wasn't popular and it was difficult to support and keep up to date.  However, today I present to you a *PREVIEW* of our RESTful API.  Results are returned in JSON.  You can now authenticate and push requests to the cloud-shell interface via HTTP. 

The interface is in extreme-beta-state for the moment, as it only provides RAW access to  the STDOUT of the methods as run through the interactive cloud-shell.   The output must be cleaned up, the proper return-values and data-types must be returned.  Interpreting HTTP-POST data as script should also be implemented.  Once this is all complete, we'll mark it as stable.  I'm estimating a week.

Example:

 https://secure.grokthis.net/manage/vps/rest/status

Enter your username and password for the cloud-shell management interface (HTTP BASIC auth) and you should retrieve the status of your default instance.

Other commands of the cloud-shell will also work. Not yet supported via the REST interface are 'fetchuri', 'reimage', and 'console'.

2010-03-19

Cloud-shell Scripting!

Filed Under:

We now have basic Tcl, Javascript, and Ruby functionality built into cloud-shell! This allows you to script basic functionality from the interactive terminal. User feedback is encouraged, let us know what you think!

What does this mean for you? Well, power users will be able to do a whole lot of really neat things as we expand the library of available methods. Currently, though, you may access any of the existing shell commands from code.

What *will* it mean? Well, we're going to expand the available methods so that you'll be able to write scripts for any sort of neat things. Solaris or Macintosh users might be familiar with OpenFirmware and EFI -- the goal is to make our cloud-shell similar to, but more powerful than, these environments.

UPDATE: Michael Szul (@szul) asked if we had any particular reason for choosing Tcl. Well, for the interactive shell, it simply makes a lot of sense because from now on, all commands you run are actually Tcl procedures.  We can do this without a change in the typical user expectations or experience.  Stored scripts will be able to use the same familiar syntax you've always used, making it a close analog to a unix shell or powershell script.  Essentially, it is easy for the user, despite being a relatively dated and obscure language in 2010.  That said, I'm already working on Javascript support, which I feel won't be very useful for interactive use, but would be of great use for non-interactive code, especially for those from a web background.

UPDATE 2: Javascript now supported! Do 'setpref interactive_shell javascript' from the Tcl shell.  Note that from then on, everything will be in Javascript syntax, i.e. to get back to Tcl: "setpref('interactive_shell', 'tcl')".  We've mapped write/writeln/document.write/document.writeln such that they print to your terminal, for convenience.

Update 3: You may now load script files from the network. Use the fetchuri method to download a script (remote server MUST set Content-Length). You can then pass that to an eval function, i.e. in javascript: eval(fetchuri("http://ftp.grokthis.net/pub/installers/karmic.js"));  Allowing one to download & exec scripts in languages other than that of the interactive shell should be complete sometime tomorrow.

Update 4: Now supporting Ruby!!!  Finally, customers that, for whatever reason, want to disable interactive features entirely can revert to the old non-interactive shell by choosing the 'simple' shell.

Example Script (tcl):

Currently, many of the features listed below are not yet incorporated into your shell.  This is an example of how scripting will eventually empower users. This example pseudo-script reimages the OS while also setting the CPU architecture and boot methods, and finally, boots the OS. It is a simple example, but hopefully, a powerful one.  Ultimately, we intend to base our reimaging software on this concept.

    # user settings
set cpu_arch 64
set boot_method pvgrub
set url "ftp://ftp.grokthis.net/disk_images/fedora-12_64.tar.bz2"

# set the guest
set guest [get_guest]

# Program:
foreach disk [get_storage] {
if { [string compare $disk(desc) 'root'] == 0 } {
reimage $disk $url
}
}

setpref cpu_arch $cpu_arch
setpref boot_method $boot_method

boot

# Notify a remote machine of our IP address
fetchuri "http://your-server/instance-manager/callback/create/$guest(ip)"

2009-05-12

Introducing the GrokThis VPS "Cloud"

Filed Under:
Today, we are formally introducing the GrokThis.net "VPS Cloud" with the official deployment of the Annelidous Cloud Infrastructure Interface (ACII).  The ACII is an application programming interface (API) by which developers may control virtual machines running on the GrokThis.net VPS Cloud.  The ACII is immediately available to all GrokVPS and VPS Village customers.

In the coming months, we will be extending and enhancing this API, and have plans to support industry standard APIs as they become available.  At this time, the ACII API allows developers to obtain a list of available virtual machines, manage and control virtual machines by issue shutdown, reboot, rescue, and boot commands.  Very shortly, this API will also allow the creation of new virtual machines.

At this time a utility billing model is not yet available, but the availability of utility billing is expected for Summer 2009.

At this time, an example client script in Perl has been posted:
Download Perl Example


The GrokThis.net VPS Cloud is powered by Annelidous, a free software cloud infrastructure management solution developed internally at GrokThis.net and released to the community under the AGPLv3 license.
Syndication
Facebook
GrokThis.net on Facebook
Twitter
Tag cloud
upgrade vps contest xen howto feature rails django hardware failure ajax virtualization security mason support cloud software
Log in


Forgot your password?
New user?
Archives
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: