Commit Graph

10984 Commits

Author SHA1 Message Date
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
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
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
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
Fabiano Fidêncio
cb4cbe2958 tools: Add support for caching Kernel artefacts
Let's add support for caching Kernel 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
762f9f4c3e tools: Add support for caching Firecracker artefacts
Let's add support for caching Firecracker 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:28:56 +01:00
Fabiano Fidêncio
6b1b424fc7 tools: Add support for caching Cloud Hypervisor artefacts
Let's add support for caching Cloud Hypervisor 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:28:56 +01:00
Fabiano Fidêncio
08fe49f708 versions: Adjust kernel names to match kata-deploy build targets
Let's adjust the kernel names in versions.yaml so those can match the
names used as part of the kata-deploy local build scripts.

Right now this doesn't bring any benefit nor drawback, but it'll make
our life easier later on in this same series.

Depends-on: github.com/kata-containers/tests#5534

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-17 11:28:56 +01:00