paas on openstack

33
SINGLE PLATFORM. COMPLETE SCALABILITY. PaaS on OpenStack @natishalom CTO & Founder GigaSpaces

Upload: open-stack

Post on 14-May-2015

5.054 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: PaaS on Openstack

SINGLE PLATFORM. COMPLETE SCALABILITY.

PaaS on OpenStack@natishalomCTO & Founder GigaSpaces

Page 2: PaaS on Openstack

Agenda

Defining the PaaS

Different paths to PaaS

PaaS on OpenStack

Demo (Optional)

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 2

Page 3: PaaS on Openstack

Defining the PaaS

There is a difference between knowing the PaaS (path), and walking the PaaS (path).

Morpheus in “The Matrix”

Quiz: What do you

expect from a PaaS?

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 3

Page 4: PaaS on Openstack

Agenda

Defining the PaaS

Different paths to PaaS

PaaS on OpenStack

Demo (Optional)

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 4

Page 5: PaaS on Openstack

Different Paths to PaaS

Productivity vs. Control tradeoffs

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 5

Page 6: PaaS on Openstack

Google App Engine Architecture

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 6

Page 7: PaaS on Openstack

Control assumptions

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 7

• HW configuration• Operating system• Language (Java/Paython)• Middleware stack (data-

base, messaging,…)• Architecture• Performance (Quota :

CPU, Mem, Net,..)• Data center location

• Application Code• Selecting the middleware

stack from a predefined list.

You

Page 8: PaaS on Openstack

Heroku Architecture

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 8

Routing Mesh

Dyno Grid

SQL Database

Memory Cache

Page 9: PaaS on Openstack

Control assumptions

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 9

• HW configuration• Operating system• Language (Ruby)• Middleware stack (data-

base, messaging…)– Flexibility of choices

• Architecture• Performance (dyno)• Data center location

• Application Code• Selecting the middleware

stack from a predefined list

You

Page 10: PaaS on Openstack

Elastic BeanstalkApplication

Elastic Beanstalk Architecture

AutoScaling

http://myapp-staging.elasticbeanstalk.com/

Elastic Load Balancer

Apache

Tomcat

Amazon Linux AMI

Your Running Application

EC2 Instances

EC2 Instances

EC2 Instances

VersionVersion

VersionEnvironment

Ela

stic

Be

an

sta

lkH

ost

Ma

na

ge

r

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 10

Page 11: PaaS on Openstack

Control assumptions

Amazon• Operating system• Language (Java)• Middleware stack

(tomcat, RDS…)– Can be easily extended

• Architecture (Web)• Storage• Data center

You• Application Code• Selecting the middleware

stack (anything beyond tomcat)

• HW configuration• Performance • Limited control over the

OS using linux tools• JVM tuning/configuration

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 11

Page 12: PaaS on Openstack

Productivity Myths

• You have to give up control for more simplicity– Not always…

• Less code = more productivity– Productivity is measured by units of

features being delivered (not lines of code)

• Opinionated architecture (Rails/Grails) is extremely productive

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 12

Carlos Ble's post Goodbye Google App Engine

“..developing on GAE introduced such a design complexity that working around it pushes us 5 months behind schedule.”

Page 13: PaaS on Openstack

So Who’s Better?

Google/Heroku• Top-down sandbox

approach• Highly opinionated• Designed for extreme

simplicity at expense of user control

Amazon • Bottom-up approach• Designed for extreme

simplicity with a significantly higher degree of control

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 13

Fits a small subset of apps

Fits a larger spectrum of apps

Page 14: PaaS on Openstack

Agenda

Defining the PaaS

Different paths to PaaS

PaaS on OpenStack

Demo (Optional)

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 14

Page 15: PaaS on Openstack

PaaS on OpenStack – Aim Higher

• Anyone should be able to:– Build their own PaaS in a snap– Run on any cloud (public/private)– Gain multi-tenancy, elasticity… Without code changes.

• Provide a significantly higher degree of control without substantial complexity– Language choice– OS– Middleware stack

• Should come pre-integrated with popular stack– Spring,Tomcat, DevOps, NoSQL, Hadoop…

• Designed to run the most demanding mission-critical apps

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 15

Page 16: PaaS on Openstack

The Building Blocks..

Service Orchestration

Recipe

Service

• Provision• Automation• Multi-tenancy• Management/Monitoring

• Package• Configuration• Life cycle

• Any process or group of processes• DB, Web, NoSQL

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 16

Page 17: PaaS on Openstack

Service Orchestration Layer

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 17

Grid Service ManagerAgent

Grid Service Container

GigaSpaces Application Cluster

Agent

Grid Service Container

Agent

Grid Service Container

Public Cloud Private CloudBare metal

Scale-out

Scale-in

DeployControl

Data Center/Cloud

Page 18: PaaS on Openstack

Agent

Grid Service Container

Life cycle Provisioning Monitoring Statistics

Zoom-In…

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 18

Page 19: PaaS on Openstack

19

Service Recipe (Proposal)

® Copyright 2011 GigaSpaces Ltd. All Rights Reserved

