Commit Graph

9693 Commits

Author SHA1 Message Date
stevenhorsman
c9af89d094 osbuilder: don't pull in umoci with attestation
Umoci is not longer required if we have the attestation-agent, so don't
override the user input

Fixes: #5237
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-23 09:33:35 +01:00
Wainer Moschetta
fb56efd658
Merge pull request #5202 from stevenhorsman/remove-skopeo-from-deploy
packaging: Remove skopeo & umoci
2022-09-22 21:31:20 -03:00
stevenhorsman
77176cd7b9 packaging: Remove skopeo & umoci
- Remove skopeo and umoci from the CC image

Fixes: #4889
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-20 14:28:40 +01:00
Steve Horsman
f80723a483
Merge pull request #5167 from Alex-Carter01/sev-initrd-rename
kata-deploy: rename make target for sev initrd
2022-09-20 10:50:33 +01:00
Wainer Moschetta
63f931b719
Merge pull request #5127 from Alex-Carter01/depmod-rootfs
CC use depmod in rootfs builder for kernel modules with docker support
2022-09-19 09:33:33 -03:00
Wainer Moschetta
ad49a11761
Merge pull request #5038 from Alex-Carter01/sev-kernel-makefile
CC | packaging: Build SEV capable kernel + efi_secret module
2022-09-19 09:32:33 -03:00
Alex Carter
59537ceb2d osbuilder: CC, add kmod to rootfs builder docker environment
To use depmod in the rootfs builder, the docker environment will require kmod.

Fixes: kata-containers#5125

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-16 10:13:10 -04:00
Alex Carter
50a959e6cf osbuilder: CC use depmod in rootfs builder for kernel modules
Using depmod when adding kernel modules to get dependencies.

Needed for the efi secret module for sev.

Fixes: #5125

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-16 10:12:49 -04:00
Wainer Moschetta
c53f063acd
Merge pull request #5024 from Alex-Carter01/rootfs-agent-config
CC | rootfs builder: add agent config file to rootfs for offline_sev_kbc
2022-09-16 10:25:30 -03:00
stevenhorsman
6233fa95d1 doc: Add new endpoints
Add new endpoints to the sample confidential config for the agent

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
31164eeedf doc: workaround link checker
- Update crictl to remove backticks

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
ef381b084d vendor: Bump image-rs version
- Bump the image-rs version to pick up the signing scheme updates

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
812818d381 agent: Enable security_validate if required
If we are using the offline_fs_kbc and have created a resource json
then switch security_validate on the image_client to enable
the signature verification feature for image-rs

Fixes: #4581
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
216c066795 doc: Update the agent build
Update the agent build to get around the nix & glibc linker problems
by running the libseccomp installation first

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
3aebead189 doc: Update ccv0 doc and scripts
- Update the doc and scripts to reflect that skopeo isn't mandatory
for signature verification any longer
- Update the script to default the aa_kbc to offline_fs_kbc

Fixes: #4581
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
Alex Carter
9f643ac9c8 osbuilder: add CC's agent config file to rootfs for offline_sev_kbc
Adds default config file.
Adds case in rootfs.sh to copy config.

Fixes kata-containers#5023

Fixes: #5023

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-15 18:26:29 +00:00
Alex Carter
056d85de2c kata-deploy: rename make target for sev initrd
The sev initrd target had been changed to "cc-sev-rootfs-initrd".
This was good discussion as part of #5120.
I failed to rename it from "cc-sev-initrd-image" in kata-deploy-binaries.
The script will fail for a bad build target.

Fixes: #5166

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-14 23:34:33 +00:00
Wainer Moschetta
30460044a5
Merge pull request #5130 from Alex-Carter01/qemu-sev-runtimeclass
CC, kata-deploy: add kata-qemu-sev runtimeclass
2022-09-14 19:47:23 -03:00
Wainer Moschetta
895150e383
Merge pull request #5120 from Alex-Carter01/initrd-efi-dep
CC, packaging: add sev-initrd target, and add efi_secret module to sev's initrd
2022-09-14 08:03:55 -03:00
Alex Carter
69230fac97 packaging: add efi secret module to rootfs for sev
Adds the efi_secret kernel module to the sev initrd.

