drove-cli


Namedrove-cli JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/PhonePe/drove-cli
SummaryDrove Command Line Interface
upload_time2025-09-16 05:25:41
maintainerSantanu Sinha
docs_urlNone
authorSantanu Sinha
requires_python<4.0,>=3.7
licenseApache-2.0
keywords container docker podman distributed-systems container-orchestrator
VCS
bugtrack_url
requirements Requests tabulate tenacity urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Drove CLI

Command line interface for the Drove Container Orchestrator.

# Getting Started

## Installation

You can install the CLI from PyPI.

```bash
pip install drove-cli
```

### To install in a virtual env

Create virtual environment
```bash
mkdir -p ${HOME}/venvs
cd ${HOME}/venvs
python3 -m venv drove_cli
cd drove_cli
source bin/activate
pip install drove-cli
```

To activate in another shell:

```bash
source ${HOME}/venvs/drove_cli/bin/activate
```

To deactivate the venv (run when in activated environment):
```bash
deactivate
```

## Running using docker
The cli is pushed as a docker for easy access. This also eliminates the need for having python etc setup on your system.

1) Pull the image:
```shell
docker pull ghcr.io/phonepe/drove-cli:latest
```

2) Create a shell script called `drove` with the following content:

```shell
#! /bin/sh
docker run \
    --rm --interactive --tty --network host \
    --name drove-cli -v ${HOME}/.drove:/root/.drove:ro  \
    ghcr.io/phonepe/drove-cli:latest "$@"

```

3) Make the script executable
```shell
chmod a+x drove
```

4) Put the path to this script in your `~/.bashrc`.

```shell
export PATH="${PATH}:/path/to/your/script"
```

5) Logout/login or run `. ~/.bashrc` to load the new [path]


6) Run drove cli
```shell
drove -h
```

## Requirements
The CLI is written in Python 3x


## Accessing the Documentation
The arguments needed by the script are self documenting. Please use `-h` or `--help` in different sections and sub-sections of the CLI to get descriptions of commands, sub-commands, their arguments and options.

To see basic help:
```

$ drove -h

usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME] [--password PASSWORD] [--debug]
             {lsinstances,executor,cluster,apps,appinstances,tasks,localservices} ...


positional arguments:
  {lsinstances,executor,cluster,apps,appinstances,tasks,localservices}
                        Available plugins
    lsinstances         Drove local service instance related commands
    executor            Drove cluster executor related commands
    cluster             Drove cluster related commands
    apps                Drove application related commands
    appinstances        Drove application instance related commands
    tasks               Drove task related commands
    localservices       Drove local service related commands

options:
  -h, --help            show this help message and exit
  --file FILE, -f FILE  Configuration file for drove client
  --cluster CLUSTER, -c CLUSTER
                        Cluster name as specified in config file
  --endpoint ENDPOINT, -e ENDPOINT
                        Drove endpoint. (For example: https://drove.test.com)
  --auth-header AUTH_HEADER, -t AUTH_HEADER
                        Authorization header value for the provided drove endpoint
  --insecure, -i        Do not verify SSL cert for server
  --username USERNAME, -u USERNAME
                        Drove cluster username
  --password PASSWORD, -p PASSWORD
                        Drove cluster password
  --debug, -d           Print details of errors

```

To see documentation for a command/section:
```
$ drove cluster -h
usage: drove cluster [-h] {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off} ...

positional arguments:
  {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off}
                        Available commands for cluster management
    ping                Ping the cluster
    summary             Show cluster summary
    leader              Show leader for cluster
    endpoints           Show all exposed endpoints
    events              Events on the cluster
    maintenance-on      Set cluster to maintenance mode
    maintenance-off     Removed maintenance mode on cluster

options:
  -h, --help            show this help message and exit
```

To further drill down into options for a sub-command/subsection:
```
$ drove cluster events -h
usage: drove cluster events [-h] [--follow] [--type TYPE] [--count COUNT] [--textfmt TEXTFMT]

optional arguments:
  -h, --help            show this help message and exit
  --follow, -f          Follow events (Press CTRL-C to kill)
  --type TYPE, -t TYPE  Output events of only the matching type
  --count COUNT, -c COUNT
                        Fetch <count> events at a time.
  --textfmt TEXTFMT, -s TEXTFMT
                        Use the format string to print message
```

# Connecting to the Drove cluster

In order to use the CLI, we need to provide coordinates to the cluster to connect to. This can be done in the following manner:

## Drove CLI config file
The config file can be located in the following paths:
* `.drove` file in your home directory (Typically used for the default cluster you frequently connect to)
*  A file in any path that can be passed as a parameter to the CLI with the `-f FILE` option

### Config File format
This file is in ini format and is arranged in sections.

```ini
[DEFAULT]
...
stage_token = <token1>
prod_token = <token2>

[local]
endpoint = http://localhost:10000
username = admin
password = admin

[stage]
endpoint = https://stage.testdrove.io
auth_header = %(stage_token)s

[production]
endpoint = https://prod.testdrove.io
auth_header = %(prod_token)s

..
```

The `DEFAULT` section can be used to define common variables like Insecure etc. The `local`, `stage`, `production` etc are names for individual clusters and these sections can be used to define configuration for individual clusters. Cluster name is referred to in the command line by using the `-c` command line option.\
*Interpolation* of values is supported and can be achieved by using `%(variable_name)s` references.

> * Note: The `DEFAULT` section is mandatory
> * Note: The `s` at the end of `%(var)s` is mandatory for interpolation

### Contents of a Section
```
endpoint = https://yourcluster.yourdomain.com # Endpoint for cluster
insecure = true
username = <your_username>
password = <your_password>
auth_header= <Authorization value here if using header based auth>
```

Authentication priority:
* If both `username` and `password` are provided, basic auth is used.
* If a value is provided in the `auth_header` parameter, it is passed as the value for the `Authorization` header in the upstream HTTP calls to the Drove server verbatim.
* If neither, no auth is set

