Skip to content

Start or stop Cloudera Manager, CDH and daemons via CM APi script

License

Notifications You must be signed in to change notification settings

prataprajr/cmapi_clusterstartstop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cmapi_clusterstartstop

Start or stop Cloudera Manager, CDH and daemons via CM API

##Introduction This script lets you start and (gracefully) stop a Cloudera Hadoop cluster. The highlights are:

  • Uses CM API(python client) for managing CDH and CM services, so is portable across multiple Cloudera versions. Tested on 5.7.1
  • Uses Ansbile 'service' module for managing Linux daemons(cloudera-scm-[agent,server,server-db]), so is portable across multiple Linux versions. Tested on RHEL 7.1
  • Central management script(which is the only file that a user needs to modify) is written in bash.

##Typical use cases

  • Can be used to automate shutdown and start of Hadoop cluster during off peak hours. Most cloud providers bill VMs per hour, so you can have considerable savings on monthly bill by coupling this script to the inbuilt VM shutdown/start utility. For example, in AWS you can link this to Lambda and shutdown clusters between 22:00 to 6:00 daily and reduce the monthly bill by 1/3.
  • Quickly stop/start multiple Cloudera Hadoop clusters during maintenance(Eg: Datacenter power maintenance).

##Pre-requisites

##List of Scripts

  • startstopcluster.sh
  • python/stopcmservices.py
  • python/startcmservices.py
  • python/stopcdhservices.py
  • python/startcdhservices.py

##Usage

  • Open script file 'startstopcluster.sh' and edit parameters as per your environment'
  • Execute the script:
./startstopcluster.sh start
./startstopcluster.sh stop

About

Start or stop Cloudera Manager, CDH and daemons via CM APi script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published