Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions pkg/node/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var InstanceCores = map[string]int{
"c3.xlarge": 4,
"c3.2xlarge": 8,
"c3.4xlarge": 16,
"c3.8xlarge": 32,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that 32 is the correct number of cores: https://ec2instances.info/?selected=c3.8xlarge

"c3.8xlarge": 36,
"c4.large": 2,
"c4.xlarge": 4,
"c4.2xlarge": 8,
Expand All @@ -43,13 +43,16 @@ var InstanceCores = map[string]int{
"c5.12xlarge": 48,
"c5.18xlarge": 72,
"c5.24xlarge": 96,
"c5.metal": 96,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"c5.metal": 72,
"c5d.large": 2,
"c5d.xlarge": 4,
"c5d.2xlarge": 8,
"c5d.4xlarge": 16,
"c5d.9xlarge": 36,
"c5d.12xlarge": 48,
"c5d.18xlarge": 72,
"c5d.24xlarge": 96,
"c5d.metal": 72,
"c5n.large": 2,
"c5n.xlarge": 4,
"c5n.2xlarge": 8,
Expand Down Expand Up @@ -82,7 +85,7 @@ var InstanceCores = map[string]int{
"h1.4xlarge": 16,
"h1.8xlarge": 32,
"h1.16xlarge": 64,
"hs1.8xlarge": 17,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"hs1.8xlarge": 16,
"i2.xlarge": 4,
"i2.2xlarge": 8,
"i2.4xlarge": 16,
Expand All @@ -102,6 +105,10 @@ var InstanceCores = map[string]int{
"i3en.12xlarge": 48,
"i3en.24xlarge": 96,
"i3en.metal": 64,
"inf1.xlarge": 4,
"inf1.2xlarge": 8,
"inf1.6xlarge": 24,
"inf1.24xlarge": 96,
"m1.small": 1,
"m1.medium": 1,
"m1.large": 2,
Expand Down Expand Up @@ -310,7 +317,10 @@ var InstanceMemory = map[string]int{
"c5d.2xlarge": 16384,
"c5d.4xlarge": 32768,
"c5d.9xlarge": 73728,
"c5d.12xlarge": 98304,
"c5d.18xlarge": 147456,
"c5d.24xlarge": 196608,
"c5d.metal": 196608,
"c5n.large": 5376,
"c5n.xlarge": 10752,
"c5n.2xlarge": 21504,
Expand Down Expand Up @@ -363,6 +373,10 @@ var InstanceMemory = map[string]int{
"i3en.12xlarge": 393216,
"i3en.24xlarge": 786432,
"i3en.metal": 786432,
"inf1.xlarge": 8192,
"inf1.2xlarge": 16384,
"inf1.6xlarge": 49152,
"inf1.24xlarge": 196608,
"m1.small": 1740,
"m1.medium": 3840,
"m1.large": 7680,
Expand Down Expand Up @@ -430,7 +444,7 @@ var InstanceMemory = map[string]int{
"m5n.24xlarge": 393216,
"p2.xlarge": 62464,
"p2.8xlarge": 499712,
"p2.16xlarge": 786432,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"p2.16xlarge": 749568,
"p3.2xlarge": 62464,
"p3.8xlarge": 249856,
"p3.16xlarge": 499712,
Expand Down Expand Up @@ -571,7 +585,10 @@ var InstanceENIsAvailable = map[string]int{
"c5d.2xlarge": 4,
"c5d.4xlarge": 8,
"c5d.9xlarge": 8,
"c5d.12xlarge": 8,
"c5d.18xlarge": 15,
"c5d.24xlarge": 15,
"c5d.metal": 15,
"c5n.large": 3,
"c5n.xlarge": 4,
"c5n.2xlarge": 4,
Expand Down Expand Up @@ -624,6 +641,10 @@ var InstanceENIsAvailable = map[string]int{
"i3en.12xlarge": 8,
"i3en.24xlarge": 15,
"i3en.metal": 15,
"inf1.xlarge": 4,
"inf1.2xlarge": 4,
"inf1.6xlarge": 8,
"inf1.24xlarge": 15,
"m1.small": 2,
"m1.medium": 2,
"m1.large": 3,
Expand Down Expand Up @@ -832,7 +853,10 @@ var InstanceIPsAvailable = map[string]int{
"c5d.2xlarge": 15,
"c5d.4xlarge": 30,
"c5d.9xlarge": 30,
"c5d.12xlarge": 30,
"c5d.18xlarge": 50,
"c5d.24xlarge": 50,
"c5d.metal": 50,
"c5n.large": 10,
"c5n.xlarge": 15,
"c5n.2xlarge": 15,
Expand Down Expand Up @@ -885,6 +909,10 @@ var InstanceIPsAvailable = map[string]int{
"i3en.12xlarge": 30,
"i3en.24xlarge": 50,
"i3en.metal": 50,
"inf1.xlarge": 10,
"inf1.2xlarge": 10,
"inf1.6xlarge": 30,
"inf1.24xlarge": 50,
"m1.small": 4,
"m1.medium": 6,
"m1.large": 10,
Expand Down
14 changes: 13 additions & 1 deletion pkg/node/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

instance_types = {}

uri = URI("https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html")
uri = URI("https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.partial.html")
doc = Nokogiri::HTML(Net::HTTP.get(uri))
table = doc.css(".table-contents table")
table.css("tr").each do |row|
Expand Down Expand Up @@ -67,6 +67,7 @@
# addresses on the interface, we recommend using a maximum of 31 IP addresses
# per interface.


instance_types["f1.16xlarge"][:ip] = 31
instance_types["g3.16xlarge"][:ip] = 31
instance_types["h1.16xlarge"][:ip] = 31
Expand All @@ -76,11 +77,22 @@
# Manually fixup memory for some metal instances that are not reported
# correctly by the API
#
instance_types["a1.metal"][:memory] = 32 * 1024
instance_types["i3.metal"][:memory] = 512 * 1024
instance_types["i3en.metal"][:memory] = 768 * 1024
instance_types["r5.metal"][:memory] = 768 * 1024
instance_types["m5.metal"][:memory] = 384 * 1024
instance_types["c5.metal"][:memory] = 192 * 1024
instance_types["r5d.metal"][:memory] = 768 * 1024
instance_types["c5n.metal"][:memory] = 192 * 1024
instance_types["c5d.metal"][:memory] = 192 * 1024
instance_types["m5d.metal"][:memory] = 384 * 1024
instance_types["z1d.metal"][:memory] = 384 * 1024
instance_types["u-6tb1.metal"][:memory] = 6291456
instance_types["u-9tb1.metal"][:memory] = 9437184
instance_types["u-12tb1.metal"][:memory] = 12582912
instance_types["u-18tb1.metal"][:memory] = 18874368
instance_types["u-24tb1.metal"][:memory] = 25165824

file.puts "var InstanceCores = map[string]int{"
instance_types.each do |type, info|
Expand Down