Coder Social home page Coder Social logo

docker-mesos's Introduction

Dockerized Mesos Stack

These images can be used to quickly get up and running with a local Apache Mesos, Marathon and Chronos cluster. The typical use case would be as a workbench to develop, test and demo your Marathon and Docker configurations.

Usage

A local instance of the cluster infrastructure can be brought up with Docker Compose as

git clone [email protected]:meltwater/docker-mesos.git
cd docker-mesos

# You need to edit docker-compose.yml and set MESOS_HOSTNAME=<your IP-address> 
# on the mesosslave container. This applies if your host doesn't have a 
# hostname that resolves via DNS.

docker-compose up

Modifying Services

If you add or modify the Marathon json files in marathon-submit/json/ you can restart the cluster to have them submitted.

docker-compose kill
docker-compose rm -f
docker-compose build
docker-compose up

Web Interfaces

Note: when using Mac OSX or Windows and boot2docker the localhost part needs to be replaced with the hostname or IP of the boot2docker VM.

Services and Apps

The marathon-submit/json/ directory contains a number of example services that will be automatically submitted to Marathon on startup. You can add services by dropping JSON config files for Marathon into the marathon-submit/json/ directory, doing a docker-compose build and they'll be deployed when you restart the cluster. One can also deploy apps directly to the running cluster using the Marathon REST API. The same works for the chronos-submit/json/ directory. See the Chronos REST API for more info.

Service Discovery

There's several ways to implement service discovery, ranging from dynamic DNS and configuration updates to lower level network plumbing. One of the goals of service discovery is to externalize concerns like network configuration, high availability and scaling from service consumers and applications. Another aspect is the ability to vary the service discovery mechanism and network plumbing without impacting existing applications and configurations.

Dynamic Proxies

A common service discovery implementation involves proxies that bind to localhost and forwards TCP and UDP connections to where services are currently running. Clients are statically configured to access services through localhost on a well-known port number. The proxy takes care of failover and load balancing in case the service moves or has multiple replicas. In case of a failover the service consumer will receive a transient connection error and needs to retry until the connection reestablishes.

In this solution Marathon keeps track of running services and expose this state through RESTful HTTP endpoints. The proxymatic container subscribes to state updates and configures Pen or HAProxy to forward connections. The effect is that TCP and UDP connections are forwarded from a well known service port to one of the healthy service replicas.

docker-mesos's People

Contributors

devatoria avatar mikljohansson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.