Deploying WSO2 Middleware
on Mesos
Imesh Gunaratne
Senior Technical Lead, WSO2
Agenda
● PaaS Solutions for WSO2 Middleware
● Deploying WSO2 Middleware on Apache Mesos
○ Mesos Architecture
○ Mesos Features Used
○ WSO2 Docker Images
○ WSO2 Carbon Reference Architectures for Mesos
○ Deployment Workflow
○ WSO2 Mesos Artifacts
PaaS Solutions for
Middleware
PaaS Solutions for WSO2 Middleware
Core PaaS Features Needed for a
Production Deployment
● Auto healing
● Autoscaling
● Automatic cluster discovery
● Dynamic load balancing
● VM/Container support
● Multi-tenancy
● Configuration orchestration
● Artifact distribution
● Multi-region/cloud deployments
● Centralized logging
● Monitoring
● Metering
Deploying WSO2 Middleware
on Apache Mesos
An Introduction to Apache Mesos
● An open-source cluster manager that was developed at
the University of California, Berkeley
● It "provides efficient resource isolation and sharing across
distributed applications, or frameworks
● Twitter, Airbnb, Apple and over 50 organizations use
Mesos.
https://en.wikipedia.org/wiki/Apache_Mesos
Apache Mesos Features
● Scalability to 10,000s of nodes
● Fault-tolerant replicated master and slaves using ZooKeeper
● Support for Docker containers
● Native isolation between tasks with Linux Containers
● Multi-resource scheduling (memory, CPU, disk, and ports)
● Java, Python and C++ APIs for developing new parallel
applications
● Web UI for viewing cluster state
http://mesos.apache.org/
https://www.digitalocean.com/community/tutorials/an-introduction-to-mesosphere
Apache Mesos Architecture
Apache Mesos Resource Scheduling
http://mesos.apache.org/documentation/latest/architecture/
An Introduction to Mesosphere
https://mesosphere.com/
● Mesosphere = Apache Mesos + Marathon + Chronos + DOCS Services
Mesosphere High Level Architecture
Marathon
Mesos
Task 1
Task 2
Slave 1
Task 3
Task n
Slave 2 Slave m
Application 1 Application 2 Application n
Mesos Features used by WSO2 Middleware
● Docker
● Marathon applications
● Marathon load balancer
● Manual scaling
● Autoscaling
https://github.com/mesosphere/marathon-autoscale
WSO2 Docker Images
https://github.com/wso2/dockerfiles
WSO2 Carbon Reference Architecture for
Mesos - 1
C1 C2 C3 C4 C5
Marathon Load
Balancer
Manager Marathon
Application
Worker Marathon
Application
Client
Gov
Reg
Conf
Reg
User
Store
Containers created
by Mesos tasks
WSO2 Carbon Reference Architecture for
Mesos - 2
C1 C2 C3
Client
C4 C5
Marathon Load
Balancer
C6 C7
Gateway
Mgr MA
Gateway
Worker MA
Key Manager
MA
Store MA
Gov
Reg
Conf
Reg
User
Store
API-M
DB
A volume mount for
synchronizing API
artifacts
C8 C9
Publisher
MA
Carbon Cluster Discovery on Mesos
C1 C2 Cn
Service
Server 1 Server 2 Server n
C1
Service
Server 1
C1 C2
Service
Server 1 Server 2
Hazelcast member
initialization
Hazelcast member
initialization
Hazelcast member
initialization
1 2 n
Deployment Workflow
3
1 2
Build Docker
Image
Import Docker Image
to Docker Registry
Application Artifacts
Mesos
Membership
Scheme
Product Distribution
Docker Image (DI)
Puppet Module
+ Hiera Files
JDK Deploy Mesos
Artifacts
Mesos Artifacts
WSO2 Mesos Artifacts
https://github.com/wso2-incubator/mesos-artifacts
● WSO2 Mesos Artifacts Git Repository
○ Mesos Membership Scheme
○ Marathon Applications
Thank you!

