Apache Stratos - Building a PaaS using OSGi and Equinox

2,476 views
2,364 views

Published on

Apache Stratos is a PaaS built on top of Equinox and OSGi. Stratos runs all kinds of workloads including Java, OSGi, Tomcat apps, PHP, Node.js, MySQL, Mongo, Cassandra and others.
This session is an introduction to Stratos which will cover:
- How to get started
- Deploying on Amazon AWS and OpenStack Clouds
- Workloads Stratos supports
- Why and how Equinox is used
- Multi-tenancy and security
- Elastic scaling
- How Stratos compares to other PaaS systems

The session will include live demontrations of Stratos.
The session is aimed at those interested in PaaS models, as well as those with a strong interest in OSGi runtimes and Equinox.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,476
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
41
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Apache Stratos - Building a PaaS using OSGi and Equinox

  1. 1. 1 Apache Stratos Building a PaaS using OSGi and Equinox Paul Fremantle CTO and Co-Founder, WSO2 Committer, Apache Stratos @pzfreo #wso2 #apache paul@wso2.com pzf@apache.org
  2. 2. About me o CTO and Co-Founder WSO2 o Working in Apache for 14 years o Working with Cloud, SOA, APIs, MQTT, IoT o Also presenting tomorrow about IoT security (M2M day 2
  3. 3. The Small Print 3 Disclaimer Apache Stratos is an effort undergoing incubation at The Apache Software Foundation (ASF). Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
  4. 4. 4
  5. 5. Today’s Buzzword Bingo! PaaS Cloud Elastic Policy Auto-Scale DevOps jClouds Puppet Platform IaaS Chef Cassandra Multi-tenant Load Balancer Governance Monitoring 5
  6. 6. What is a PaaS anyway? 6
  7. 7. Gartner Reference Model for Platform as a Service Hardware Integrated PaaS Platform Management, Monitoring, Gov ernance, Provisioning System Infrastructure or System Infrastructure Services (IaaS) PaaS Service Offerings PaaS Technology Core Cloud Performance Foundation Cloud Value Foundation (Shared Resources, Multitenancy, Self-Service, Elasticity, Real-Time Versioning, Metadata Management, Subscription/Use Billing) (In-Memory Computing, Grid/Massive Scale, Auto-Scaling, SLA Enforcement, Use Tracking, High Availability, Security, Data Integrity, Parallel Processing) Integrated PaaS Application Modeling, Design, Development, Maintenance, Life Cycle Management Applications PaaS IaaS SaaS Application Platform Integration Platform Business Process Management Platform Cloud Database Platform Other User Experience Platform
  8. 8. What is Cloud? o Depends who you are o My daughter: iCloud (her music in the cloud) o My mum: gmail (her email in the cloud) o My VP sales: Salesforce (his prospects in the cloud) o Sysadmin: Amazon/Rackspace/etc (his infrastructure in the cloud) o *: what you care about, self- provisioned, managed, metered and paid per use, in the cloud 8
  9. 9. PaaS is a cloud for developers o Provisioning stuff developers care about: o Not VMs, networks and disk (though that might still be useful) o Application environments, databases, queues o Dev / Staging / Production o Different runtimes: o Java Servlet/Tomcat, Node.js, PHP, Python o MySQL, MongoDB, Cassandra o Etc o Working with Git, SVN, Jenkins, etc 9
  10. 10. Who needs a PaaS anyway? o Anyone who wants to provision application environments on-the-fly o A basis for multi-tenant SaaS applications o Elastic scaling and management of the infrastructure o Application based monitoring of the environment o More intelligent use of resources 10
  11. 11. What is Apache Stratos? ● A Platform-as-a-Service (PaaS) Framework ● Built on OSGi and Equinox ● Donated to Apache Software Foundation ● Committers from Cisco, Citrix, SunGard, Indiana U, NASA JPL, etc ● Deploys onto an Infrastructure-as-a-Service (IaaS) Including Amazon EC2, VMWare vCloud, OpenStack…etc ● Creates a secure, multi-tenant, elastic, metered, billed PaaS Supports private, public or hybrid PaaS
  12. 12. Quick Demo o Warning: this is alpha software o Running on Amazon o Accessed via Conference wifi o Hmmm? Ok who’s idea was that 12
  13. 13. 13
  14. 14. 14
  15. 15. Why OSGi? o A set of servers that need to be deployed in different architectures: o Single JVM for developer testing / small footprint o Scale-out for large scale deployment o Re-usable components from a wider set of middleware o Message Broker o HTTP Load Balancer o Identity Services o Logging and Metering o etc 15
  16. 16. © WSO2 2011 Carbon Framework
  17. 17. © WSO2 2011 Carbon Component Manager
  18. 18. More on Carbon o Based on Equinox o Using p2 feature model o Allows components to be managed and deployed from either local or remote repo o Handles versions and dependencies o Supports rollback o Command line p2 management and OSGi Console o Consistent model for scaling o Master/Slave + Deployment Synchronizer o Consistent Registry/Repository o Security model 18
  19. 19. Lessons learnt from Carbon o OSGi is a bit of a pain sometimes o We hide as much as possible from end-users o Used properly it enables massive productivity gains o Small company with > 15 products and world class deployments o Small teams can be productive o End users can enhance the products with their own components o Minification o Scaling out 19
  20. 20. What does a PaaS look like > stratos subscribe-cartridge php myphp --repo-url https://github.com/pzfreo/php-s4 --deployment-policy economy Subscribes to a runtime (e.g. php) > git push php-s4 Auto deploys the code into the cartridge 20
  21. 21. Stratos Layered Architecture
  22. 22. Stratos Cartridges ● A component which can be plugged into Stratos, so that it can use Stratos core services of the framework layer ● Cloud-aware platform environment extending legacy technologies into the cloud and delivering cloud benefits ● Users/DevOps may create custom cartridges and host any application, container, or framework in a Stratos Cloud. (Eg: node.js, Ruby, MongoDB, Wordpress, .net, Oracle WebLogic or JBoss SOA Platform..etc ● Single tenant or multi-tenanted
  23. 23. Stratos Cartridges
  24. 24. Puppet o Puppet o Powerful devops and provisioning tool o Used by the cartridges to auto-provision o Today to create a cartridge you basically build a puppet script o Next step is that will be a generic Puppet cartridge 24
  25. 25. Multi-factored Auto Scaling ● Integrate both real-time and rule-based decision making ● Scaling algorithm can use multiple-factors ● Capable of predicting future load
  26. 26. Scalable and Dynamic Load Balancing ● Comes with an HTTP Load Balancer as a cartridge ● Service level load balancing ● Auto Scaling load balancers ● External load balancer integration support ● Supports HAProxy for non-HTTP loads
  27. 27. Cloud Bursting
  28. 28. Controlling IaaS Resources Partitions ● Logically group IaaS resource locations ● Partitions are important to make application high availability ● Cartridge instances are spawned inside these partitions ● Partitions are defined by DevOps Network Partitions ● Logical groups of multiple partitions, that are in the same network. ● Stratos will spawn Load Balancers per network partition. ● Since LB instances and cartridge instances reside in same network, they can communicate using private IP addresses. ● Used in deployment policies.
  29. 29. Smart Policies Auto Scaling Policy ● Defines threshold values pertaining to scale up/down decision ● Auto scaler will refer this policies ● Defined by DevOps ● During cartridge subscription user specifies the auto scaling policy to be used Deployment Policy ● Defines how and where to spawn cartridge instances ● Defines minimum and maximum instances in a selected service cluster ● Defined by DevOps based on deployment patterns ● Guarantee SLA of cloud applications
  30. 30. More highlights… ● Unified communication ● Centralized monitoring and metering ● Web UI and CLI ● REST API for integration with external PaaS management interface for both DevOps and user interaction ● Artifact distribution coordinator ● Persistence volume support for cartridges ● Gracefully shutdown instance when scale down
  31. 31. App Factory Apache License Open Source 31
  32. 32. Why Stratos? o Inherently Multi-tenant o Highly Extensible o OSGi components, AMQP-based architecture, Policies, IaaS, etc o Built in Single Sign On/Identity management model o Policy based o Supports a simple model of partitions o Smart Load Balancing o Non-HTTP Load balancing o LXC support o Apache Foundation o App Factory takes it to the next level 32
  33. 33. Want to help? o Feedback and testing o Creating Cartridges o Virgo? Birt? Mosquitto? Etc o Existing apps too (e.g. Drupal, Wordpress, etc) o Porting to Google Compute o Autoscaling policies and rules o Ease of use – creating a Vagrant/LXC distro o Help with App Factory 33
  34. 34. Stratos @ Google Summer of Code 6 proposals o Python Agent o AWS LB support o GCE LB support o New scaling algorithms o New LB algorithms o GCE support 34
  35. 35. Resources o http://stratos.incubator.apache.org/ o Hangout archives (and future hangouts) o http://stratos.incubator.apache.org/events/hangouts.html o Carbon: o http://www.slideshare.net/wso2.org/introduction-to-the- wso2-carbon-platform-webinar o Stratos o http://www.slideshare.net/lakwarus/overview-of-apache- stratos-incubation-40-architecture 35
  36. 36. Questions?

×