mar

marathonctl

A CLI utility for simple deployment using the Marathon API.

Showing:

Popularity

Downloads/wk

7

Maintenance

No Maintenance Data Available

Package

Dependencies

8

Size (min+gzip)

61.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

marathonctl

A CLI utility for simple deployment using the Marathon API.

npm install marathonctl

build status npm version

Features

  • Uses a manifest file. Maintain a marathon.json in your repo to configure the application.
  • Cross-platform. Works on Darwin and Linux systems.
  • Supports promptless usage. Allow machine users (CI systems) to deploy using options such as username and password.

Usage

  Usage: marathonctl [command] [options]

  Options:

    --pass
    --user
    --quiet
    --timeout <milliseconds>

  Commands:

    - deploy <marathon-json-path> <tag>
    - destroy <marathon-json-path>
    - login <marathon-url>
    - status <marathon-json-path>

Documentation

marathonctl may also be used as a Node.js module.

marathonctl(args, flags, opts)

const marathonctl = require('marathonctl')

const args = ['deploy', 'marathon.json', 'latest']
const flags = {quiet: true}
const opts = {
  cwd: path.resolve(__dirname, 'path/to/repo'),
  env: process.env
}

marathonctl(args, flags, opts)
  .then(() => {
    console.log('Deployed successfully')
  })
  .catch((err) => {
    console.error(`Could not deploy: ${err.message}`)
  })

Manifest example

NOTE: The "image" must NOT include the image tag.

{
  "auth": true,
  "marathonUrl": "https://my.marathon.com",
  "app": {
    "id": "/myapp",
    "cpus": 0.1,
    "mem": 64,
    "disk": 0,
    "instances": 1,
    "container": {
      "type": "DOCKER",
      "docker": {
        "image": "myapp",
        "network": "BRIDGE",
        "portMappings": [
          {
            "containerPort": 3000,
            "hostPort": 0,
            "protocol": "tcp"
          }
        ]
      }
    },
    "healthChecks": [
      {
        "protocol": "HTTP",
        "portIndex": 0,
        "path": "/health",
        "gracePeriodSeconds": 30,
        "intervalSeconds": 30,
        "timeoutSeconds": 30,
        "maxConsecutiveFailures": 3
      }
    ]
  }
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100