Skip to content

Commit f0adbb0

Browse files
committed
Make instance volume size configurable
1 parent 5d1853e commit f0adbb0

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

cli/cmd/lib_cluster_config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ func confirmClusterConfig(clusterConfig *clusterconfig.ClusterConfig, awsCreds *
219219
if clusterConfig.LogGroup != defaultCC.LogGroup {
220220
items = append(items, table.KV{K: "log group", V: clusterConfig.LogGroup})
221221
}
222+
223+
if clusterConfig.InstanceVolumeSize != defaultCC.InstanceVolumeSize {
224+
items = append(items, table.KV{K: "instance volume size", V: clusterConfig.InstanceVolumeSize})
225+
}
226+
222227
if clusterConfig.Telemetry != defaultCC.Telemetry {
223228
items = append(items, table.KV{K: "telemetry", V: clusterConfig.Telemetry})
224229
}

docs/cluster/config.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ log_group: cortex
3434
# Name of the EKS cluster Cortex will create
3535
cluster_name: cortex
3636

37+
# Volume size for each instance in the cluster (in GiB)
38+
instance_volume_size: 50
39+
3740
# Flag to enable collection of anonymous usage stats and error reports
3841
telemetry: true
3942

manager/eks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ metadata:
2323
nodeGroups:
2424
- name: ng-1
2525
instanceType: $CORTEX_INSTANCE_TYPE
26+
volumeSize: $CORTEX_INSTANCE_VOLUME_SIZE
2627
minSize: $CORTEX_MIN_INSTANCES
2728
maxSize: $CORTEX_MAX_INSTANCES
2829
desiredCapacity: $CORTEX_MIN_INSTANCES

pkg/lib/clusterconfig/clusterconfig.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type ClusterConfig struct {
3737
Region string `json:"region" yaml:"region"`
3838
Bucket string `json:"bucket" yaml:"bucket"`
3939
LogGroup string `json:"log_group" yaml:"log_group"`
40+
InstanceVolumeSize int64 `json:"instance_volume_size" yaml:"instance_volume_size"`
4041
Telemetry bool `json:"telemetry" yaml:"telemetry"`
4142
ImagePredictorServe string `json:"image_predictor_serve" yaml:"image_predictor_serve"`
4243
ImagePredictorServeGPU string `json:"image_predictor_serve_gpu" yaml:"image_predictor_serve_gpu"`
@@ -111,6 +112,14 @@ var Validation = &cr.StructValidation{
111112
Default: "cortex",
112113
},
113114
},
115+
{
116+
StructField: "InstanceVolumeSize",
117+
Int64Validation: &cr.Int64Validation{
118+
Default: 50,
119+
GreaterThanOrEqualTo: pointer.Int64(20), // large enough to fit docker images and any other overhead
120+
LessThanOrEqualTo: pointer.Int64(16384),
121+
},
122+
},
114123
{
115124
StructField: "Telemetry",
116125
BoolValidation: &cr.BoolValidation{
@@ -373,6 +382,7 @@ func (cc *InternalClusterConfig) String() string {
373382
items = append(items, table.KV{K: "region", V: cc.Region})
374383
items = append(items, table.KV{K: "bucket", V: cc.Bucket})
375384
items = append(items, table.KV{K: "log group", V: cc.LogGroup})
385+
items = append(items, table.KV{K: "instance volume size", V: cc.InstanceVolumeSize})
376386
items = append(items, table.KV{K: "telemetry", V: cc.Telemetry})
377387
items = append(items, table.KV{K: "image_predictor_serve", V: cc.ImagePredictorServe})
378388
items = append(items, table.KV{K: "image_predictor_serve_gpu", V: cc.ImagePredictorServeGPU})

0 commit comments

Comments
 (0)