Skip to content

Fix the hardcoded us-east-1 region in clusters.go #27

@tnachen

Description

@tnachen

Currently in clusters.go we hard coded us-east-1:

`
// TODO: We assume region is us-east-1 and we assume Kubernetes only.
clusterDefinition := &deployer.ClusterDefinition{
Nodes: jobDeploymentConfig.GetNodes(),
}

    deployment := &deployer.Deployment{
            Region:            "us-east-1",
            Name:              "workload-profiler-" + applicationConfig.Name,
            NodeMapping:       []deployer.NodeMapping{},
            ClusterDefinition: *clusterDefinition,
            KubernetesDeployment: &deployer.KubernetesDeployment{
                    Kubernetes: []deployer.KubernetesTask{},
            },
    }

`
We are able to look up the region using the ec2metadata service (Refer to aws_sizing.go for example). We should call it once to get the region and az, and pass it to clusters.go and also aws sizing if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions