Configuration Management¶
The Manta CLI uses a centralized configuration system stored in ~/.manta/
that manages credentials, profiles, and settings across all Manta tools.
Configuration Structure¶
Directory Layout
~/.manta/
├── admin/ # Admin configuration
│ └── config.toml # Admin settings
├── sdk/ # SDK profiles
│ ├── active # Active profile indicator
│ ├── default.toml # Default SDK profile
│ └── dev.toml # Development profile
├── nodes/ # Node configurations
│ ├── default.toml # Default node config
│ ├── dev_0.toml # Individual node configs
│ ├── dev_1.toml
│ └── instances/ # Node instance data
├── state/
│ └── active-profile # Currently active SDK profile
└── logs/ # Operation logs
└── nodes/ # Node-specific logs
├── dev_0.log
└── dev_1.log
Initialization¶
Interactive Setup
The easiest way to configure the CLI:
manta sdk config init --interactive
This will prompt you for:
Platform host and port
Authentication token
Profile name
Optional settings
Configuration Commands¶
# Show all settings
manta sdk config show
# List profiles
manta sdk config list
# Use profile configuration
manta sdk config use <profile_name>
# Delete profile
manta config delete <profile_name>
Environment Variables¶
Configuration can be overridden using environment variables:
# Connection settings
export MANTA_HOST=localhost
export MANTA_PORT=50052
export MANTA_MANAGER_PORT=50051
# Authentication
export MANTA_TOKEN=your_jwt_token
export MANTA_CERT_FOLDER=/path/to/certs
# Profile selection
export MANTA_PROFILE=production
# Feature flags
export MANTA_STREAMING=true
export MANTA_COMPRESSION=false
# Logging
export MANTA_LOG_LEVEL=DEBUG
export MANTA_LOG_FILE=~/.manta/debug.log
Priority Order
Command-line arguments
Environment variables
Active profile configuration
Default profile configuration
Global configuration
Built-in defaults
Troubleshooting¶
Common Issues
Permission Denied
# Fix permissions chmod 700 ~/.manta chmod 600 ~/.manta/sdk
Invalid Token
Ensure you use the right token (user token or cluster token)
Connection Failed
Ensure the host and port are correct
Best Practices¶
Use Profiles: Separate environments with profiles
Secure Tokens: Never commit tokens to version control
Regular Backups: Backup configuration before changes
Token Rotation: Rotate tokens periodically
Minimal Permissions: Use tokens with minimal required permissions
Environment Variables: Use for CI/CD and automation
Validate Changes: Test configuration after modifications
Next Steps¶
Cluster Management Commands - Managing clusters with CLI
Python User API - Programmatic configuration