'Launches cluster using flat-rate instances. This method attempts to
minimize the number of launch requests by grouping nodes of the same
type/ami and launching each group simultaneously within a single launch
request. This is especially important for Cluster Compute instances
given that Amazon *highly* recommends requesting all CCI in a single
launch request.'

def _create_flat_rate_cluster(self):

    lmap = self._get_launch_map()
    zone = None
    insts = []
    master_alias = self._make_alias(master=True)
    (itype, image) = [i for i in lmap if (master_alias in lmap[i])][0]
    aliases = lmap.get((itype, image))
    for alias in aliases:
        log.debug(('Launching    %s    (ami:    %s,    type:    %s)' % (alias, image, itype)))
    master_response = self.create_nodes(aliases, image_id=image, instance_type=itype, force_flat=True)[0]
    zone = master_response.instances[0].placement
    insts.extend(master_response.instances)
    lmap.pop((itype, image))
    for (itype, image) in lmap:
        aliases = lmap.get((itype, image))
        if (not aliases):
            continue
        for alias in aliases:
            log.debug(('Launching    %s    (ami:    %s,    type:    %s)' % (alias, image, itype)))
        resv = self.create_nodes(aliases, image_id=image, instance_type=itype, zone=zone, force_flat=True)
        insts.extend(resv[0].instances)
    self.ec2.wait_for_propagation(instances=insts)
