Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static workflow #7

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4c023e3
dragonball: Fix compilation issue without all net features
justxuewei Dec 28, 2023
4bc67db
metrics: Improve iperf3 cleanup
GabyCT Jan 3, 2024
97bdc15
dbs-pci: introduce Cargo.lock
studychao Jan 4, 2024
02cd726
dbs-utils: add Cargo.lock
studychao Jan 4, 2024
f1235dd
dbs_virtio_devices: add Cargo.lock
studychao Jan 4, 2024
44b5b88
docs: Update docs for new StratoVirt VMM introduction
fadecoder Jan 1, 2024
0f53217
Merge pull request #8771 from openanolis/chao/fix_ut
studychao Jan 4, 2024
91360e7
agent: Bump ttrpc version
justxuewei Jan 2, 2024
cf9a0e2
protocols: Bump ttrpc version
justxuewei Jan 2, 2024
bf59c7b
runtime-rs: Bump ttrpc and containerd-shim-protos versions
justxuewei Jan 2, 2024
f97f16a
agent-ctl: Bump ttrpc version
justxuewei Jan 2, 2024
7c176a6
agent: use method params instead of const params in functions
cheriL Oct 27, 2023
db948f6
Merge pull request #8757 from justxuewei/upgrade-containerd-shim-protos
justxuewei Jan 4, 2024
b5a6e74
Merge pull request #8744 from justxuewei/vhu-net-compile
justxuewei Jan 4, 2024
4f9ee7b
Merge pull request #8766 from GabyCT/topic/improvedeleteion
GabyCT Jan 4, 2024
f056ffe
Merge pull request #8759 from fadecoder/update_docs_for_stratoVirt_VMM
GabyCT Jan 4, 2024
7d5336a
agent: hold lock while setting new policy
danmihai1 Dec 26, 2023
4ad1971
tests: Add hypervisor component to kill kata components function
GabyCT Jan 4, 2024
5ea07c2
Merge pull request #8776 from GabyCT/topic/addextraqemu
GabyCT Jan 4, 2024
b18f269
Merge pull request #8735 from microsoft/danmihai1/set-policy
danmihai1 Jan 4, 2024
0e9d73f
agent: Fix an issue reporting OOM events by mistake
justxuewei Jan 4, 2024
192c6ee
Merge pull request #8773 from justxuewei/dbs-k8s-fragile
justxuewei Jan 5, 2024
e3611cf
Merge pull request #8326 from cheriL/8325/fix_method_param
gkurz Jan 9, 2024
d382c21
GHA: enable static check on arm64
jongwu Dec 1, 2023
9c0b4ab
runtime-rs: use pathBuf only for x86
jongwu Dec 1, 2023
95b83bd
GHA: Enable static check for s390x
BbolroC Nov 21, 2023
5409e37
CI: Use sudo if yq_path is not writable by USER
BbolroC Nov 21, 2023
947b354
Lint: Fix `cargo clippy` errors for s390x
BbolroC Nov 21, 2023
c05216b
Static-check: Exclude s390x from dragonball and runtime-rs
BbolroC Nov 21, 2023
eb7855c
kata-ctl: Clean up a test leftover file explicitely
BbolroC Dec 4, 2023
430c119
kernel: measured rootfs as argument to build-kernel.sh
wainersm Jul 4, 2023
7d83b16
github: run static checks on ppc64le
Amulyam24 Jan 9, 2024
a89c4e8
dragonball: skip running static-checks for ppc64le
Amulyam24 Jan 9, 2024
b2016c6
runtime: fix failing unit tests on ppc64le
Amulyam24 Jan 9, 2024
76984a6
tools: fix makefile spacing
Amulyam24 Jan 9, 2024
5ce5a63
runk: skip the test_init_container_create_launcher if not root on ppc…
Amulyam24 Jan 9, 2024
d07a458
kata-ctl: skip building kata-ctl on ppc64le
Amulyam24 Jan 9, 2024
55897b4
agent: fix failing unit tests on ppc64le
Amulyam24 Jan 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/static-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
fi

