mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-24 10:41:43 +00:00
packaging: Allow building a CC capable image
Let's add a new build target for our local-build scripts, cc-rootfs-image-tarball, and use it to build an image that has skopeo and umoci embedded in, and that using the offline_fs_kbc as the attenstation agent KBC. Fixes: #4557 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
335ddd5876
commit
a438d6114b
@ -69,3 +69,6 @@ install-tarball:
|
|||||||
|
|
||||||
image: kata-tarball
|
image: kata-tarball
|
||||||
$(MK_DIR)kata-deploy-build-and-upload-image.sh $(CURDIR)/kata-static.tar.xz
|
$(MK_DIR)kata-deploy-build-and-upload-image.sh $(CURDIR)/kata-static.tar.xz
|
||||||
|
|
||||||
|
cc-rootfs-image-tarball:
|
||||||
|
${MAKE} $@-build
|
||||||
|
@ -30,6 +30,8 @@ readonly virtiofsd_builder="${static_build_dir}/virtiofsd/build-static-virtiofsd
|
|||||||
|
|
||||||
readonly rootfs_builder="${repo_root_dir}/tools/packaging/guest-image/build_image.sh"
|
readonly rootfs_builder="${repo_root_dir}/tools/packaging/guest-image/build_image.sh"
|
||||||
|
|
||||||
|
readonly cc_prefix="/opt/confidential-containers"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
workdir="${WORKDIR:-$PWD}"
|
workdir="${WORKDIR:-$PWD}"
|
||||||
@ -83,6 +85,16 @@ EOF
|
|||||||
exit "${return_code}"
|
exit "${return_code}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Install cc capable guest image
|
||||||
|
install_cc_image() {
|
||||||
|
info "Create CC image"
|
||||||
|
export SKOPEO=yes
|
||||||
|
export UMOCI=yes
|
||||||
|
export AA_KBC="offline_fs_kbc"
|
||||||
|
|
||||||
|
"${rootfs_builder}" --imagetype=image --prefix="${cc_prefix}" --destdir="${destdir}"
|
||||||
|
}
|
||||||
|
|
||||||
#Install guest image
|
#Install guest image
|
||||||
install_image() {
|
install_image() {
|
||||||
info "Create image"
|
info "Create image"
|
||||||
@ -180,6 +192,8 @@ handle_build() {
|
|||||||
install_virtiofsd
|
install_virtiofsd
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
cc-rootfs-image) install_cc_image ;;
|
||||||
|
|
||||||
cloud-hypervisor) install_clh ;;
|
cloud-hypervisor) install_clh ;;
|
||||||
|
|
||||||
firecracker) install_firecracker ;;
|
firecracker) install_firecracker ;;
|
||||||
@ -227,6 +241,7 @@ main() {
|
|||||||
local build_targets
|
local build_targets
|
||||||
local silent
|
local silent
|
||||||
build_targets=(
|
build_targets=(
|
||||||
|
cc-rootfs-image
|
||||||
cloud-hypervisor
|
cloud-hypervisor
|
||||||
firecracker
|
firecracker
|
||||||
kernel
|
kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user