WSO2 Middleware on DC/OS
Udara Liyanage / Anuruddha Liyanarachchi
DC/OS IntroductionA data center operation system that provides resource isolation and sharing resources among distributed applications
Developed at Berkeley university
Twitter , AirBnB, Apple … etc
DC/OS FeaturesHigh resource utilization
Container orchestration
Zero downtime upgrades
Scaling
High availability
Service discovery and load balancing
Restful APIs for management
Why DC/OSSetup with few machines few machines, easy to manage
install software and dependencies by hand
ssh and nohup/screen would do
resource utilization is poor
adding new software requires some work
scaling is not so easy
Why DC/OSSetup with few machines manual software installation
would not help!Setup with larger no of machines
Datacenter as a single big computer illusion
A developer sees a giant machine rather than a set of small machines
Mesos workflowYou tell Mesos
which binary to use
number of application instances required
required cpu, memory and disk
which ports to be opened
You don’t worrywhere to deploy application
what if hardware fails
how apps discover other apps
Mesos finds a suitable node
auto heal if nodes fail
make sure apps doesn’t exceed resources requested
health check application instances
Marathon Mesos frameworkMarathon is a container orchestration
platform for DC/OS
Let you deploy Docker based long running applications
Highavailability
Healthcheck
Stateful application with persistent volumes
Restful API
Web based UI for easy application deployment
Apply constraints
MarathonLBMarathonLB load balance service via service port
VHost for custom domains
{ "name":"servlet-https", "containerPort":9443, "servicePort":10095, "protocol":"tcp"}{ "id": "http-service", "labels": { "HAPROXY_GROUP":"external", "HAPROXY_0_VHOST":"esbmgt.wso2.com" }}
Meso DNSEvery Marathon application gets a DNS name
[app_name].marathon.mesos
Ex:
esbmgt.marathon.mesos
asmgt.marathon.mesos
Mesos WSO2 artifactsDockerfiles - Build docker images for Mesos
https://github.com/wso2/dockerfiles
Puppet modules - Configuration management for WSO2 Docker images for Mesos, Kubernetes and baremetal
https://github.com/wso2/puppet-modules
Mesos artifacts - Json file representing WSO2 Marathon applications
https://github.com/wso2/mesos-artifacts
Challenges in Mesos - Clusteringwso2::clustering: enabled: true membership_scheme: mesos member_discovery_scheme: Marathon marathon_applications: gateway-manager, gateway-worker marathon_endpoint: http://mesos.wso2.com:8080
At startup carbon server queries Marathon REST API to find existing members
Initialize Hazelcast clustering with existing members ip and ip of itself
Mesos can dynamically respin members due to
scaling
healthcheck fails
exceed resources
Mesos node fails
but servers can identify its members
Demo
Thank Youhttp://www.tomsitpro.com/articles/mesos-mesosphere-data-center-open-source-apache,1-2001.html
https://abhishek-tiwari.com/post/building-distributed-systems-with-mesos
https://github.com/mesosphere/mesos-dns