Commit Graph

557 Commits

Author SHA1 Message Date
Fabiano Fidêncio
e604f83c40
Merge pull request #3735 from fidencio/wip/kata-deploy-use-kata-with-qemu-as-the-default-shim-v2-binary
kata-deploy: Use (kata with) qemu as the default shim-v2 binary
2022-02-21 14:52:55 +01:00
James O. D. Hunt
67c3195c9c
Merge pull request #3721 from Amulyam24/kernel-fix
kernel: remove SYS_SUPPORTS_HUGETLBFS from powerpc fragments
2022-02-21 09:10:21 +00:00
Fabiano Fidêncio
11220f052f kata-deploy: Use (kata with) qemu as the default shim-v2 binary
When using kata-deploy, no `containerd-shim-kata-v2` binary is deployed,
but we do deploy a `kata` runtime class, which seems very much
incosistent.

As the default configuration for kata-containers points to QEMU, let's
also use kata with QEMU as the default shim-v2 binary.

Fixes: #3228, #3734

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-21 10:03:47 +01:00
Amulyam24
8cc1b18636 kernel: remove SYS_SUPPORTS_HUGETLBFS from powerpc fragments
The name of SYS_SUPPORTS_HUGETLBFS has been changed to
ARCH_SUPPORTS_HUGETLBFS which is being selected on default
by another kernel config.
More info- 855f9a8e87
Change applicable from v5.13.

Fixes: #3720

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2022-02-18 18:06:50 +05:30
Jakob Naucke
5c9d2b413f
packaging: Use patch for applying patches
`tools/packaging/scripts/apply_patches.sh` uses `git apply $patch`, but
this will not apply to subdirectories. If one wanted to apply with
`git apply`, they'd have to run it with `--directory=...`
_relative to the Git tree's root_ (absolute will not work!). I suggest
we just use `patch`, which will do what we expected `git apply` would
do.

`patch` is also added to build containers that require it.

Fixes: #3690
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-02-18 11:32:17 +01:00
Fabiano Fidêncio
5b3fb6f83d kernel: Build SGX as part of the vanilla kernel
Let's take advantage of the fact that we've bumped to our kernel version
ot the 5.15 LTS and enable SGX by default, as it's present there.

Fixes: #3692

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-18 10:41:08 +01:00
Julio Montes
0b31b7ccc2
Merge pull request #3707 from devimc/2022-02-16/qemu-tdx
packaging: support qemu-tdx
2022-02-17 12:20:05 -06:00
Julio Montes
7c4ee6ec48 packaging/qemu: create no_patches file for qemu-tdx
create no_patches.txt file for qemu-tdx, this way we can build it
using packaging scripts

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-17 09:17:57 -06:00
Peng Tao
9e618f1fb2
Merge pull request #3684 from fidencio/kernel-lts-5.15.x
versions: Linux 5.15.x
2022-02-17 10:25:28 +08:00
Fabiano Fidêncio
a6b4015130 tools: clh: Remove unused variables
Right now we're getting the info for the Cloud Hypervisor repo and
version, but we don't do anything with them, as those are not passed
down to the build script.

Morever, the build script itself gets the info from exactly the same
place when those are not passed, making those redundant.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-16 14:54:51 +01:00
Fabiano Fidêncio
5816c132ec tools: Build cloud-hypervisor with "--features tdx"
Right now TDx support on Cloud Hypervisor is gated behind a "--features
tdx" flag.  However, having TDx support enabled should not and does not
impact on the general usability of cloud-hypervisor.

As sooner than later we'll need kata-deploy binaries to be tested on a
CI that's TDx capable, for the confidential containers effort, let's
take the bullet and already enable it by default.

By the way, touching kata-deploy-binaries.sh as it's ensure the change
will be used in the following workflows:
* kata-deploy-push
* kata-deploy-test
* release

Fixes: #3688

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-16 14:51:15 +01:00
Carlos Venegas
e6060cb7c0 versions: Linux 5.15.x
Upgrade to new Linux kernel LTS version.

Fixes: #3576

Signed-off-by: Carlos Venegas <jose.carlos.venegas.munoz@intel.com>
2022-02-16 11:12:44 +01:00
Fabiano Fidêncio
948a2b099c tools: clh: Ensure the download binary is executable
We're downloading the released cloud-hypervisor binary from GitHub, but
we should also ensure we set the binary as executable.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-15 20:23:46 +01:00
Fabiano Fidêncio
e07545a23c tools: clh: Allow passing down a build flag
Let's allow passing down a build flag to cargo, when building Cloud
Hypervisor.

By doing this we allow calling this script with:
```
extra_build_flags="--features tdx" ./build-static-clh.sh
```

Fixes: #3671

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-15 14:14:30 +01:00
Fabiano Fidêncio
55cdef2295 tools: clh: Add the possibility to always build from sources
The current code will always pull the release binaries in case the
version requested by Kata Containers matches with a released version.

