{Name: "a1.tiny", Price: 0.02, RAM: 128000000, VCPUs: 1},
{Name: "a1.small", Price: 0.04, RAM: 256000000, VCPUs: 2},
{Name: "a1.medium", Price: 0.08, RAM: 512000000, VCPUs: 4},
+ {Name: "a1.large", Price: 0.16, RAM: 1024000000, VCPUs: 8},
},
- sbatchArgs: []string{"--constraint=instancetype=a1.small"},
+ sbatchArgs: []string{"--constraint=instancetype=a1.medium"},
},
// No node types configured => no slurm constraint
{
var (
ErrConstraintsNotSatisfiable = errors.New("constraints not satisfiable by any configured instance type")
ErrInstanceTypesNotConfigured = errors.New("site configuration does not list any instance types")
+ discountConfiguredRAMPercent = 5
)
// ChooseInstanceType returns the cheapest available
needVCPUs := ctr.RuntimeConstraints.VCPUs
needRAM := ctr.RuntimeConstraints.RAM + ctr.RuntimeConstraints.KeepCacheRAM
+ needRAM = needRAM * 100 / int64(100-discountConfiguredRAMPercent)
+
if len(cc.InstanceTypes) == 0 {
err = ErrInstanceTypesNotConfigured
return