From 7da7a59216bf666d1f19453e78c19cc071c316fd Mon Sep 17 00:00:00 2001 From: supershal Date: Thu, 17 Aug 2023 14:11:06 -0700 Subject: [PATCH 1/2] ci: use base d2iq templates --- .github/workflows/vsphere-e2e.yaml | 24 +++++++++---------- images/ova/rocky-91.yaml | 2 +- pkg/packer/manifests/vsphere/packer.pkr.hcl | 6 ++--- .../vsphere/packer-vsphere-airgap.yaml.tmpl | 4 +--- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/vsphere-e2e.yaml b/.github/workflows/vsphere-e2e.yaml index 391e2c8e5..b37b3ab36 100644 --- a/.github/workflows/vsphere-e2e.yaml +++ b/.github/workflows/vsphere-e2e.yaml @@ -15,21 +15,21 @@ jobs: max-parallel: 3 matrix: os: - - "redhat 7.9" - - "redhat 8.4" - - "redhat 8.6" - - "ubuntu 20.04" + # - "redhat 7.9" + # - "redhat 8.4" + # - "redhat 8.6" + # - "ubuntu 20.04" - "rocky 9.1" buildConfig: - "offline" - - "offline-fips" - exclude: - - os: "ubuntu 20.04" - buildConfig: fips - - os: "ubuntu 20.04" - buildConfig: offline-fips - - os: "rocky 9.1" - buildConfig: offline-fips + # - "offline-fips" + # exclude: + # - os: "ubuntu 20.04" + # buildConfig: fips + # - os: "ubuntu 20.04" + # buildConfig: offline-fips + # - os: "rocky 9.1" + # buildConfig: offline-fips runs-on: - self-hosted - small diff --git a/images/ova/rocky-91.yaml b/images/ova/rocky-91.yaml index 526c1d07a..3becc235b 100644 --- a/images/ova/rocky-91.yaml +++ b/images/ova/rocky-91.yaml @@ -13,7 +13,7 @@ packer: insecure_connection: "false" network: "" resource_pool: "" - template: "os-qualification-templates/d2iq-base-RockyLinux-9.1" # change default value with your base template name + template: "d2iq-base-templates/d2iq-base-RockyLinux-9.1" # change default value with your base template name vsphere_guest_os_type: "other4xLinux64Guest" guest_os_type: "rocky9-64" # goss params diff --git a/pkg/packer/manifests/vsphere/packer.pkr.hcl b/pkg/packer/manifests/vsphere/packer.pkr.hcl index 337c63bc2..b23a02906 100644 --- a/pkg/packer/manifests/vsphere/packer.pkr.hcl +++ b/pkg/packer/manifests/vsphere/packer.pkr.hcl @@ -354,7 +354,7 @@ variable "remote_folder" { default = "/tmp" } -data "sshkey" "kibkey" { +data "sshkey" "temp_kib_key" { name = "konvoy-image-builder-tmpkey" } @@ -378,9 +378,9 @@ locals { ssh_agent_auth = var.ssh_agent_auth != "false" ? true : var.ssh_private_key_file == "" && var.ssh_public_key != "" # inject generated key if no agent auth or private key is given - ssh_private_key_file = var.ssh_private_key_file != "" ? var.ssh_private_key_file : local.ssh_agent_auth ? "" : data.sshkey.kibkey.private_key_path + ssh_private_key_file = var.ssh_private_key_file != "" ? var.ssh_private_key_file : local.ssh_agent_auth ? "" : data.sshkey.temp_kib_key.private_key_path # when ssh_private_key_file uses the generated key inject its public key - ssh_public_key = local.ssh_private_key_file == data.sshkey.kibkey.private_key_path ? data.sshkey.kibkey.public_key : var.ssh_public_key + ssh_public_key = local.ssh_private_key_file == data.sshkey.temp_kib_key.private_key_path ? data.sshkey.temp_kib_key.public_key : var.ssh_public_key # prepare cloud-init cloud_init = < Date: Thu, 17 Aug 2023 16:47:49 -0700 Subject: [PATCH 2/2] ci: set vsphere base templates from d2iq-base-templates directory --- .github/workflows/vsphere-e2e.yaml | 24 ++++++++++----------- images/ova/rhel-79.yaml | 2 +- images/ova/rhel-84.yaml | 2 +- images/ova/rhel-86.yaml | 2 +- images/ova/ubuntu-2004.yaml | 2 +- pkg/packer/manifests/vsphere/packer.pkr.hcl | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/vsphere-e2e.yaml b/.github/workflows/vsphere-e2e.yaml index b37b3ab36..391e2c8e5 100644 --- a/.github/workflows/vsphere-e2e.yaml +++ b/.github/workflows/vsphere-e2e.yaml @@ -15,21 +15,21 @@ jobs: max-parallel: 3 matrix: os: - # - "redhat 7.9" - # - "redhat 8.4" - # - "redhat 8.6" - # - "ubuntu 20.04" + - "redhat 7.9" + - "redhat 8.4" + - "redhat 8.6" + - "ubuntu 20.04" - "rocky 9.1" buildConfig: - "offline" - # - "offline-fips" - # exclude: - # - os: "ubuntu 20.04" - # buildConfig: fips - # - os: "ubuntu 20.04" - # buildConfig: offline-fips - # - os: "rocky 9.1" - # buildConfig: offline-fips + - "offline-fips" + exclude: + - os: "ubuntu 20.04" + buildConfig: fips + - os: "ubuntu 20.04" + buildConfig: offline-fips + - os: "rocky 9.1" + buildConfig: offline-fips runs-on: - self-hosted - small diff --git a/images/ova/rhel-79.yaml b/images/ova/rhel-79.yaml index ae82c34b1..f9609042d 100644 --- a/images/ova/rhel-79.yaml +++ b/images/ova/rhel-79.yaml @@ -13,7 +13,7 @@ packer: insecure_connection: "false" network: "" resource_pool: "" - template: "os-qualification-templates/d2iq-base-RHEL-79" + template: "d2iq-base-templates/d2iq-base-RHEL-79" vsphere_guest_os_type: "rhel7_64Guest" guest_os_type: "rhel7-64" # goss params diff --git a/images/ova/rhel-84.yaml b/images/ova/rhel-84.yaml index b75d177f0..99ddae15f 100644 --- a/images/ova/rhel-84.yaml +++ b/images/ova/rhel-84.yaml @@ -13,7 +13,7 @@ packer: insecure_connection: "false" network: "" resource_pool: "" - template: "os-qualification-templates/d2iq-base-RHEL-84" # change default value with your base template name + template: "d2iq-base-templates/d2iq-base-RHEL-84" # change default value with your base template name vsphere_guest_os_type: "rhel8_64Guest" guest_os_type: "rhel8-64" # goss params diff --git a/images/ova/rhel-86.yaml b/images/ova/rhel-86.yaml index 6d8da5c0e..986014ea4 100644 --- a/images/ova/rhel-86.yaml +++ b/images/ova/rhel-86.yaml @@ -13,7 +13,7 @@ packer: insecure_connection: "false" network: "" resource_pool: "" - template: "os-qualification-templates/d2iq-base-RHEL-86" # change default value with your base template name + template: "d2iq-base-templates/d2iq-base-RHEL-86" # change default value with your base template name vsphere_guest_os_type: "rhel8_64Guest" guest_os_type: "rhel8-64" # goss params diff --git a/images/ova/ubuntu-2004.yaml b/images/ova/ubuntu-2004.yaml index c8f1c3aa8..53aec4e75 100644 --- a/images/ova/ubuntu-2004.yaml +++ b/images/ova/ubuntu-2004.yaml @@ -13,7 +13,7 @@ packer: insecure_connection: "false" network: "" resource_pool: "" - template: "os-qualification-templates/d2iq-base-Ubuntu-20.04" # change default value with your base template name + template: "d2iq-base-templates/d2iq-base-Ubuntu-20.04" # change default value with your base template name vsphere_guest_os_type: "other4xLinux64Guest" guest_os_type: "ubuntu2004-64" # goss params diff --git a/pkg/packer/manifests/vsphere/packer.pkr.hcl b/pkg/packer/manifests/vsphere/packer.pkr.hcl index b23a02906..337c63bc2 100644 --- a/pkg/packer/manifests/vsphere/packer.pkr.hcl +++ b/pkg/packer/manifests/vsphere/packer.pkr.hcl @@ -354,7 +354,7 @@ variable "remote_folder" { default = "/tmp" } -data "sshkey" "temp_kib_key" { +data "sshkey" "kibkey" { name = "konvoy-image-builder-tmpkey" } @@ -378,9 +378,9 @@ locals { ssh_agent_auth = var.ssh_agent_auth != "false" ? true : var.ssh_private_key_file == "" && var.ssh_public_key != "" # inject generated key if no agent auth or private key is given - ssh_private_key_file = var.ssh_private_key_file != "" ? var.ssh_private_key_file : local.ssh_agent_auth ? "" : data.sshkey.temp_kib_key.private_key_path + ssh_private_key_file = var.ssh_private_key_file != "" ? var.ssh_private_key_file : local.ssh_agent_auth ? "" : data.sshkey.kibkey.private_key_path # when ssh_private_key_file uses the generated key inject its public key - ssh_public_key = local.ssh_private_key_file == data.sshkey.temp_kib_key.private_key_path ? data.sshkey.temp_kib_key.public_key : var.ssh_public_key + ssh_public_key = local.ssh_private_key_file == data.sshkey.kibkey.private_key_path ? data.sshkey.kibkey.public_key : var.ssh_public_key # prepare cloud-init cloud_init = <