Prepare for adding LattePanda IOTA based cluster hosts.
This required the option to configure the available CPU as nomad assumes that we should only allocate based on the base CPU frequency but the N150 reports 800Mhz base but has a boost frequency more than 4x higher at 3.6GHz which would leave the CPU under utilised, instead we allocate at 1.8GHz (x4 cores).
This commit is contained in:
@@ -16,21 +16,23 @@ provider "template" {}
|
||||
variable "nodes" {
|
||||
description = "Map of nodes with host, password, bind interface, and host volumes"
|
||||
type = map(object({
|
||||
host = string
|
||||
password = string
|
||||
bind_interface = string
|
||||
bootstrap = optional(bool, false) # Optional field for bootstrap nodes
|
||||
host_volumes = list(string)
|
||||
host = string
|
||||
password = string
|
||||
bind_interface = string
|
||||
bootstrap = optional(bool, false) # Optional field for bootstrap nodes
|
||||
cpu_total_compute = optional(number, null) # Optional field for CPU total compute
|
||||
host_volumes = list(string)
|
||||
}))
|
||||
}
|
||||
|
||||
locals {
|
||||
config_files = { for k, v in var.nodes :
|
||||
k => templatefile("${path.module}/configuration.nix", {
|
||||
hostname = v.host
|
||||
bind_interface = v.bind_interface
|
||||
bootstrap = v.bootstrap
|
||||
host_volumes = v.host_volumes
|
||||
hostname = v.host
|
||||
bind_interface = v.bind_interface
|
||||
bootstrap = v.bootstrap
|
||||
cpu_total_compute = v.cpu_total_compute
|
||||
host_volumes = v.host_volumes
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user