Oct 8, 2011

Bring your knife to Voxel’s hAPI kitchen

INAP

Bring Your Knife to Voxel's hAPI KitchenAt Voxel, we’re big believers in automating infrastructure, and one of the tools we’re most excited about right now is Opscode’s Chef. Chef provides us with Knife, a convenient tool that allows you to easily manage one or more Chef instances.

So, historically, you would use Voxel’s API to provision a VoxCLOUD or VoxSERVER device, then use Knife to bootstrap and spin that provisioned node up as a Chef client. Today we would like to announce that a Voxel specific Knife plugin has been made available via RubyGems/GitHub: ‘knife-voxel’.

Bring Your Knife to Voxel's hAPI KitchenCurrently on version 0.0.7, the Voxel/Chef plugin allows you to provision (and bootstrap) Voxel’s virtual and dedicated instances (known as VoxCLOUD servers and VoxSERVERS in marketing-speak) as well as list and delete previously provisioned instances.

But there will be a lot more functionality to look forward to in the coming weeks, functionality that will continue to enhance the Voxel/Chef experience.

At this time, the knife-voxel plugin has the following commands:

- knife voxel voxcloud delete DEVICE_ID (options)
- knife voxel voxservers inventory list (options)
- knife voxel images list (options)
- knife voxel voxcloud create (options)
- knife voxel devices list (options)
- knife voxel voxservers delete DEVICE_ID (options)
- knife voxel voxservers create (options)
- knife voxel voxservers reimage DEVICE_ID (options)

These commands mirror Voxel’s hAPI methods as defined @ https://api.voxel.net/docs/.

Authentication can be handled in a few different ways. For each command you can pass –voxel-api-key and –voxel-api-secret with your corresponding hAPI key/secret pair. Or if you prefer, you can utilize your username and password via the –voxel-api-username and –voxel-api-password parameters. Both of these parameter sets can be specified in a knife.rb file, saving you the trouble of entering them each time at the command line. We suggest using a stored authkey/secret pair rather than a username and password when placing these options in knife.rb. The syntax is:

knife[:voxel_api_key] = '01234567890'
knife[:voxel_api_secret] = '09876543210'

To list all available images, and their corresponding IDs:

> knife voxel images list

To list the available dedicated VoxSERVER inventory, by facility, run the command:

> knife voxel voxservers inventory list

To provision a 4 core VoxCLOUD instances with 50GB of disk and Ubuntu10.04 LTS at our LGA8 facility you would run the following:

> knife voxel voxcloud create --facility LGA8 --hostname
   my.new.chef.instance --processing-cores 4 --disk-size 50 --image-id 55

To provision an available VoxSERVER configuration from inventory with our managed CentOS variant, VSE:

> knife voxel voxservers create --facility LGA8 --configuration-id 2
> --hostname my.physical.chef.instance --image-id 16

And if you’re looking for further information for each command issue:

 --help

We’re really excited to be able to offer these infrastructure automation tools to our clients – look for more to come!

Explore HorizonIQ
Bare Metal

LEARN MORE

Stay Connected

About Author

INAP

Read More