[one-users] Trying jclouds to manage OpenNebula

Daniel Molina dmolina at opennebula.org
Mon Mar 25 01:45:20 PDT 2013


Hi Giovanni,

On 20 March 2013 00:12, Giovanni Toraldo <me at gionn.net> wrote:
> Hi,
>
> just to share a few discoveries of the last few days.
>
> I've tried to manage OpenNebula instances with jclouds [1]. It doesn't
> comes with a native OpenNebula driver, however it contains a generic
> EC2 driver, that could be used along with the OpenNebula econe-server.
>
> Hence some rough edges [2] [3], I've achieved to succesfully
> authenticate, and retrieve the list of available images and active
> instances.
>
> Unfortunately, to be able to instantiate new VMs with jclouds, it
> looks like that the CreateSecurityGroup method should be implemented
> in econe-server (since jclouds relies on it to manage instances
> grouping, even when launching a single instance).
>
> Is that feasible with the current OpenNebula, without a way to
> logically group instances together? Maybe injecting a custom variable
> in the templates?
>
> Any suggestion is highly appreciated, thanks!
>
> [1] https://github.com/jclouds/jclouds
> [2] http://dev.opennebula.org/issues/1816
> [3] https://github.com/jclouds/jclouds/issues/1434
>

This is really interesting, I found a similar problem when trying
Hybrid Fox and Deltalcloud through our EC2 implementation, long time
ago.

Concerning the CreateSecurityGroup call, you could implement it in the
same way it's done in appflow/appstage to store services; using the
Document Pool provided by OpenNebula. You just have to implement a new
class that inherits from Document/DocumentJSON and specified a custom
Document type:

module OpenNebula
    class SecurityGroup < DocumentJSON

        DOCUMENT_TYPE = 200

module OpenNebula
    class SecurityGroupPool < DocumentPoolJSON

        DOCUMENT_TYPE = 200

You can interact with this pool in the same way as any other
OpenNebula pool (info, chown, acls ...) and store any information you
need.

Before creating a new instance through ec2 you can create/retrieve the
target security group and include the required information in the vm
template.

Hope this helps. If you have any doubts, please do not hesitate to ask us

Cheers

-- 
Daniel Molina
Project Engineer
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula



More information about the Users mailing list