# kubeadm init --pod-network-cidr=10.244.0.0/16
# kubectl apply -f flannel.yaml
# git clone https://github.com/openfaas/faas-netes
# kubectl apply -f ./faas-netes/faas.yml,monitoring.yml,rbac.yml
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type nestedFoo struct { | |
| A int | |
| B uint32 |
This file contains hidden or 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
| # XXX: Warning: this file is auto-generated from file "config/configuration.toml.in". | |
| [hypervisor.qemu] | |
| path = "/usr/bin/qemu-lite-system-x86_64" | |
| kernel = "/usr/share/clear-containers/vmlinuz.container" | |
| image = "/usr/share/clear-containers/clear-containers.img" | |
| machine_type = "pc" | |
| # Optional space-separated list of options to pass to the guest kernel. | |
| # For example, use `kernel_params = "vsyscall=emulate"` if you are having | |
| # trouble running pre-2.15 glibc |
root@k8s-vm:~# docker pull busybox
root@k8s-vm:~# docker export $(docker create busybox) > busybox.tar
root@k8s-vm:~# mkdir -p bundle/rootfs
root@k8s-vm:~# tar -xf busybox.tar -C bundle/rootfs/
root@k8s-vm:~# ls bundle/rootfs/
bin dev etc home lib media mnt proc root run sbin srv sys tmp usr var
root@k8s-vm:~# cd bundle
root@k8s-vm:~/bundle# runc spec
root@k8s-vm:~/bundle# lsvirtio is a kernel virtual bus. From drivers/virtio/virtio.c:
static struct bus_type virtio_bus = {
.name = "virtio",
.match = virtio_dev_match,
.dev_groups = virtio_dev_groups,
.uevent = virtio_uevent,
.probe = virtio_dev_probe,
.remove = virtio_dev_remove,Q: vhost and kernel driver/device binding? Q: vhost virtqueue
~/devlp/crosvm/target/debug/crosvm stop /run/user/1000/crosvm.sock
rm -f /run/user/1000/crosvm.sock && cargo build && ./target/debug/crosvm run --disable-sandbox -s /run/user/1000/crosvm.sock ~/devlp/kernels/nfc/arch/x86/boot/compressed/vmlinux.bin
(Copied from Manohar's gist: https://gist.github.com/mcastelino/74dc46bdfddc9943f2c04466d605a65b which is copied from https://gist.github.com/pacalet/660fa6472e0bcd53f71fc31f167c628f)
- Use a busybox based rootfs for ease of use
git clone https://github.com/mirror/busybox
cd busybox