ComputeNext Knife Plugin

 In Orchestration


ComputeNext makes cloud service brokerage simple, sewing together choice in cloud services with the metrics and data to feed smart decision making processes. Computenext platform has more than 20 providers in their market place which can be accessed and managed using Computenext API.

Knife is a command-line tool that provides an interface between a local Chef repository and the Chef Server. Knife helps users of Chef to manage:

  • Nodes
  • Cookbooks and recipes
  • Roles
  • Stores of JSON data (data bags), including encrypted data
  • Environments
  • Cloud resources, including provisioning
  • The installation of Chef on management workstations
  • Searching of indexed data on the Chef Server


Computenext

Knife Plugin is used to manage API-driven cloud servers from various providers that are available in the Computenext Market place using command line.

Computenext subcommand should be installed as a Knife plugin, using RubyGems.

Note


This plugin requires Fog gem (with computenext as a provider added) to be present on the same machine. To install the gem, please follow the steps (If you have already installed default Fog gem, please uninstall it and then install using these steps)

1. Clone the Fog-repo

git clone https://github.com/Compute-Next/fog-1.9.0.git

2. Build Fog gem

cd fog-1.9.0
gem build fog.gemspec

3. Install fog gem

gem install fog-1.9.0.gem
This subcommand has the following syntax:
knife computenext [API request]

Note

Review the list of common options available to this (and all) Knife subcommands and plugins.

cn-knife

Install this plugin

To install the knife computenext plugin using RubyGems, follow the steps below

1.Clone the knife computenext -repo

git clone https://github.com/Compute-Next/knife-computenext.git

2.Build knife computenext gem

cd knife-computenext
gem build knife-computenext.gemspec

3.Install knife computenext gem

gem install knife-computenext-0.1.gem

After Installation, add your computenext access key, secret key and auth url to the knife configuration file in the following format.

knife[:computenext_access_key] =”xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
knife[:computenext_secret_key] = ”yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy”
knife[:computenext_auth_url] = “http://services.computenext.com/apiv1.0″

To retrieve all Image details

$ knife computenext queryresources image

You can supply a query to display a particular image detail also.
Eg.

knife computenext queryresources virtualmachine platform=VC

To retrieve all  Virtual Machine details

$ knife computenext queryresources virtualmachine

You can supply a query to display a particular VM detail also.
Eg.

knife computenext queryresources virtualmachine provider=Hegerys

Creating a Virtual Machine

$ knife computenext virtualmachine create [NAME] [REGION] [ZONE] [IMAGE_ID] [INSTANCE_TYPE_ID]
[NO_OF_RESOURCES(optional)]

Note

This call will work only if you have a valid payment method. If you are using  trial version please use “Define workload”, “Add Virtual machine to workload” followed by “Create transaction resources”.

To retrieve IP details

$ knife computenext transaction retrieve detail [TRANSACTION ID]

To retrieve username and password

$ knife computenext virtualmachine retrievepassword [VIRTUALMACHINE_INSTANCE_ID]

 Deleting a Virtual Machine

$ knife computenext virtualmachine delete [VIRTUALMACHINE_INSTANCE_ID]
Recent Posts

Leave a Comment

Start typing and press Enter to search