This article describes the process of installing using Marathon on OS X.
Marathon Introduction
Marathon is a lightweight, extensible scheduling long-running Service scheduling framework built by Mesosphere company for the Mesos ecosystem. Support RESTful APIs to create and manage apps, automate fault-tolerant migrations for apps, and, in theory, simply start and manage marathon on Mesos with a shell-based task.
For Mesos, Marathon, Chronos mix:
Installation and startup process
Marathon relies on ZK and mesos, if not mesos cluster can run the local mode.
First download Zookeeper package, modify Conf/zoo.cfg, and then
start
Start a single ZK service in local:2181. ZK for Marathon, the election to make multiple copies of the same app, so that marathon can be restarted on the new Mesos slave after the app fail. ZK, on the other hand, is also used for Mesos cluster ha mode. That is, ZK is also responsible for Mesos and marathon ha, but the node path is separate, you can see the following startup parameters.
Then install the Mesos. Can be directly used in the brew installation, very very convenient,
install mesos
Start and install can refer to this article
That's what I did. a master and a slave are launched locally
/usr/local--registry=in_memory --ip=127.0.0.1/usr/local--master=127.0.0.1:5050
You can then see the UI of Mesos master in localhost:5050.
To download the marathon package, I am using the version 0.8.0, which supports the 0.20.0+ version of Mesos. After downloading the decompression can be used
./bin/start--master127.0.0.1:5050--zkzk://localhost:2181/marathon
This is the local Mesos master and ZK that are connected. View the UI of the marathon in local:8080.
Hello World
I directly yy a Hello world, create an app in the UI provided by marathon,
After filling out, the Mesos UI starts to pop up a number of tasks on a regular basis,
Follow the log, stdout. Print the following log
on 192.168.59.3Starting task test.c633dc4e-f7eb-11e4-b8f3-66‘echo "hello world"‘command at 44530with044530)
The app on Marathon is described in JSON format, see official documentation
Run with Docker
GitHub describes the interaction with Docker, first to start the Docker up, you can refer to my previous article and then CD to the marathon directory, there is a dockerfile file, execute
docker build -t marathon-tip .# 接下来是漫长的package下载和install过程。。。
After the build succeeds, start marathon in Docker,
docker run marathon-tip--local--zk zk://localhost:2181/marathon
Summarize
Marathon compared to another service scheduling framework on Mesos Apache Aurora is more accessible, itself is developed by Scala, the overall and mesos as people feel lightweight, mainly provides Google-scale capabilities and convenient app management services.
Full text end:)
Marathon on OS x first Experience