WSO2 Stratos 2 - Your all in one Cloud Platform

61
WSO2 Stratos2:All-in-One Cloud Platform Lakmal Warusawithana(Software Architect) Damitha Kumarage(Senior technical lead)

Transcript of WSO2 Stratos 2 - Your all in one Cloud Platform

Page 1: WSO2 Stratos 2 - Your all in one Cloud Platform

WSO2 Stratos2:All-in-One Cloud Platform

Lakmal Warusawithana(Software Architect)

Damitha Kumarage(Senior technical lead)

Page 2: WSO2 Stratos 2 - Your all in one Cloud Platform

We start the session with a use case scenario where benefits of moving your applications to Cloud with Stratos2 highlighted

Then we investigate how Stratos2 architectured to provide cloud-native properties like auto-scaling, distributed-dynamically wired, multi-tenant, support self-service, granularly billed and metered and incrementally deployed

Page 3: WSO2 Stratos 2 - Your all in one Cloud Platform

Platform-as-a-Service (PaaS)

Page 4: WSO2 Stratos 2 - Your all in one Cloud Platform

SF

Elastic Load Balancer

CL

OU

D C

ON

TR

OL

LE

R

BUSINESS ACTIVITY MONITORING

Page 5: WSO2 Stratos 2 - Your all in one Cloud Platform

Overwhelming?

Page 6: WSO2 Stratos 2 - Your all in one Cloud Platform

Don’t worry, Let’s learn by example

Page 7: WSO2 Stratos 2 - Your all in one Cloud Platform

We are a large scale car manufacturing company zcar.com

Page 8: WSO2 Stratos 2 - Your all in one Cloud Platform

We have a problem !!!

Page 9: WSO2 Stratos 2 - Your all in one Cloud Platform

Our dealers have their own websites to promote and sell - cars - spare parts But these sites don’t capture all our requirements - don’t contain comprehensive part lists - no uptodate price lists - do not effectively launch our promotions - often contain wrong information related to zcar.com - No proper handling of seasonal

Page 10: WSO2 Stratos 2 - Your all in one Cloud Platform

Solution

Page 11: WSO2 Stratos 2 - Your all in one Cloud Platform

Host zcar.com own multi-tenanted web site for zcar.com dealers. Our tenants are our dealers

Deploy the application in a zcar.com private PaaS

Use Stratos2

Page 12: WSO2 Stratos 2 - Your all in one Cloud Platform

What we need?

Page 13: WSO2 Stratos 2 - Your all in one Cloud Platform

IaaS to run Stratos2 A devops team to maintain deploy and maintain Stratos2(outsource?) Development team to develop zcar.com application

Page 14: WSO2 Stratos 2 - Your all in one Cloud Platform

Steps

Page 15: WSO2 Stratos 2 - Your all in one Cloud Platform

DevOps Tasks Setup IaaS(Openstack, vCloud, EC2)

Install Puppet Master

Customize Stratos2 puppet manifests

Let there be Stratos2

Let there be an WSO2 application server(AS)

cartridge

Page 16: WSO2 Stratos 2 - Your all in one Cloud Platform

Deployment

Page 17: WSO2 Stratos 2 - Your all in one Cloud Platform

Deployment

Page 18: WSO2 Stratos 2 - Your all in one Cloud Platform

Cartridge Developer Tasks Develop any custom cartridges required

Page 19: WSO2 Stratos 2 - Your all in one Cloud Platform

Application Developer Tasks Develop zcar.com application for app server

Page 20: WSO2 Stratos 2 - Your all in one Cloud Platform

Tenant(dealer) Tasks

Subscribe to Stratos2 application server cartridge

Deploy the application

Page 21: WSO2 Stratos 2 - Your all in one Cloud Platform

UI for tenant

Page 22: WSO2 Stratos 2 - Your all in one Cloud Platform

UI for tenant

Page 23: WSO2 Stratos 2 - Your all in one Cloud Platform

CLI for tenant

Page 24: WSO2 Stratos 2 - Your all in one Cloud Platform
Page 25: WSO2 Stratos 2 - Your all in one Cloud Platform

Wait …

Page 26: WSO2 Stratos 2 - Your all in one Cloud Platform

Does each dealer has separate web application or are they sharing the same

application(multi-tenanted)?

Page 27: WSO2 Stratos 2 - Your all in one Cloud Platform

AS is a multi-tenant cartridge

