#NEWLINE# def scale_cluster( cluster , instances ) : #NEWLINE# #INDENT# if ( not instances ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( not cmd . is_pre_installed_cdh ( instances [ 0 ] . remote ( ) ) ) : #NEWLINE# #INDENT# CU . pu . configure_os ( instances ) #NEWLINE# CU . pu . install_packages ( instances , PACKAGES ) #NEWLINE# #UNINDENT# CU . pu . start_cloudera_agents ( instances ) #NEWLINE# CU . await_agents ( cluster , instances ) #NEWLINE# CU . configure_instances ( instances , cluster ) #NEWLINE# CU . update_configs ( cluster ) #NEWLINE# CU . pu . configure_swift ( cluster , instances ) #NEWLINE# CU . refresh_datanodes ( cluster ) #NEWLINE# _start_roles ( cluster , instances )