Introducing the command line for your datacenter
For more than five years, DC/OS has enabled some of the largest, most sophisticated enterprises in the world to achieve unparalleled levels of efficiency, reliability, and scalability from their IT infrastructure. But now it is time to pass the torch to a new generation of technology: the D2iQ Kubernetes Platform (DKP). Why? Kubernetes has now achieved a level of capability that only DC/OS could formerly provide and is now evolving and improving far faster (as is true of its supporting ecosystem). That’s why we have chosen to sunset DC/OS, with an end-of-life date of October 31, 2021. With DKP, our customers get the same benefits provided by DC/OS and more, as well as access to the most impressive pace of innovation the technology world has ever seen. This was not an easy decision to make, but we are dedicated to enabling our customers to accelerate their digital transformations, so they can increase the velocity and responsiveness of their organizations to an ever-more challenging future. And the best way to do that right now is with DKP.
The command line interface (CLI) has always been the essential tool for operating in a server environment. Type a command. Get a result. Pipe that result into another command. It's the fastest way to work with your servers and applications interactively.
But for Mesos users, the traditional Linux CLI has been hamstrung by its attachment to individual machines. Modern applications on Mesos do not run on a single machine; they are distributed systems, composed of interconnected services running across the entire datacenter. This means developers and operators need to think about applications at datacenter scale, and their their tools, also, need to operate at datacenter scale. So: Where does that leave the CLI?
Today we're happy to announce a new and greatly enhanced version of the Mesos CLI built by Mesosphere as open source that is being contributed back to the Apache Mesos project. The new Mesos CLI operates inside your Linux shell and its commands mirror the simplicity and command structure of the Linux CLI, but extends it to operate beyond a single machine. Install the Mesos CLI extensions, and the CLI tool you use every day will now know about your entire Mesos cluster.
Installing the Mesos CLI extensions couldn't be simpler. Simply run this command:
pip install mesos.cli
When the pip install finishes, you now have a new set of commands in your CLI, all invoked with the mesos prefix. These Mesos commands understand and express the layers of abstraction in Mesos. They understand how tasks run across many machines and they are aware of Mesos-specific details, such as all of your Mesos applications and task names - complete with tab-autocomplete to save you typing.
The Mesos Commands Will be Familiar
Many of the commands in the Mesos CLI extension will be immediately recognized by Linux developers, as they map directly to familiar Linux commands. For example, mesos tail and mesos find do pretty much what you would expect from tail and find, only the Mesos versions, rather than running on a single machine, now operate at the level of the the entire datacenter.
Some Examples to Try
So let's jump right into some example commands you can run.
Instead of tailing a single file, you should be able to tail every file you are interested in, anywhere in your datacenter. Let's say that you are running an application with Marathon. You're working at debugging a problem and would like to see the stdout for every instance of this application. Now, you can!
mesos tail -f app-name
There are all kinds of events occurring throughout the Mesos cluster. One way to keep track of this would be to ssh into every master and slave. For those who are lazy (like me), you can run a single command.
When developing an application on my laptop, it is important to know whether the app is actually running or not. There's no reason to be limited to just your laptop with Mesos! Why not see everything that is running, everywhere in your datacenter!
For more details and an in-depth list of commands, check out the mesos-cli project.