Compare commits
No commits in common. "4d414c88f01ec29375c3e24b020405aa42e7b650" and "788136f4a825a9a9f2d5c540c609100d3a870716" have entirely different histories.
4d414c88f0
...
788136f4a8
4 changed files with 104 additions and 59 deletions
|
@ -1,11 +1,11 @@
|
|||
init:
|
||||
tofu init
|
||||
terraform init
|
||||
|
||||
plan:
|
||||
tofu plan -out tfplan
|
||||
terraform plan -out tfplan
|
||||
|
||||
apply:plan
|
||||
tofu apply tfplan
|
||||
terraform apply tfplan
|
||||
|
||||
refresh:plan
|
||||
tofu apply tfplan -refresh-only
|
||||
terraform apply tfplan -refresh-only
|
||||
|
|
|
@ -20,23 +20,23 @@ locals {
|
|||
# ignition = data.ignition_config.worker.rendered
|
||||
# }
|
||||
|
||||
#resource "matchbox_profile" "worker" {
|
||||
# name = "worker"
|
||||
# kernel = local.kernel
|
||||
# initrd = [
|
||||
# "--name main ${local.initrd}"
|
||||
# ]
|
||||
# args = [
|
||||
# "ip=dhcp",
|
||||
# "initrd=main",
|
||||
# "coreos.live.rootfs_url=${local.rootfs}",
|
||||
# "coreos.inst.install_dev=/dev/vda",
|
||||
# "coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
|
||||
# "console=tty0",
|
||||
# "console=ttyS0",
|
||||
# ]
|
||||
# raw_ignition = data.ignition_config.worker.rendered
|
||||
#}
|
||||
resource "matchbox_profile" "worker" {
|
||||
name = "worker"
|
||||
kernel = local.kernel
|
||||
initrd = [
|
||||
"--name main ${local.initrd}"
|
||||
]
|
||||
args = [
|
||||
"ip=dhcp",
|
||||
"initrd=main",
|
||||
"coreos.live.rootfs_url=${local.rootfs}",
|
||||
"coreos.inst.install_dev=/dev/vda",
|
||||
"coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
|
||||
"console=tty0",
|
||||
"console=ttyS0",
|
||||
]
|
||||
raw_ignition = data.ignition_config.worker.rendered
|
||||
}
|
||||
|
||||
resource "matchbox_profile" "nuc" {
|
||||
name = "nuc"
|
||||
|
@ -67,25 +67,25 @@ resource "matchbox_group" "nuc" {
|
|||
}
|
||||
}
|
||||
|
||||
#resource "matchbox_group" "slowworker" {
|
||||
# for_each = var.slowworkers
|
||||
#
|
||||
# name = each.key
|
||||
# profile = matchbox_profile.worker.name
|
||||
# selector = {
|
||||
# mac = each.value
|
||||
# }
|
||||
#
|
||||
#}
|
||||
resource "matchbox_group" "slowworker" {
|
||||
for_each = var.slowworkers
|
||||
|
||||
#resource "matchbox_group" "worker" {
|
||||
# name = "worker"
|
||||
# profile = matchbox_profile.worker.name
|
||||
# selector = {
|
||||
# mac = "52:54:00:c3:51:e8"
|
||||
# }
|
||||
#
|
||||
#}
|
||||
name = each.key
|
||||
profile = matchbox_profile.worker.name
|
||||
selector = {
|
||||
mac = each.value
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
resource "matchbox_group" "worker" {
|
||||
name = "worker"
|
||||
profile = matchbox_profile.worker.name
|
||||
selector = {
|
||||
mac = "52:54:00:c3:51:e8"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data "ignition_user" "core" {
|
||||
name = "core"
|
||||
|
@ -95,23 +95,23 @@ data "ignition_user" "core" {
|
|||
var.ssh_authorized_key
|
||||
]
|
||||
}
|
||||
#
|
||||
#data "ignition_config" "worker" {
|
||||
# users = [
|
||||
# data.ignition_user.core.rendered
|
||||
# ]
|
||||
# systemd = [
|
||||
# data.ignition_systemd_unit.qemu_ga.rendered,
|
||||
# data.ignition_systemd_unit.k3s_install.rendered,
|
||||
# data.ignition_systemd_unit.worker-images-clean-service.rendered,
|
||||
# data.ignition_systemd_unit.worker-images-clean-timer.rendered
|
||||
# ]
|
||||
# files = [
|
||||
# data.ignition_file.worker-options.rendered,
|
||||
# data.ignition_file.k3s_agent_install_script.rendered,
|
||||
# data.ignition_file.worker-images-clean.rendered
|
||||
# ]
|
||||
#}
|
||||
|
||||
data "ignition_config" "worker" {
|
||||
users = [
|
||||
data.ignition_user.core.rendered
|
||||
]
|
||||
systemd = [
|
||||
data.ignition_systemd_unit.qemu_ga.rendered,
|
||||
data.ignition_systemd_unit.k3s_install.rendered,
|
||||
data.ignition_systemd_unit.worker-images-clean-service.rendered,
|
||||
data.ignition_systemd_unit.worker-images-clean-timer.rendered
|
||||
]
|
||||
files = [
|
||||
data.ignition_file.worker-options.rendered,
|
||||
data.ignition_file.k3s_agent_install_script.rendered,
|
||||
data.ignition_file.worker-images-clean.rendered
|
||||
]
|
||||
}
|
||||
data "ignition_config" "nuc" {
|
||||
users = [
|
||||
data.ignition_user.core.rendered
|
||||
|
|
45
10-pre-k8s/talos.tf
Normal file
45
10-pre-k8s/talos.tf
Normal file
|
@ -0,0 +1,45 @@
|
|||
resource "matchbox_profile" "talos-controlplane" {
|
||||
name = "talos-controlplane"
|
||||
kernel = "http://matchbox.lab.cowley.tech:8080/assets/talos/1.6.2/vmlinuz-amd64"
|
||||
initrd = [
|
||||
"http://matchbox.lab.cowley.tech:8080/assets/talos/1.6.2/initramfs-amd64.xz"
|
||||
]
|
||||
args = [
|
||||
"initrd=initramfs.xz",
|
||||
"init_on_alloc=1",
|
||||
"slab_nomerge",
|
||||
"pti=on",
|
||||
"console=tty0",
|
||||
"console=ttyS0",
|
||||
"printk.devkmsg=on",
|
||||
"talos.platform=metal",
|
||||
"talos.config=http://matchbox.lab.cowley.tech:8080/assets/talos/controlplane.yaml"
|
||||
]
|
||||
}
|
||||
|
||||
resource "matchbox_profile" "talos-worker" {
|
||||
name = "talos-worker"
|
||||
kernel = "http://matchbox.lab.cowley.tech:8080/assets/talos/1.6.2/vmlinuz-amd64"
|
||||
initrd = [
|
||||
"http://matchbox.lab.cowley.tech:8080/assets/talos/1.6.2/initramfs-amd64.xz"
|
||||
]
|
||||
args = [
|
||||
"initrd=initramfs.xz",
|
||||
"init_on_alloc=1",
|
||||
"slab_nomerge",
|
||||
"pti=on",
|
||||
"console=tty0",
|
||||
"console=ttyS0",
|
||||
"printk.devkmsg=on",
|
||||
"talos.platform=metal",
|
||||
"talos.config=http://matchbox.lab.cowley.tech:8080/assets/talos/worker.yaml"
|
||||
]
|
||||
}
|
||||
|
||||
resource "matchbox_group" "controlplane" {
|
||||
name = "controlplane"
|
||||
profile = matchbox_profile.talos-controlplane.name
|
||||
selector = {
|
||||
mac = "52:54:00:25:b2:8e"
|
||||
}
|
||||
}
|
|
@ -2,8 +2,8 @@ matchbox_http_endpoint = "http://192.168.6.3:8080"
|
|||
matchbox_rpc_endpoint = "192.168.6.3:8081"
|
||||
#matchbox_http_endpoint = "http://matchbox.lab.cowley.tech:8080"
|
||||
#matchbox_rpc_endpoint = "matchbox.lab.cowley.tech:8081"
|
||||
#os_version = "39.20240104.3.0"
|
||||
os_version = "41.20250331.3.0"
|
||||
#os_version = "38.20231027.3.2"
|
||||
os_version = "39.20240104.3.0"
|
||||
os_stream = "stable"
|
||||
ssh_authorized_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMEpF8xS30j9n1a+0FegDYkDis8yHy2ZCj3gvWXmeu5z ccowley@pxe.lab.cowley.tech"
|
||||
nucs = {
|
||||
|
|
Loading…
Add table
Reference in a new issue