Commit Graph

11007 Commits

Author SHA1 Message Date
Wainer dos Santos Moschetta
6cd74b4530 versions: update attestation-agent dependency
In preparation for CoCo 0.5 release, updated attestation-agent to
commit c939d211fe5ac497715008e36161aff20cabb6e6

Fixes #6650
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2023-04-12 18:22:53 -03:00
Wainer dos Santos Moschetta
2bd2b12a0a agent: update image-rs dependency
In preparation for CoCo 0.5 release, updated image-rs to
commit b28eaae.

Fixes #6650
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2023-04-12 18:22:33 -03:00
Steve Horsman
dfa7ed06eb
Merge pull request #6617 from yoheiueda/remote-static-resmgmt
CCv0: runtime: Use static_sandbox_resource_mgmt by default in remote hypervisor
2023-04-12 07:49:11 +01:00
Fabiano Fidêncio
ca51331a5f
Merge pull request #6602 from Alex-Carter01/snp-qemu-x86-workflow
CC | gha: add SNP components to amdx86_64 payload workflows
2023-04-06 20:17:29 +02:00
Jeremi Piotrowski
3db0c6bcac
Merge pull request #6625 from BbolroC/revive-runtime-config-s390x
CC: Revive removed runtime config for IBM SE
2023-04-06 15:59:22 +02:00
Fabiano Fidêncio
b936ddc139
Merge pull request #6569 from jepio/jepio/6404-test
CC | agent: add support for ttrpc + dependency on test PR
2023-04-06 14:15:44 +02:00
Hyounggyu Choi
b73f26440e CC: Revive removed runtime config for IBM SE
This is just to get the removed runtime config for IBM SE back again.

Fixes: #6624

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-04-06 20:18:28 +09:00
Yohei Ueda
938447803b
runtime: Use static resource in remote hypervisor
This patch updates the template configuration file for
the remote hypervisor to set static_sandbox_resource_mgmt
to be true.  The remote hypervisor uses the peer pod config
to determine the sandbox size, so requires this to be set to
true by default.

Fixes: #6616
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2023-04-06 16:53:05 +09:00
Hyounggyu Choi
bb2a35ac88
Merge pull request #6601 from BbolroC/cc-rootfs-initrd-s390x
CC: Add cc-rootfs-initrd to payload image for s390x
2023-04-06 16:04:06 +09:00
Alex Carter
ee20810a78 gha: Add SNP components to the cc-payload workflows
Adding SNP components needed to the x86 payload push and release payloads.

QEMU is needed in both the after-push payload and release payload, while OVMF is only
missing from the release workflow.

Fixes: #6600

Signed-Off-By: Alex Carter <AlexCarter@ibm.com>
2023-04-05 17:54:28 -04:00
Hyounggyu Choi
47322c32bf CC: Add cc-rootfs-initrd to payload image for s390x
This is to add an artifact named `cc-rootfs-initrd` to a payload image
because it is identified that the artifact is required to run a cc-operator
e2e test.

Fixes: #6544

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-04-05 00:59:18 +09:00
Xynnn007
38037dbe1f osbuilder: Support attestation-agent[cc_kbc] TDX dependencies
attestation-agent depends on tdx-attest-rs when cc_kbc is enabled, which
depends on libtdx-attest.so. Include the dev package in build container,
and the runtime package in the built rootfs.

The build of tdx-attest-sys (which is a dep of tdx-attest-rs) uses
bindgen, which requires libclang so install that in the build container
as well.

We specify the tdx stack DCAP v1.15

Fixes: #6519

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
2023-04-04 10:26:57 +02:00
Jeremi Piotrowski
5c27f27af0
Merge pull request #6135 from Alex-Carter01/snp-config
config: Add SEV SNP config
2023-03-31 20:10:08 +02:00
Jeremi Piotrowski
c8f615b204
Merge pull request #6062 from Alex-Carter01/snp-qemu
kata-deploy: SNP version of Qemu
2023-03-31 20:09:57 +02:00
Alex Carter
28fd92c478 kata-deploy: SNP version of Qemu
An SNP runtimeclass needs a build of Qemu from https://github.com/AMDESE/qemu/tree/snp-v3.

So a new target needs to be added to add it to a kata-deploy bundle.

Building requires a qemu no_patches file

Fixes: #6061
Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2023-03-31 14:58:38 +00:00
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
Jeremi Piotrowski
1da81308c7 dep: Add depends-on entry for tests PR
Depends-on:github.com/kata-containers/tests#5579

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-03-31 13:36:31 +02: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
Xynnn007
93f23dcd2a osbuilder: add ttrpc as default for attestation-agent
`ttrpc=true` parameter tells the Makefile of attestation-agent
to build the attestation-agent with ttrpc support

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
2023-03-30 09:12:07 +08:00
Xynnn007
30981f81b5 dep: use newest version of attestation-agent
Newest AA supports ttrpc, and it will be built when
generating guest image.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
2023-03-30 09:11:50 +08:00
Xynnn007
fcea177d96 agent: add support for ttrpc
This commit brings ttrpc of image-rs. It will use the
lightweight underlying ttrpc to interact between kata-agent
and attestation-agent.

Also, this PR brings a patch for `oci-distribution`,
because two dependencies of `image-rs` depends on different
versions of `oci-distribution`, which will cause that
`image-rs` can not be built. We need a specified version of
`oci-distribution` to unify.

Fixes #6219

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
2023-03-30 09:11:50 +08: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