Skip to content

CLI

Introduction

You can interact with Mantis Job Clusters by means of a command-line interface (CLI). This page explains how to install and use this interface.

Installation

You can install the Mantis CLI locally in your development environment by following the instructions on the Mantis CLI Readme.

Additionally, you can install the Mantis CLI onto your system as a package by following instructions on the Mantis CLI Releasing section of the readme.

Mantis Commands

A Mantis command takes the following form:

mantis command

You can also issue the following command to learn about the various Mantis commands available to you from the command line:

mantis --help

Or you can issue the following command to learn about the use of a specific Mantis command:

mantis command --help

Setting Up Your AWS Credentials

Mantis can operate natively on different clouds. By default, Mantis provides CLI facilities for operating Mantis in the Amazon AWS environment.

Before you can use the Mantis CLI to interact with Mantis Clusters in AWS, you must first establish your AWS credentials with Mantis. To do this, first obtain your AWS access key and secret access key, then issue the following command:

mantis aws:configure [-k|--key=access-key] [-s|--secret=secret-access-key]

This command will store your AWS credentials to the same location and with the same file format as the Amazon AWS CLI.

Bootstrapping a Mantis Cluster in AWS

You can use the Mantis CLI to bootstrap a Mantis Cluster in AWS. This will create the following:

  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 Agent EC2 instance backed by EBS volume
  7. Single Mantis Master EC2 instance backed by EBS volume
  8. Single Mantis API EC2 instance backed by EBS volume

To do this issue the following command:

mantis aws:bootstrap

Note

Before you issue the mantis aws:bootstrap command you must have first set up your AWS credentials. You can do that with the mantis aws:configure command (see above).

By default, the Mantis CLI bootstrap command is interactive and will prompt you for provisioning choices. Additionally, you can pass the following command-line parameters to skip some of the prompts from the mantis aws:bootstrap command:

prompt parameter valid inputs
select a region [-r|--region] region us-east-1, us-east-2, us-west-2
confirm -y n/a

After you have finished executing the mantis aws:bootstrap command, you can submit Jobs into the Mantis cluster that it creates.