build-checks:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -75,7 +74,18 @@ jobs:
install-libseccomp: yes
- component: runk
install-libseccomp: yes
instance:
- "ubuntu-20.04"
- "arm-no-k8s"
- "s390x"
- "ppc64le"
runs-on: ${{ matrix.instance }}
steps:
- name: Adjust a permission for repo
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE $HOME
sudo rm -f /tmp/kata_hybrid* # Sometime we got leftover from test_setup_hvsock_failed()
if: ${{ matrix.instance != 'ubuntu-20.04' }}
- name: Checkout the code
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -119,6 +129,7 @@ jobs:
XDG_RUNTIME_DIR=$(mktemp -d /tmp/kata-tests-$USER.XXX | tee >(xargs chmod 0700))
echo "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}" >> $GITHUB_ENV
- name: Running `${{ matrix.command }}` for ${{ matrix.component }}
if: ${{ !( matrix.instance == 'ppc64le' && matrix.command == 'make sudo -E PATH=\"$PATH\" make test' && matrix.component == 'agent' ) != 'false' }}
run: |
cd ${{ matrix.component-path }}
${{ matrix.command }}
Expand Down
14 changes: 12 additions & 2 deletions ci/install_yq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ die() {
function install_yq() {
local yq_pkg="github.com/mikefarah/yq"
local yq_version=3.4.1
local precmd=""
INSTALL_IN_GOPATH=${INSTALL_IN_GOPATH:-true}

if [ "${INSTALL_IN_GOPATH}" == "true" ];then
Expand All @@ -25,6 +26,15 @@ function install_yq() {
local yq_path="${GOPATH}/bin/yq"
else
yq_path="/usr/local/bin/yq"
# Check if we need sudo to install yq
if [ ! -w "/usr/local/bin" ]; then
# Check if we have sudo privileges
if ! sudo -n true 2>/dev/null; then
die "Please provide sudo privileges to install yq"
else
precmd="sudo"
fi
fi
fi
[ -x "${yq_path}" ] && [ "`${yq_path} --version`"X == "yq version ${yq_version}"X ] && return

Expand Down Expand Up @@ -75,9 +85,9 @@ function install_yq() {

## NOTE: ${var,,} => gives lowercase value of var
local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}"
curl -o "${yq_path}" -LSsf "${yq_url}"
${precmd} curl -o "${yq_path}" -LSsf "${yq_url}"
[ $? -ne 0 ] && die "Download ${yq_url} failed"
chmod +x "${yq_path}"
${precmd} chmod +x "${yq_path}"

if ! command -v "${yq_path}" >/dev/null; then
die "Cannot not get ${yq_path} executable"
Expand Down
2 changes: 1 addition & 1 deletion docs/Developer-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ You can build and install the guest kernel image as shown [here](../tools/packag
# Install a hypervisor

When setting up Kata using a [packaged installation method](install/README.md#installing-on-a-linux-system), the
`QEMU` VMM is installed automatically. Cloud-Hypervisor and Firecracker VMMs are available from the [release tarballs](https://github.com/kata-containers/kata-containers/releases), as well as through [`kata-deploy`](../tools/packaging/kata-deploy/README.md).
`QEMU` VMM is installed automatically. Cloud-Hypervisor, Firecracker and StratoVirt VMMs are available from the [release tarballs](https://github.com/kata-containers/kata-containers/releases), as well as through [`kata-deploy`](../tools/packaging/kata-deploy/README.md).
You may choose to manually build your VMM/hypervisor.

## Build a custom QEMU
Expand Down
17 changes: 17 additions & 0 deletions docs/design/virtualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,27 @@ Devices and features used:
- seccomp filters
- [HTTP OpenAPI](https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/vmm/src/api/openapi/cloud-hypervisor.yaml)

### StratoVirt/KVM

[StratoVirt](https://gitee.com/openeuler/stratovirt) is an enterprise-level open source VMM oriented to cloud data centers, implements a unified architecture to support Standard-VMs, containers and serverless (Micro-VM). StratoVirt has some competitive advantages, such as lightweight and low resource overhead, fast boot, hardware acceleration, and language-level security with Rust.

Currently, StratoVirt in Kata supports Micro-VM machine type, mainly focus on FaaS cases, supporting device hotplug (virtio block), file-system sharing through virtio fs and so on. Kata Containers with StratoVirt now use virtio-mmio bus as driver, and doesn't support CPU/memory resize nor VFIO, thus doesn't support updating container resources after booted.

Devices and features used currently:
- Micro-VM machine type for FaaS(mmio, no ACPI)
- Virtual Socket(vhost VSOCK、virtio console)
- Virtual Storage(virtio block, mmio)
- Virtual Networking(virtio net, mmio)
- Shared Filesystem(virtio fs)
- Device Hotplugging(virtio block hotplug)
- Entropy Source(virtio RNG)
- QMP API

### Summary

| Solution | release introduced | brief summary |
|-|-|-|
| Cloud Hypervisor | 1.10 | upstream Cloud Hypervisor with rich feature support, e.g. hotplug, VFIO and FS sharing|
| Firecracker | 1.5 | upstream Firecracker, rust-VMM based, no VFIO, no FS sharing, no memory/CPU hotplug |
| QEMU | 1.0 | upstream QEMU, with support for hotplug and filesystem sharing |
| StratoVirt | 3.3 | upstream StratoVirt with FS sharing and virtio block hotplug, no VFIO, no CPU/memory resize |
23 changes: 13 additions & 10 deletions docs/hypervisors.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ are available, their default values and how each setting can be used.

| Hypervisor | Written in | Architectures | Type | Configuration file |
|-|-|-|-|-|
[ACRN] | C | `x86_64` | Type 1 (bare metal) | `configuration-acrn.toml` |
[Cloud Hypervisor] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-clh.toml` |
[Firecracker] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-fc.toml` |
[QEMU] | C | all | Type 2 ([KVM]) | `configuration-qemu.toml` |
[`Dragonball`] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-dragonball.toml` |
|[ACRN] | C | `x86_64` | Type 1 (bare metal) | `configuration-acrn.toml` |
|[Cloud Hypervisor] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-clh.toml` |
|[Firecracker] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-fc.toml` |
|[QEMU] | C | all | Type 2 ([KVM]) | `configuration-qemu.toml` |
|[`Dragonball`] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-dragonball.toml` |
|[StratoVirt] | rust | `aarch64`, `x86_64` | Type 2 ([KVM]) | `configuration-stratovirt.toml` |

## Determine currently configured hypervisor

Expand All @@ -49,11 +50,12 @@ the hypervisors:

| Hypervisor | Summary | Features | Limitations | Container Creation speed | Memory density | Use cases | Comment |
|-|-|-|-|-|-|-|-|
[ACRN] | Safety critical and real-time workloads | | | excellent | excellent | Embedded and IOT systems | For advanced users |
[Cloud Hypervisor] | Low latency, small memory footprint, small attack surface | Minimal | | excellent | excellent | High performance modern cloud workloads | |
[Firecracker] | Very slimline | Extremely minimal | Doesn't support all device types | excellent | excellent | Serverless / FaaS | |
[QEMU] | Lots of features | Lots | | good | good | Good option for most users | | All users |
[`Dragonball`] | Built-in VMM, low CPU and memory overhead| Minimal | | excellent | excellent | Optimized for most container workloads | `out-of-the-box` Kata Containers experience |
|[ACRN] | Safety critical and real-time workloads | | | excellent | excellent | Embedded and IOT systems | For advanced users |
|[Cloud Hypervisor] | Low latency, small memory footprint, small attack surface | Minimal | | excellent | excellent | High performance modern cloud workloads | |
|[Firecracker] | Very slimline | Extremely minimal | Doesn't support all device types | excellent | excellent | Serverless / FaaS | |
|[QEMU] | Lots of features | Lots | | good | good | Good option for most users | |
|[`Dragonball`] | Built-in VMM, low CPU and memory overhead| Minimal | | excellent | excellent | Optimized for most container workloads | `out-of-the-box` Kata Containers experience |
|[StratoVirt] | Unified architecture supporting three scenarios: VM, container, and serverless | Extremely minimal(`MicroVM`) to Lots(`StandardVM`) | | excellent | excellent | Common container workloads | `StandardVM` type of StratoVirt for Kata is under development |

For further details, see the [Virtualization in Kata Containers](design/virtualization.md) document and the official documentation for each hypervisor.

Expand All @@ -63,3 +65,4 @@ For further details, see the [Virtualization in Kata Containers](design/virtuali
[KVM]: https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine
[QEMU]: http://www.qemu-project.org
[`Dragonball`]: https://github.com/kata-containers/kata-containers/blob/main/src/dragonball
[StratoVirt]: https://gitee.com/openeuler/stratovirt
Loading
Loading