Skip to content

Instantly share code, notes, and snippets.

View jodh-intel's full-sized avatar
💭
setting my status to setting my status

James O. D. Hunt jodh-intel

💭
setting my status to setting my status
View GitHub Profile
@jodh-intel
jodh-intel / kata-deploy.yaml.diff
Created February 7, 2024 17:11
kata deploy diff
diff --git a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
index 0360847a5..99abec7fe 100644
--- a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
+++ b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
@@ -17,7 +17,7 @@ spec:
hostPID: true
containers:
- name: kube-kata
- image: quay.io/kata-containers/kata-deploy:latest
+ image: quay.io/kata-containers/kata-deploy-ci:kata-containers-amd64
@jodh-intel
jodh-intel / configuration.toml
Last active March 23, 2023 17:54
Example Kata Containers configuration for runtime-rs runtime with Cloud Hypervisor feature enabled.
# Copyright (c) 2019 Ericsson Eurolab Deutschland GmbH
# Copyright (c) 2021 Adobe Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# XXX: WARNING: this file is auto-generated.
# XXX:
# XXX: Source file: "config/configuration-clh.toml.in"
# XXX: Project:

Install rust

Install the rust language server and clippy tools:

$ rustup component add rustfmt rls
$ rustup component add clippy
@jodh-intel
jodh-intel / kata-containers-unit-testing.md
Last active February 11, 2022 15:10
Kata Containers Unit Testing
date title author
2022-02-01
Kata Containers unit testing
James O. D. Hunt

Why write unit tests?

  • Catch regressions
@jodh-intel
jodh-intel / kata-full-fat-kernel.md
Last active January 11, 2022 15:42
Idea for a "full fat" Kata Containers guest kernel

Full fat kernel

Background

  • Originally, the guest kernel was as minimal as possible.
  • Booted extremely fast, but didn't support all uses-cases.
  • Over time, we have added lots of extra kernel CONFIG_* options...
    • For new kernel options
    • For new hardware features
@jodh-intel
jodh-intel / kata-containers-tracing-status.md
Created May 25, 2021 15:33
Kata Containers tracing status update (2021-05-25)

Background

Chelsea and I have been looking at adding end-to-end openTelemetry tracing support to Kata Containers.

Components

With Kata 2.x's simpler architecture, we only need tracing support in:

  • hypervisor (ideally)
#!/bin/bash
#
# Copyright (c) 2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#---------------------------------------------------------------------
# FIXME: - start trace forwarder!
#---------------------------------------------------------------------
@jodh-intel
jodh-intel / kata-agent-shutdown-testing.md
Last active March 9, 2021 09:20
Kata agent shutdown testing / debugging
  • Use osbuilder to create a custom rootfs.
  • Ensure you add extra packages for bash, strace, gdb (and maybe rust-gdb).
  • Install an updated kata-agent.service file into the image:
    $ cat kata-agent.service.in
    #
    # Copyright (c) 2018-2019 Intel Corporation
    #
    # SPDX-License-Identifier: Apache-2.0
    #
diff --git a/src/server.rs b/src/server.rs
index e307527..5871fd4 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -46,6 +46,7 @@ pub struct Server {
quit: Arc<AtomicBool>,
connections: Arc<Mutex<HashMap<RawFd, Connection>>>,
methods: Arc<HashMap<String, Box<dyn MethodHandler + Send + Sync>>>,
+ pre_handler: Option<Arc<Box<dyn PreHandler + Send + Sync>>>,
handler: Option<JoinHandle<()>>,
@jodh-intel
jodh-intel / RUNNING_KATA_CONTAINERS.md
Last active January 25, 2018 16:42
Running Kata Containers with the Clear Containers runtime