The Apache Mesos project allows a developer to orchestrate and utilize a cluster of machines as if it were a single pool of resources. Engineers from multiple disciplines are writing “frameworks” to take advantage of the redundancy and scalability that Mesos provides. During the development of the ELK stack on Mesos (Elasticsearch, Logstash and Kibana) we found that the Mesos and Docker community is sorely missing tools to enable integration tests and projects to reduce boilerplate code. We decided to create our own tool for experimenting with Mesos and testing frameworks: minimesos, available at
https://www.minimesos.org
Minimesos is an experimentation and testing tool which can be used as a standalone cli application or from within a JUnit test. Start a containerized Mesos cluster, start the scheduler of your framework and perform assertions. At the end of the test the cluster is destroyed. In this talk I will introduce minimesos, it's features, design and implementation and what is on the horizon.
2. container-solutions.com | @containersoluti
About Me
● Senior software engineer at
Container Solutions Amsterdam
● R&D in the Docker, Mesos and Programmable
infrastructure ecosystem
● Creator of minimesos
2
@Frank_Scholten
frankscholten
5. container-solutions.com | @containersoluti
What is minimesos?
● Experimentation and testing tool for Apache Mesos
● Instant Mesos cluster on your laptop
● CLI and Java API
● Runs in Docker
● Sponsored by
5
6. container-solutions.com | @containersoluti
The story behind minimesos
● CS contributed to by
● The Mesos ELK stack on Mesos is a core piece
● Developing & testing distributed systems is hard...
http://container-solutions.com/orchestrated-machine-containerpilot-minimesos-travelling-orchestration
6
21. container-solutions.com | @containersoluti
minimesos installation
● curl -sSL https://minimesos.org/install | sh
● Initial pull of Docker images may take a few minutes
● For more info see http://www.minimesos.org
2
1
24. container-solutions.com | @containersoluti
● minimesos started out running Docker-inside-of-Docker
● But, sharing images between Docker daemons requires a registry
Limitations
2
4
Linux box or Docker Machine VM
Agent
Scheduler
Daemon
Daemon
Executor
Registry
Master
25. container-solutions.com | @containersoluti
● We now use run Docker-outside-of-Docker
● But this created a different problem...
Limitations
2
5
Linux box or Docker Machine VM
Agent Master
Scheduler
Daemon
Executor
26. container-solutions.com | @containersoluti
Limitations
● Executors do not use Agent ports. Different network interface!
● ‘Mesos Agents not routable’ (from Marathon UI)
https://github.com/ContainerSolutions/minimesos/issues/401
● minimesos containers write files as root on host instead of $USER
● ‘Failures to write from containers to host’
https://github.com/ContainerSolutions/minimesos/issues/426
2
6
27. container-solutions.com | @containersoluti
Limitations
● Only supports single Mesos Master and single Zookeeper
● ‘Support Zookeeper ensemble’ https://github.
com/ContainerSolutions/minimesos/issues/16
● Only supports Java as testing API
● ‘Support Python client’
https://github.com/ContainerSolutions/minimesos/issues/264
2
7
28. container-solutions.com | @containersoluti
Improvements
● ‘Support IP per container’ - CNI & Project Calico
https://github.com/ContainerSolutions/minimesos/issues/420
● ‘Add user namespace requirement’
https://github.com/ContainerSolutions/minimesos/issues/332
● ‘REST API’
https://github.com/ContainerSolutions/minimesos/issues/452
2
8
30. container-solutions.com | @containersoluti
Consul
3
0
● DNS service discovery
● Add Consul container to the minimesosFile
consul {
imageName = "containersol/consul-server"
imageTag = "0.6-1"
}
● Use MINIMESOS_CONSUL_IP as ENV or Marathon token
31. container-solutions.com | @containersoluti
Registrator
3
1
● Auto registers containers to Consul
● Add Registrator container to the minimesosFile
registrator {
imageName = "containersol/consul-server"
imageTag = "0.6-1"
}
● Use MINIMESOS_CONSUL_IP as ENV or Marathon token
33. container-solutions.com | @containersoluti
Related tools
3
3
● Mesos Starter - Spring boot starter for Mesos frameworks
https://github.com/ContainerSolutions/mesos-starter
● Created and maintained by @mwldk
● Used by
34. container-solutions.com | @containersoluti
Related tools
3
4
● Mesos Framework - Write a framework with a config file
https://github.com/ContainerSolutions/mesosframework
● Created and maintained by @drphilwinder
● Used by
35. container-solutions.com | @containersoluti
Related tools
3
5
● Mesos Maven plugin - Start & destroy minimesos from Maven
● Created and maintained by @drphilwinder
● See @drphilwinder’s blog on all these tools
http://container-solutions.com/mesos-framework-overview/
36. container-solutions.com | @containersoluti
How to contribute to minimesos
● Found a bug or issue? Let us know
● PRs are appreciated!
● Your PR is auto built by Travis CI
Blog post by @sadovnikov at the CS blog
http://container-solutions.com/moved-ci-jenkins-travis
3
6
38. container-solutions.com | @containersoluti
Let’s stay in touch
3
8
See you at the the hackaton! We are working on the REST API and available for Q&A
minimesos
http://minimesos.org
http://www.container-solutions.com
minimesos contributors
@minimesos @Frank_Scholten @AdamSandor2 @sadovnikov @mwldk @DrPhilWinder
@alex_glv @remmelt @containersoluti