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 install
or justmake install
- Run
cmt --help
to 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.py
file in thecloudera-manager-tools
folder - Implement in it a
Myservice
class (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
.py
file 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.