Skip to content

Netflix/mantis-cli

Repository files navigation

mantis-cli

Build Status OSS Lifecycle License

CLI for interacting with Mantis clusters.

Dependencies

  1. node 10
  2. yarn
  3. oclif
  4. oclif-dev

Development

Getting started

$ npm install -g yarn
$ npm install -g oclif
$ npm install -g @oclif/dev-cli

Building

$ yarn

Testing

$ yarn test

Running

For local development, you can run the CLI by calling:

$ bin/run

Otherwise you can also link it via yarn and run the mantis command:

$ yarn link
$ mantis

Releasing

$ oclif-dev pack

MacOS installer

$ oclif-dev pack:macos

A .pkg file will be placed into dist/. On installation, the mantis binary will be placed onto the PATH and its files in /usr/local/lib.

Usage

Display help

$ mantis --help
$ mantis aws:bootstrap --help
$ mantis aws:configure --help
# etc ...

Example output:

$ mantis aws:bootstrap --help

bootstraps a Mantis cluster in AWS

USAGE
  $ mantis aws:bootstrap

OPTIONS
  -r, --region=region  AWS region
  -y, --confirm        Autoconfirms commands

DESCRIPTION
  This command will automatically orchestrate the creation of all
  AWS and Mantis dependencies in AWS. Specifically, it will create:

     1. AWS key pair
     2. Default VPC
     3. Security groups
     4. Single Zookeeper EC2 instance backed by EBS volume
     5. Single Mesos Master EC2 instance backed by EBS volume
     6. Single Mesos Slave EC2 instance backed by EBS volume
     7. Single Mantis Control Plane EC2 instance backed by EBS volume

  This command will also set up connection strings and other properties
  for Mantis.

  Once this command finishes, you will be able to submit streaming jobs into
  your Mantis cluster via HTTP requests to the Mantis Control Plane.

  == IMPORTANT ==
  As a pre-requisite, this command requires that you set up your AWS credentials.
  See `mantis aws:configure --help` for more details.

Display commands

$ mantis commands

Configure AWS credentials

$ mantis aws:configure

Bootstrap Mantis in AWS

$ mantis aws:bootstrap

Teardown Mantis cluster in AWS

$ mantis aws:teardown