Each tenant get a completely isolated AS environment

Each user has his own zcar application

running in a AS cluster

Page 28: WSO2 Stratos 2 - Your all in one Cloud Platform

OK who handle security?

Who handle load?

Who take backups?

Who handle whole lot of other issues that a enterprise application developer(zcar.com

developers) need to worry about?

Page 29: WSO2 Stratos 2 - Your all in one Cloud Platform

That’s why you choose Stratos2

Zcar.com is car business

They just know about cars

So let them concentrate on their car app

Rest is Stratos2

Page 30: WSO2 Stratos 2 - Your all in one Cloud Platform

Got the picture?

Ok let’s see what happen underneath

Page 31: WSO2 Stratos 2 - Your all in one Cloud Platform

Stratos2 Core Components

Page 32: WSO2 Stratos 2 - Your all in one Cloud Platform

Stratos 2.0

Page 33: WSO2 Stratos 2 - Your all in one Cloud Platform

Understanding the Stratos2 Controller

Cloud Controller(CC): using jclouds creates/removes VM or LXC instances, based on input from ELB Elastic Load Balancer(ELB): distributes requests to the correct instances, based on tenant and load balance, including rewriting URLs Artifact Distribution Coordinator(ADC): takes complete applications and breaks into per-instance components, which are then loaded into instances by Deployment Synchronizer

Page 34: WSO2 Stratos 2 - Your all in one Cloud Platform

Understanding the Stratos2 Controller

Deployment Synchronizer: checks out the right code for an Instance Management Console: allows control of all this by either Web UI or interactive command-line tooling Load Monitor: takes information on load from multiple sources

Page 35: WSO2 Stratos 2 - Your all in one Cloud Platform

ADC

Page 36: WSO2 Stratos 2 - Your all in one Cloud Platform
Page 37: WSO2 Stratos 2 - Your all in one Cloud Platform

Tenant-aware ELB

• Fail-over, auto-scaling and multi-tenancy • Single load balancer route incoming requests to clusters of different services in a tenant-aware manner • IaaS independent elasticity Simple textual configuration language

Page 38: WSO2 Stratos 2 - Your all in one Cloud Platform

Tenant-aware ELB

Private Jet Mode for tenants Some tenants load to deploy in a single tenant mode Allocate entire service clusters for tenants • Cloud Bursting to hybrid clouds

Page 39: WSO2 Stratos 2 - Your all in one Cloud Platform

Cloud Controller

Heart of Stratos 2.0 Foundation Is acting as a bridge between application level and IaaS level via Jclouds API. Enables your system to scale across multiple IaaS providers Is the central location where the service topology resides

Page 40: WSO2 Stratos 2 - Your all in one Cloud Platform

Cloud Controller

Responsible for sharing the service topology among Stratos 2.0 core services Supports hot update and deployment of its configuration files Currently support AWS EC2 IaaS provider, Openstack Nova IaaS provider and vCloud IaaS provider Enables cloud burst your system across multiple IaaS providers.

Page 41: WSO2 Stratos 2 - Your all in one Cloud Platform

Stratos2 Core Services

• The Stratos Core Services provide essential capabilities to applications running in Stratos2 Cartridges

– Logging-as-a-Service – Data-as-a-Service (MySQL and Cassandra) – Identity-as-a-Service – Registry/Repository (for metadata and config) – Billing and Metering – Storage as a Service(Relational, NoSQL)

Page 42: WSO2 Stratos 2 - Your all in one Cloud Platform

Identity Server / Service

• Each tenant is identified by the @tenant-domain • Each tenant admin can choose to manage their tenants user

store either within the Stratos-internal LDAP store or using an external LDAP

• Bulk import • Each tenant user has a OpenId/Infocard as well as SAML2

tokens – Single-signon – Single-Signoff is also supported

Page 43: WSO2 Stratos 2 - Your all in one Cloud Platform

Identity Server / Service

• SAML2 is used across the Stratos deployment to ensure a smooth transition (single sign-on) between Stratos services

– SAML2 is also available as sign-on for webapps, gadgets

and other user-deployed content

Page 44: WSO2 Stratos 2 - Your all in one Cloud Platform

Stratos2 Cartridges

• A component which can be plugged into Stratos, so that it can use Stratos core services of the Foundation Layer

• Cloud-aware platform environment extending legacy

technologies into the cloud and delivering cloud benefits • Stratos operations teams may create custom cartridges and

