}},
}
- if instanceType.ExtraScratch > 0 {
+ if instanceType.AttachScratch {
rii.BlockDeviceMappings = []*ec2.BlockDeviceMapping{&ec2.BlockDeviceMapping{
DeviceName: aws.String("/dev/xvdt"),
Ebs: &ec2.EbsBlockDevice{
DeleteOnTermination: aws.Bool(true),
- VolumeSize: aws.Int64((int64(instanceType.ExtraScratch) / 1000000000) + 1),
+ VolumeSize: aws.Int64((int64(instanceType.Scratch) / 1000000000) + 1),
VolumeType: aws.String("gp2"),
}}}
}
Preemptible: false,
},
"tiny-with-extra-scratch": arvados.InstanceType{
- Name: "tiny",
- ProviderType: "t2.micro",
- VCPUs: 1,
- RAM: 4000000000,
- Scratch: 10000000000,
- ExtraScratch: 20000000000,
- Price: .02,
- Preemptible: false,
+ Name: "tiny",
+ ProviderType: "t2.micro",
+ VCPUs: 1,
+ RAM: 4000000000,
+ Scratch: 20000000000,
+ Price: .02,
+ Preemptible: false,
+ AttachScratch: true,
},
"tiny-preemptible": arvados.InstanceType{
Name: "tiny",
"git.curoverse.com/arvados.git/lib/cloud"
"git.curoverse.com/arvados.git/lib/cloud/azure"
+ "git.curoverse.com/arvados.git/lib/cloud/ec2"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"github.com/sirupsen/logrus"
)
var drivers = map[string]cloud.Driver{
"azure": azure.Driver,
+ "ec2": ec2.Driver,
}
func newInstanceSet(cluster *arvados.Cluster, setID cloud.InstanceSetID, logger logrus.FieldLogger) (cloud.InstanceSet, error) {
}
type InstanceType struct {
- Name string
- ProviderType string
- VCPUs int
- RAM ByteSize
- Scratch ByteSize
- ExtraScratch ByteSize
- Price float64
- Preemptible bool
+ Name string
+ ProviderType string
+ VCPUs int
+ RAM ByteSize
+ Scratch ByteSize
+ Price float64
+ Preemptible bool
+ AttachScratch bool
}
type Dispatch struct {