Skip to content

Commit

Permalink
Update Matchbox profile to use initramfs and rootfs images
Browse files Browse the repository at this point in the history
* Fedora CoreOS stable (after Oct 6) ships separate initramfs
and rootfs images, used as initrd's
* Update profiles to match the Matchbox examples, which have
already switched to the new profile and to remove the unused
kernel args
* Requires Fedora CoreOS version which ships rootfs images
(e.g. stable 32.20200923.3.0 or later)

Rel:

* coreos/fedora-coreos-tracker#390 (comment)
* poseidon/matchbox@da0df01#diff-4541f7b7c174f6ae6270135942c1c65ed9e09ebe81239709f5a9fb34e858ddcf

Supercedes poseidon#888
  • Loading branch information
dghubble committed Nov 25, 2020
1 parent 3e30f3c commit 677003e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions fedora-coreos/kubernetes/profiles.tf
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
locals {
remote_kernel = "https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-kernel-x86_64"
remote_initrd = "https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img"
remote_initrd = [
"https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img",
"https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img"
]

remote_args = [
"ip=dhcp",
"rd.neednet=1",
"initrd=fedora-coreos-${var.os_version}-live-initramfs.x86_64.img",
"coreos.inst.image_url=https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-metal.x86_64.raw.xz",
"coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"coreos.inst.install_dev=${var.install_disk}",
"coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"coreos.inst.image_url=https://builds.coreos.fedoraproject.org/prod/streams/${var.os_stream}/builds/${var.os_version}/x86_64/fedora-coreos-${var.os_version}-metal.x86_64.raw.xz",
"console=tty0",
"console=ttyS0",
]

cached_kernel = "/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-kernel-x86_64"
cached_initrd = "/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img"
cached_initrd = [
"/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-initramfs.x86_64.img",
"/assets/fedora-coreos/fedora-coreos-${var.os_version}-live-rootfs.x86_64.img"
]

cached_args = [
"ip=dhcp",
"rd.neednet=1",
"initrd=fedora-coreos-${var.os_version}-live-initramfs.x86_64.img",
"coreos.inst.image_url=${var.matchbox_http_endpoint}/assets/fedora-coreos/fedora-coreos-${var.os_version}-metal.x86_64.raw.xz",
"coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"coreos.inst.install_dev=${var.install_disk}",
"coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"coreos.inst.image_url=${var.matchbox_http_endpoint}/assets/fedora-coreos/fedora-coreos-${var.os_version}-metal.x86_64.raw.xz",
"console=tty0",
"console=ttyS0",
]
Expand All @@ -37,9 +43,7 @@ resource "matchbox_profile" "controllers" {
name = format("%s-controller-%s", var.cluster_name, var.controllers.*.name[count.index])

kernel = local.kernel
initrd = [
local.initrd
]
initrd = local.initrd
args = concat(local.args, var.kernel_args)

raw_ignition = data.ct_config.controller-ignitions.*.rendered[count.index]
Expand Down Expand Up @@ -73,9 +77,7 @@ resource "matchbox_profile" "workers" {
name = format("%s-worker-%s", var.cluster_name, var.workers.*.name[count.index])

kernel = local.kernel
initrd = [
local.initrd
]
initrd = local.initrd
args = concat(local.args, var.kernel_args)

raw_ignition = data.ct_config.worker-ignitions.*.rendered[count.index]
Expand Down

0 comments on commit 677003e

Please sign in to comment.