> NOTE: Use the `insecure` option to skip certificate checks on the server endpoint (comes in handy for internal domains)

To use a custom config file, invoke drove in the following form:

```
$ drove -f custom.conf ...
```

This will connect to the cluster if an endpoint is mentioned in the `DEFAULT` section.

```
$ drove -f custom.conf -c stage ...
```

This will connect to the cluster whose config is mentioned in the `[stage]` config section.

```
$ drove -c stage ...
```

This will connect to the cluster whose config is mentioned in the `[stage]` config section in `$HOME/.drove` config file.


## Command line options
Pass the endpoint and other options using `--endpoint|-e` etc etc. Options can be obtained using `-h` as mentioned above. Invocation will be in the form:

```
$ drove -e http://localhost:10000 -u guest -p guest ...
```

## CLI format
The following CLI format is followed:

```
usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME] [--password PASSWORD] [--debug]
             {executor,cluster,apps,appinstances,tasks} ...
```
### Basic Arguments
```
  -h, --help            show this help message and exit
  --file FILE, -f FILE  Configuration file for drove client
  --cluster CLUSTER, -c CLUSTER
                        Cluster name as specified in config file
  --endpoint ENDPOINT, -e ENDPOINT
                        Drove endpoint. (For example: https://drove.test.com)
  --auth-header AUTH_HEADER, -t AUTH_HEADER
                        Authorization header value for the provided drove endpoint
  --insecure, -i        Do not verify SSL cert for server
  --username USERNAME, -u USERNAME
                        Drove cluster username
  --password PASSWORD, -p PASSWORD
                        Drove cluster password
  --debug, -d           Print details of errors

```

## Commands
Commands in drove are meant to address specific functionality. They can be summarized as follows:
```
    list                List all executors
    info                Show details about executor
    appinstances        Show app instances running on this executor
    tasks               Show tasks running on this executor
    lsinstances         Show local service instances running on this executor
    blacklist           Blacklist executors
    unblacklist         Un-blacklist executors
```
### executor
---
Drove cluster executor related commands

```shell
drove executor [-h] {list,info,appinstances,tasks} ...
```

#### Sub-commands

##### list

List all executors

```shell
drove executor list [-h]
```

##### info

Show details about executor

```shell
drove executor info [-h] executor-id
```

###### Positional Arguments

`executor-id` - Executor id for which info is to be shown

##### appinstances

Show app instances running on this executor

```shell
drove executor appinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
```
###### Positional Arguments

`executor-id` - Executor id for which info is to be shown

###### Arguments

```
  --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order
```

##### tasks

Show tasks running on this executor

```shell
drove executor tasks [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
```

###### Positional Arguments

`executor-id` - Executor id for which info is to be shown

###### Named Arguments
```
  --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order
```

##### lsinstances

Show local service instances running on this executor

```shell
drove executor lsinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
```
###### Positional Arguments

`executor-id` - Executor id for which info is to be shown

###### Arguments

```
  --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}
                        Sort output by column
  --reverse, -r         Sort in reverse order
```

##### blacklist

Take executors out of rotation.

```shell
drove executor blacklist executor-id [executor-id ...]
```

###### Positional Arguments

`executor-id` - List of executor ids to be blacklisted. At least one is mandatory.

##### unblacklist

Bring blacklisted executors back into rotation.

```shell
drove executor unblacklist executor-id [executor-id ...]
```

###### Positional Arguments

`executor-id` - List of executor ids to be brought in to the rotation. At least one is mandatory.

### cluster
---
Drove cluster related commands

```shell
drove cluster [-h] {ping,summary,leader,endpoints,events} ...
```

#### Sub-commands

##### ping

Ping the cluster

```shell
drove cluster ping [-h]
```

##### summary

Show cluster summary

```shell
drove cluster summary [-h]
```

##### leader

Show leader for cluster
```shell
drove cluster leader [-h]
```
##### endpoints

Show all exposed endpoints
```shell
drove cluster endpoints [-h] [--vhost VHOST]
```

###### Named Arguments

```
  --vhost VHOST, -v VHOST
                        Show details only for the specific vhost
```

##### events

Events on the cluster

```shell
drove cluster events [-h] [--follow] [--type TYPE] [--count COUNT] [--textfmt TEXTFMT]
```

###### Named Arguments

```
  --follow, -f          Follow events (Press CTRL-C to kill)
  --type TYPE, -t TYPE  Output events of only the matching type
  --count COUNT, -c COUNT
                        Fetch <count> events at a time.
  --textfmt TEXTFMT, -s TEXTFMT
                        Use the format string to print message
                        Default: “{type: <25} | {id: <36} | {time: <20} | {metadata}”
```
##### maintenance-on
Set cluster to maintenance mode.

```shell
drove cluster maintenance-on
```
##### maintenance-off
Set cluster to normal mode.

```shell
drove cluster maintenance-off
```

### apps
---
Drove application related commands

```shell
drove apps [-h] {list,summary,spec,create,destroy,deploy,scale,suspend,restart,cancelop} ...
```
#### Sub-commands

##### list

List all applications

```shell
drove apps list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
```

###### Named Arguments

```
  --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}
                        Sort output by column
  --reverse, -r         Sort in reverse order
```

##### summary

Show a summary for an application
```shell
drove apps summary [-h] app-id
```
###### Positional Arguments

`app-id` - Application ID

##### spec

Print the raw json spec for an application
```shell
drove apps spec [-h] app-id
```
###### Positional Arguments

`app-id` - Application ID

##### create

Create application on cluster
```shell
drove apps create [-h] spec-file
```
###### Positional Arguments

`spec-file` - JSON spec file for the application

##### destroy

Destroy an app with zero instances
```shell
drove apps destroy [-h] app-id
```
###### Positional Arguments

`app-id` - Application ID

##### deploy

