Marathon is an Apache Mesos framework for long-running applications. Given that
you have Mesos running as the kernel for your datacenter, Marathon is the
init
or upstart
daemon.
Marathon provides a REST API for starting, stopping, and scaling applications. Marathon is written in Scala and can run in highly-available mode by running multiple copies. The state of running tasks gets stored in the Mesos state abstraction.
Marathon is a meta framework: you can start other Mesos frameworks such as Chronos or Storm with it to ensure they survive machine failures. It can launch anything that can be launched in a standard shell. In fact, you can even start other Marathon instances via Marathon.
Using Marathon versions 0.7.0+ and Mesos 0.20.0+, you can deploy, run and scale Docker containers with ease.
- HA -- run any number of Marathon schedulers, but only one gets elected as leader; if you access a non-leader, your request gets proxied to the current leader
- Constraints - e.g., only one instance of an application per rack, node, etc.
- Service Discovery & Load Balancing via HAProxy or the events API (see below).
- Health Checks: check your application's health via HTTP or TCP checks.
- Event Subscription lets you supply an HTTP endpoint to receive notifications, for example to integrate with an external load balancer.
- Web UI
- JSON/REST API for easy integration and scriptability
- Basic Auth and SSL
- Metrics: available at
/metrics
in JSON format
Marathon documentation is available on the Marathon GitHub pages site.
Documentation for installing and configuring the full Mesosphere stack including Mesos and Marathon is available on the Mesosphere website.
We heartily welcome external contributions to Marathon's documentation. Documentation should be committed to the master
branch and published to our GitHub pages site using the instructions in docs/README.md.
Marathon requires Mesos installed on the same machine in order to use a shared library. Instructions on how to install prepackaged releases of Mesos are available in the Marathon docs.
Instructions on how to install prepackaged releases are available in the Marathon docs. Alternatively, you can build Marathon from source.
-
To build Marathon from source, check out this repo and use sbt to build a JAR:
git clone https://github.com/mesosphere/marathon.git cd marathon sbt assembly
-
Run
./bin/build-distribution
to package Marathon as an executable JAR (optional).
Mesos local mode allows you to run Marathon without launching a full Mesos
cluster. It is meant for experimentation and not recommended for production
use. Note that you still need to run ZooKeeper for storing state. The following
command launches Marathon on Mesos in local mode. Point your web browser to
http://localhost:8080
to see the Marathon UI.
./bin/start --master local --zk zk://localhost:2181/marathon
For more information on how to run Marathon in production and configuration options, see the Marathon docs.
See the documentation on how to run Marathon locally inside a virtual machine.
Build tip:
docker build -t marathon-head .
Run it:
docker run marathon-head --master local --zk zk://localhost:2181/marathon
If you want to inspect the contents of the Docker:
docker run -i -t --entrypoint=/bin/bash marathon-head -s
To develop on the web UI look into the instructions of the Marathon UI repository.
-
marathonctl A handy CLI tool for controlling Marathon
-
Ruby gem and command line client
Running Chronos with the Ruby Marathon Client:
marathon -M http://foo.bar:8080 start -i chronos -u https://s3.amazonaws.com/mesosphere-binaries-public/chronos/chronos.tgz \ -C "./chronos/bin/demo ./chronos/config/nomail.yml \ ./chronos/target/chronos-1.0-SNAPSHOT.jar" -c 1.0 -m 1024
-
Ruby gem marathon_deploy alternative command line tool to deploy using json or yaml files with ENV macros.
-
Scala client, developed at Guidewire
-
Java client by Mohit Soni
-
Maven plugin, developed at HolidayCheck
-
Python client, developed at The Factory
-
Python client, developed at Wizcorp
-
Go client by Rohith Jayawardene
-
Go client by Jean-Baptiste Dalido
-
Node client by Silas Sewell
-
Clojure client by Halit Olali
Across all installations Marathon is managing applications on more than 100,000 nodes world-wide. These are some of the companies using it:
- Airbnb
- Allegro Group
- AllUnite
- Artirix
- Corvisa
- bol.com
- Branding Brand
- Daemon
- DHL Parcel
- Disqus
- eBay
- The Factory
- Football Radar
- Guidewire
- Groupon
- GSShop
- HolidayCheck
- Human API
- Indix
- ING
- iQIYI
- Measurence
- Motus
- OpenTable
- Orbitz
- Otto
- PayPal
- Qubit
- RelateIQ
- Refinery29
- Sailthru
- sloppy.io
- SmartProcure
- Strava
- Viadeo
- Wikia
- WooRank
- Yelp
Not in the list? Open a pull request and add yourself!
Have you found an issue? Feel free to report it using our Issues page.
In order to speed up response times, we ask you to provide as much
information on how to reproduce the problem as possible. If the issue is related
in any way to the web ui, we kindly ask you to use the gui
label.
If you have questions, please post on the
Marathon Framework Group
email list. You can find Marathon support in the #marathon
channel, and Mesos
support in the #mesos
channel, on freenode (IRC). The team at
Mesosphere is also happy to answer any questions.
Marathon was created by Tobias Knaup and Florian Leibert and continues to be developed by the team at Mesosphere and by many contributors from the community.
YourKit, LLC
YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.