service {  name "cassandra-service"  icon new File("icon.png")  defaultScalingUnit "small"  IpRange "*.*.*.*"

  lifecycle {    //life cycle events can be shell scripts or groovy closures that receive the admin as a parameter    //here you can implement logic to download binaries from any repository or file server    install {ServiceContext serviceContext ->      myCalculatedParam = serviceContext.serviceInstance.localHostAddress.hostName;      masterNodeIp = serviceContext.getServiceInstanceMatching(name("cassandra-master")).localHostAddress.hostName      serviceContext.environmentParameters["localHostName"] = myCalculatedParam;      port = serviceContext.portLocator.nextAvailablePort      serviceContext.environmentParameters["port"] = port      //inject runtime parameters to a config file / script using a utility class      serviceContext.templateReplacer.replace("cassandra.yaml", serviceContext.environmentParameters)      "install.sh".execute();    }    uninstall "install.sh"    relocate "relocate.sh"    preStart "pre-start.sh"    start "start.sh"    postStart "post-start.sh"    preShutdown "pre-shutdown.sh"    shutdown "shutdown.sh"    postShutdown "post-shutdown.sh"  }

Page 20: PaaS on Openstack

20

Service Recipe Monitors & SLA

® Copyright 2011 GigaSpaces Ltd. All Rights Reserved

monitoring {    pluginClass "org.openspaces.usm.JmxMetricsCollector"    config {      jmxOperations["org.apache.cassandra.db:CompactionManager:CompletedTasks:Cassandra": "Completed Tasks",                    "org.apache.cassandra.db:CompactionManager:PendingTasks:Cassandra": "Pending Tasks",                    "org.apache.cassandra.db:CompactionManager:ColumnFamilyInProgress:Cassandra": "Column Family In Progress"];      jmxHost "127.0.0.1";      jmxPort 8080;    }  }

  sla {    deploymentConstraints {      scalingUnit small    }    scalingRules {      rule {        priority 1        when {thisSerice().anyInstace."Disk Space".lessThan(30.MB) }        add 2.ScalingUnits      }

      rule {        priority 2        when {thisSerice().anyInstace."CPU Utilization".lessThan(30.Percent).for(5.Minutes)}        remove 1.ScalingUnit

      }

      rule {        when (alertOfType("CPU Utilization").raisedFor(anyServiceNode()))      }      //    }

  }

 

Page 21: PaaS on Openstack

Agenda

Defining the PaaS

Different paths to PaaS

PaaS on OpenStack

Demo (Optional)

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 21

Page 22: PaaS on Openstack

You take the control seat.

How does it work?

Page 23: PaaS on Openstack

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved

23

The Demo

• Use Cassandra as a private case for a service

• Demonstrate what it takes to– Deploy– Manage– Handle failure– Scale– Monitor

Page 24: PaaS on Openstack

The Deployment Process

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 24

CassandraInstallation

CassandraInstallation

Agent

Grid Service Container

4) Provision a Machine and installGigaSpaces

5) Start containers

6) Start cassandra

CassandraInstances

Agent

Grid Service Container

CassandraInstances

7) Add instance

3) Deploy

2) Pack

1) Deploy Cassandra

DevOps CLIElastic Service

Manager

Page 25: PaaS on Openstack

Continuous Availability

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 25

Agent

Grid Service Container

CassandraInstances

Grid Service Container

USM starts new instance

Machine failure

Agent

Grid Service Container

CassandraInstances

Elastic ServiceManager

Instance failure

Elastic manager starts a new instance on another machine

Page 26: PaaS on Openstack

Continuous Scalability

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 26

Agent

Grid Service Container

CassandraInstances

Agent

Grid Service Container

CassandraInstances

Elastic ServiceManager

Agent

Grid Service Container

CassandraInstances

Agent

Grid Service Container

CassandraInstances

Monitor

Not enough resources to meet the SLA

Add resources to meet the SLA

Page 27: PaaS on Openstack

Multi-Tenancy

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 27

Agent

Grid Service Container

Tenant A

Elastic ServiceManager

Tenant B

Agent

Grid Service Container

Tenant C

Add shared tenant

Add private tenant

Page 28: PaaS on Openstack

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved

28

Composite Application

Agent

Grid Service Container

Apache

Elastic ServiceManager

Agent

Grid Service Container

Tomcat

Agent

Grid Service Container

Cassandra

Page 29: PaaS on Openstack

Monitoring

• Redirect console output• Monitor statistics through JMX• Pluggable monitoring• Management console:

– Web– CLI– API (REST, Groovy, Java)

• Alerts

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 29

Page 30: PaaS on Openstack

Current Status

• JClouds provider for OpenStack is ready– Developed in Collaboration with GridDynamics & Adrian

Cole– Integrated with OpenStack/Cactus build– Required a few patch updates to OpenStack code base

• Continuous collaboration with Citrix– Integrate the platform with the underlying IaaS stack

• Better performance/utilization– Full stack (pre-engineered) enterprise-ready solution

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 30

Page 31: PaaS on Openstack

Join the Effort

• Call for action– Try out the provider jclouds– Establish a PaaS working group to drive PaaS

within OpenStack community

• Register now for the beta program– www.gigaspaces.com

• Learn more..– natishalom.typepad.com– blog.gigaspaces.com

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 31

Page 32: PaaS on Openstack

Summary

• Curving out complexity, opinionated architecture, relying on someone else’s stack is only one way to achieve productivity at the expense of control

• With OpenStack we can aim higher and make the application infrastructure simpler and better suited for the cloud in the first place

® Copyright 2011 Gigaspaces Ltd. All Rights Reserved 32

Page 33: PaaS on Openstack

GigaSpaces Cloud Enabled Platform gigaspaces.com/paas-enablement

gigaspaces.com/saas-enablement

GigaSpaces XAP Product Overview:http://www.gigaspaces.com/wiki/