mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-01-13 02:39:34 +01:00
d276fffcda
* Terraform v0.11.4 introduced changes to remote-exec that mean Typhoon bare-metal clusters require multiple runs of terraform apply to ssh and bootstrap. * Bare-metal installs PXE boot a live instance to install to disk and then reboot from disk as controllers/workers. Terraform remote-exec has no way to "know" to wait until the reboot has occurred to kickoff Kubernetes bootstrap. Previously Typhoon created a "debug" user during this install phase to allow an admin to SSH, but remote-exec would hang, trying to connect as user "core". Terraform v0.11.4 changes this behavior so remote-exec fails and a user must re-run terraform apply until succeeding. * A new way to "trick" remote-exec into waiting for the reboot into the disk install is to run SSH on a non-standard port during the disk install. This retains the ability for an admin to SSH during install (most distros don't have this) and fixes the issue so only a single run of terraform apply is needed. * https://github.com/hashicorp/terraform/pull/17359#issuecomment-376415464
34 lines
1.2 KiB
HCL
34 lines
1.2 KiB
HCL
// Install Container Linux to disk
|
|
resource "matchbox_group" "container-linux-install" {
|
|
count = "${length(var.controller_names) + length(var.worker_names)}"
|
|
|
|
name = "${format("container-linux-install-%s", element(concat(var.controller_names, var.worker_names), count.index))}"
|
|
profile = "${var.cached_install == "true" ? element(matchbox_profile.cached-container-linux-install.*.name, count.index) : element(matchbox_profile.container-linux-install.*.name, count.index)}"
|
|
|
|
selector {
|
|
mac = "${element(concat(var.controller_macs, var.worker_macs), count.index)}"
|
|
}
|
|
}
|
|
|
|
resource "matchbox_group" "controller" {
|
|
count = "${length(var.controller_names)}"
|
|
name = "${format("%s-%s", var.cluster_name, element(var.controller_names, count.index))}"
|
|
profile = "${element(matchbox_profile.controllers.*.name, count.index)}"
|
|
|
|
selector {
|
|
mac = "${element(var.controller_macs, count.index)}"
|
|
os = "installed"
|
|
}
|
|
}
|
|
|
|
resource "matchbox_group" "worker" {
|
|
count = "${length(var.worker_names)}"
|
|
name = "${format("%s-%s", var.cluster_name, element(var.worker_names, count.index))}"
|
|
profile = "${element(matchbox_profile.workers.*.name, count.index)}"
|
|
|
|
selector {
|
|
mac = "${element(var.worker_macs, count.index)}"
|
|
os = "installed"
|
|
}
|
|
}
|