This, however, has a limitation of preventing users / CIs to build
cloud-hypervisor from source for a reason or another, such as passing a
specific build flag to cloud-hypervisor.

This is a pre-req to solving
https://github.com/kata-containers/kata-containers/issues/3671.

While here, a small changes were needed in order to improve readability
and debugability of why we're building something from the sources rather
than simply downloading and using a pre-built binary.

Fixes: #3672

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-15 14:13:51 +01:00
Julio Montes
955d359f9e kernel: add missing config fragment for TDx
Add kernel config fragment that enables TDx

fixes #3659

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-14 07:40:12 -06:00
James O. D. Hunt
3d3af84cde
Merge pull request #3636 from Kvasscn/kata_dev_fix_check_build_type
scripts: fix a typo while to check build_type
2022-02-14 12:33:59 +00:00
Bin Liu
cf53ec2c71
Merge pull request #2977 from luodw/support_nydus
feature(nydusd): add nydusd support to introduce lazyload ability
2022-02-14 13:08:50 +08:00
Eric Ernst
172fac5cc8
Merge pull request #3613 from hxtmdev/markdown-relative
docs: Fix relative links in Markdown
2022-02-13 21:01:41 -08:00
Julio Montes
1797b3eb04 packaging/kernel: build TDX guest kernel
Add support for building TDX kernel from github.com/intel/tdx

To build a guest kernel that supports Intel TDx run:

```
./build-kernel.sh -s -x tdx -d setup
./build-kernel.sh -s -x tdx -d install
```

fixes #3650

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-11 16:00:32 -06:00
Julio Montes
bc8464e04f packaging/kernel: add option -s option
Add -s option to skip .config checks

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-11 15:44:03 -06:00
luodaowen.backend
2d9f89aec7 feature(nydusd): add nydusd support to introduse lazyload ability
Pulling image is the most time-consuming step in the container lifecycle. This PR
introduse nydus to kata container, it can lazily pull image when container start. So it
can speed up kata container create and start.

Fixes #2724

Signed-off-by: luodaowen.backend <luodaowen.backend@bytedance.com>
2022-02-11 21:41:17 +08:00
Daniel Höxtermann
b19b6938a8 docs: Fix relative links in Markdown
Relative links within this repository allow for easier navigation to
the corresponding file / directory in the current commit / for the
selected version.

Link text was slightly changed / fixed in
- docs/Unit-Test-Advice.md
- docs/how-to/how-to-run-docker-with-kata.md

Fixes #3045

Signed-off-by: Daniel Höxtermann <daniel@hxtm.dev>
2022-02-11 13:49:42 +01:00
zhanghj
54e1faec4c scripts: fix a typo while to check build_type
check $build_type is not an empty string instead of equal to "true".

Fixes: #3635

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2022-02-09 17:13:04 +08:00
Snir Sheriber
007221875e docs: update Release-Process.md
with a reminder to test kata-deploy

Fixes: #3611
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2022-02-06 09:15:57 +02:00
Snir Sheriber
496bc10de2 tools: check for yq before using it
as get_from_kata_deps may be called from scripts that
does not install_yq

Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2022-02-06 09:14:31 +02:00
Fabiano Fidêncio
aa3fae1397 kata-deploy: Fix the tag replacement logic
When building a non-stable release, the tag is **always** "latest¨,
instead of the version. The same magic done for setting the correct
tags up should be done for replacing the tag on the kata-deploy and
kata-cleanup yaml files, as part of the kata-deploy test.

Fixes: #3559

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-26 20:42:48 +01:00
Fabiano Fidêncio
618aa659d6
Merge pull request #3509 from ManaSugi/remove-libseccomp-from-dockerfile
osbuilder: Remove libseccomp from Dockerfile
2022-01-21 06:50:53 +01:00
Gabriela Cervantes
9c2f1de16d docs: Remove kata-pkgsync reference
Now that kata-pkgsync has been removed, this PR removes the reference
in the documentation.

Fixes #3513

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-20 18:00:58 +00:00
Manabu Sugimoto
df6ae1e789 osbuilder: Remove libseccomp from Dockerfile
Remove the libseccomp package from Dockerfile of `alpine` and `clearlinux`
because the libseccomp library is installed by the `ci/install_libseccomp.sh`
script when building the kata-agent.

Fixes: #3508

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-01-21 00:32:57 +09:00
Archana Shinde
f71eedf3a0
Merge pull request #3437 from haslersn/un-gn
tools: Fix groupname if it differs from username
2022-01-19 22:25:59 -08:00
Archana Shinde
1c3f8c708e
Merge pull request #3488 from ManaSugi/fix-seccomp-notice-in-release-page
release: Escape backticks in Libseccomp Notices
2022-01-19 19:40:54 -08:00
Gabriela Cervantes
8cc088b540 packaging: Remove kata-pkgsync tool
This PR removes the kata-pkgsync tool that is mainly used for OBS
packages, currently for kata 2.0 we do not have OBS packages and
this tool is not being used for kata 2.0

