-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make worker node volume type and IOPS configurable #592
Comments
hi, I'm currently looking at this. Do you also want to update the pricing depending on the storage type or is the price just a rough guidance? |
@tthebst awesome! Yes, we would like to update the cluster pricing depending on the storage type if that's feasible. Good catch! Here is where we add it to the CLI output: https://github.com/cortexlabs/cortex/blob/master/cli/cmd/lib_cluster_config.go#L296 That pulls from this file: Which is generated by running this file: So the path to take would probably be to modify Does that all make sense? Let us know if you have any other questions! |
@tthebst Sorry, I just assumed that the pricing data would be there, but I did not confirm! At first I couldn't find it, but after digging in a bit more, I may have found it (I have not cross-referenced with the AWS web console). I found this in the JSON: "ZS6E9ESZZKGW2ZVG" : {
"sku" : "ZS6E9ESZZKGW2ZVG",
"productFamily" : "System Operation",
"attributes" : {
"servicecode" : "AmazonEC2",
"location" : "US West (Oregon)",
"locationType" : "AWS Region",
"provisioned" : "Yes",
"group" : "EBS IOPS",
"groupDescription" : "IOPS",
"usagetype" : "USW2-EBS:VolumeP-IOPS.piops",
"operation" : "",
"servicename" : "Amazon Elastic Compute Cloud",
"volumeApiName" : "io1"
}
}, The SKU can be used to find this in the json: "ZS6E9ESZZKGW2ZVG" : {
"ZS6E9ESZZKGW2ZVG.JRTCKXETXF" : {
"offerTermCode" : "JRTCKXETXF",
"sku" : "ZS6E9ESZZKGW2ZVG",
"effectiveDate" : "2020-04-01T00:00:00Z",
"priceDimensions" : {
"ZS6E9ESZZKGW2ZVG.JRTCKXETXF.6YS6EN2CT7" : {
"rateCode" : "ZS6E9ESZZKGW2ZVG.JRTCKXETXF.6YS6EN2CT7",
"description" : "$0.065 per IOPS-month provisioned - US West (Oregon)",
"beginRange" : "0",
"endRange" : "Inf",
"unit" : "IOPS-Mo",
"pricePerUnit" : {
"USD" : "0.0650000000"
},
"appliesTo" : [ ]
}
},
"termAttributes" : { }
}
}, Is that the data you are looking for? If so, feel free to add whichever attribute filters you think make sense to find the SKU, similar to how we filter for the other products. |
Oh, thanks for the headsup. I searched under storage. |
I'm currently encountering an issue. I generated a new resource metadata file, which works. I'm now working on the config validations. I generated the metadata file such that the IOPS pricing is zero for all storages expect io1 and standard. Now when i want to validate volume_iops this depends on volume_type. With the current validation system, it is not possible to reference other config values in the validation except the one to be validated. I don't really know where the best place to validate volume_iops. Do you have any opinion on this?
Tim |
@tthebst I'm glad you reached out! I've given it some thought, and I think this could make sense regarding the fields: instance_volume_size: 50 # already exists
instance_volume_type: general_purpose # or gp2 if you prefer the short hand
instance_volume_iops: 3000 # only applicable for instance_volume_type: provisioned_iops On the go side of things,
Does that make sense? |
@deliahu I'm now finalizing the changes. Just one more thing. The manager node I assume should still use "gp2" as storgage type. Is this correct? Also where do you write your tests? Tim |
@tthebst Awesome, I'm looking forward to checking it out! Yes, let's stick with gp2 for the manager node. Go tests are in the same directory as the source files, and in our case we've been keeping them in the same package too. We don't have full test coverage (especially on the relevant code for this PR), but here is an example of one of our tests if you'd like to add one: https://github.com/cortexlabs/cortex/blob/master/pkg/lib/zip/zip_test.go |
Description
Allow users to configure worker node volume type and IOPS in
cluster.yaml
. Potential field names can bevolume_type
andvolume_iops
.The text was updated successfully, but these errors were encountered: