mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-25 19:59:34 +01:00
bac968d3eb
* Remove k8s_domain_name input variable, the controller DNS record will be "${var.cluster_name}.${dns_zone}" * Rename dns_base_zone to dns_zone * Rename dns_base_zone_name to dns_zone_name
26 lines
707 B
HCL
26 lines
707 B
HCL
# Secure copy bootkube assets to ONE controller and start bootkube to perform
|
|
# one-time self-hosted cluster bootstrapping.
|
|
resource "null_resource" "bootkube-start" {
|
|
depends_on = ["module.controllers", "module.workers", "module.bootkube"]
|
|
|
|
# TODO: SSH to a controller's IP instead of waiting on DNS resolution
|
|
connection {
|
|
type = "ssh"
|
|
host = "${format("%s.%s", var.cluster_name, var.dns_zone)}"
|
|
user = "core"
|
|
timeout = "15m"
|
|
}
|
|
|
|
provisioner "file" {
|
|
source = "${var.asset_dir}"
|
|
destination = "$HOME/assets"
|
|
}
|
|
|
|
provisioner "remote-exec" {
|
|
inline = [
|
|
"sudo mv /home/core/assets /opt/bootkube",
|
|
"sudo systemctl start bootkube",
|
|
]
|
|
}
|
|
}
|