Adds a rootfs flag for kernel module based on the AA_KBC.

Finding the kernel module in the local build based on kernel version and kernel config version.

Moved kernel config version checking function from kernel builder to lib script.

Fixes: #5118

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-13 11:18:16 -04:00
Alex Carter
fa11294b0f packaging: add CC's sev-initrd target
Adds a make target, and a function in the kata-deploy-binaries script.
In the spirit of avoiding code duplication, making the cc-initrd function more generic.

Fixes: #5118

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-13 11:17:54 -04:00
Wainer Moschetta
9b49a6ddc6
Merge pull request #5026 from Alex-Carter01/sev-ovmf-makefile
CC| packaging: Add AmdSev OVMF target for use in payload images
2022-09-13 11:11:51 -03:00
Steve Horsman
65b4261aa8
Merge pull request #3697 from yoheiueda/CCv0-peerpod
Support Peer Pod VMs
2022-09-13 11:14:44 +01:00
Alex Carter
502a78730b packaging: Build SEV capable kernel + efi_secret module
Adds a new make target for an sev kernel which can be built and put into payload bundles for the operator.

Currently not including this sev kernel target in the cc payload bundle.

Unfortunately having to breakflow from using the generic cc_tee_kernel functions in either the kata-deploy-binaries or build-kernel.
Largely based on using an upstreamed kernel release, meaning the url is the defaul cdn, and e.g. we use version rather than tag.
The upside of this is that we can use the sha sum checking functionality from the generic get_kernel function.

CC label in title removed for commit message check.

Fixes: #5037

Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-09-12 15:52:50 -04:00
Alex Carter
93a1780bdb packaging: Add CC's AmdSev OVMF target for use in payload images
Currently leaving the cc-sev-ovmf-tarball target out of the cc payload.
I was not sure where discussion had landed on the number of payload bundles.
e.g. could be included in a cc bundle along with tdx support or create an SEV bundle.

Fixes: kata-containers#5025

Fixes: #5025

Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-09-12 12:59:11 -04:00
Yohei Ueda
5422a056f2
runtime: Copy shared files recursively
This patch enables recursive file copying
when filesystem sharing is not used.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:22:26 +09:00
Yohei Ueda
de232b8030
agent: support copying of directories and symlinks
This patch allows copying of directories and symlinks when
static file copying is used between host and guest. This change is
necessary to support recursive file copying between shim and agent.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:07:34 +09:00
Lei Li
c3e6b66051
runtime: Support privileged containers in peer pod VM
This patch fixes the issue of running containers
with privileged as true.

See the discussion at this URL for the details.
https://github.com/confidential-containers/cloud-api-adaptor/issues/111

Author:    Lei Li <cdlleili@cn.ibm.com>
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:07:34 +09:00
Yohei Ueda
f9278f22c3
runtime: Support the remote hypervisor type
This patch adds the support of the remote hypervisor type.
Shim opens a Unix domain socket specified in the config file,
and sends TTPRC requests to a external process to control
sandbox VMs.

Fixes #4482

