Skip to content

6fusion/adaptor-vmware

Repository files navigation

6fusion Adaptor Template

Follow us at www.6fusion.com and on twitter @6fusionCore

Introduction

6fusion Adaptor Template is a REST service template, using padrinorb, designed in such a way that a developer can easily integrate their hypervisor or cloud system with the 6fusion framework.

Our goal with this template is to adhere to the essence of REST and at the same time create a standard template that will make creating a 6fusion Adaptor extremely easy.

Here is a brief overview of models requested by the 6fusion Engine Room:

INode

This is where the iNode information that facilitates communication with the iNode is stored

Capability

This is simply a model for building a capabilities array of actions/tasks that can be performed on the iNode

Host

Represents a physical device in the cloud infrastrucutre that hosts virtual machines or software.

HostReading

Represents the activity of a specific Host.

Machine

Represents a virtual slice of the cloud infrastructure.

MachineReading

Readings or Metrics that are gathered from the cloud infrastructure on a machine basis. (This is what is used to calculate the WAC.)

MachineDisk

Represents a disk on the Machine that is used for storage or a mounted image for loading additional software.

MachineDiskReading

Represents the activity of the specific disk/mounted image or MachineDisk.

MachineNic

Represents a network interface on the machine.

MachineNicReading

Represents the activity of the specific network interface or MachineNic.

Usage

To use the 6fusion Adaptor Template, simply…

  • Fork the latest version from github

  • $ git checkout {forked_repository}

  • Modify to suit

JRuby Configuration w/ RVM

If you are looking to use a Java library for interaction with your cloud service, you’ll want to run this REST service as a jruby application. To do so is pretty simple.

  • In the Gemfile you’ll want to switch from the ‘thin’ gem to the ‘trinidad’ gem.

    • Comment Out Line #4 (gem ‘thin’ # or mongrel)

    • Uncomment Line #5 (gem ‘trinidad’, :platform => ‘jruby’)

  • If you are using rvm you’ll want to also uncomment a line in the .rvmrc file in the root of the project.

    • Line #22 (PROJECT_JRUBY_OPTS=( –1.9 ).

  • Finally if you haven’t done so run this command in your shell client.

    • chmod +x ${rvm_path}/hooks/after_use_jruby_opts

Getting Started

In order to use the template it is really simple. All you need to do is navigate to the models folder of your checkout and modify the class methods on the models to implement the requested information. You can use the yard documentation to get an idea of what to implement or read the comments above each of the methods.

You can access the yard documentation either through building it with the yard gem or using the hosted yard documentation

For additonal information that may be helpful developing your adaptor look here: Adaptor Template - Wiki

** Do NOT modify the INode model unless you have a specific storage strategy. This is the only model where a basic implementation has already been done for you.

Optional Linux startup scripts

The etc/init.d/adaptor-vmware will start/stop/restart the adaptor. It assumes the installation adaptor-vmware project is /opt/6fusion/adaptor-vmware and will start the project using the default Padriono/Thin client. To make use of these scripts:

$ mkdir -p /opt/6fusion
$ cd /opt/6fusion
$ git clone [email protected]:6fusion/adaptor-vmware.git
$ ln -s adaptor-vmware/etc/init.d/adaptor-vmware /etc/init.d/adaptor-vmware

Copyright 2012 6fusion, Inc. See LICENSE for details.

About

VMware Implementation of the 6fusion Engine Room Adaptor

Resources

License

Stars

Watchers

Forks

Packages

No packages published