Commit Graph

7609 Commits

Author SHA1 Message Date
James O. D. Hunt
480343671b
Merge pull request #3046 from fidencio/wip/update-crio-documentation
Update CRI-O documentation
2021-11-16 08:33:29 +00:00
Fabiano Fidêncio
eb11d053d5 cri-o: Update deployment documentation
CRI-O deployment documentation was quite outdated, giving info from the
`1.x` era.  Let's update this to reflect what we currently have.

Fixes: #2498

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-11-15 18:30:40 +01:00
Fabiano Fidêncio
d22706c060
Merge pull request #3040 from wllenyj/rework-agent-ctl
CCv0|agent-ctl: fix compile error
2021-11-15 13:32:01 +01:00
Fabiano Fidêncio
92e3a14023 cri-o: Update links for the CRI-O github page
The links are either pointing to the not-used-anymore `master` branch,
or to the kubernetes-incubator page.

Let's always point to the CRI-O github page, using the `main`branch.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-11-15 11:39:09 +01:00
Fabiano Fidêncio
0a19340a93 cri-o: Remove outdated documentation
Although the documentation removed is correct, it's not relevant to the
current supported versions of CRI-O.

Related: #2498

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-11-15 11:39:08 +01:00
snir911
b046c1ef6b
Merge pull request #2959 from snir911/wip/cgroups-systemd-fix
cgroups: Fix systemd cgroup support
2021-11-15 10:44:45 +02:00
wllenyj
429ab089f7 agent-ctl: fix complie error
Since the `utils::get_option` interface is modified,
PullImage needs to adapt to this modification in CCv0 branch.

Fixes #3044

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2021-11-15 14:28:40 +08:00
Eric Ernst
e89c06e68b
Merge pull request #3032 from liubin/fix/3031-merge-two-types-packages
runtime: merge virtcontainers/pkg/types into virtcontainers/types
2021-11-12 14:23:21 -08:00
Chelsea Mafrica
b585264555
Merge pull request #3034 from fidencio/wip/remove-non-used-actions
workflows: Remove non-used main.yaml
2021-11-12 11:25:47 -08:00
Chelsea Mafrica
d38135c93b
Merge pull request #2570 from YchauWang/wyc-agent-test
agent/src: improve unit test coverage for src/namespace.rs
2021-11-12 11:24:13 -08:00
Fabiano Fidêncio
a3b3c85ec3 workflows: Remove non-used main.yaml
The main.yaml workflow was created and used only on 1.x.  We inherited
it, but we didn't remove it after deprecating the 1.x repos.

