[one-ecosystem] Which cloud interface to choose

Hector Sanjuan hsanjuan at opennebula.org
Thu Dec 15 07:14:51 PST 2011


Hi John,

If you look at current implementation of occi-server.rb will see that
every operation is authenticated using html basic authentication (this is
done at the "before do..end" chunk). That means, a special header inserted
in every request.

Included client utils such is occi-storage set this header everytime, when
they do this:

                 req.basic_auth @occiauth[0], @occiauth[1]

For your application you need to either do the same, and set basic auth
headers everytime you request something from the server, or slightly
modify the server to implement a login method "login" and enable
"sessions", very similar to what is done in sunstone-server.rb.

An example of how this headers are set up using jQuery ajax method for
sunstone:

                 $.ajax({
                     url: "ui/login",
                     type: "POST",
                     data: {remember: remember},
                     beforeSend : function(req) {
                         req.setRequestHeader( "Authorization",
                                             "Basic " + btoa(username + ":"  
+
password)
                                             )
                     },
                     success: ...
                     error: ...
                 });

I think in 3.0 the "password" should be SHA1-hashed before sending it (not
100% sure now).

I dont know how you plan your application, but note that Sunstone is very
flexible and that using Groups + ACLs + Custom plugins may already cover
your requirements and save you some time. Some useful documentation is
here http://opennebula.org/documentation:rel3.0:sunstone#tuning_extending

Good luck,

Hector

En Tue, 13 Dec 2011 14:23:10 +0100, John Samonakis <samon at ucnet.uoc.gr>
escribió:

> Hi!
>
>
> Florian thanks a lot for your valuable info. I have study your
> implementation
>
> and I think you have done a very good job! The source code help me
>
> to understand how to develop my web application.
>
>
> Currently I am trying to list the VMs using the OcciOneListTester but I
> receive
>
> the message "Basic auth not provided".
>
>
> I believe, I have configure correctly the occi service since I can list  
> the
> VMs
>
> using the command occi-compute.
>
>
> I use OpenNebula 3.0
>
>
> I search for a solution but the url I found
> <http://comments.gmane.org/gmane.comp.distributed.opennebula.user/4323>
> http://comments.gmane.org/gmane.comp.distributed.opennebula.user/4323
>
> didn't help me to understand what I have to do.
>
>
> thanks a lot
>
> John
>
>
>
>
>
> From: florian.feldhaus at tu-dortmund.de
> [mailto:florian.feldhaus at tu-dortmund.de]
> Sent: Tuesday, November 15, 2011 2:52 PM
> To: samon at ucnet.uoc.gr; ecosystem at lists.opennebula.org
> Subject: Re: [one-ecosystem] Which cloud interface to choose
>
>
> We are currently doing exactly the same using OCCI (for IaaS management)  
> and
> CDMI (for storage). I summed it up in a screencast which you may find  
> here:
>
> dl.dropbox.com/u/4837292/OCCI_CDMI_Screencast_large.mp4
>
>
> If that's what you want, you can find the OCCI 1.1 server for OpenNebula
> here (please use the latest version from git):
>
> http://dev.opennebula.org/projects/ogf-occi/wiki
>
>
> The CDMI server can be found here:
>
> https://github.com/livenson/vcdm/tree/master/src/vcdm
>
>
> And you can find the Webclient (including a Java library which can be  
> used
> stand alone) here:
>
> https://github.com/gwdg/Pollux
>
>
> Especially the client is currently not too well documented, but if you  
> like
> to use it, we would be glad to improve documentation and provide support.
>
>
> Cheers,
>
> Florian
>
>
> Von: John Samonakis <samon at ucnet.uoc.gr>
> Datum: Tue, 15 Nov 2011 14:45:59 +0200
> An: <ecosystem at lists.opennebula.org>
> Betreff: [one-ecosystem] Which cloud interface to choose
>
>
> Hi
>
>
> I want to make an GUI for educational purposes, in order, students, to  
> use
> VM
>
> for their projects. The GUI must have some basic functions such as start,
> terminate,
>
> reboot a VM.
>
>
> There are two cloud interfaces supported: EC2-Query API and OCCI-OGF.
>
> Which of them is more appropriate for my purpose?
>
>
> thanks a lot
>
> John
>
> _______________________________________________Ecosystem mailing list
> Ecosystem at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/ecosystem-opennebula.org
>


-- 
Usando el novísimo cliente de correo de Opera: http://www.opera.com/mail/



More information about the Ecosystem mailing list