From 4008d35abd9ac8bead7a59747381af9a2e7bb8ea Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Wed, 8 Jul 2020 14:23:46 -0400 Subject: [PATCH 1/5] upi/metal: Add pxe_kernel_args, stop using pxe_os_image_url --- upi/metal/config.tf | 8 ++++---- upi/metal/main.tf | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/upi/metal/config.tf b/upi/metal/config.tf index b6435fdb8c0..9ad60e7b2a2 100644 --- a/upi/metal/config.tf +++ b/upi/metal/config.tf @@ -132,13 +132,13 @@ EOF } -variable "pxe_os_image_url" { +variable "pxe_kernel_args" { type = string + default = "" description = < Date: Fri, 10 Jul 2020 15:55:16 -0400 Subject: [PATCH 2/5] upi/metal: Docs updates for liveimage --- docs/user/metal/install_upi.md | 2 ++ upi/metal/terraform.tfvars.example | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/user/metal/install_upi.md b/docs/user/metal/install_upi.md index 7faedd0ecec..2fe08ba120d 100644 --- a/docs/user/metal/install_upi.md +++ b/docs/user/metal/install_upi.md @@ -196,6 +196,8 @@ TODO RHEL CoreOS does not have assets for bare-metal. * `rd.neednet=1`: [CoreOS Installer][coreos-installer] needs internet access to fetch the OS image that needs to be installed on the machine. +* `coreos.inst.image_url`: If you're not using a live image based initrd you will need to specify a [CoreOS Installer][coreos-installer] image. A live image is available starting in 4.6. + * CoreOS Installer [arguments][coreos-installer-args] are required to be configured to install RHCOS and setup the Ignition config file for that machine. ## Watching your installation diff --git a/upi/metal/terraform.tfvars.example b/upi/metal/terraform.tfvars.example index ea3a4faa5c0..c4ce5dab347 100644 --- a/upi/metal/terraform.tfvars.example +++ b/upi/metal/terraform.tfvars.example @@ -8,7 +8,7 @@ bootstrap_ign_file = "" cluster_domain = "" // The number of control plane machines required. -// +// // Since etcd is colocated on control plane machines, suggested number is 3 or 5. // Default: 1 master_count = "1" @@ -17,22 +17,22 @@ master_count = "1" master_ign_file = "" // Client certificate used to authenticate with the matchbox RPC API. -// +// // For more info: https://github.com/coreos/matchbox/blob/master/Documentation/api.md matchbox_client_cert = "matchbox/tls/client.crt" // Client certificate's key used to authenticate with the matchbox RPC API. -// +// // For more info: https://github.com/coreos/matchbox/blob/master/Documentation/api.md matchbox_client_key = "matchbox/tls/client.key" // HTTPS endpoint for matchbox. This must include the scheme -// +// // For more info: https://github.com/coreos/matchbox/blob/master/Documentation/api.md matchbox_http_endpoint = "" // RPC endpoint for matchbox. -// +// // For more info: https://godoc.org/github.com/coreos/matchbox/matchbox/client matchbox_rpc_endpoint = "" @@ -46,22 +46,24 @@ packet_project_id = "" public_r53_zone = "" // URL to the initrd image that should be used to PXE machines. -// +// // This can be a fully-qualified URL or URL relative to matchbox_http_endpoint to use Matchbox assets (https://github.com/coreos/matchbox/blob/master/Documentation/matchbox.md#assets). pxe_initrd_url = "" // URL to the kernel image that should be used to PXE machines. -// +// // This can be a fully-qualified URL or URL relative to matchbox_http_endpoint to use Matchbox assets (https://github.com/coreos/matchbox/blob/master/Documentation/matchbox.md#assets). pxe_kernel_url = "" -// URL to the OS image for RHCOS that should be installed on machines. -// +// PXE Boot Kernel args +// Note, earlier versions of this code relied on a url via pxe_os_image_url, this has been replaced +// with arbitrary kernel arguments which can include coreos.inst.image_url +// // For more info: https://github.com/coreos/coreos-installer#kernel-command-line-options-for-coreos-installer-running-in-the-initramfs -pxe_os_image_url = "" +pxe_kernel_args = "coreos.inst.image_url=https://example.com/image.gz " // The number of worker machines required. -// +// // Default: 1 worker_count = "1" From a53180b05f087335b68bc1cf2591c7228966f503 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Sat, 11 Jul 2020 11:42:12 -0400 Subject: [PATCH 3/5] fix local.kernel_args --- upi/metal/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upi/metal/main.tf b/upi/metal/main.tf index c5ac7c00961..0288924746a 100644 --- a/upi/metal/main.tf +++ b/upi/metal/main.tf @@ -135,7 +135,7 @@ module "bootstrap" { pxe_kernel = local.pxe_kernel pxe_initrd = local.pxe_initrd pxe_kernel_args = concat( - local.pxe_kernel_args, + local.kernel_args, ["${var.pxe_kernel_args}"], ) matchbox_http_endpoint = var.matchbox_http_endpoint From e408a4d4aeb9a65294eba74952eae9e4b093576a Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Mon, 13 Jul 2020 09:10:46 -0400 Subject: [PATCH 4/5] docs suggestions --- docs/user/metal/install_upi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/metal/install_upi.md b/docs/user/metal/install_upi.md index 2fe08ba120d..4f2d0ea75bf 100644 --- a/docs/user/metal/install_upi.md +++ b/docs/user/metal/install_upi.md @@ -196,7 +196,7 @@ TODO RHEL CoreOS does not have assets for bare-metal. * `rd.neednet=1`: [CoreOS Installer][coreos-installer] needs internet access to fetch the OS image that needs to be installed on the machine. -* `coreos.inst.image_url`: If you're not using a live image based initrd you will need to specify a [CoreOS Installer][coreos-installer] image. A live image is available starting in 4.6. +* `coreos.inst.image_url`: Required for versions <= 4.5 only; should be the URL to a CoreOS "metal" image. In 4.6+ the metal image is included in the Live images. * CoreOS Installer [arguments][coreos-installer-args] are required to be configured to install RHCOS and setup the Ignition config file for that machine. From 4bc5a8891132ea034175caf97bff306280959dfa Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Tue, 4 Aug 2020 19:56:23 -0400 Subject: [PATCH 5/5] update w/ Suggestions --- upi/metal/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upi/metal/main.tf b/upi/metal/main.tf index 0288924746a..46b81f589a7 100644 --- a/upi/metal/main.tf +++ b/upi/metal/main.tf @@ -50,7 +50,7 @@ resource "matchbox_profile" "master" { args = concat( local.kernel_args, ["coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?cluster_id=${var.cluster_id}&role=master"], - ["${var.pxe_kernel_args}"], + [var.pxe_kernel_args], ) raw_ignition = file(var.master_ign_file) @@ -67,7 +67,7 @@ resource "matchbox_profile" "worker" { args = concat( local.kernel_args, ["coreos.inst.ignition_url=${var.matchbox_http_endpoint}/ignition?cluster_id=${var.cluster_id}&role=worker"], - ["${var.pxe_kernel_args}"], + [var.pxe_kernel_args], ) raw_ignition = file(var.worker_ign_file) @@ -136,7 +136,7 @@ module "bootstrap" { pxe_initrd = local.pxe_initrd pxe_kernel_args = concat( local.kernel_args, - ["${var.pxe_kernel_args}"], + [var.pxe_kernel_args], ) matchbox_http_endpoint = var.matchbox_http_endpoint igntion_config_content = file(var.bootstrap_ign_file)