deltacloud api

26
Deltacloud API Michal Fojtik, Software Engineer, Red Hat Czech

Upload: michal-fojtik

Post on 02-Jul-2015

2.053 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deltacloud API

Deltacloud API

Michal Fojtik, Software Engineer, Red Hat Czech

Page 2: Deltacloud API
Page 3: Deltacloud API

3

Cloud? Just another buzzword?

Similar to electrical power generation and delivery through electrical grid

On-demand service

Large cost saving

Pay as you go pricing model

Different cloud models: SaaS, PaaS, IaaS

Private or public clouds ?

Page 4: Deltacloud API

4

Infrastructure as a Service – How it works?

Massive usage of virtualization delivered through Internet

Choose a template of virtual machine

Choose hardware profile for VM

Run it!

Nice, but not really useful Web2.0* interfaces

Providers obviously expose all services via API

Real tool for interacting with cloud

Allow to develop custom applications for cloud

* buzzword #2

Page 5: Deltacloud API

5

API?

What you can do with this 'API'?

Launch virtual machines on-demand

Manage state of virtual machines

Get information about virtual machine (IP, state,

etc.)

Create own virtual machine templates

Attach/detach some storage to virtual machine

Page 6: Deltacloud API

6

Many API's == Many problems

Providers wants to lock-in you to their API

No standards

Too complex to change your application code

Too lazy to watch all changes in their API

Page 7: Deltacloud API

7

Deltacloud API

Apache Deltacloud (http://incubator.apache.org/deltacloud/)

Cloud-agnostic provisioning and management API

Manage resources in different IaaS clouds using a single REST-based API

Moved to Apache Foundation Incubator (2010), ASF Licence

Page 8: Deltacloud API

8

Why another API ?

Avoiding lock-in by providing an API abstraction that can be implemented as a wrapper around a large number of clouds, freeing users of cloud from dealing with the particulars of each cloud’s API.

Providing a basis for open-source evolution of cloud API’s.

Providing backward compatibility for API XML structure

Page 9: Deltacloud API

9

Deltacloud API: SOA

Page 10: Deltacloud API

10

Deltacloud API: Supported cloud providers

Deltacloud currently supports:

Amazon EC2 and S3 + Eucalyptus

Rackspace Cloud Servers and Cloud Files

Gogrid Cloud Servers

Terremark Vcloud Express

Rimuhosting VPS

Red Hat Enterprise Virtualisation (RHEV-M API)

Open-nebula Cloud

IBM SBC ...more coming soon...

Page 11: Deltacloud API

11

Accessing Deltacloud API

Deltacloud API is a simple state-full application written using almighty power of Ruby and Sinatra web framework

Installation:

gem install deltacloud-core

Running an instance:

deltacloudd -i [ec2|rhevm|gogrid|rackspace|opennebula|mock]

Accessing Web UI:

http://localhost:3000/api

Page 12: Deltacloud API

12

Deltacloud API: Top level entry-point

Easy ramp-up

No need to know the resource types ahead of time, simply load the ‘Primary Entry Point’ and start navigating among resource

Deltacloud uses HTTP basic authentication

Page 13: Deltacloud API

13

Basic cloud abstraction collections

Realms

A distinct organizational unit within the back-end cloud such as a data center

Hardware Profiles

Sizing of a virtual machine in a cloud

Images

Templates (virtual machine images) from which Instances are created

Instances

A realized virtual server, running in a given back-end cloud

Page 14: Deltacloud API

14

Extended cloud abstraction

Storage volumes

Virtual storage device that can be attached to an Instance

Storage snapshots

Snapshots of a Storage Volume at a specified point in time

Key-value storage (blob)

Generic ‘key ==> value’ based data store

Authentication keys

Credentials used to access a running Instance

Loadbalancers

Maintain high availability for Instances (Elastic LoadBalancing, F5 LoadBalancer)

Page 15: Deltacloud API

15

Deltacloud API: Why REST ?

Better than SOAP :-)

Based on HTTP protocol thus state-less

Programming language agnostic

Clients in Java, Ruby, Perl, C, <add your language here>

Content negotiation

Supported formats: XML, JSON, HTML

Recommended method: HTTP 'Accept' headers

Page 16: Deltacloud API

16

Deltacloud API: Features vs Capabilities

Features

Enhance standard API behavior with additional features defined for each collection

Capabilities

Give an option for client to check if given operation is supported by back-end cloud

Both “features” and “capabilities” are advertised by Deltacloud API top entry-point.

Page 17: Deltacloud API

17

Deltacloud API: Launching an Instance (1)

Step 1: Choose VM Image

Each Image defines the root partition and initial storage for the instance operating system

Available actions:

Filtering using owner_id and architecture

Future operations:

Creating custom images using Image Warehouse

Page 18: Deltacloud API

18

Deltacloud API: Launching an Instance (2)

Step 2: Choose Hardware Profile

Describes the sizing of a virtual machine in a cloud and prescribes details such as how many virtual CPU’s, how much memory or how much local storage an instance might have

Properties are:

Fixed

Range

Enumerative

Page 19: Deltacloud API

19

Deltacloud API: Launching an Instance (3)

Step 3: Choose a Realm

Represents a distinct unit within the same cloud like Data Center location

Changes many aspects of cloud:

Pricing

SLA

Geo location

Page 20: Deltacloud API

20

Deltacloud API: Launching an Instance!

Final: Glue all things together

Additional parameters:

Name – Each instance should have name

Hardware profile properties – Fine tune memory, CPU, storage size

Features – Parameters defined by features

Page 21: Deltacloud API

21

Deltacloud API: Managing instance state

Client access to the back-end state machine

Basic virtual machine operations:

Reboot

Stop

Start

Destroy

Page 22: Deltacloud API

22

Deltacloud API: Run command on instance

Currently only Linux instances are supported.

Authentication:

SSH private keys (Amazon)

Password (Gogrid, Rackspace)

Page 23: Deltacloud API

23

Deltacloud API consumers

Native Ruby client shipped by Deltacloud API core framework

Allows full control of back-end cloud and provide access to all features

Command line client

Control cloud from terminal, can be used for testing and batch operations

Java client library

Used by many jBoss projects developed by Red Hat (jCloud, Eclipse Deltacloud plugin, BoxGrinder...)

C client library

Used by Condor Grid to queue cloud operations (Aeolus project)

Native implementations

virtualmaster.cz, <put your company here ;-)>

Page 24: Deltacloud API

24

Page 25: Deltacloud API

25

Contributing to Deltacloud API

Everyone can contribute, ask questions, ask about new features...

...even in real time on IRC: #deltacloud @ freenode.net

...or send patches to:

[email protected]

Page 26: Deltacloud API

26

Thank you!

Questions ?

[email protected]