Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

Build Status

Marathon CLI

CLI tool to access and deploy apps and services to Marathon.


The master branch is a WIP of package repository feature. Marathonctl as a simple commandline tool to deploy apps to marathon is implemented and you can find the binaries here. Please use the latest v0.0.x. The package manager changes will come in v0.1.x series as we're making some non-backward compatible changes.


You can download a binary distribution from the releases.

$ marathonctl
Command line client to Marathon

  marathonctl [command]

Available Commands:
  deploy      Deploy an app using Marathon's app definition
  package     Manage packages which needs to be installed on Marathon
  repo        Manage remote repositories where packages can be installed
  version     Version of the Marathon CLI

  -h, --help                   help for marathonctl string   Marathon host in http://host:port form. (default "http://localhost:8080")
      --mesos.master string    Mesos host in host:port form. (default "localhost:5050") string         ZK host in host:port form. (default "localhost:2181")

Use "marathonctl [command] --help" for more information about a command.


You can optionally create a configuration file $HOME/.marathonctl/config.json with the following contents, which can be overriden using the above flags.

  "marathon": {
    "host": ""
  "mesos": {
    "master": "mesos.master:5050"
  "zk": {
    "host": "zk01:2181"

Deploy Apps

marathonctl deploy helps you deploy applications to your Marathon setup from command line. It takes an app definition and tries to deploy it.

$ marathonctl deploy -h
Deploy an app using Marathon's app definition

  marathonctl deploy <app.json> [flags]

  -d, --dry-run              Print the final application configuration but don't deploy
  -e, --environment string   Environment to deploy (default "test")
  -f, --force                Force deploy the app
  -t, --timeout int          timeout in seconds for deployment to complete, else we'll fail (default 900)

Application Definition

The application definition (app.json) that's passed it treated as a Go Template and rendered. The available variables for the template is {{ .DEPLOY_ENV }}.

Using Environment Variables

You can also access environment variables in your app.json using the convention {{ .Env.GO_PIPELINE_LABEL }}, where GO_PIPELINE_LABEL is an environment variable.

Example app.json file could be something like

  "id": "{{ .DEPLOY_ENV }}.http",
  "cpus": 0.1,
  "mem": 10,
  "instances": 1,
  "ports": [
  "cmd": "python -m SimpleHTTPServer $PORT0",
  "uris": [
    "{{ .Env.WASP_CLI_VERSION }}/wasp-linux-amd64"
  "upgradeStrategy": {
    "minimumHealthCapacity": 0.9,
    "maximumOverCapacity": 0.1
  "env": {
    "DEPLOY_ENV": "{{ .DEPLOY_ENV }}"
  "healthChecks": [
      "protocol": "COMMAND",
      "command": { "value": "curl -f http://$HOST:$PORT0/" },
      "gracePeriodSeconds": 60,
      "intervalSeconds": 30,
      "maxConsecutiveFailures": 3,
      "timeoutSeconds": 10


CLI client to Mesosphere Marathon + WIP Package Manager


You can’t perform that action at this time.