While here, let's also update the reference to the `main.yaml` file,
and point to `release.yaml` (the file that's actually used for 2.x).

Fixes: #3033

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-11-12 18:17:11 +01:00
Chelsea Mafrica
6b48d3754a
Merge pull request #3013 from fgiudici/kata_metrics_doc
doc: update kata metrics documentation
2021-11-12 09:11:36 -08:00
Chelsea Mafrica
c8f2ef9488
Merge pull request #3030 from liubin/fix/3029-delete-codes
runtime: delete not used codes
2021-11-12 08:53:20 -08:00
stevenhorsman
0a1d7893ff Merge remote-tracking branch 'upstream/main' into CCv0
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-12 09:46:51 +00:00
stevenhorsman
6c3e03958a Merge branch 'CCv0' of github.com:kata-containers/kata-containers into CCv0
Keep the CCvo branch up to date with changes from main
2021-11-12 09:36:39 +00:00
bin
09f7962ff1 runtime: merge virtcontainers/pkg/types into virtcontainers/types
There are two types packages under virtcontainers, and the
virtcontainers/pkg/types has a few codes, merging them into
one can make it easy for outstanding and using types package.

Fixes: #3031

Signed-off-by: bin <bin@hyper.sh>
2021-11-12 15:06:39 +08:00
bin
6acedc2531 runtime: delete not used codes
Functions EnvVars and GetOCIConfig in runtime/virtcontainers/pkg/oci/utils.go
are not used anymore.

Fixes: #3029

Signed-off-by: bin <bin@hyper.sh>
2021-11-12 11:35:31 +08:00
Fabiano Fidêncio
c0aea3f662
Merge pull request #3017 from fidencio/wip/bump-golang
versions: bump golang to 1.17.x
2021-11-11 16:57:50 +01:00
Fabiano Fidêncio
7c947357ad
Merge pull request #3015 from ManaSugi/fix-yq-path
release: Use ${GOPATH}/bin/yq for upload-libseccomp-tarball action
2021-11-11 10:48:42 +01:00
Fabiano Fidêncio
395638c4bc versions: bump golang to 1.17.x
According to https://endoflife.date/go golang 1.15 is not supported
anymore.  Let's remove it from out tests, add 1.17.x, and bump the
newest version known to work when building kata to 1.17.3.

Fixes: #3016

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-11-11 10:43:18 +01:00
Bin Liu
bf24eb6b33
Merge pull request #2979 from jodh-intel/agent-ctl-json-api-spec
agent-ctl: Allow API specification in JSON format
2021-11-11 16:45:30 +08:00
Francesco Giudici
570915a8c3 docs: update kata 2.0 metrics documentation
We now support any container engine CRI compliant in kata-monitor.
Update documentation to reflect it.

Fixes: #980

Signed-off-by: Francesco Giudici <fgiudici@redhat.com>
2021-11-11 09:33:01 +01:00
Snir Sheriber
bcf181b7ee cgroups: Fix systemd cgroup support
As github.com/containerd/cgroups doesn't support scope
units which are essential in some cases lets create
the cgroups manually and load it trough the cgroups
api
This is currently done only when there's single sandbox
cgroup (sandbox_cgroup_only=true), otherwise we set it
as static cgroup path as it used to be (until a proper
soultion for overhead cgroup under systemd will be
suggested)

Fixes: #2868
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-11-11 08:51:45 +02:00
Manabu Sugimoto
3430723594 release: Use ${GOPATH}/bin/yq for upload-libseccomp-tarball action
We need to explicitly call `${GOPATH}/bin/yq` that is installed by
`ci/install_yq.sh`.

Fixes: #3014

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-11-11 13:42:12 +09:00
Bin Liu
04185bd068
Merge pull request #2997 from Jakob-Naucke/lint-protection
virtcontainers: Lint protection types
2021-11-11 08:34:48 +08:00
Fabiano Fidêncio
05cf7cdddb
Merge pull request #3007 from liubin/fix/3006-check-env-key-value
agent: check environment variables if empty or invalid
2021-11-10 19:19:47 +01:00
Francesco Giudici
6339fdd1f6 docs: update kata metrics architecture image
We now support any CRI container engine in kata-monitor, notably CRI-O.
Add both containerd and CRI-O in the kata metrics architecture image.

Signed-off-by: Francesco Giudici <fgiudici@redhat.com>
2021-11-10 18:58:15 +01:00
wllenyj
08c34f2ac2 runtime: Use a separate ImageService to support PullImage
Compatible with the agent's ImageService.

Fixes #2984

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2021-11-10 16:10:21 +01:00
wllenyj
dfb8c965e6 agent: Separate the ImageService from the AgentService
Use a separate ImageService to support PullImage.

Fixes #2984

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2021-11-10 16:10:21 +01:00
Jakob Naucke
23bd6fe5da
Merge pull request #2908 from Jakob-Naucke/install-aa
osbuilder: Build attestation-agent and friends
2021-11-10 16:09:54 +01:00
bin
57bb7ffae3 agent: check environment variables if empty or invalid
Invalid environment variable key/value will cause set_env panic.

Refer: https://doc.rust-lang.org/std/env/fn.set_var.html#panics

Fixes: #3006

Signed-off-by: bin <bin@hyper.sh>
2021-11-10 20:54:21 +08:00
Fabiano Fidêncio
653976c0fd
Merge pull request #3000 from bergwolf/crioptions
runtime: Revert "runtime: use containerd package instead of cri-containerd"
2021-11-10 13:41:24 +01:00
Tim Zhang
fbf3bb55c0
Merge pull request #2995 from Tim-Zhang/fix-container-created-time
rustjail: Fix created time of container
2021-11-10 19:44:04 +08:00
James O. D. Hunt
8ab90e1068 agent-ctl: Allow API specification in JSON format
Update the `agent-ctl` tool to allow API fields to be specified in JSON
format, either directly on the command-line, or via a file URI.

This feature is made possible by enabling `serde` support in the agent
`protocols` crate. Careful use of the `serde` macros allows the
`agent-ctl` tool to accept _partially_ specified API objects in JSON
format; fields that are not specified are set to the default value for
their respective types.

`build.rs` changes based on work by Fupan.

Fixes: #2978.

Contributions-by: Fupan Li <lifupan@gmail.com>
Contributions-by: Bin Liu <bin@hyper.sh>
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-10 10:16:04 +00:00
James O. D. Hunt
18c47fe8f3
Merge pull request #2986 from jodh-intel/rm-dynamic-tracing-api
agent: Remove dynamic tracing APIs
2021-11-10 10:10:14 +00:00
Peng Tao
eacfcdec19 runtime: Revert "runtime: use containerd package instead of cri-containerd"
This reverts commit 76f16fd1a7 to bring
back cri-containerd crioptions parsing so that kata works with older
containerd versions like v1.3.9 and v1.4.6.

Fixes: #2999
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-11-10 16:06:42 +08:00
Tim Zhang
e7856ff10c rustjail: Fix created time of container
Got wrong created time of container after an exec
this commit will fix this problem.

Fixes: #2994

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-11-10 10:43:03 +08:00
Chelsea Mafrica
8b01666109
Merge pull request #2992 from Amulyam24/kernel_vfio
kernel: add VFIO kernel dependencies for ppc64le
2021-11-09 15:22:16 -08:00
Jakob Naucke
b7b89905d4
virtcontainers: Lint protection types
Protection types like tdxProtection or seProtection were marked nolint,
remove this. As a side effect, ARM needs dummy tests for these.

Fixes: #2801
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-11-09 18:36:32 +01:00
Jakob Naucke
13f6418c46
osbuilder: Build Skopeo, umoci, attestation-agent
When the environment variable $SKOPEO_UMOCI is set to "yes", Skopeo and
umoci are built inside the guest build container and installed to the
guest rootfs. The respective build- and runtime dependencies are added.
This respects the (existing) $LIBC variable (gnu/musl) and avoids issues
with glibc mismatches.
This is currently only supported for Ubuntu guests, as the system Golang
packages included in the versions of other distros that we use are too
old to build these packages, and re-enabling installing Golang from
golang.org is cumbersome, given especially that it is unclear how long
we will keep using Skopeo and umoci.

Additionally, when the environment variable $AA_KBC is set,
attestation-agent (with that KBC) is included.

This replaces some logic in ccv0.sh that is removed.

Fixes: #2907
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-11-09 18:04:21 +01:00
Amulyam24
7566b736ac kernel: add VFIO kernel dependencies for ppc64le
Recently added VFIO kernel configs require addtional
dependencies on pcc64le.

Fixes: #2991

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2021-11-09 14:38:03 +05:30
James O. D. Hunt
87f676062c agent: Remove dynamic tracing APIs
Remove the `StartTracing` and `StopTracing` agent APIs that toggle
dynamic tracing. This is not supported in Kata 2.x, as documented in the
[tracing proposals document](https://github.com/kata-containers/kata-containers/pull/2062).

Fixes: #2985.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-09 08:39:06 +00:00
James O. D. Hunt
b09dd7a883 docs: Fix typo
Correct a typo identified by the static checker's spell checker.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-09 08:38:42 +00:00
stevenhorsman
4762da105c Merge remote-tracking branch 'upstream/main' into CCv0 2021-11-08 14:58:30 +00:00
James O. D. Hunt
b192d388c1
Merge pull request #2970 from jodh-intel/logging-create-tests-and-checks
logging: Always run crate tests
2021-11-08 13:16:48 +00:00
stevenhorsman
9b34595ad0 version: Update CCv0 fork of containerd used
- Update CCv0 to use the new confidential containers fork of containerd
- Start using the current-CCv0 branch

Fixes #2947

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:50:32 +00:00
stevenhorsman
d57648eb13 doc: Add pull image support to shim
- Add a ctr shim pull image function to CCv0.sh
- Add information on how to use it in the how-to doc

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:50:32 +00:00
Dave Hay
02f6db595c shim: Add PullImage support
Add a new PullImage endpoint to the shim API.
Add new PullImage functions to the virtcontainers files, which allows
the PullImage endpoint on the agent to be called.
Update the containerd vendor files to support new PullImage API changes.

Fixes #2651

Signed-off-by: Dave Hay <david_hay@uk.ibm.com>
Co-authored-by: ashleyrobertson <ashleyro@uk.ibm.com>
Co-authored-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:50:31 +00:00
Fabiano Fidêncio
18834810e6 kata-deploy: point to the -cc:v0 image
Just in case someone thinks about using kata-deploy directly from this
branch, let's point to the `-cc:v0`image.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2021-11-05 14:50:29 +00:00
Fabiano Fidêncio
7854cf007a kata-deploy: Add a basic script to build & upload a CCv0 image
This is a dirty hack, that we should expand later so we can pass one or
n number of repos where we'll upload our images, and use it as part of
the release scripts.

For now, however, let's just do this quick & dirty hack so we can
present the CCv0 demo using the operator, even knowing that the
kubernetes part of the work is not done yet and that the demo itself
will be done connecting to a node and doing all the shenanigans
manually.

Fixes: #2854

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2021-11-05 14:49:45 +00:00