Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: copy uki to installer #10128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 94 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-12-26T15:20:08Z by kres fcff05e.
# Generated on 2025-01-14T13:54:20Z by kres fcff05e.

name: default
concurrency:
Expand Down Expand Up @@ -3453,6 +3453,99 @@ jobs:
/tmp/logs-*.tar.gz
/tmp/support-*.zip
retention-days: "5"
integration-uki:
permissions:
actions: read
contents: write
issues: read
packages: write
pull-requests: read
runs-on:
- self-hosted
- talos
if: contains(fromJSON(needs.default.outputs.labels), 'integration/uki')
needs:
- default
steps:
- name: gather-system-info
id: system-info
uses: kenchan0130/[email protected]
continue-on-error: true
- name: print-system-info
run: |
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))

OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"NodeName: ${NODE_NAME}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory: ${MEMORY_GB} GB"
)

for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
done
continue-on-error: true
- name: checkout
uses: actions/checkout@v4
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
timeout-minutes: 10
- name: Download artifacts
if: github.event_name != 'schedule'
uses: actions/download-artifact@v4
with:
name: talos-artifacts
path: _out
- name: Fix artifact permissions
if: github.event_name != 'schedule'
run: |
xargs -a _out/executable-artifacts -I {} chmod +x {}
- name: ci-temp-release-tag
if: github.event_name != 'schedule'
run: |
make ci-temp-release-tag
- name: build
if: github.event_name == 'schedule'
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
PLATFORM: linux/amd64
PUSH: "true"
run: |
make talosctl-linux-amd64 installer imager _out/integration-test-linux-amd64
- name: talosctl-cni-bundle
if: github.event_name == 'schedule'
run: |
make talosctl-cni-bundle
- name: integration-uki
env:
GITHUB_STEP_NAME: ${{ github.job}}-integration-uki
IMAGE_REGISTRY: registry.dev.siderolabs.io
WITH_UKI: "true"
run: |
sudo -E make e2e-qemu
- name: save artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: talos-logs-integration-uki
path: |-
/tmp/logs-*.tar.gz
/tmp/support-*.zip
retention-days: "5"
push:
permissions:
actions: read
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/integration-uki-cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2025-01-14T13:54:20Z by kres fcff05e.

name: integration-uki-cron
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
"on":
schedule:
- cron: 30 3 * * *
jobs:
default:
runs-on:
- self-hosted
- talos
steps:
- name: gather-system-info
id: system-info
uses: kenchan0130/[email protected]
continue-on-error: true
- name: print-system-info
run: |
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))

OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"NodeName: ${NODE_NAME}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory: ${MEMORY_GB} GB"
)

for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
done
continue-on-error: true
- name: checkout
uses: actions/checkout@v4
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
timeout-minutes: 10
- name: Download artifacts
if: github.event_name != 'schedule'
uses: actions/download-artifact@v4
with:
name: talos-artifacts
path: _out
- name: Fix artifact permissions
if: github.event_name != 'schedule'
run: |
xargs -a _out/executable-artifacts -I {} chmod +x {}
- name: ci-temp-release-tag
if: github.event_name != 'schedule'
run: |
make ci-temp-release-tag
- name: build
if: github.event_name == 'schedule'
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
PLATFORM: linux/amd64
PUSH: "true"
run: |
make talosctl-linux-amd64 installer imager _out/integration-test-linux-amd64
- name: talosctl-cni-bundle
if: github.event_name == 'schedule'
run: |
make talosctl-cni-bundle
- name: integration-uki
env:
GITHUB_STEP_NAME: ${{ github.job}}-integration-uki
IMAGE_REGISTRY: registry.dev.siderolabs.io
WITH_UKI: "true"
run: |
sudo -E make e2e-qemu
- name: save artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: talos-logs-integration-uki
path: |-
/tmp/logs-*.tar.gz
/tmp/support-*.zip
retention-days: "5"
3 changes: 2 additions & 1 deletion .github/workflows/slack-notify.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-12-26T15:20:08Z by kres fcff05e.
# Generated on 2025-01-14T13:54:20Z by kres fcff05e.

