Skip to content

ptorrestr/mesos-spark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

I want to run marathon-mesos-deimos setup (http://beingasysadmin.wordpress.com/2014/06/27/managing-docker-clusters-using-mesos-and-marathon/) on CoreOS.

I was ispired by Ebay's building from docker using hosts docker setup (http://www.ebaytechblog.com/2014/05/12/delivering-ebays-ci-solution-with-apache-mesos-part-ii/#.U85a4nV53Ua).

I want to enjoy both CoreOS and mesos resource management, in future hopefully kubernetes (https://github.com/mesosphere/kubernetes-mesos).

Prerequisites

  • fleetctl
  • vagrant
  • virtualbox
  • python
  • docker-py==0.3.1
  • ansible

Install

  • Start CoreOS cluster
  • for testing I am using vagrant - http://coreos.com/docs/running-coreos/platforms/vagrant/
  • slightly customized version is in coreos-vagrant directory
  • Connect to fleet from localhost - https://github.com/coreos/fleet/blob/master/Documentation/remote-access.md
  • fleet is getting ssh-keys from ssh-agent so if you don't have yours there already you can add one using
  • ssh-agent && vagrant ssh-config core-01 | sed -n "s/IdentityFile//gp" | xargs ssh-add
  • export FLEETCTL_TUNNEL="$(vagrant ssh-config core-01 | sed -n "s/[ ]*HostName[ ]*//gp"):$(vagrant ssh-config core-01 | sed -n "s/[ ]*Port[ ]*//gp")"
  • make initial changes on coreos hosts, following commnads have to be run from ansible directory
  • ansible-playbook -i vagranttest coreos.yml
  • submit and start following units:
  • registry
  • ansible-playbook -i vagranttest coreos-registry.yml
  • zookeeper
  • ansible-playbook -i vagranttest coreos-zookeeper.yml
  • mesos-master
  • ansible-playbook -i vagranttest coreos-mesos-master.yml
  • mesos-slave
  • ansible-playbook -i vagranttest coreos-mesos-slave.yml
  • marathon
  • ansible-playbook -i vagranttest coreos-marathon.yml
  • Test marathon API
  • curl -v -X POST -H "Content-Type: application/json" <marathon-IP>:8080/v2/apps -d@test.json
  • test.json: { "id": "test", "container": {"image": "docker:///debian:jessie", "options" : []}, "cmd": "while sleep 10; do date -u +%T; done", "cpus": "0.5", "mem": "268.0", "uris": [ ], "instances": "1" }

Architecture

  • Host OS
  • CoreOS - https://coreos.com/
  • Native Technology: - ETCD - key/value store - Fleet - cluster level systemd
  • Mesos - Resource manager gathers resources
  • Marathon - Mesos framework for running docker images
  • Deimos - python Docker bindings for mesos-slave

Features

TODO

  • Crate docker images for
  • Docker Registry
  • Zookeeper
  • Mesos-master
  • Mesos-slave
  • Marathon (mesos framework)
  • Run apps in HA
  • Create pattern Unit files
  • Idealy using some tool (ansible...)
  • Set dynamic communication between services
  • using etcd
  • using haproxy generated from marathon (https://github.com/mesosphere/marathon)

About

Mesos-Spark Virtual machines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published