It’s weekend… so I allow myself this silly post. Every time, I play around with Mesos, Marathon and/or Kubernetes I feel like I’m the star in my very own Inception adventure1.
Disclaimer: Only continue if you can stand bulling at this moment. The music should get you in the mood while reading .
Some call this reality. Some believe this is also just dream. If that were true I figure we’d probably call the dreamer god. Anyways, I just turn on my computer at this level. Nothing fancy yet.
Computer is on. I’m plugged in (sorry for the Matrix reference, don’t want to confuse).
At this level, I enter my VM, being an instance in the cloud or the kitten
purring in Virtualbox (
vagrant up; vagrant ssh).
Mesos, the place where the frameworks are fired up, drops us one notch deeper down the dream pipeline.
One could start a task that lasts at least 10 seconds in Mesos.
This task would run as a framework (a short-lived one at that).
By visiting the Marathon portal (most likely running on port 5050 on the Mesos
master), navigating to the frameworks view and selecting the most recently
terminated framework (provided that the 10 seconds have already expired )
one can enter the job’s sandbox o observe the output to
Mesos jobs are executed from the directory and environment in which the
mesos-execute command is called. In
stdout we expect to see something that
env on the Mesos slave.
Marathon is started as a Mesos framework, which drops us down another level. Upon adding another Marathon job, the framework (being Marathon) manages the environment in which the call is executed.
By adding a Marathon job that echoes
env and observing the
from the task’s sandbox one can verify that the
env differs from the host’s.
Selecting the task’s sandbox and opening the task’s
stdout (both screens
portrayed in the following figures) allows us to introspect
stdout for the
task of interest.
Marathon provides us with extra management functionality as in easily scaling, suspending and resuming of jobs. That is why it makes sense to start jobs from Marathon instead of firing them directly into Mesos. We run frameworks in Mesos, we run jobs in Marathon (which is a framework)… that simple.
If you made it this far, thank you so much for your time.
Enough of the Inception (err junk or analogy), you may say at this stage. I don’t even fully remember what Inception was all about other than some convoluted mess involving nested dreams; after all 2010 is a lifetime ago (for a toddler it actually is).
All I wanted to say is: Mesos rocks, Marathon rocks and life is good.
For now… more Inception junk for the weekend. Have a good one
Before 2010 (premiere of Inception) it happened to be The Matrix ↩