Deploy new app instances.
```shell
drove apps deploy [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instances
```
###### Positional Arguments

`app-id` - Application ID\
`instances` - Number of new instances to be created

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure instance count is reached
```
##### scale

Scale app to required instances. Will increase or decrease instances on the cluster to match this number

```shell
drove apps scale [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instances
```
###### Positional Arguments

`app-id` - Application ID\
`instances` - Number of instances. Setting this to 0 will suspend the app

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure instance count is reached
```

##### suspend

Suspend the app
```shell
drove apps suspend [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id
```
###### Positional Arguments[¶](#Positional%20Arguments_repeat9 "Link to this heading")

`app-id` - Application ID

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure all instances are suspended
```

##### restart

Restart am existing app instances.

```shell
drove apps restart [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id
```

###### Positional Arguments

`app-id` - Application ID

###### Named Arguments
```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure all instances are replaced
```
##### cancelop

Cancel current operation
```shell
drove apps cancelop [-h] app-id
```
###### Positional Arguments
`app-id` - Application ID

### appinstances
---
Drove application instance related commands
```shell
drove appinstances [-h] {list,info,logs,tail,download,replace,kill} ...
```
#### Sub-commands

##### list

List all application instances
```shell
drove appinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] app-id
```
###### Positional Arguments
`app-id` - Application ID

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
```
##### info

Print details for an application instance
```shell
drove appinstances info [-h] app-id instance-id
```
###### Positional Arguments
`app-id` - Application ID\
`instance-id` - Application Instance ID

##### logs

Print list of logs for application instance
```shell
drove appinstances logs [-h] app-id instance-id
```
###### Positional Arguments

`app-id` - Application ID\
`instance-id` - Application Instance ID

##### tail

Tail log for application instance
```shell
drove appinstances tail [-h] [--file FILE] app-id instance-id
```
###### Positional Arguments

`app-id` - Application ID\
`instance-id` - Application Instance ID

###### Named Arguments

```
  --log LOG, -l LOG  Log filename to tail. Default is to tail output.log
```

##### download

Download log for application instance
```shell
drove appinstances download [-h] [--out OUT] app-id instance-id file
```
###### Positional Arguments

`app-id` - Application ID\
`instance-id` - Application Instance ID\
`file` - Log filename to download

###### Named Arguments
```
--out, -o Filename to download to. Default is the same filename as provided.
```
##### replace

Replace specific app instances with fresh instances
```shell
drove appinstances replace [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instance-id [instance-id ...]
```
###### Positional Arguments
`app-id` - Application ID\
`instance-id` - Application Instance IDs

###### Named Arguments
```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure all instances are replaced
```

##### kill

Kill specific app instances
```shell
drove appinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instance-id [instance-id ...]
```
###### Positional Arguments
`app-id` - Application ID\
`instance-id` - Application Instance IDs

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure all instances are killed
```
### tasks
---
Drove task related commands
```shell
drove tasks [-h] {create,kill,list,show,logs,tail,download} ...
```
#### Sub-commands

##### create

Create a task on cluster
```shell
drove tasks create [-h] spec-file
```
###### Positional Arguments

`spec-file` - JSON spec file for the task

##### kill

Kill a running task
```shell
drove tasks kill [-h] source-app-name task-id
```
###### Positional Arguments

`source-app-name` - Source app name as specified in spec\
`task-id` - ID of the task as specified in the spec

##### list

List all active tasks
```shell
drove tasks list [-h] [--app APP] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
```
###### Named Arguments
```
  --app APP, -a APP     Show tasks only for the given source app
  --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}
                        Sort output by column
  --reverse, -r         Sort in reverse order
```
##### show

Shows details about a task
```shell
drove tasks show [-h] source-app task-id
```
###### Positional Arguments
`source-app` - Name of the Drove application that started the task\
`task-id` - Task ID

##### logs

Print list of logs for task
```shell
drove tasks logs [-h] source-app task-id
```
###### Positional Arguments
`source-app` - Name of the Drove application that started the task\
`task-id` - Task ID

##### tail

Tail log for task
```shell
drove tasks tail [-h] [--file FILE] source-app task-id
```
###### Positional Arguments
`source-app` - Name of the Drove application that started the task\
`task-id` - Task ID

###### Named Arguments

```
  --file FILE, -f FILE  Log filename to tail. Default is to tail output.log
```
##### download

Download log for task

```shell
drove tasks download [-h] [--out OUT] source-app task-id file
```
###### Positional Arguments
`source-app` - Name of the Drove application that started the task\
`task-id` - Task ID\
`file` - Log filename to download

###### Named Arguments

```
  --out OUT, -o OUT  Filename to download to. Default is the same filename as provided.
```
### localservices
---
Drove local service related commands

```shell
drove localservices [-h] {list,summary,spec,create,destroy,activate,deactivate,restart,cancelop} ...
```
#### Sub-commands

##### list

List all local services

```shell
drove localservices list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
```

###### Named Arguments

```
  --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}
                        Sort output by column
  --reverse, -r         Sort in reverse order
