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

packaging: Add confidential image / initrd #8983

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-kata-static-tarball-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ jobs:
- qemu-tdx-experimental
- stratovirt
- rootfs-image
- rootfs-image-confidential
- rootfs-image-tdx
- rootfs-initrd
- rootfs-initrd-confidential
- rootfs-initrd-mariner
- rootfs-initrd-sev
- runk
Expand Down
8 changes: 8 additions & 0 deletions tools/packaging/kata-deploy/local-build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ BASE_TARBALLS = serial-targets \
tdvf-tarball \
virtiofsd-tarball
BASE_SERIAL_TARBALLS = rootfs-image-tarball \
rootfs-image-confidential-tarball \
rootfs-image-tdx-tarball \
rootfs-initrd-confidential-tarball \
rootfs-initrd-mariner-tarball \
rootfs-initrd-sev-tarball \
rootfs-initrd-tarball \
Expand Down Expand Up @@ -160,12 +162,18 @@ stratovirt-tarball:
rootfs-image-tarball: agent-tarball
${MAKE} $@-build

rootfs-image-confidential-tarball: agent-opa-tarball kernel-confidential-tarball
${MAKE} $@-build

rootfs-image-tdx-tarball: agent-opa-tarball kernel-confidential-tarball
${MAKE} $@-build

rootfs-initrd-mariner-tarball: agent-opa-tarball
${MAKE} $@-build

rootfs-initrd-confidential-tarball: agent-opa-tarball kernel-confidential-tarball
${MAKE} $@-build

rootfs-initrd-sev-tarball: agent-opa-tarball kernel-confidential-tarball
${MAKE} $@-build

Expand Down
24 changes: 24 additions & 0 deletions tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ options:
qemu-tdx-experimental
stratovirt
rootfs-image
rootfs-image-confidential
rootfs-image-tdx
rootfs-initrd
rootfs-initrd-confidential
rootfs-initrd-mariner
rootfs-initrd-sev
runk
Expand Down Expand Up @@ -284,6 +286,13 @@ install_image() {
"${rootfs_builder}" --osname="${os_name}" --osversion="${os_version}" --imagetype=image --prefix="${prefix}" --destdir="${destdir}" --image_initrd_suffix="${variant}"
}

#Install guest image for confidential guests
install_image_confidential() {
export AGENT_POLICY=yes
export MEASURED_ROOTFS=yes
install_image "confidential"
}

#Install guest image for tdx
install_image_tdx() {
export AGENT_POLICY=yes
Expand Down Expand Up @@ -344,6 +353,13 @@ install_initrd() {
"${rootfs_builder}" --osname="${os_name}" --osversion="${os_version}" --imagetype=initrd --prefix="${prefix}" --destdir="${destdir}" --image_initrd_suffix="${variant}"
}

#Install guest initrd for confidential guests
install_initrd_confidential() {
export AGENT_POLICY=yes
export MEASURED_ROOTFS=yes
install_initrd "confidential"
}

#Install Mariner guest initrd
install_initrd_mariner() {
export AGENT_POLICY=yes
Expand Down Expand Up @@ -888,7 +904,9 @@ handle_build() {
install_clh
install_firecracker
install_image
install_image_confidential
install_initrd
install_initrd_confidential
install_initrd_mariner
install_initrd_sev
install_kata_ctl
Expand Down Expand Up @@ -965,10 +983,14 @@ handle_build() {

rootfs-image) install_image ;;

rootfs-image-confidential) install_image_confidential ;;

rootfs-image-tdx) install_image_tdx ;;

rootfs-initrd) install_initrd ;;

rootfs-initrd-confidential) install_initrd_confidential ;;

rootfs-initrd-mariner) install_initrd_mariner ;;

rootfs-initrd-sev) install_initrd_sev ;;
Expand Down Expand Up @@ -1081,7 +1103,9 @@ main() {
qemu
stratovirt
rootfs-image
rootfs-image-confidential
rootfs-initrd
rootfs-initrd-confidential
rootfs-initrd-mariner
runk
shim-v2
Expand Down
6 changes: 6 additions & 0 deletions versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ assets:
x86_64:
name: *default-image-name
version: *default-image-version
confidential:
name: *default-image-name
version: *default-image-version
tdx:
name: *default-image-name
version: *default-image-version
Expand All @@ -159,6 +162,9 @@ assets:
x86_64:
name: *default-initrd-name
version: *default-initrd-version
confidential:
name: *glibc-initrd-name
version: *glibc-initrd-version
mariner:
name: "cbl-mariner"
version: "2.0"
Expand Down