Deploying WSO2 Middleware on Mesos

  • 1.
    Deploying WSO2 Middleware onMesos Imesh Gunaratne Senior Technical Lead, WSO2
  • 2.
    Agenda ● PaaS Solutionsfor WSO2 Middleware ● Deploying WSO2 Middleware on Apache Mesos ○ Mesos Architecture ○ Mesos Features Used ○ WSO2 Docker Images ○ WSO2 Carbon Reference Architectures for Mesos ○ Deployment Workflow ○ WSO2 Mesos Artifacts
  • 3.
  • 4.
    PaaS Solutions forWSO2 Middleware
  • 5.
    Core PaaS FeaturesNeeded for a Production Deployment ● Auto healing ● Autoscaling ● Automatic cluster discovery ● Dynamic load balancing ● VM/Container support ● Multi-tenancy ● Configuration orchestration ● Artifact distribution ● Multi-region/cloud deployments ● Centralized logging ● Monitoring ● Metering
  • 6.
  • 7.
    An Introduction toApache Mesos ● An open-source cluster manager that was developed at the University of California, Berkeley ● It "provides efficient resource isolation and sharing across distributed applications, or frameworks ● Twitter, Airbnb, Apple and over 50 organizations use Mesos. https://en.wikipedia.org/wiki/Apache_Mesos
  • 8.
    Apache Mesos Features ●Scalability to 10,000s of nodes ● Fault-tolerant replicated master and slaves using ZooKeeper ● Support for Docker containers ● Native isolation between tasks with Linux Containers ● Multi-resource scheduling (memory, CPU, disk, and ports) ● Java, Python and C++ APIs for developing new parallel applications ● Web UI for viewing cluster state http://mesos.apache.org/
  • 9.
  • 10.
    Apache Mesos ResourceScheduling http://mesos.apache.org/documentation/latest/architecture/
  • 11.
    An Introduction toMesosphere https://mesosphere.com/ ● Mesosphere = Apache Mesos + Marathon + Chronos + DOCS Services
  • 12.
    Mesosphere High LevelArchitecture Marathon Mesos Task 1 Task 2 Slave 1 Task 3 Task n Slave 2 Slave m Application 1 Application 2 Application n
  • 13.
    Mesos Features usedby WSO2 Middleware ● Docker ● Marathon applications ● Marathon load balancer ● Manual scaling ● Autoscaling https://github.com/mesosphere/marathon-autoscale
  • 14.
  • 15.
    WSO2 Carbon ReferenceArchitecture for Mesos - 1 C1 C2 C3 C4 C5 Marathon Load Balancer Manager Marathon Application Worker Marathon Application Client Gov Reg Conf Reg User Store Containers created by Mesos tasks
  • 16.
    WSO2 Carbon ReferenceArchitecture for Mesos - 2 C1 C2 C3 Client C4 C5 Marathon Load Balancer C6 C7 Gateway Mgr MA Gateway Worker MA Key Manager MA Store MA Gov Reg Conf Reg User Store API-M DB A volume mount for synchronizing API artifacts C8 C9 Publisher MA
  • 17.
    Carbon Cluster Discoveryon Mesos C1 C2 Cn Service Server 1 Server 2 Server n C1 Service Server 1 C1 C2 Service Server 1 Server 2 Hazelcast member initialization Hazelcast member initialization Hazelcast member initialization 1 2 n
  • 18.
    Deployment Workflow 3 1 2 BuildDocker Image Import Docker Image to Docker Registry Application Artifacts Mesos Membership Scheme Product Distribution Docker Image (DI) Puppet Module + Hiera Files JDK Deploy Mesos Artifacts Mesos Artifacts
  • 19.
    WSO2 Mesos Artifacts https://github.com/wso2-incubator/mesos-artifacts ●WSO2 Mesos Artifacts Git Repository ○ Mesos Membership Scheme ○ Marathon Applications
  • 20.