예제 #1
0
    def __init__(self, spec):
        super(EksCluster, self).__init__(spec)
        self.zones = sorted(FLAGS.eks_zones)
        self.zone = ','.join(self.zones)
        self.region = util.GetRegionFromZone(self.zones[0])

        self.networks = [
            aws_network.AwsNetwork.GetNetworkFromNetworkSpec(
                network.BaseNetworkSpec(zone)) for zone in self.zones
        ]
        self.eks_control_plane = _EksControlPlane(self.name, self.region,
                                                  self.networks)
        self.eks_workers = _EksWorkers('%s-worker-nodes' % self.name,
                                       self.region)
예제 #2
0
 def __init__(self, dpb_service_spec):
     super(AwsDpbEmr, self).__init__(dpb_service_spec)
     self.dpb_service_type = AwsDpbEmr.SERVICE_TYPE
     self.project = None
     self.cmd_prefix = list(util.AWS_PREFIX)
     if self.dpb_service_zone:
         region = util.GetRegionFromZone(self.dpb_service_zone)
         self.cmd_prefix += ['--region', region]
         self.network = aws_network.AwsNetwork.GetNetworkFromNetworkSpec(
             network.BaseNetworkSpec(zone=self.dpb_service_zone))
     else:
         raise errors.Setup.InvalidSetupError(
             'dpb_service_zone must be provided, for provisioning.')
     self.bucket_to_delete = None
     self.dpb_version = FLAGS.dpb_emr_release_label
 def network(self):
     network_spec = network.BaseNetworkSpec(self.zone)
     return azure_network.AzureNetwork.GetNetworkFromNetworkSpec(
         network_spec)
 def network(self):
   network_spec = network.BaseNetworkSpec(self.zone)
   return aws_network.AwsNetwork.GetNetworkFromNetworkSpec(network_spec)