Commit Graph

10988 Commits

Author SHA1 Message Date
Alex Carter
2b5c84b9ec config: Add SEV SNP config
Adding SNP template for config, and values to the runtime makefile to generate the output toml.

Based on [Joana's SNP Guide](https://github.com/kata-containers/kata-containers/blob/main/docs/how-to/how-to-run-kata-containers-with-SNP-VMs.md).

Fixes: #6112
Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2023-03-31 13:51:09 +00:00
Steve Horsman
2b8e241179
Merge pull request #5850 from Alex-Carter01/snp-ovmf
CC: kata-deploy add x86 ovmf build for SNP
2023-03-31 11:41:20 +01:00
Christophe de Dinechin
10920e2398
Merge pull request #6545 from BbolroC/se-image-in-payload
CC: Introduce secure image in payload image
2023-03-31 11:16:39 +02:00
Steve Horsman
a4781e2cc9
Merge pull request #6342 from bpradipt/fsnotify
runtime: propagate configmap, secrets, downward-api etc changes for remote-hyp
2023-03-31 09:03:44 +01:00
Fabiano Fidêncio
c7c29ee722
Merge pull request #6552 from BbolroC/kata-qemu-se-deploy
CC|kata-deploy: Add kata-qemu-se runtimeclass
2023-03-31 09:58:47 +02:00
Pradipta Banerjee
3081cd5f8e runtime: propagate configmap/secrets etc changes for remote-hyp
For remote hypervisor, the configmap, secrets, downward-api or project-volumes are
copied from host to guest. This patch watches for changes to the host files
and copies the changes to the guest.

Note that configmap updates takes significantly longer than updates via downward-api.
This is similar across runc and Kata runtimes.

Fixes: #6341

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: Julien Ropé <jrope@redhat.com>
2023-03-30 03:14:52 +00:00
Hyounggyu Choi
f73a5f4b1f CC|kata-deploy: Add kata-qemu-se runtimeclass
This is to add a new element `qemu-se` to the shims for a new runtime
class `kata-qemu-se`.

Fixes: #6549

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-03-29 22:32:29 +09:00
Alex Carter
594aa178b3 CC: kata-deploy add x86 ovmf build for SNP
SNP needs two builds of ovmf: the AmdSev build and the normal x86_64 build.

Adds target for vanilla ovmf build for snp

Adding another make target / kata-deploy function, and fixing the ovmf builder so these builds dont overlap.

Fixes: #5849

Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-03-29 13:22:43 +00:00
Hyounggyu Choi
48b0dd66ec CC: Introduce secure image in payload image
This is a preliminary work to establish an e2e test for a new runtime
class kata-qemu-se (IBM secure execution).

Fixes: #6544

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-03-29 18:51:28 +09:00
Fabiano Fidêncio
4c810c7933
Merge pull request #6457 from arronwy/multiple_same_images
image_rpc: Add container_count for containers without cid
2023-03-28 10:16:48 +02:00
Fabiano Fidêncio
121892ec61
Merge pull request #6532 from fidencio/topic/cc-tdx-use-a-specific-dcap-version
rootfs: Ensure we use a compatible version of dcap with rats-tls
2023-03-27 19:57:59 +02:00
Fabiano Fidêncio
bda8160224 rootfs: Ensure we use a compatible version of dcap with rats-tls
DCAP has upgraded to 1.16, which is not compatible with the host OS used
as part of our CI (2022ww44).  Let's ensure DCAP 1.15 is used instead.

Fixes: #6529

Signed-off-by: Wang, Arron <arron.wang@intel.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-27 17:07:17 +02:00
Steve Horsman
4b027ba664
Merge pull request #6506 from Megan-Wright/CCv0
CCv0: Merge main into CCv0 branch
2023-03-27 14:42:03 +01:00
Steve Horsman
b1afabdef0
Merge pull request #6249 from stevenhorsman/attestation-agent-bump
osbuilder: Make attestation-agent build
2023-03-23 12:26:51 +00:00
Steve Horsman
1474053196
Merge pull request #6350 from stevenhorsman/remote-config
config: Add initial remote hypervisor config
2023-03-21 13:44:08 +00:00
Steve Horsman
7ea4357723
Merge pull request #6352 from stevenhorsman/kata-deploy
kata-deploy: Add cri-o support
2023-03-21 13:43:25 +00:00
stevenhorsman
ddc2f1c331 osbuilder: Make attestation-agent build
Update the build to use the attestation-agent makefile to build it, so
we can pick up the enhancements there

Fixes: #6253
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-03-20 17:58:58 +00:00
stevenhorsman
6a7c39824a kata-deploy: Add cri-o support
Add support for cri-o into kata-deploy and merge in CAA features

Fixes: #6351
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
Co-authored-by:: Pradipta Banerjee <pradipta.banerjee@gmail.com>
2023-03-20 17:58:43 +00:00
stevenhorsman
7c9a791d67 config: Add initial remote hypervisor config
Remote hypervisor template config

Fixes: #6349
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-03-20 17:58:27 +00:00
Fabiano Fidêncio
d12e53b5a1
Merge pull request #6503 from jepio/jepio/static-checks-workflow-improvements-ccv0
CC | static checks workflow improvements
2023-03-20 18:50:15 +01:00
Megan Wright
f31c907f46 Fix bad merge 2023-03-20 13:51:10 +00:00
Megan Wright
42978f3e83 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6504
Signed-off-by: Megan Wright <megan.wright@ibm.com>
2023-03-20 13:23:49 +00:00
Jeremi Piotrowski
269c5f5877 workflows: static-checks: Free disk space before running checks
We've been seeing the 'sudo make test' job occasionally run out of space in
/tmp, which is part of the root filesystem. Removing dotnet and
`AGENT_TOOLSDIRECTORY` frees around 10GB of space and in my tests the job still
has 13GB of space left after running.

Fixes: #6401
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-20 12:19:35 +01:00
Jeremi Piotrowski
70ed46169c workflows: static-checks: Set GOPATH only once
{{ runner.workspace }}/kata-containers and {{ github.workspace }} resolve to
the same value, but they're being used multiple times in the workflow. Remove
multiple definitions and define the GOPATH var at job level once.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-20 12:19:35 +01:00
Jeremi Piotrowski
e201544145 tools/osbuilder/tests: Remove TRAVIS variable
The last remaining user of the TRAVIS variable in this repo is
tools/osbuilder/tests and it is only used to skip spinning up VMs. Travis
didn't support virtualization and the same is true for github actions hosted
runners. Replace the variable with KVM_MISSING and determine availability of
/dev/kvm at runtime.

TRAVIS is also used by '.ci/setup.sh' in kata-containers/tests to reduce the
set of dependencies that gets installed, but this is also in the process of
being removed.

Fixes: #3544
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-20 12:19:35 +01:00
Jeremi Piotrowski
cdb2efe003 workflows: static-checks: Remove TRAVIS_XXX variables
These variables are unused since we don't use travis CI. This also allows to
remove two steps:

- 'Setup GOPATH' only printed variables
- 'Setup travis reference' modified some shell local variables that don't have
  any influence on the rest of the steps

The TRAVIS var is still used by tools/osbuilder/tests to determine if
virtualization is available.

Fixes: #3544
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-20 12:19:35 +01:00
Fabiano Fidêncio
2fe0733dcb
Merge pull request #4582 from BbolroC/vfio-ap
agent: Bring in VFIO-AP device handling again
2023-03-20 11:43:13 +01:00
Steve Horsman
4bd6103253
Merge pull request #6491 from jepio/jepio/kata-deploy-push-more-space
CC | kata-deploy-push more space
2023-03-20 10:34:51 +00:00
Fabiano Fidêncio
20452402b5
Merge pull request #6498 from fidencio/topic/cc-switch-back-the-permission-of-cache-components-to-0755
cache_components: Switch back the permission to 755
2023-03-20 09:09:22 +01:00
Zhongtao Hu
1e8005ff88
Merge pull request #6477 from openanolis/runtime-rs-hostname
bugfix: set hostname in CreateSandboxRequest
2023-03-20 12:43:29 +08:00
Fabiano Fidêncio
77783153b6 cache_components: Switch back the permission to 755
2b41dbe broke all the cached jobs as it changed the permission of the
cache_components.sh file from 755 to 644.

Fixes: #6497

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-17 23:50:47 +01:00
Fabiano Fidêncio
45759e82b1
Merge pull request #6474 from UnmeshDeodhar/fix-sev-cached-kernel-bug
packaging: fix sev kernel caching
2023-03-17 23:01:40 +01:00
Fabiano Fidêncio
96252db787
Merge pull request #6481 from fidencio/topic/cache-artefacts
packaging / kata-deploy builds:  Add the ability to cache and consume cached components
2023-03-17 20:54:42 +01:00
Jeremi Piotrowski
26f80ff468 workflows: kata-deploy-push: Remove unneeded tools from runner
`make kata-tarball` needs a lot of disk space and github action runners don't
have that much of it. Remove unneeded tools from the runner, which frees
another ~10GB of space.

Fixes: #6490
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-17 17:46:38 +01:00
Jeremi Piotrowski
a394798b75 kata-deploy: Remove temporary directory after creating tarball
The various tarballs are unpacked into a temporary directory, and then that
directory is compressed into kata-static.tar.xz. After we have the tarball,
there is no reason to keep the temporary directory. Dispose of it as the last
step.

Fixes: #6490
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-17 17:43:42 +01:00
Fabiano Fidêncio
fbf891fdff packaging: Adapt get_last_modification()
The function is returning "" when called from the script used to cache
the artefacts and one difference noted between this version and the
already working one from the CCv0 is that we make sure to `pushd
${repo_root_dir}` in the CCv0 version.

Let's give it a try here and see if it solves the issue.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
82a04dbce1 local-build: Use cached VirtioFS when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
3b99004897 local-build: Use cached shim v2 when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
1b8c5474da local-build: Use cached RootFS when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
09ce4ab893 local-build: Use cached QEMU when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
1e1c843b8b local-build: Use cached Nydus when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
64832ab65b local-build: Use cached Kernel when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
04fb52f6c9 local-build: Use cached Firecracker when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Fabiano Fidêncio
8a40f6f234 local-build: Use cached Cloud Hypervisor when possible
As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 16:27:34 +01:00
Unmesh Deodhar
2b41dbe00f packaging: fix sev kernel caching
Check if tarball exists. If yes, skip the tarball create command.

Fixes: #6473

signed-off-by: Unmesh Deodhar <udeodhar@amd.com>
2023-03-17 10:17:54 -05:00
Fabiano Fidêncio
194d5dc8a6 tools: Add support for caching VirtioFS artefacts
Let's add support for caching VirtioFS artefacts that are generated using
the kata-deploy local-build scripts.

Right now those are not used, but we'll switch to using them very soon
as part of upcoming changes of how we build the components we test in
our CI.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 11:43:01 +01:00
Fabiano Fidêncio
a34272cf20 tools: Add support for caching shim v2 artefacts
Let's add support for caching shim v2 artefacts that are generated using
the kata-deploy local-build scripts.

Right now those are not used, but we'll switch to using them very soon
as part of upcoming changes of how we build the components we test in
our CI.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 11:43:01 +01:00
Fabiano Fidêncio
7898db5f79 tools: Add support for caching RootFS artefacts
Let's add support for caching RootFS artefacts that are generated using
the kata-deploy local-build scripts.

Right now those are not used, but we'll switch to using them very soon
as part of upcoming changes of how we build the components we test in
our CI.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 11:43:01 +01:00
Fabiano Fidêncio
e90891059b tools: Add support for caching QEMU artefacts
Let's add support for caching QEMU artefacts that are generated using
the kata-deploy local-build scripts.

Right now those are not used, but we'll switch to using them very soon
as part of upcoming changes of how we build the components we test in
our CI.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 11:43:01 +01:00
Fabiano Fidêncio
7aed8f8c80 tools: Add support for caching Nydus artefacts
Let's add support for caching Nydus artefacts that are generated using
the kata-deploy local-build scripts.

Right now those are not used, but we'll switch to using them very soon
as part of upcoming changes of how we build the components we test in
our CI.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-03-17 11:43:01 +01:00