host any application, container, or framework in a Stratos Cloud. (Eg: A custom cartridge to bring cloud characteristics to IBM Websphere Application Server, IBM WebSphere ESB, Oracle WebLogic, or JBoss SOA Platform)

• Single tenant or multi-tenanted • Process level isolation and instance-level dedicated tenancy

Page 45: WSO2 Stratos 2 - Your all in one Cloud Platform

Stratos2 Cartridges

• A cartridge is a package of code/configuration that plugs into Stratos 2 to offer a new PaaS Service

– e.g. Carbon ESB cartridge plugs in to provide a Stratos ESB-

as-a-Service – PHP Cartridge plugs in to provide PHP-as-a-Service

• A cartridge is a VM image plus config – In Stratos 2 you need a VM Image per IaaS – e.g. need to create both EC2 and LXC image to use on both

IaaS

Page 46: WSO2 Stratos 2 - Your all in one Cloud Platform

Stratos2 Cartridges

– A runtime that may (or may not) be optimized to use

Stratos Core Services – e.g. Logging, Authn/Authz, Billing and Metering, Registry-

based Config – Plus a simple script to deploy code or artifacts

• Stratos takes care of: – Spawning instances – Load-balancing and URL Mapping – Autoscaling

Page 47: WSO2 Stratos 2 - Your all in one Cloud Platform

User Roles involved in Cartridge Architecture

• Cartridge Creator – Understands the cartridge domain (e.g. PHP) plus Cartridge

SPI – Creates image and configs (including for different IaaS)

• Cartridge Deployer (Stratos Admin/DevOps) – Registers cartridge with Stratos

• Cartridge Subscriber(Tenant Admin) – Subscribes to the cartridge with Scaling parameters Other resources such as persistent file system / DB

Page 48: WSO2 Stratos 2 - Your all in one Cloud Platform

User Roles involved in Cartridge Architecture

• Cartridge Users – Per-tenant users or developers – Access deployed applications – Upload applications to the cartridge (optional)

Page 49: WSO2 Stratos 2 - Your all in one Cloud Platform

Custom Domain Mapping

• A tenant can have two types of domains for his applications Sub Domain Own Domain

• Suppose that a tenant is going to subscribe to an application

called xmotors • Then his sub domain url would be http://xmotors.as.zcar.com • If the own domain he provide is xmotors.com then his own domain url would be http://xmotors.com

Page 50: WSO2 Stratos 2 - Your all in one Cloud Platform
Page 51: WSO2 Stratos 2 - Your all in one Cloud Platform

OK now let’s go step further with our zcar.com example

Page 52: WSO2 Stratos 2 - Your all in one Cloud Platform

New Problem

Page 53: WSO2 Stratos 2 - Your all in one Cloud Platform

Some of the dealers are reluctant to go with the new system because they need some added functionality specific to their region, which is already provided by their existing application Their old system is written in PHP and use database mysql They want part of their old system still accessible to their clients

Page 54: WSO2 Stratos 2 - Your all in one Cloud Platform

Solution

Page 55: WSO2 Stratos 2 - Your all in one Cloud Platform

Introduce tenant specific php and mysql cartridges

Page 56: WSO2 Stratos 2 - Your all in one Cloud Platform

PHP cartridge that ship with Stratos2 is a single-tenanted cartridge MySQL cartridge is also a single tenanted data cartridge that ship with Stratos2

Page 57: WSO2 Stratos 2 - Your all in one Cloud Platform

Customize php cartridge and mysql cartridge puppet manifests Let there be PHP and MySQL cartridges Subscribe the tenant for these cartridges Upload the dealer apps

Page 58: WSO2 Stratos 2 - Your all in one Cloud Platform

What if dealer specific app is written in Python. Stratos2 does not ship a Python cartridge yet !!!

Page 59: WSO2 Stratos 2 - Your all in one Cloud Platform

Simple. Create your own python cartridge. You just need add a new puppet manifest for Python. Rest is for Stratos2. Your cartridge will be dynamically added to Stratos2.

Page 60: WSO2 Stratos 2 - Your all in one Cloud Platform

Timelines

Stratos 2.0 Beta1 Released Stratos 2.0 Beta Soon Stratos 2.0 available Q1 2013 –Including PHP, MySQL, WSO2 service Cartridges

–Other cartridges will follow

Page 61: WSO2 Stratos 2 - Your all in one Cloud Platform

Questions?