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:
- Cookbooks and recipes
- Stores of JSON data (data bags), including encrypted data
- Cloud resources, including provisioning
- The installation of Chef on management workstations
- Searching of indexed data on the Chef Server
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.
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
2. Build Fog gem
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]
Review the list of common options available to this (and all) Knife subcommands and plugins.
Install this plugin
To install the knife computenext plugin using RubyGems, follow the steps below
1.Clone the knife computenext -repo
2.Build knife computenext gem
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_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.
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.
knife computenext queryresources virtualmachine provider=Hegerys
Creating a Virtual Machine
$ knife computenext virtualmachine create [NAME] [REGION] [ZONE] [IMAGE_ID] [INSTANCE_TYPE_ID]
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