Drove CLI¶
The Drove CLI (drove) provides command-line access to Drove clusters.
Before you begin¶
You need:
- Python 3.x or Docker
- Network access to a Drove controller
- Valid credentials (username/password or auth token)
Install drove-cli¶
pip install drove-cli
docker pull ghcr.io/phonepe/drove-cli:latest
# Create wrapper script
cat > /usr/local/bin/drove << 'EOF'
#!/bin/sh
docker run --rm -it --network host \
-v ${HOME}/.drove:/root/.drove:ro \
ghcr.io/phonepe/drove-cli:latest "$@"
EOF
chmod +x /usr/local/bin/drove
Verify:
drove --version
Upgrade drove-cli¶
pip install -U drove-cli
docker pull ghcr.io/phonepe/drove-cli:latest
Configure cluster access¶
Create ~/.drove:
[DEFAULT]
current_cluster = prod
[prod]
endpoint = https://drove.example.com
auth_header = Bearer <token>
# or
username = admin
password = admin
Test connectivity:
drove cluster ping
See Configuration for auth options and multi-cluster setup.
Enabling Command Completion¶
You can generate shell completions file for bash, zfs and tcsh using the --print-completion option.
drove --print-completion bash > drove.bash.completions
To use this osurce the completion file
source drove.bash.completions
Tip
Check your operating system documentation to understand where to store this file to enable completions automatically.
Common tasks¶
View cluster state¶
drove cluster summary
drove executor list
Deploy an application¶
drove apps create app-spec.json
drove apps scale MY_APP-1 3 --wait
Check application health¶
drove apps list
drove describe app MY_APP-1
Debug a failing instance¶
drove appinstances list MY_APP-1
drove describe instance MY_APP-1 AI-xxxxx
drove appinstances tail MY_APP-1 AI-xxxxx
Switch clusters¶
drove config get-clusters
drove config use-cluster staging
Command groups¶
| Command | Purpose |
|---|---|
appinstances |
Instance operations |
apps |
Application lifecycle |
cluster |
Cluster operations |
config |
CLI configuration |
describe |
Detailed resource info |
executor |
Node management |
localservices |
Per-node services |
lsinstances |
Local service instances |
tasks |
One-off task execution |
Get help¶
drove -h # All commands
drove apps -h # Command group
drove apps scale -h # Specific command