Co-authored-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 11:07:28 +09:00
Yohei Ueda
150e8aba6d
runtime: Add hypervisor proto to support peer pod VMs
This patch adds a protobuf definiton of the remote hypervisor type.

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2022-09-09 10:18:23 +09:00
Fabiano Fidêncio
55c8c7226d
Merge pull request #5134 from Megan-Wright/CCv0
CCv0: Merge main into CCv0 branch
2022-09-08 19:35:45 +02:00
Alex Carter
7849c7977c kata-deploy: add CC's kata-qemu-sev runtimeclass
After adding an SEV QEMU config file (#4850), need to configure containerd to select this when appropriate based on a new runtimeclass.

Adds to the configuration of containerd so the correct config is selected.

Fixes: #4851

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-08 15:19:45 +00:00
Fabiano Fidêncio
61fd408594
Merge pull request #5096 from ryansavino/sev-kernel-build-fix-ccv0
kernel: fix kernel tarball name for SEV for CCv0
2022-09-08 11:43:09 +02:00
Fabiano Fidêncio
b11b6e3756
Merge pull request #5129 from fidencio/topic/cc-simplify-kata-deploy-cleanup
kata-deploy-cc: Simplify cleanup
2022-09-07 15:41:06 +02:00
Megan Wright
2e7e81b8d8 CCv0: Revert version of tokio in Cargo.lock file
Revert version of tokio back to 1.20.1

Signed-off-by: Megan Wright <megan.wright@ibm.com>
2022-09-07 11:38:14 +01:00
Megan Wright
9ad37bfd90 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #5132
Signed-off-by: Megan Wright <megan.wright@ibm.com>
2022-09-07 09:44:08 +01:00
Bin Liu
5df6ff991d
Merge pull request #5116 from liubin/fix/5115-replace-tab-by-space
libs/kata-types: replace tabs by spaces in comments
2022-09-07 15:53:34 +08:00
Fabiano Fidêncio
e94d38c97b
Merge pull request #5058 from ryansavino/gperf-url-fix
gperf: point URL to mirror site
2022-09-07 09:25:13 +02:00
Bin Liu
fe55f6afd7
Merge pull request #5124 from amshinde/revert-arp-neighbour-api
Revert arp neighbour api
2022-09-07 11:14:53 +08:00
Chelsea Mafrica
051dabb0fe
Merge pull request #5099 from liubin/fix/5098-add-default-config-for-runtime-rs
runtime-rs: add default agent/runtime/hypervisor for configuration
2022-09-06 17:49:42 -07:00
Archana Shinde
d23779ec9b Revert "agent: fix unittests for arp neighbors"
This reverts commit 81fe51ab0b.
2022-09-06 15:41:42 -07:00
Archana Shinde
d340564d61 Revert "agent: use rtnetlink's neighbours API to add neighbors"
This reverts commit 845c1c03cf.

Fixes: #5126
2022-09-06 15:41:42 -07:00
Archana Shinde
188d37badc kata-deploy: Add debug statement
Adding this so that we can see the status of running pods in
case of failure.

Fixes: #5126

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2022-09-06 15:41:14 -07:00
Fabiano Fidêncio
c17a6f1b53 kata-deploy-cc: Simplify cleanup
Let's remove the whole content from:
* /opt/confidential-containers/libexec
* /opt/confidential-containers/share

And then manually remove the binaries under bin directory` as the
pre-install hook will drop binaries there.

Finally, let's call a `rmdir -p /opt/confidential-containers/bin` which
should take care of the cleanup in case no pre-install hook is used, and
let's make sure we pass `--ignore-fail-on-non-empty` so we don't fail
when using a pre-install hook.

Fixes: #5128

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-09-07 00:05:45 +02:00
Fabiano Fidêncio
f5a6522398
Merge pull request #5121 from fidencio/topic/kata-deploy-fix-containerd-shim-v2-location
kata-deploy: Fix `containerd-shim-kata-v2` location
2022-09-06 19:28:00 +02:00
Ryan Savino
9cad7fb045 kernel: fix kernel tarball name for SEV
'linux-' prefix needed for tarball name in SEV case. Output to same file name.

Fixes: #5094

Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
2022-09-06 11:03:55 -05:00
Fabiano Fidêncio
124c0e7af4 kata-deploy: Fix containerd-shim-kata-v2 location
For Confidential Containers the file is present at
`/opt/confidential-containers` instead of `/opt/kata`.

Fixes: #5119

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-09-06 16:32:28 +02:00
Bin Liu
50f9126153 libs/kata-types: replace tabs by spaces in comments
Replace tabs by spaces in the comments of file
libs/kata-types/src/annotations/mod.rs.

Fixes: #5115

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-06 17:32:57 +08:00
Fabiano Fidêncio
3c7fe93997
Merge pull request #5045 from fidencio/topic/kata-deploy-misc-fixes
CC | kata-deploy: Misc fixes related to building the payload
2022-09-05 20:28:02 +02:00
Fabiano Fidêncio
01e29fc1fd kata-deploy-cc: Do a serial build of the payload
Every now and then we've been hitting issues with parallel builds.  in
order to not rely on lucky for the first release, let's do a serial
build of the payload image.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-09-05 18:20:24 +02:00