Archive

Author Archive

Public, Private, Hybrid Cloud – OpenNebula

July 5th, 2010 jmguilla No comments

OpenNebula

You want to build your on premise cloud?

OpenNebula may be the solution. Like explained in this post for EUCALYPTUS, OpenNebula is a tool that provides its users with the capability of building their own cloud. It currently handles Xen, KVM and VMware based environments and also uses Deltacloud for dynamic provisioning on external clouds such as EC2 or ElasticHosts. It also features new local and Cloud interfaces, such as libvirtEC2 Query API and OGF OCCI API, and support for multiple users, image transferring and cloning, virtual network management and service contextualization.

Installation

Like for EUCALYPTUS, installation steps are not straight forward. Many dependencies are required ( for server side bellow ):

This machine will act as the OpenNebula server and therefore needs to have installed the following software:

  • ruby >= 1.8.6 and < 1.9.0
  • sqlite3 >= 3.5.2
  • xmlrpc-c >= 1.06
  • openssl >= 0.9
  • ssh

Additionally, to build OpenNebula from source you neeed:

  • Development versions of the sqlite3xmlrpc-c and openssl packages, if your distribution does not install them with the libraries.
  • scons >= 0.97
  • g++ >= 4
  • flex >= 2.5 (optional, only needed to rebuild the parsers)
  • bison >= 2.3 (optional, only needed to rebuild the parsers)
Once you get rid of that, you have to go through a huge configuration step ( see the documentation to have an idea ;) ).

First Use

Once you get rid of the hell of editing “etc/oned.conf” and the virtual image to make it “context aware” you can enjoy your newly created on premise cloud. The commands are really easy to use: onehost ( open nebula express host ), onevm, onevnet… to manage hosts, virtual machines, virtual network… I have not been playing with this tool for a long time, and I am not supposed to, but so far main boring thing (IMO, you are not obliged to share the same point of view…) is that the way we must proceed to configure virtual machines’ network access… You must create as many virtual machine’s configuration file as the number of virtual machine you want to run just to set vnc access for each one, and try to deal with the network configuration for your cloud. It has been two days now that I am trying to get 4 virtual machines running on top of KVM with working network unsuccessfully… I hope once I’ll get through this, it will be easier to scale to an cloud of million VMs :D !!!

OpenNebula vs. EUCALYPTUS

Two tools to build your on premise cloud, totally private, public or hybrid, both can be managed with EC2 like tools and can dynamically provision EC2 ami and are open source… These projects are pretty similar, a first advantage goes to OpenNebula, way more easier to install & setup and the contextualization of the virtual machines… EUCALYPTUS, on the other side, is really difficult to install and to use but offer a Web User Interface, which will make your users happy ( I’m not fond of CLI ;) )… The best you could do would be to try by yourself… But, to be honest, it would rather bet on an integrated solution such as VMware & Citrix offer to build a cloud infrastructure.

Categories: Cloud Tags: , , ,

Personal Coach on the French Riviera

June 14th, 2010 jmguilla No comments

I just made a new website online for a friend of mine. You can visit his website at: http://diet.form.free.fr

He his my personal trainer and I warmly recommend him if you want to workout seriously!!!!

Categories: News Tags: ,

Practical API Design

May 31st, 2010 jmguilla No comments

I just finished reading “Practical API Design“, a really good book that every API maintainer should have. I suggest to every developer to have it as fellow for your daily programs…

Categories: Java, Programming Tags: ,

Crypt Google

May 25th, 2010 jmguilla 8 comments

Google finally provide users with the capability to encrypt their online search: https://www.google.com

Categories: News Tags:

Only expose API Methods to users

May 21st, 2010 jmguilla 1 comment

Accessor Pattern

Everybody has always been considered by separation of code i.e, related functionalities written in the same packages for instance. The issue that comes up when writing an API is that you likely need to call some of that methods in other packages but you still don’t want to expose them to users. In Java language you can use 4 differents modifiers: Public, Protected, Package and Private. To answer our problem it lacks a modifier, let’s name it “Friendly”, that would allow to call methods in other packages under friendship. That would solve both both code separation concerns and non exposable methods. Here is an example of the Accessor Pattern:

package jean.michel.guillaume.api;
 
/**
 * class part of the public API, every one can use it
 */
public final class RMCore {
    static {
        Accessor.setDefault(new AccessorImpl());
    }
 
    /** Anyone can change value of the item. */
    public void addNode(String url) {
        //impl
    }
 
    /** Only friends can notify node changes.  */
    void notifyNodeUpdate(String url) {
        //impl
    }
}
package jean.michel.guillaume;
 
/**
 * We'll use this class to expose methods in separate packages
 */
public abstract class Accessor {
    private static volatile Accessor DEFAULT;
    public static Accessor getDefault(){
        Accessor a = DEFAULT;
        if( a != null){
            return a;
        }
        try{
            Class.forName(RMCore.class.getName(), true, RMCore.class.getClassLoader());
        }catch(Exception e){
            e.printStackTrace();
        }
        return DEFAULT;
    }
 
    public static void setDefault(Accessor a){
        if( DEFAULT != null){
            throw new IllegalStateException();
        }
        DEFAULT = a;
    }
 
    protected abstract void void notifyNodeUpdate(String url);
}
package jean.michel.guillaume.api;
 
import jean.michel.guillaume.Accessor;
 
/**
 * Now, we can just implement our own Accessor in a separate package
 * to gain access to friendly methods!! Don't forget to declare AccessorImpl
 * package private!!
 */
final class AccessorImpl extends Accessor {
 
    protected void notifyNodeUpate(String url) {
 
    }
}
Categories: Java, Programming Tags: ,