```

##### summary

Show a summary for a local service
```shell
drove localservices summary [-h] service-id
```
###### Positional Arguments

`service-id` - Local Service ID

##### spec

Print the raw json spec for a local service
```shell
drove localservices spec [-h] service-id
```
###### Positional Arguments

`service-id` - Local Service ID

##### create

Create local service on cluster
```shell
drove localservices create [-h] spec-file
```
###### Positional Arguments

`spec-file` - JSON spec file for the local service

##### destroy

Destroy an inactive local service

```shell
drove localservices destroy [-h] service-id
```
###### Positional Arguments

`service-id` - Local Service ID


##### activate

Activate a local service

```shell
drove localservices activate [-h] service-id
```
###### Positional Arguments

`service-id` - Local Service ID

##### deactivate

Deactivate a local service

```shell
drove localservices deactivate [-h] service-id
```
###### Positional Arguments

`service-id` - Local Service ID

##### update

Deactivate a local service

```shell
drove localservices update [-h] service-id count
```
###### Positional Arguments

`service-id` - Local Service ID
`count` - Number of instances per executor

##### restart

Restart a local service.

```shell
drove localservices restart [-h] [--stop] [--parallelism PARALLELISM] [--timeout TIMEOUT] [--wait] service-id
```

###### Positional Arguments

`service-id` - Local Service ID

###### Named Arguments
```
  --stop, -s            Stop current instance before spinning up new ones
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are replaced
```
##### cancelop

Cancel current operation
```shell
drove localservices cancelop [-h] service-id
```
###### Positional Arguments
`service-id` - Service ID

### lsinstances
---
Drove local service instance related commands

```shell
drove lsinstances [-h] {list,info,logs,tail,download,replace,kill} ...
```
#### Sub-commands

##### list

List all local service instances
```shell
drove lsinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] service-id
```
###### Positional Arguments
`service-id` - Local Service ID

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation (default: 1)
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
```
##### info

Print details for an local service instance
```shell
drove lsinstances info [-h] service-id instance-id
```
###### Positional Arguments
`service-id` - Local Service ID\
`instance-id` - Local Service Instance ID

##### logs

Print list of logs for local service instance
```shell
drove lsinstances logs [-h] service-id instance-id
```
###### Positional Arguments

`service-id` - Local Service ID\
`instance-id` - Local Service Instance ID

##### tail

Tail log for local service instance
```shell
drove lsinstances tail [-h] [--file FILE] service-id instance-id
```
###### Positional Arguments

`service-id` - Local Service ID
`instance-id` - Local Service Instance ID

###### Named Arguments

```
  --log LOG, -l LOG  Log filename to tail. Default is to tail output.log
```

##### download

Download log for local service instance
```shell
drove lsinstances download [-h] [--out OUT] service-id instance-id file
```
###### Positional Arguments

`service-id` - Local Service ID
`instance-id` - Local Service Instance ID
`file` - Log filename to download

###### Named Arguments
```
--out, -o Filename to download to. Default is the same filename as provided.
```
##### replace

Replace specific local service instances with fresh instances
```shell
drove lsinstances replace [-h] [--stop] [--parallelism PARALLELISM] [--timeout TIMEOUT] [--wait] service-id instance-id [instance-id ...]
```
###### Positional Arguments
`service-id` - Local Service ID
`instance-id` - Local Service Instance IDs

###### Named Arguments
```
  --stop, -s            Stop the instance before spinning up a new one
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster
  --wait, -w            Wait to ensure all instances are replaced
```

##### kill

Kill specific local service instances
```shell
drove lsinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] service-id instance-id [instance-id ...]
```
###### Positional Arguments
`service-id` - Local Service ID
`instance-id` - Local Service Instance IDs

###### Named Arguments

```
  --parallelism PARALLELISM, -p PARALLELISM
                        Number of parallel threads to be used to execute operation
  --timeout TIMEOUT, -t TIMEOUT
                        Timeout for the operation on the cluster (default: 5 minutes)
  --wait, -w            Wait to ensure all instances are killed
```

