コード例 #1
0
ファイル: create_cluster.py プロジェクト: gtzelepis/e-science
 def create_yarn_cluster(self):
     self.HOSTNAME_MASTER_IP, self.server_dict = self.c_hadoop_cluster.create_bare_cluster()
     list_of_hosts = reroute_ssh_prep(self.server_dict, self.HOSTNAME_MASTER_IP)
     install_yarn(list_of_hosts, self.HOSTNAME_MASTER_IP, self.opts['name'])
     logging.log(REPORT, ' Bare cluster has been created.')
     return self.HOSTNAME_MASTER_IP, self.server_dict
コード例 #2
0
ファイル: create_cluster.py プロジェクト: amathilda/e-science
            raise
        # Update cluster info with the master VM root password.
        set_cluster_state(self.opts['token'],
                          self.cluster_id,
                          'Configuring YARN cluster node communication (2/3)',
                          password=self.master_root_pass)

        try:
            list_of_hosts = reroute_ssh_prep(self.server_dict,
                                             self.HOSTNAME_MASTER_IP)
            set_cluster_state(self.opts['token'], self.cluster_id,
                              'Installing and configuring YARN (3/3)')

            install_yarn(self.opts['token'], list_of_hosts,
                         self.HOSTNAME_MASTER_IP, self.cluster_name_postfix_id,
                         self.orka_image_uuid, self.ssh_file,
                         self.opts['replication_factor'],
                         self.opts['dfs_blocksize'])

        except Exception, e:
            logging.error(str(e.args[0]))
            logging.error('Created cluster and resources will be deleted')
            # If error in Yarn cluster, update cluster status as destroyed
            set_cluster_state(self.opts['token'],
                              self.cluster_id,
                              'Error',
                              status='Failed',
                              error=str(e.args[0]))
            self.destroy('Failed')
            raise
コード例 #3
0
ファイル: create_cluster.py プロジェクト: amathilda/e-science
            self.HOSTNAME_MASTER_IP, self.server_dict = self.create_bare_cluster()
        except Exception, e:
            logging.error(str(e.args[0]))
            raise
        # Update cluster info with the master VM root password.
        set_cluster_state(self.opts['token'], self.cluster_id,
                          'Configuring YARN cluster node communication (2/3)',
                          password=self.master_root_pass)

        try:
            list_of_hosts = reroute_ssh_prep(self.server_dict,
                                             self.HOSTNAME_MASTER_IP)
            set_cluster_state(self.opts['token'], self.cluster_id,
                          'Installing and configuring YARN (3/3)')

            install_yarn(self.opts['token'], list_of_hosts, self.HOSTNAME_MASTER_IP,
                         self.cluster_name_postfix_id, self.orka_image_uuid, self.ssh_file, self.opts['replication_factor'], self.opts['dfs_blocksize'])

        except Exception, e:
            logging.error(str(e.args[0]))
            logging.error('Created cluster and resources will be deleted')
            # If error in Yarn cluster, update cluster status as destroyed
            set_cluster_state(self.opts['token'], self.cluster_id, 'Error', status='Failed', error=str(e.args[0]))
            self.destroy('Failed')
            raise

        finally:
            if self.ssh_file != 'no_ssh_key_selected':
                os.system('rm ' + self.ssh_file)

        return self.HOSTNAME_MASTER_IP, self.server_dict, self.master_root_pass, self.cluster_id