Cloudera Manager CLI tools to easily perform common operations using its API.
- Python 2.7
- pip
- make (optional)
- virtualenv (development)
- Clone the project
- Run
sudo python setup.py installor justmake install
- Run
cmt --helpto get complete usage info.
sudo pip uninstall cloudera_manager_tools && sudo rm -f $(which cmt)or justmake uninstall
- Clone the project
- Configure the dev env with
make devinit - Activate the virtualenv
source .env/bin/activate - Install CMT in editable mode in the virtualenv
make devinstall
If you want to implement a new SERVICE named myservice for CMT, you need to:
- Create a new
myservice.pyfile in thecloudera-manager-toolsfolder - Implement in it a
Myserviceclass (Uppercase capital letter) which extends one of the CMT abstract classes defined in__interfaces__.py - Implement actions for your myservice by implementing public methods (whose name is not staring by "_").
Have a look at the code in any of the already implemented services in the cloudera-manager-tools for more details.
IMPORTANT NOTES:
- Any
.pyfile in thecloudera-manager-tools, whose name is not starting with "__" (two underscores) will be loaded as SERVICE - Any method defined in your CMT service class whose name is not starting with "_" (an underscore) will be exposed as ACTION for your service.