©2024, Santanu Sinha.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PhonePe/drove-cli",
    "name": "drove-cli",
    "maintainer": "Santanu Sinha",
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": "santanu.sinha@gmail.com",
    "keywords": "container, docker, podman, distributed-systems, container-orchestrator",
    "author": "Santanu Sinha",
    "author_email": "santanu.sinha@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5e/6e/f1979fc454fd616d594fbeef4eb748d0be85d8299790ad96711c99adfc64/drove_cli-0.0.3.tar.gz",
    "platform": null,
    "description": "# Drove CLI\n\nCommand line interface for the Drove Container Orchestrator.\n\n# Getting Started\n\n## Installation\n\nYou can install the CLI from PyPI.\n\n```bash\npip install drove-cli\n```\n\n### To install in a virtual env\n\nCreate virtual environment\n```bash\nmkdir -p ${HOME}/venvs\ncd ${HOME}/venvs\npython3 -m venv drove_cli\ncd drove_cli\nsource bin/activate\npip install drove-cli\n```\n\nTo activate in another shell:\n\n```bash\nsource ${HOME}/venvs/drove_cli/bin/activate\n```\n\nTo deactivate the venv (run when in activated environment):\n```bash\ndeactivate\n```\n\n## Running using docker\nThe cli is pushed as a docker for easy access. This also eliminates the need for having python etc setup on your system.\n\n1) Pull the image:\n```shell\ndocker pull ghcr.io/phonepe/drove-cli:latest\n```\n\n2) Create a shell script called `drove` with the following content:\n\n```shell\n#! /bin/sh\ndocker run \\\n    --rm --interactive --tty --network host \\\n    --name drove-cli -v ${HOME}/.drove:/root/.drove:ro  \\\n    ghcr.io/phonepe/drove-cli:latest \"$@\"\n\n```\n\n3) Make the script executable\n```shell\nchmod a+x drove\n```\n\n4) Put the path to this script in your `~/.bashrc`.\n\n```shell\nexport PATH=\"${PATH}:/path/to/your/script\"\n```\n\n5) Logout/login or run `. ~/.bashrc` to load the new [path]\n\n\n6) Run drove cli\n```shell\ndrove -h\n```\n\n## Requirements\nThe CLI is written in Python 3x\n\n\n## Accessing the Documentation\nThe arguments needed by the script are self documenting. Please use `-h` or `--help` in different sections and sub-sections of the CLI to get descriptions of commands, sub-commands, their arguments and options.\n\nTo see basic help:\n```\n\n$ drove -h\n\nusage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME] [--password PASSWORD] [--debug]\n             {lsinstances,executor,cluster,apps,appinstances,tasks,localservices} ...\n\n\npositional arguments:\n  {lsinstances,executor,cluster,apps,appinstances,tasks,localservices}\n                        Available plugins\n    lsinstances         Drove local service instance related commands\n    executor            Drove cluster executor related commands\n    cluster             Drove cluster related commands\n    apps                Drove application related commands\n    appinstances        Drove application instance related commands\n    tasks               Drove task related commands\n    localservices       Drove local service related commands\n\noptions:\n  -h, --help            show this help message and exit\n  --file FILE, -f FILE  Configuration file for drove client\n  --cluster CLUSTER, -c CLUSTER\n                        Cluster name as specified in config file\n  --endpoint ENDPOINT, -e ENDPOINT\n                        Drove endpoint. (For example: https://drove.test.com)\n  --auth-header AUTH_HEADER, -t AUTH_HEADER\n                        Authorization header value for the provided drove endpoint\n  --insecure, -i        Do not verify SSL cert for server\n  --username USERNAME, -u USERNAME\n                        Drove cluster username\n  --password PASSWORD, -p PASSWORD\n                        Drove cluster password\n  --debug, -d           Print details of errors\n\n```\n\nTo see documentation for a command/section:\n```\n$ drove cluster -h\nusage: drove cluster [-h] {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off} ...\n\npositional arguments:\n  {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off}\n                        Available commands for cluster management\n    ping                Ping the cluster\n    summary             Show cluster summary\n    leader              Show leader for cluster\n    endpoints           Show all exposed endpoints\n    events              Events on the cluster\n    maintenance-on      Set cluster to maintenance mode\n    maintenance-off     Removed maintenance mode on cluster\n\noptions:\n  -h, --help            show this help message and exit\n```\n\nTo further drill down into options for a sub-command/subsection:\n```\n$ drove cluster events -h\nusage: drove cluster events [-h] [--follow] [--type TYPE] [--count COUNT] [--textfmt TEXTFMT]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --follow, -f          Follow events (Press CTRL-C to kill)\n  --type TYPE, -t TYPE  Output events of only the matching type\n  --count COUNT, -c COUNT\n                        Fetch <count> events at a time.\n  --textfmt TEXTFMT, -s TEXTFMT\n                        Use the format string to print message\n```\n\n# Connecting to the Drove cluster\n\nIn order to use the CLI, we need to provide coordinates to the cluster to connect to. This can be done in the following manner:\n\n## Drove CLI config file\nThe config file can be located in the following paths:\n* `.drove` file in your home directory (Typically used for the default cluster you frequently connect to)\n*  A file in any path that can be passed as a parameter to the CLI with the `-f FILE` option\n\n### Config File format\nThis file is in ini format and is arranged in sections.\n\n```ini\n[DEFAULT]\n...\nstage_token = <token1>\nprod_token = <token2>\n\n[local]\nendpoint = http://localhost:10000\nusername = admin\npassword = admin\n\n[stage]\nendpoint = https://stage.testdrove.io\nauth_header = %(stage_token)s\n\n[production]\nendpoint = https://prod.testdrove.io\nauth_header = %(prod_token)s\n\n..\n```\n\nThe `DEFAULT` section can be used to define common variables like Insecure etc. The `local`, `stage`, `production` etc are names for individual clusters and these sections can be used to define configuration for individual clusters. Cluster name is referred to in the command line by using the `-c` command line option.\\\n*Interpolation* of values is supported and can be achieved by using `%(variable_name)s` references.\n\n> * Note: The `DEFAULT` section is mandatory\n> * Note: The `s` at the end of `%(var)s` is mandatory for interpolation\n\n### Contents of a Section\n```\nendpoint = https://yourcluster.yourdomain.com # Endpoint for cluster\ninsecure = true\nusername = <your_username>\npassword = <your_password>\nauth_header= <Authorization value here if using header based auth>\n```\n\nAuthentication priority:\n* If both `username` and `password` are provided, basic auth is used.\n* If a value is provided in the `auth_header` parameter, it is passed as the value for the `Authorization` header in the upstream HTTP calls to the Drove server verbatim.\n* If neither, no auth is set\n\n> NOTE: Use the `insecure` option to skip certificate checks on the server endpoint (comes in handy for internal domains)\n\nTo use a custom config file, invoke drove in the following form:\n\n```\n$ drove -f custom.conf ...\n```\n\nThis will connect to the cluster if an endpoint is mentioned in the `DEFAULT` section.\n\n```\n$ drove -f custom.conf -c stage ...\n```\n\nThis will connect to the cluster whose config is mentioned in the `[stage]` config section.\n\n```\n$ drove -c stage ...\n```\n\nThis will connect to the cluster whose config is mentioned in the `[stage]` config section in `$HOME/.drove` config file.\n\n\n## Command line options\nPass the endpoint and other options using `--endpoint|-e` etc etc. Options can be obtained using `-h` as mentioned above. Invocation will be in the form:\n\n```\n$ drove -e http://localhost:10000 -u guest -p guest ...\n```\n\n## CLI format\nThe following CLI format is followed:\n\n```\nusage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME] [--password PASSWORD] [--debug]\n             {executor,cluster,apps,appinstances,tasks} ...\n```\n### Basic Arguments\n```\n  -h, --help            show this help message and exit\n  --file FILE, -f FILE  Configuration file for drove client\n  --cluster CLUSTER, -c CLUSTER\n                        Cluster name as specified in config file\n  --endpoint ENDPOINT, -e ENDPOINT\n                        Drove endpoint. (For example: https://drove.test.com)\n  --auth-header AUTH_HEADER, -t AUTH_HEADER\n                        Authorization header value for the provided drove endpoint\n  --insecure, -i        Do not verify SSL cert for server\n  --username USERNAME, -u USERNAME\n                        Drove cluster username\n  --password PASSWORD, -p PASSWORD\n                        Drove cluster password\n  --debug, -d           Print details of errors\n\n```\n\n## Commands\nCommands in drove are meant to address specific functionality. They can be summarized as follows:\n```\n    list                List all executors\n    info                Show details about executor\n    appinstances        Show app instances running on this executor\n    tasks               Show tasks running on this executor\n    lsinstances         Show local service instances running on this executor\n    blacklist           Blacklist executors\n    unblacklist         Un-blacklist executors\n```\n### executor\n---\nDrove cluster executor related commands\n\n```shell\ndrove executor [-h] {list,info,appinstances,tasks} ...\n```\n\n#### Sub-commands\n\n##### list\n\nList all executors\n\n```shell\ndrove executor list [-h]\n```\n\n##### info\n\nShow details about executor\n\n```shell\ndrove executor info [-h] executor-id\n```\n\n###### Positional Arguments\n\n`executor-id` - Executor id for which info is to be shown\n\n##### appinstances\n\nShow app instances running on this executor\n\n```shell\ndrove executor appinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id\n```\n###### Positional Arguments\n\n`executor-id` - Executor id for which info is to be shown\n\n###### Arguments\n\n```\n  --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}\n                        Sort output by column\n  --reverse, -r         Sort in reverse order\n```\n\n##### tasks\n\nShow tasks running on this executor\n\n```shell\ndrove executor tasks [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id\n```\n\n###### Positional Arguments\n\n`executor-id` - Executor id for which info is to be shown\n\n###### Named Arguments\n```\n  --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}\n                        Sort output by column\n  --reverse, -r         Sort in reverse order\n```\n\n##### lsinstances\n\nShow local service instances running on this executor\n\n```shell\ndrove executor lsinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id\n```\n###### Positional Arguments\n\n`executor-id` - Executor id for which info is to be shown\n\n###### Arguments\n\n```\n  --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}\n                        Sort output by column\n  --reverse, -r         Sort in reverse order\n```\n\n##### blacklist\n\nTake executors out of rotation.\n\n```shell\ndrove executor blacklist executor-id [executor-id ...]\n```\n\n###### Positional Arguments\n\n`executor-id` - List of executor ids to be blacklisted. At least one is mandatory.\n\n##### unblacklist\n\nBring blacklisted executors back into rotation.\n\n```shell\ndrove executor unblacklist executor-id [executor-id ...]\n```\n\n###### Positional Arguments\n\n`executor-id` - List of executor ids to be brought in to the rotation. At least one is mandatory.\n\n### cluster\n---\nDrove cluster related commands\n\n```shell\ndrove cluster [-h] {ping,summary,leader,endpoints,events} ...\n```\n\n#### Sub-commands\n\n##### ping\n\nPing the cluster\n\n```shell\ndrove cluster ping [-h]\n```\n\n##### summary\n\nShow cluster summary\n\n```shell\ndrove cluster summary [-h]\n```\n\n##### leader\n\nShow leader for cluster\n```shell\ndrove cluster leader [-h]\n```\n##### endpoints\n\nShow all exposed endpoints\n```shell\ndrove cluster endpoints [-h] [--vhost VHOST]\n```\n\n###### Named Arguments\n\n```\n  --vhost VHOST, -v VHOST\n                        Show details only for the specific vhost\n```\n\n##### events\n\nEvents on the cluster\n\n```shell\ndrove cluster events [-h] [--follow] [--type TYPE] [--count COUNT] [--textfmt TEXTFMT]\n```\n\n###### Named Arguments\n\n```\n  --follow, -f          Follow events (Press CTRL-C to kill)\n  --type TYPE, -t TYPE  Output events of only the matching type\n  --count COUNT, -c COUNT\n                        Fetch <count> events at a time.\n  --textfmt TEXTFMT, -s TEXTFMT\n                        Use the format string to print message\n                        Default: \u201c{type: <25} | {id: <36} | {time: <20} | {metadata}\u201d\n```\n##### maintenance-on\nSet cluster to maintenance mode.\n\n```shell\ndrove cluster maintenance-on\n```\n##### maintenance-off\nSet cluster to normal mode.\n\n```shell\ndrove cluster maintenance-off\n```\n\n### apps\n---\nDrove application related commands\n\n```shell\ndrove apps [-h] {list,summary,spec,create,destroy,deploy,scale,suspend,restart,cancelop} ...\n```\n#### Sub-commands\n\n##### list\n\nList all applications\n\n```shell\ndrove apps list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]\n```\n\n###### Named Arguments\n\n```\n  --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}\n                        Sort output by column\n  --reverse, -r         Sort in reverse order\n```\n\n##### summary\n\nShow a summary for an application\n```shell\ndrove apps summary [-h] app-id\n```\n###### Positional Arguments\n\n`app-id` - Application ID\n\n##### spec\n\nPrint the raw json spec for an application\n```shell\ndrove apps spec [-h] app-id\n```\n###### Positional Arguments\n\n`app-id` - Application ID\n\n##### create\n\nCreate application on cluster\n```shell\ndrove apps create [-h] spec-file\n```\n###### Positional Arguments\n\n`spec-file` - JSON spec file for the application\n\n##### destroy\n\nDestroy an app with zero instances\n```shell\ndrove apps destroy [-h] app-id\n```\n###### Positional Arguments\n\n`app-id` - Application ID\n\n##### deploy\n\nDeploy new app instances.\n```shell\ndrove apps deploy [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instances\n```\n###### Positional Arguments\n\n`app-id` - Application ID\\\n`instances` - Number of new instances to be created\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure instance count is reached\n```\n##### scale\n\nScale app to required instances. Will increase or decrease instances on the cluster to match this number\n\n```shell\ndrove apps scale [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instances\n```\n###### Positional Arguments\n\n`app-id` - Application ID\\\n`instances` - Number of instances. Setting this to 0 will suspend the app\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure instance count is reached\n```\n\n##### suspend\n\nSuspend the app\n```shell\ndrove apps suspend [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id\n```\n###### Positional Arguments[\u00b6](#Positional%20Arguments_repeat9 \"Link to this heading\")\n\n`app-id` - Application ID\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure all instances are suspended\n```\n\n##### restart\n\nRestart am existing app instances.\n\n```shell\ndrove apps restart [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id\n```\n\n###### Positional Arguments\n\n`app-id` - Application ID\n\n###### Named Arguments\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure all instances are replaced\n```\n##### cancelop\n\nCancel current operation\n```shell\ndrove apps cancelop [-h] app-id\n```\n###### Positional Arguments\n`app-id` - Application ID\n\n### appinstances\n---\nDrove application instance related commands\n```shell\ndrove appinstances [-h] {list,info,logs,tail,download,replace,kill} ...\n```\n#### Sub-commands\n\n##### list\n\nList all application instances\n```shell\ndrove appinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] app-id\n```\n###### Positional Arguments\n`app-id` - Application ID\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n```\n##### info\n\nPrint details for an application instance\n```shell\ndrove appinstances info [-h] app-id instance-id\n```\n###### Positional Arguments\n`app-id` - Application ID\\\n`instance-id` - Application Instance ID\n\n##### logs\n\nPrint list of logs for application instance\n```shell\ndrove appinstances logs [-h] app-id instance-id\n```\n###### Positional Arguments\n\n`app-id` - Application ID\\\n`instance-id` - Application Instance ID\n\n##### tail\n\nTail log for application instance\n```shell\ndrove appinstances tail [-h] [--file FILE] app-id instance-id\n```\n###### Positional Arguments\n\n`app-id` - Application ID\\\n`instance-id` - Application Instance ID\n\n###### Named Arguments\n\n```\n  --log LOG, -l LOG  Log filename to tail. Default is to tail output.log\n```\n\n##### download\n\nDownload log for application instance\n```shell\ndrove appinstances download [-h] [--out OUT] app-id instance-id file\n```\n###### Positional Arguments\n\n`app-id` - Application ID\\\n`instance-id` - Application Instance ID\\\n`file` - Log filename to download\n\n###### Named Arguments\n```\n--out, -o Filename to download to. Default is the same filename as provided.\n```\n##### replace\n\nReplace specific app instances with fresh instances\n```shell\ndrove appinstances replace [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instance-id [instance-id ...]\n```\n###### Positional Arguments\n`app-id` - Application ID\\\n`instance-id` - Application Instance IDs\n\n###### Named Arguments\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure all instances are replaced\n```\n\n##### kill\n\nKill specific app instances\n```shell\ndrove appinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instance-id [instance-id ...]\n```\n###### Positional Arguments\n`app-id` - Application ID\\\n`instance-id` - Application Instance IDs\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure all instances are killed\n```\n### tasks\n---\nDrove task related commands\n```shell\ndrove tasks [-h] {create,kill,list,show,logs,tail,download} ...\n```\n#### Sub-commands\n\n##### create\n\nCreate a task on cluster\n```shell\ndrove tasks create [-h] spec-file\n```\n###### Positional Arguments\n\n`spec-file` - JSON spec file for the task\n\n##### kill\n\nKill a running task\n```shell\ndrove tasks kill [-h] source-app-name task-id\n```\n###### Positional Arguments\n\n`source-app-name` - Source app name as specified in spec\\\n`task-id` - ID of the task as specified in the spec\n\n##### list\n\nList all active tasks\n```shell\ndrove tasks list [-h] [--app APP] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]\n```\n###### Named Arguments\n```\n  --app APP, -a APP     Show tasks only for the given source app\n  --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}\n                        Sort output by column\n  --reverse, -r         Sort in reverse order\n```\n##### show\n\nShows details about a task\n```shell\ndrove tasks show [-h] source-app task-id\n```\n###### Positional Arguments\n`source-app` - Name of the Drove application that started the task\\\n`task-id` - Task ID\n\n##### logs\n\nPrint list of logs for task\n```shell\ndrove tasks logs [-h] source-app task-id\n```\n###### Positional Arguments\n`source-app` - Name of the Drove application that started the task\\\n`task-id` - Task ID\n\n##### tail\n\nTail log for task\n```shell\ndrove tasks tail [-h] [--file FILE] source-app task-id\n```\n###### Positional Arguments\n`source-app` - Name of the Drove application that started the task\\\n`task-id` - Task ID\n\n###### Named Arguments\n\n```\n  --file FILE, -f FILE  Log filename to tail. Default is to tail output.log\n```\n##### download\n\nDownload log for task\n\n```shell\ndrove tasks download [-h] [--out OUT] source-app task-id file\n```\n###### Positional Arguments\n`source-app` - Name of the Drove application that started the task\\\n`task-id` - Task ID\\\n`file` - Log filename to download\n\n###### Named Arguments\n\n```\n  --out OUT, -o OUT  Filename to download to. Default is the same filename as provided.\n```\n### localservices\n---\nDrove local service related commands\n\n```shell\ndrove localservices [-h] {list,summary,spec,create,destroy,activate,deactivate,restart,cancelop} ...\n```\n#### Sub-commands\n\n##### list\n\nList all local services\n\n```shell\ndrove localservices list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]\n```\n\n###### Named Arguments\n\n```\n  --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}\n                        Sort output by column\n  --reverse, -r         Sort in reverse order\n```\n\n##### summary\n\nShow a summary for a local service\n```shell\ndrove localservices summary [-h] service-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n\n##### spec\n\nPrint the raw json spec for a local service\n```shell\ndrove localservices spec [-h] service-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n\n##### create\n\nCreate local service on cluster\n```shell\ndrove localservices create [-h] spec-file\n```\n###### Positional Arguments\n\n`spec-file` - JSON spec file for the local service\n\n##### destroy\n\nDestroy an inactive local service\n\n```shell\ndrove localservices destroy [-h] service-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n\n\n##### activate\n\nActivate a local service\n\n```shell\ndrove localservices activate [-h] service-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n\n##### deactivate\n\nDeactivate a local service\n\n```shell\ndrove localservices deactivate [-h] service-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n\n##### update\n\nDeactivate a local service\n\n```shell\ndrove localservices update [-h] service-id count\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n`count` - Number of instances per executor\n\n##### restart\n\nRestart a local service.\n\n```shell\ndrove localservices restart [-h] [--stop] [--parallelism PARALLELISM] [--timeout TIMEOUT] [--wait] service-id\n```\n\n###### Positional Arguments\n\n`service-id` - Local Service ID\n\n###### Named Arguments\n```\n  --stop, -s            Stop current instance before spinning up new ones\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster\n  --wait, -w            Wait to ensure all instances are replaced\n```\n##### cancelop\n\nCancel current operation\n```shell\ndrove localservices cancelop [-h] service-id\n```\n###### Positional Arguments\n`service-id` - Service ID\n\n### lsinstances\n---\nDrove local service instance related commands\n\n```shell\ndrove lsinstances [-h] {list,info,logs,tail,download,replace,kill} ...\n```\n#### Sub-commands\n\n##### list\n\nList all local service instances\n```shell\ndrove lsinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] service-id\n```\n###### Positional Arguments\n`service-id` - Local Service ID\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation (default: 1)\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n```\n##### info\n\nPrint details for an local service instance\n```shell\ndrove lsinstances info [-h] service-id instance-id\n```\n###### Positional Arguments\n`service-id` - Local Service ID\\\n`instance-id` - Local Service Instance ID\n\n##### logs\n\nPrint list of logs for local service instance\n```shell\ndrove lsinstances logs [-h] service-id instance-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\\\n`instance-id` - Local Service Instance ID\n\n##### tail\n\nTail log for local service instance\n```shell\ndrove lsinstances tail [-h] [--file FILE] service-id instance-id\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n`instance-id` - Local Service Instance ID\n\n###### Named Arguments\n\n```\n  --log LOG, -l LOG  Log filename to tail. Default is to tail output.log\n```\n\n##### download\n\nDownload log for local service instance\n```shell\ndrove lsinstances download [-h] [--out OUT] service-id instance-id file\n```\n###### Positional Arguments\n\n`service-id` - Local Service ID\n`instance-id` - Local Service Instance ID\n`file` - Log filename to download\n\n###### Named Arguments\n```\n--out, -o Filename to download to. Default is the same filename as provided.\n```\n##### replace\n\nReplace specific local service instances with fresh instances\n```shell\ndrove lsinstances replace [-h] [--stop] [--parallelism PARALLELISM] [--timeout TIMEOUT] [--wait] service-id instance-id [instance-id ...]\n```\n###### Positional Arguments\n`service-id` - Local Service ID\n`instance-id` - Local Service Instance IDs\n\n###### Named Arguments\n```\n  --stop, -s            Stop the instance before spinning up a new one\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster\n  --wait, -w            Wait to ensure all instances are replaced\n```\n\n##### kill\n\nKill specific local service instances\n```shell\ndrove lsinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] service-id instance-id [instance-id ...]\n```\n###### Positional Arguments\n`service-id` - Local Service ID\n`instance-id` - Local Service Instance IDs\n\n###### Named Arguments\n\n```\n  --parallelism PARALLELISM, -p PARALLELISM\n                        Number of parallel threads to be used to execute operation\n  --timeout TIMEOUT, -t TIMEOUT\n                        Timeout for the operation on the cluster (default: 5 minutes)\n  --wait, -w            Wait to ensure all instances are killed\n```\n\n\u00a92024, Santanu Sinha.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Drove Command Line Interface",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/PhonePe/drove-cli",
        "Repository": "https://github.com/PhonePe/drove-cli"
    },
    "split_keywords": [
        "container",
        " docker",
        " podman",
        " distributed-systems",
        " container-orchestrator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf74fd73b487a771a14dab279603ddbb6d3c9125ce105d3ce6e3705a6a13d749",
                "md5": "7eed9dfce62039b69a97bc8411267c17",
                "sha256": "65fc6d069889946642d4a23461abcd0eecb527620393b6a29ce19a1b5d631787"
            },
            "downloads": -1,
            "filename": "drove_cli-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7eed9dfce62039b69a97bc8411267c17",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 28022,
            "upload_time": "2025-09-16T05:25:39",
            "upload_time_iso_8601": "2025-09-16T05:25:39.967189Z",
            "url": "https://files.pythonhosted.org/packages/bf/74/fd73b487a771a14dab279603ddbb6d3c9125ce105d3ce6e3705a6a13d749/drove_cli-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e6ef1979fc454fd616d594fbeef4eb748d0be85d8299790ad96711c99adfc64",
                "md5": "e75bbca31439c926e8f582c9dd3fc0aa",
                "sha256": "ae090ebd9810c657342bdc7e5b02cf9bf12a493e2d0153f01862cc0930695741"
            },
            "downloads": -1,
            "filename": "drove_cli-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e75bbca31439c926e8f582c9dd3fc0aa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 23463,
            "upload_time": "2025-09-16T05:25:41",
            "upload_time_iso_8601": "2025-09-16T05:25:41.187374Z",
            "url": "https://files.pythonhosted.org/packages/5e/6e/f1979fc454fd616d594fbeef4eb748d0be85d8299790ad96711c99adfc64/drove_cli-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-16 05:25:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PhonePe",
    "github_project": "drove-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Requests",
            "specs": [
                [
                    "==",
                    "2.32.5"
                ]
            ]
        },
        {
            "name": "tabulate",
            "specs": [
                [
                    "==",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "tenacity",
            "specs": [
                [
                    "==",
                    "9.1.2"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.5.0"
                ]
            ]
        }
    ],
    "lcname": "drove-cli"
}
        
Elapsed time: 2.10231s