2023-12-15 16:35:17 +00:00
|
|
|
resource "juju_application" "controller-server" {
|
|
|
|
name = "controller-server"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "ubuntu"
|
2024-05-12 13:43:53 +00:00
|
|
|
channel = var.ubuntu_channel
|
|
|
|
revision = var.ubuntu_revision
|
2024-05-07 19:23:43 +00:00
|
|
|
base = var.default-base
|
2023-12-15 16:35:17 +00:00
|
|
|
}
|
|
|
|
|
2024-05-12 13:43:53 +00:00
|
|
|
units = length(var.controller_ids)
|
|
|
|
|
|
|
|
placement = "${join(",", sort([
|
2024-05-12 20:58:33 +00:00
|
|
|
for index, _ in var.controller_ids :
|
2024-05-12 13:43:53 +00:00
|
|
|
juju_machine.all_machines[index].machine_id
|
|
|
|
]))}"
|
2023-12-15 16:35:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "sysconfig-control" {
|
|
|
|
name = "sysconfig-control"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "sysconfig"
|
2024-05-12 13:43:53 +00:00
|
|
|
channel = var.sysconfig_compute_channel
|
|
|
|
revision = var.sysconfig_compute_revision
|
2023-12-15 16:35:17 +00:00
|
|
|
}
|
|
|
|
|
2024-05-02 20:44:41 +00:00
|
|
|
units = 0
|
|
|
|
|
2023-12-15 16:35:17 +00:00
|
|
|
config = {
|
|
|
|
governor = "performance"
|
|
|
|
enable-pti = "on"
|
|
|
|
update-grub = "true"
|
|
|
|
enable-tsx = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "control-sysconfig" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.sysconfig-control.name
|
2023-12-15 16:35:17 +00:00
|
|
|
endpoint = "juju-info"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.controller-server.name
|
2023-12-15 16:35:17 +00:00
|
|
|
endpoint = "juju-info"
|
|
|
|
}
|
|
|
|
}
|