Fixes #3493

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-19 15:53:37 +00:00
Manabu Sugimoto
a8b66de5e8 release: Escape backticks in Libseccomp Notices
Escape (with backslash) backticks (`) to prevent them from being
evaluated by the shell.

Fixes: #3487

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-01-19 19:45:05 +09:00
Fabiano Fidêncio
0b5c0ae2ae
Merge pull request #3188 from weiyuanke/fix_version
update apiVersion
2022-01-17 23:20:06 +01:00
Carlos Venegas
5f41e199dd
Merge pull request #3438 from haslersn/usr-bin-env-bash
scripts: Use shebang /usr/bin/env bash
2022-01-17 15:39:42 -06:00
Carlos Venegas
5a55313431
Merge pull request #3446 from jodh-intel/kernel-proc-config
packaging: Make kernel config accessible to guest
2022-01-17 15:37:34 -06:00
Sebastian Hasler
e347694fff tools: Fix groupname if it differs from username
The script `tools/packaging/static-build/qemu/build-base-qemu.sh`
previously failed on systems where the user's groupname differs from the
username

Fixes: #3461

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
2022-01-17 16:52:39 +01:00
Jianyong Wu
d370604fa5
Merge pull request #3292 from zyzii/vcpu-hotplug2
experimentally enable the vcpu-hotplug for arm in qemu side
2022-01-14 18:10:40 +08:00
Huang Shijie
2d0ec00aff Qemu: Enable the vcpu-hotplug for arm
Initially enable vcpu hotplug in qemu for arm base on Salli's work[1].

Fixes:#3280

Signed-off-by: Huang Shijie <shijie8@gmail.com>
[1] https://github.com/salil-mehta/qemu/tree/virt-cpuhp-armv8/rfc-v1
2022-01-14 13:27:17 +00:00
James O. D. Hunt
e22a4e2a0a packaging: Make kernel config accessible to guest
Provide the `/proc/config.gz` file in guest kernels that allow the guest
to determine the kernel configuration used to build the running kernel.

Note that since `gunzip` expects to rename the gzip'ed file it operates
on, to use this feature you need to run something like the following in
the container environment:

 ```bash
 # cat /proc/config.gz|gunzip -c
 ```

Fixes: #3445.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-01-14 08:50:34 +00:00
Sebastian Hasler
adffd3f8b6 scripts: Use shebang /usr/bin/env bash
Not all distros have `/bin/bash`, e.g. NixOS.

Fixes: #3450

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
2022-01-13 22:53:28 +01:00
Fabiano Fidêncio
e4b7a12bf3 qat: Add Debian to the distro examples
Debian is a supported rootfs that uses systemd as init, thus, it should
be mentioned in the QAT README document.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-13 21:54:05 +01:00
Fabiano Fidêncio
6979d5be69 osbuilder: Remove gentoo rootfs-builder
As the gentoo rootfs is not tested in our CI, we can't guarantee it
actually works as expected.

Whenever we have someone willing to maintain this rootfs we can have it
added back, and also add a CI job to test it altogether, avoiding then
any possible regression.

Fixes: #2144

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-13 21:54:05 +01:00
Fabiano Fidêncio
22c1a093d7 osbuilder: Remove suse rootfs-builder
As the suse rootfs is not tested in our CI, we can't guarantee it
actually works as expected.

Whenver we have someone willing to maintain this rootfs we can have it
added back, and also add a CI job to test it altogether, avoiding then
any possible regression.

Fixes: #2145

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-13 21:54:05 +01:00
Fabiano Fidêncio
85dd587382 osbuilder: Remove fedora rootfs-builder
As the fedora rootfs is not tested in our CI, we can't guarantee it
actually works as expected.

Whenever we have someone willing to maintain the rootfs we can have it
added back, and also add a CI job to test it altogether, avoiding then
any possible regression.

Fixes: #2143

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-13 21:54:05 +01:00
Fabiano Fidêncio
06fae29f49 osbuilder: Remove centos rootfs-builder
As the centos rootfs is not tested in our CI, we can't guarantee it
actually works as expected.

Whenever we have someone willing to maintain the rootfs we can have it
added back, and also add a CI job to test it altogether, avoiding then
any possible regression.

Fixes: #2140

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-13 21:54:05 +01:00
Gabriela Cervantes
01005c5a9c docs: Remove ccloudvm reference
This PR removes the ccloudvm reference at the README document as the
setup of scripts of ccloudvm were removed.

Fixes #3448

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-13 18:22:26 +00:00
Snir Sheriber
ac7acbf87b kata-deploy: validate conf file can be created
As containerd doesn't exist at cleanup

Fixes: #3429
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2022-01-12 10:12:46 +02:00
Gabriela Cervantes
7e2bc4d764 packaging: Remove ccloudvm instructions and script
This PR removes ccloudvm for kata 2.0, ccloudvm was used in kata 1.x
and we are not longer using it for kata 2.0.

Fixes #3427

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-11 15:41:16 +00:00