name: slack-notify
"on":
Expand All @@ -10,6 +10,7 @@ name: slack-notify
- integration-qemu-cron
- integration-conformance-cron
- integration-trusted-boot-cron
- integration-uki-cron
- integration-provision-0-cron
- integration-provision-1-cron
- integration-provision-2-cron
Expand Down
52 changes: 52 additions & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
- e2e-docker-short
- integration-qemu
- integration-trusted-boot
- integration-uki
- integration-provision-0
- integration-provision-1
- integration-provision-2
Expand Down Expand Up @@ -470,6 +471,57 @@ spec:
artifactPath: /tmp/logs-*.tar.gz
additionalArtifacts:
- "/tmp/support-*.zip"
- name: integration-uki
buildxOptions:
enabled: true
depends:
- default
runners:
- self-hosted
- talos
crons:
- '30 3 * * *'
triggerLabels:
- integration/uki
steps:
- name: download-artifacts
conditions:
- not-on-schedule
artifactStep:
type: download
artifactName: talos-artifacts
artifactPath: _out
- name: ci-temp-release-tag
conditions:
- not-on-schedule
- name: build
conditions:
- only-on-schedule
command: talosctl-linux-amd64 installer imager _out/integration-test-linux-amd64
environment:
PLATFORM: linux/amd64
IMAGE_REGISTRY: registry.dev.siderolabs.io
PUSH: true
- name: talosctl-cni-bundle
conditions:
- only-on-schedule
- name: integration-uki
command: e2e-qemu
withSudo: true
environment:
GITHUB_STEP_NAME: ${{ github.job}}-integration-uki
WITH_UKI: true
IMAGE_REGISTRY: registry.dev.siderolabs.io
- name: save-talos-logs
conditions:
- always
artifactStep:
type: upload
artifactName: talos-logs-integration-uki
disableExecutableListGeneration: true
artifactPath: /tmp/logs-*.tar.gz
additionalArtifacts:
- "/tmp/support-*.zip"
- name: integration-provision-0
buildxOptions:
enabled: true
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ image-%: ## Builds the specified image. Valid options are aws, azure, digital-oc
docker run --rm -t -v /dev:/dev -v $(PWD)/$(ARTIFACTS):/secureboot:ro -v $(PWD)/$(ARTIFACTS):/out -e SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) --network=host --privileged $(REGISTRY_AND_USERNAME)/imager:$(IMAGE_TAG) $* --arch $$arch $(IMAGER_ARGS) ; \
done

images-essential: image-aws image-azure image-gcp image-metal secureboot-installer ## Builds only essential images used in the CI (AWS, GCP, and Metal).
images-essential: image-aws image-azure image-gcp image-metal image-metal-uki uki-installer secureboot-installer ## Builds only essential images used in the CI (AWS, GCP, and Metal).

images: image-akamai image-aws image-azure image-digital-ocean image-exoscale image-cloudstack image-gcp image-hcloud image-iso image-metal image-nocloud image-opennebula image-openstack image-oracle image-scaleway image-upcloud image-vmware image-vultr ## Builds all known images (AWS, Azure, DigitalOcean, Exoscale, Cloudstack, GCP, HCloud, Metal, NoCloud, OpenNebula, OpenStack, Oracle, Scaleway, UpCloud, Vultr and VMware).

Expand Down Expand Up @@ -602,6 +602,11 @@ provision-tests-track-%:
REGISTRY=$(IMAGE_REGISTRY) \
ARTIFACTS=$(ARTIFACTS)

uki-installer:
$(MAKE) image-installer \
IMAGER_ARGS="--extra-kernel-arg=console=ttyS0"
crane push $(ARTIFACTS)/installer-$${arch}.tar $(REGISTRY_AND_USERNAME)/installer:$(IMAGE_TAG)-$${arch}-uki ; \

installer-with-extensions: $(ARTIFACTS)/extensions/_out/extensions-metadata
$(MAKE) image-installer \
IMAGER_ARGS="--base-installer-image=$(REGISTRY_AND_USERNAME)/installer:$(IMAGE_TAG) $(shell cat $(ARTIFACTS)/extensions/_out/extensions-metadata | $(EXTENSIONS_FILTER_COMMAND) | xargs -n 1 echo --system-extension-image)"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/talos

go 1.23.3
go 1.23.4

replace (
// see e.g. https://github.com/grpc/grpc-go/issues/6696
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.23.3
go 1.23.4

use (
.
Expand Down
9 changes: 9 additions & 0 deletions hack/test/e2e-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ case "${WITH_IOMMU:-false}" in
;;
esac

case "${WITH_UKI:-false}" in
false)
;;
*)
INSTALLER_IMAGE=${INSTALLER_IMAGE}-amd64-uki
QEMU_FLAGS+=("--uki-path=_out/metal-amd64-uki.efi")
;;
esac

function create_cluster {
build_registry_mirrors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package options
import (
"fmt"

"github.com/foxboron/go-uefi/efi"
"github.com/siderolabs/go-blockdevice/v2/blkid"

"github.com/siderolabs/talos/pkg/machinery/constants"
Expand Down Expand Up @@ -63,6 +64,8 @@ type BootAssets struct {
}

// FillDefaults fills in default paths to be used when in the context of the installer.
//
//nolint:gocyclo
func (assets *BootAssets) FillDefaults(arch string) {
if assets.KernelPath == "" {
assets.KernelPath = fmt.Sprintf(constants.KernelAssetPath, arch)
Expand All @@ -74,6 +77,10 @@ func (assets *BootAssets) FillDefaults(arch string) {

if assets.UKIPath == "" {
assets.UKIPath = fmt.Sprintf(constants.UKIAssetPath, arch)

if efi.GetSecureBoot() && !efi.GetSetupMode() {
assets.UKIPath = fmt.Sprintf(constants.SignedUKIAssetPath, arch)
}
}

if assets.SDBootPath == "" {
Expand Down
Loading
Loading