minimesos. Apache Mesos made easy

23
container-solutions.com | @containersoluti minimesos - Apache Mesos made easy - Viktor Sadovnikov Programmable Infrastructure Engineer @ Container Solutions

Transcript of minimesos. Apache Mesos made easy

container-solutions.com | @containersoluti

minimesos -Apache Mesos

made easy- Viktor Sadovnikov

Programmable Infrastructure Engineer @ Container Solutions

container-solutions.com | @containersoluti

Viktor Sadovnikov

● 1985 - first keyboard touch

● 1988 - first line of code

● 1993 - first computer at home

● 1994 - first paid code line

● 2001 - first code to test another code

● 2005 - first build server runs

● 2007 - first automated deployments

2

@sadovnikov

container-solutions.com | @containersoluti

Outline

- What is Apache Mesos?

- Why minimesos?

- minimesos CLI + Demo

- minimesos Java API + Demo

- Upcoming changes

3

container-solutions.com | @containersoluti4

- Top level Apache project since 2013

- “Program against your datacenter like it’s a single pool of resources”- Distributed systems ‘kernel’

What is Mesos?“Apache Mesos abstracts CPU, memory, storage, and other

compute resources away from machines (physical or virtual),

enabling fault-tolerant and elastic distributed systems to

easily be built and run effectively”

container-solutions.com | @containersoluti

Mesos Architecture

5

Quick run through Mesos architecture and terminology

● Mesos Master

● Mesos Agents

● ZooKeeper

● Frameworks

● Framework Scheduler

● Framework Executors (aka Tasks)

container-solutions.com | @containersoluti

Mesos Resources

6

container-solutions.com | @containersoluti

Mesos Architecture

7

container-solutions.com | @containersoluti

Mesos Scheduler

8

container-solutions.com | @containersoluti

Mesos Executor

9

container-solutions.com | @containersoluti

Overview

10

container-solutions.com | @containersoluti

Simplify deployments, improve utilization

11

container-solutions.com | @containersoluti

Powered by Mesos

12

http://mesos.apache.org/documentation/latest/powered-by-mesos/ lists 91 organisation

container-solutions.com | @containersoluti

Popular Mesos Frameworks

13

container-solutions.com | @containersoluti14

Why minimesos?● developed a number of frameworks:

ElasticSearch, LogStash, Kibana

● taking minutes to deploy and to ruin

someone else’s tests

● costs of having Google Cloud clusters

almost per developer

● debugging is nearly impossible - rely

on logs

container-solutions.com | @containersoluti15

Why minimesos?

- Build classes

- Deploy framework(somewhere far away)

- …

- Check logs

- TASK_LOST :-(

- ....Yawn!

- Long feedback loop

- Hard to do end-to-end feature testing

- Many components, many possible failures

minimesos

container-solutions.com | @containersoluti16

Needs● unit and integration tests as

local builds and CI part

● running cluster locally

Why minimesos?

Solutions● minimesos Java API

● minimesos CLI

container-solutions.com | @containersoluti

minimesos CLI. Part I

17

- Installation

curl -sSL https://minimesos.org/install | sh

- Start default cluster

minimesos up

- Destroy running cluster

minimesos destroy

container-solutions.com | @containersoluti

minimesos CLI. Part II

18

- Initializing configuration file

minimesos init

- Installing an application through Marathon

minimesos install --marathonFile tasks/task.json

- Retrieving Mesos state

minimesos state

container-solutions.com | @containersoluti

minimesos CLI. Demo

19

- curl -sSL https://minimesos.org/install | sh- minimesos up- Mesos Master and Marathon UI- docker ps; minimesos destroy; docker ps -a- current directory in IntelliJ- minimesos init- configuration file editing- minimesos up; docker ps and Mesos Master UI- app.json and app.sh for Marathon- minimesos install --marathonFile tasks/app.json- Marathon and Master UI; kill a process; Marathon and Master UI- es.json and minimesos install --marathonFile tasks/es.json- Marathon, Master and ElasticSearch UI

container-solutions.com | @containersoluti

minimesos Java API

20

private static final ClusterArchitecture CONFIG = new ClusterArchitecture.Builder() .withZooKeeper() .withMaster() .withAgent("ports(*):[8080-8082]") .withAgent("ports(*):[8080-8082]") .withAgent("ports(*):[8080-8082]") .build();

@ClassRulepublic static final MesosCluster CLUSTER = new MesosCluster(CONFIG);

container-solutions.com | @containersoluti

minimesos Java API. Demo

21

container-solutions.com | @containersoluti

minimesos. Upcoming changes

22

0.7.0 - released March 9, 2016● Configuration file support

0.8.0 - in a month or so● Network services’ discovery

a bit more distant releases● REST API and clients in several languages

● distributed minimesos cluster

container-solutions.com | @containersoluti

Contacts

23

https://github.com/ContainerSolutions/minimesos

http://minimesos.org/

http://mesosframeworks.com/

http://container-solutions.com/

@containersoluti, @minimesos