diff options
-rw-r--r-- | users/fcuny/exp/containerd-to-vm/.gitignore | 3 | ||||
-rw-r--r-- | users/fcuny/exp/containerd-to-vm/Makefile | 6 | ||||
-rw-r--r-- | users/fcuny/exp/containerd-to-vm/hack/cni/50-c2vm.conflist | 26 |
3 files changed, 35 insertions, 0 deletions
diff --git a/users/fcuny/exp/containerd-to-vm/.gitignore b/users/fcuny/exp/containerd-to-vm/.gitignore index 6f01038..aaebe20 100644 --- a/users/fcuny/exp/containerd-to-vm/.gitignore +++ b/users/fcuny/exp/containerd-to-vm/.gitignore @@ -1,2 +1,5 @@ /cmd/c2vm/c2vm /c2vm +/hack/firecracker.tgz +/hack/firecracker/ +/hack/linux/ diff --git a/users/fcuny/exp/containerd-to-vm/Makefile b/users/fcuny/exp/containerd-to-vm/Makefile index a071aeb..a7997d8 100644 --- a/users/fcuny/exp/containerd-to-vm/Makefile +++ b/users/fcuny/exp/containerd-to-vm/Makefile @@ -1,3 +1,9 @@ .PHONY: build build: go build -o c2vm cmd/c2vm/main.go + +.PHONY: firecracker-binary +firecracker-binary: + mkdir -p hack/firecracker + curl -L -o hack/firecracker/firecracker.tgz https://github.com/firecracker-microvm/firecracker/releases/download/v0.24.3/firecracker-v0.24.3-x86_64.tgz + tar xvzf hack/firecracker/firecracker.tgz -C hack/firecracker diff --git a/users/fcuny/exp/containerd-to-vm/hack/cni/50-c2vm.conflist b/users/fcuny/exp/containerd-to-vm/hack/cni/50-c2vm.conflist new file mode 100644 index 0000000..9321e54 --- /dev/null +++ b/users/fcuny/exp/containerd-to-vm/hack/cni/50-c2vm.conflist @@ -0,0 +1,26 @@ +{ + "name": "c2vm", + "cniVersion": "0.4.0", + "plugins": [ + { + "type": "bridge", + "bridge": "c2vm-br", + "isDefaultGateway": true, + "forceAddress": false, + "ipMasq": true, + "hairpinMode": true, + "mtu": 1500, + "ipam": { + "type": "host-local", + "subnet": "192.168.128.0/24", + "resolvConf": "/etc/resolv.conf" + } + }, + { + "type": "firewall" + }, + { + "type": "tc-redirect-tap" + } + ] +} |