Skip to content

Mizar Developer Tips & Tricks

Vinay Kulkarni edited this page Jun 16, 2021 · 3 revisions

Build, Unit Tests, E2E Tests

To build Mizar, recommended system requirements are [TODO: figure out minimum system needs]

git clone https://github.com/CentaurusInfra/mizar
cd mizar
make all

Deployment

Mizar can be deployed locally on a single VM using kind (Kubernetes In Docker) or in a pre-created K8s cluster (e.g. using kubeadm)

Locally using Kubernetes in Docker (kind)

To deploy in kind for development & debugging, 'dev' mode is available.

./kind-setup.sh dev 2

The above would create a local kind cluster that had one control-plane master and two worker nodes.

Deployment in a set of VMs or bare-metal servers.

Once a cluster has been deployed using kubeadm or other means, Mizar can be deployed as follows:

kubectl create -f https://raw.githubusercontent.com/CentaurusInfra/mizar/dev-next/etc/deploy/deploy.mizar.yaml

Currently, there are a few caveats with yaml deployment:

  • Tested and supported only with Ubuntu 18.04.05
  • kernel has been updated using ./bootstrap.sh script (which calls kernel-update.sh)
  • Persistent interface naming needs to be disabled.

Debugging

Mizar has the following key components: transit daemon, operator, and XDP.

To view Mizar daemon logs, look up the daemon pod name and get the logs as shown in below example:

kubectl get pods -owide | grep "mizar-daemon"
kubectl logs mizar-daemon-42vgw

To view Mizar operator logs, look up the daemon pod name and get the logs as shown in below example:

kubectl get pods | grep "mizar-operator"
kubectl logs mizar-operator-54df7b55d-7l4lk

To view CNI and kubelet logs on a node,

journalctl -b-0 -u kubelet

To view XDP debug logs:

sudo cat /sys/kernel/debug/tracing/trace_pipe