mesosphere

Apache Mesos API, UI, CLI Hackathon Recap

Dec 12, 2013

Tobi Knaup

D2iQ

5 min read

  
The first Apache Mesos hackathon was held at our offices at the end of October. We decided to theme the hackathon on Mesos' REST interface, web UI, and CLI. Since the web UI and CLI leverage the REST interface we felt these features would complement one another and foster a collaborative day of hacking.
 
The day started off with Mesos project founder Benjamin Hindman giving a brief explanation of the REST interface in Mesos, including demonstrating the '/help' endpoint which provides man like information for available REST endpoints (if you didn't know about '/help' go check it out for yourself by browsing to 'ip:port/help' of a Mesos master or slave).
 
Ben also explained how the Mesos CLI works. Like git, Mesos has a top-level mesos command that invokes subcommands. Basically, attempting to invoke mesos ps actually invokes mesos-ps or fails if no mesos-ps could be found on the path. The top-level mesos command sets up environment variables so the subcommands don't have to do as much work.
 
At the beginning of the day only two CLI subcommands existed: mesos-ps and mesos-resolve. The mesos-ps subcommand is used for, you guessed it, printing out all of the tasks that are running. The mesos-resolve subcommand is used to resolve a Mesos "master string" that might include ZooKeeper (e.g., "zk://ip1:port1,ip2:port2/path/to/mesos").
 
There were some great conversations and lots of progress was made on new CLI tools. Two standouts were Shingo Omura (from OGIS International Inc.) and Du Li (from Ericsson). Shingo cleaned up some bugs in the existing CLI tools as well as added mesos-cat and mesos-tail which allows you to cat and tail files on remote slaves in a task's chroot (including the stdout and stderr files that Mesos creates automatically). Du added mesos-scp which let's you copy local files to slaves that the current Mesos master has registered.
 
After the hackathon it was clear that this was just the beginning of the Mesos CLI. There are lots of opportunities to create great CLI tools. Check out the code and add a new one today!
 
In addition to lots of great work done on the Mesos CLI some new REST interfaces were also proposed and added in order to make the web UI be more 'task centric'. We're actively working on improvements to the web UI that's leveraging these new REST interfaces.
 
The day finished up with beers and a BBQ. We had a great time hosting everyone and look forward to doing it again in the future, thanks to all who came!

Ready to get started?