forked from sc2-sys/deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40cca98
commit 81614ab
Showing
17 changed files
with
433 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Kata Containers | ||
|
||
Most of the Kata development happens in our [Kata fork]( | ||
https://github.com/csegarragonz/kata-containers). The reason why we use a fork | ||
is to pin to an older, but stable, CC release, and add patches on top when | ||
necessary. Down the road (and particularly when CoCo uses Kata's main), we'd | ||
get rid of the fork. | ||
|
||
## Tweaking Kata | ||
|
||
To get a working environment to modify Kata, clone our fork and build/exec into | ||
the workon container. For convenience, it is recommended to clone the fork at | ||
the same directory level that this repo lives (i.e. ../kata-containers). | ||
|
||
```bash | ||
git clone https://github.com/csegarragonz/kata-containers | ||
cd kata-containers | ||
./csg-bin/build_docker.sh | ||
./csg-bin/cli.sh | ||
``` | ||
|
||
## Replacing the Kata Agent | ||
|
||
Replacing the Kata Agent is something we may do regularly, and is a fairly | ||
automated process. | ||
|
||
First, from our Kata fork, rebuild the `kata-agent` binary: | ||
|
||
```bash | ||
cd ../kata-containers | ||
./csg-bin/cli.sh | ||
cd src/agent | ||
make | ||
exit | ||
cd - | ||
``` | ||
|
||
Second, from this repository, bake the new agent into the `initrd` image used | ||
by `qemu-sev` and update the config path: | ||
|
||
```bash | ||
inv kata.replace-agent | ||
``` | ||
|
||
The new VMs you start should use the new `initrd` (and thus the updated | ||
`kata-agent`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Troubleshooting | ||
|
||
In this document we include a collection of tips to help you debug the system | ||
in case something is not working as expected. | ||
|
||
## K8s Monitoring with K9s | ||
|
||
Gaining visibility into the state of a Kubernetes cluster is hard. Thus we can | ||
not stress enough how useful `k9s` is to debug what is going on. | ||
|
||
We strongly recommend you using it, you may install it with: | ||
|
||
```bash | ||
inv k9s.install | ||
export KUBECONFIG=$(pwd)/.config/kubeadm_kubeconfig | ||
k9s | ||
``` | ||
|
||
## Enabling debug logging in the system journal | ||
|
||
Another good observability tool are the journal logs. Both `containerd` and | ||
`kata-agent` send logs to the former's systemd journal log. You may inspect | ||
the logs using: | ||
|
||
```bash | ||
sudo journalctl -xeu containerd | ||
``` | ||
|
||
To enable debug logging you may run: | ||
|
||
```bash | ||
inv containerd.set-log-level [debug,info] | ||
inv kata.set-log-level [debug,info] | ||
``` | ||
|
||
naturally, run the commands again with `info` to reset the original log level. | ||
|
||
## Nuking the whole cluster | ||
|
||
When things really go wrong, resetting the whole cluster is usually a good way | ||
to get a clean start: | ||
|
||
```bash | ||
inv kubeadm.destroy kubeadm.create | ||
``` | ||
|
||
If you want a really clean start, you can re-install cotnainerd and all the | ||
`k8s` tooling: | ||
|
||
```bash | ||
inv kubeadm.destroy | ||
inv containerd.build containerd.install | ||
inv k8s.install --clean | ||
inv kubeadm.create | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from invoke import task | ||
from os.path import join | ||
from tasks.util.env import KATA_CONFIG_DIR | ||
from tasks.util.toml import update_toml | ||
|
||
|
||
@task | ||
def disable_attestation(ctx): | ||
""" | ||
Disable attestation for CoCo | ||
""" | ||
conf_file_path = join(KATA_CONFIG_DIR, "configuration-qemu-sev.toml") | ||
updated_toml_str = """ | ||
[hypervisor.qemu] | ||
guest_pre_attestation = false | ||
""" | ||
update_toml(conf_file_path, updated_toml_str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.