No Huddle Offense

"Individual commitment to a group effort-that is what makes a team work, a company work, a society work, a civilization work."

Coffee instead of snakes – Openshift fun (2)

February 8th, 2012 • Comments Off on Coffee instead of snakes – Openshift fun (2)

In my last post I demoed how OpenShift can be used to deploy WSGI based Python application. But since OpenShift also supports other languages including Java I wanted to give it a shot.

So I developed a very minimalistic application which emulates a RESTful interface. Of course it takes the simplistic – all time favorite – Hello World approach for this. Client can create resources, which when queried will return the obligatory ‘Hello <resource name>’.

To start create a new java application in your OpenShift dashboard. When cloning the git repository – which was created – you will notice that you basically get a maven project with some templates in it. Now you can simple use maven to test and develop your application. When done do a git push and your application is ready to go.

The implementation is pretty straight forward:

/**
 * Simple REST Hello World Service.
 *
 * @author tmetsch
 *
 */
public class HelloServlet extends HttpServlet {
    [...]
    @Override
    protected final void doGet(final HttpServletRequest req,
            final HttpServletResponse resp) throws ServletException,
            IOException {
            [...]
    }
    [...]

So beside from extending the HttpServlet class all you need to do is implement the doGet and doPost methods. When done edit the ‘web.xml’ file in the folder src/main/webapp:

[...]
<servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>the.ultimate.test.pkg.HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>/users/*</url-pattern>
</servlet-mapping>
[...]

This will make sure you the application can be found under the right route. If you like you can also add an index.html file in the same folder so people can read a brief introduction when visting the top layer of you application. In my case that would be http://testus-sample.rhcloud.com – The application itself can be found under: http://testus-sample.rhcloud.com/users/.

So I like the approach OpenShift takes here with maven. You can simply add you dependencies like jmock, junit etc. and during deployment it is taken care of that everything falls in place. Also if you write Unittest it’ll also ensure that you’re application will work – Non functional apps will not be deployed obviously if you write a Unittest and use maven. It’s pretty easy to write Unittest for the HttpServlet class if you use a mocking framework like jmock. You can get the source code at github.

What is OCCI?

December 2nd, 2009 • 2 Comments

OCCI has been around for a while now, and for those just starting to fiddle with it here is a ‘introduction’. OCCI is more then just a document and specification…’

The OGF Open Cloud Computing Interface Working Group (OCCI-wg) is developing a clean, open API for ‘Infrastructure as a Service’ (IaaS) based Clouds. IaaS is one of three primary services: Infrastructure, Software, and Platform of the emerging Cloud industry.

OCCI–wg is a working group of the OGF established in March 2009. The group has active membership of over 200 individuals and is led by four chairs from industry, academia, service providers and end-users. Several members are from commercial service providers that are committed to implementing the OGF-OCCI specification.

Ignacio and me during the founding session.

Ignacio and me during the founding session.

The idea of cost reduction, GreenIT and on-demand resource planning lead to the idea of having elastic environments which scale on demand. Today’s demand for elastic environments in which public Clouds (like Amazon’s EC2 offerings) and private Clouds (locally installed resources) interoperate (Hybrid-,Federate- or InterClouds) show the need for standardization. Differentiation in the offerings is done by extensions and prices not by core functionalities. The need to interface all Cloud providers (private as well as public) in the same manner shows the need for standards for core features. Therefore main drivers behind the specification are to ensure Portability, Interoperability and Integration between Cloud service providers and end-users.

OCCI will be a very slim RESTful based API which can be easily extended. Without the overhead of many similar protocols the REST approach allows users to easily access their services. Every resource is uniquely addressed using a Uniform Resource Identifier (URI). Based on a set of operations – create, retrieve, update and delete (CRUD) – resources can be managed. Currently three types of resources are considered: storage, network and compute resources. Those resources can be linked together to form a virtual machine with assigned attributes. For example, it is possible to provision a machine which has 2GB of RAM, one hard disk and one network interface.

The Specification itself is setup to be modular. Therefore it is delivered as a document series. Each of the documents focuses on a certain topic and can be independently used from the others. Until now the OCCI specification consist of four modules: The Core specification, a description of how IaaS based resources should look like, a HTTP rendering for easy machine-to-machine management and a XHTML rendering for creation of human-to-machine interfaces.

The following diagram shows an example RESTful query towards an OCCI compliant service provider:

occi

OCCI overview diagram

An HTTP GET operation is performed on an unique URI representing a virtual machine of Solaris zone. The URI encapsulates the instance and provider id. The OCCI specification describes how operations can be performed upon resources (Compute, Storage and Network). Resources can be linked so they described e.g. a Virtual Machine. Each resource type has a certain set of attributes (e.g. CPU speed, Storage size and IP addresses).

The CRUD operations can be performed upon the resources. During the past months two reference implementations have emerged. Based on drafts of the specification a group of the University of Madrid (UCM – OpenNebula) and a group inside of the National Institute of Nuclear Physics (INFN) created reference implementations.

The idea which led to the creation of the OCCI group has been triggered and sponsored by the EU project RESERVOIR. RESERVOIR tries to establish a tool suite for Cloud computing middleware in which the interfaces should be standardized. One of these interface will be an implementation of the OCCI specification. The work done within the group has gained an significant impact in the Cloud community. Blogs, technology related websites, twitter (Tag #OCCI) and journals have driven and reported about OCCI thanks to the open process of the group.

Currently the OCCI group is finalizing and documenting the initial draft specification. After only half a year the OCCI group succeeded in delivering on of the first standards for the Cloud community. This could be achieved thanks to the big momentum the group has had. Due to the specification’s high extensibility the group will start to work on extensions after the first draft has been delivered. In future OCCI might become a provider of a complete Cloud computing interface stack which covers IaaS as well as PaaS based offerings.

OCCI plays a major role in today’s Cloud computing standardization efforts. The group is actively collaborating with other groups from SNIA for storage and DMTF for management standards. A white paper has been published describing how SNIA’s Cloud Data Management Interface and OCCI can work in conjunction. The work is also featured on the http://www.cloud- standards.org wiki where Cloud related standards are coordinated by the major Standards Development Organizations (SDOs).

For more information visit http://www.occi-wg.org/

The Cloud & Standards collaboration

October 27th, 2009 • Comments Off on The Cloud & Standards collaboration

Cloud Computing is a hype topic, most of you know that. Still there is a lot of interesting stuff going on during the past months and weeks. As one of the chairs of the OCCI (http://www.occi-wg.org) working group I had the great opportunity to present the status and some cloud related work during the Cloud Computing and its Applications conference. I was invited by Ian Foster to present the following slides:

CCA09 Cloud Computing Standards and OCCI
View more documents from befreax.

What it comes done to is the following: During OGF27 (http://www.ogf.org/OGF27) we stated to present one of the first standardized Cloud interfaces. We are almost there and soon the specification will be out in the public comments phase of the OGF editor pipeline. More important than having one standard is to have the standards collaborate while each focus on a different aspect. For example the Cloud Data Management Interface driven by SNIA (http://www.snia.org). Now we need some more efforts like demos demonstrating interoperable and portable cloud solutions.

If you wanna know what is going on for OCCI right now: We had a lot of blog posts, mails, etc going on…

BTW the OCCI sessions during OGF27 itself went pretty well and both OCCI and myself have been in the closing remarks from Craig Lee:

IMGP2653

For Your Cloud Poster

September 7th, 2009 • Comments Off on For Your Cloud Poster

So happy to see the poster I made at the Sun HPC workshop:
28285391

Open Cloud Framework – Open Standards for the Cloud Community

September 2nd, 2009 • Comments Off on Open Cloud Framework – Open Standards for the Cloud Community

Here is the talk I gave at GridKa School 2009 in Karlsruhe. Recordings will follow later – so stay tuned. The slides itself might not be to easy to read because they are designed for presentation not for Offline usage. But you’ll find a short transcript below…

  1. Introduction slide
  2. A very simple quote showing that not many people know what Cloud Computing is. Simon Wardley – found 68 definitions at his OSCON presentation.
  3. So what is cloud computing – cartoon shows that it is unclear and that Cloud Computing is not when you take an existing product and add a ‘Cloud Computing’ stamp on it. But these slides will define Cloud Computing using the RESERVOIR project acronym. The cartoon although is funny – the first line shows that adding public resources to your Private Cloud will create a big cloud. The second line shows that if you deinstall all software you will get Sun hardware 🙂 The third shows that if you have problem with your Cloud Sun will fix it.
  4. Intro to the FP7 EU Project RESERVOIR
  5. RESERVOIR stands for Resources and Services Virtualization without Barriers. So the 3 components are Resources, Services and Virtualization. If you combine them all without barriers you get Cloud Computing.
  6. Resources can be one of these nice Sun Blade Centers
  7. Services are any kind of Software with a demand for Services. The last think is important. Without the demand no Cloud. Next to that a Service has an Interface towards the End-user a Description consisting of Meta-information for the Semantic Cloud as well as requirements like CPU speed and architecture. Also a Service needs to have a SLA bound to it.
  8. Virtualization is basically an abstraction. And possible for Hardware (VirtualBox, VmWare,…), Software (Java), Storage (OGSA-DAI) or Network (Sun Crossbow).
  9. A lot of barriers need to dealt with.
  10. Sun doesn’t do this alone but with these RESERVOIR Project partners.
  11. Still what is Cloud Computing? This picture shows that it is everything and a kitchen sink. It is a lot and therefore we need more clarification based on Classification.
  12. The 3 major things which can be provided as a Service towards the customer are Software, Infrastructure and Platform as a Service. Important is that this is not a layered approach because you could offer SaaS on top of IaaS without PaaS…
  13. Several patterns of how users use the Cloud also show that Cloud Computing isn’t easy to describe
  14. The diversity also adds more confusion
  15. But one major thing of the Cloud is that you can do migration, consolidation and Hybrid-Clouds – so to say beeing elastic
  16. The RESERVOIR layered architecture
  17. Demoing the features fo such an environment – things Sun has demonstrated
  18. The Virtual Java Service Container is a unique entry point for all kind of Java Services. Those can be deployed and then managed/scaled in the environment
  19. The Exeds of a SGE cluster can be started and shutdown on demand.
  20. But the ‘blue arrows on slide #16 show that all this (elasticity, management etc.) is not possible without Standards. One is OGFs Open Cloud Computing Interface.
  21. A nice quote about standardization – design it to be extensible and think about the future
  22. It has 3 main drivers: Interoperability
  23. Portability
  24. Integration
  25. Focus on IaaS/virtual workloads
  26. If you have a lot of people you will have also some great minds onboard who can help
  27. 190 Members and a lot of active members/implementors and chairs are helping out
  28. The timeline to create a slim, extensbile API for the Cloud (And one of the first!) by OGF27
  29. The two devliverables of the OCCI working group
  30. The CRUD operations and mapping towards HTTP operations
  31. A diagram of OCCI. Maybe to complex to explain in text. Join the group or listen to one of the future talks about OCCI 🙂
  32. The most important slide. Having only one standard doesn’t help. It helps having one interface to ‘combine’ Clouds but what happens with e.g. secure data (top left)? So there is a demand for other standards. Those are shown in the big Cloud. More are also there. So please: join and help those groups! Without these the Cloud will not be possible (think of the barriers and elasticity)
  33. If it doesn’t happen Mankind will also die off…
  34. References and questions