- Clone the gpins repo:
git clone https://github.com/sonic-net/sonic-buildimage.git
- Init
export NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 NOBULLSEYE=1
make init
- Configure
PLATFORM=alpinevs make configure
- Build
make target/sonic-alpinevs.img.gz
- Build alpinevs container
./alpine/build_alpinevs_container.sh
Pre-req: A KVM enabled workstation (or VM) which can support VMs on it
- Install KNE and setup KNE cluster
kne deploy deploy/kne/kind-bridge.yaml
- Load alpinevs container image in kne:
kind load docker-image alpine-vs:latest --name kne
- Download Lemming. Build the Lucius dataplane and load it
https://github.com/openconfig/lemming
cd lemming
bazel build //dataplane/standalone/lucius:image-tar
docker load -i bazel-bin/dataplane/standalone/lucius/image-tar/tarball.tar
kind load docker-image us-west1-docker.pkg.dev/openconfig-lemming/release/lucius:ga --name kne
- Create 2 switch Alpine topology:
- Modify the deploy/kne/twodut-alpine.pb.txt to point to the correct Alpine and Lucius images
kne create twodut-alpine.pb.txt
- Terminals
- [Terminal1] SSH to the AlpineVS DUT Switch VM inside the deployment:
ssh-keygen -f /tmp/id_rsa -N ""
Set IPDUT var to the EXTERNAL-IP of "kubectl get svc -n twodut-alpine service-alpine-dut"
ssh-copy-id -i /tmp/id_rsa.pub -oProxyCommand=none admin@$IPDUT
ssh -i /tmp/id_rsa -oProxyCommand=none admin@$IPDUT
- [Terminal2] SSH to the AlpineVS Control Switch VM inside the deployment:
ssh-keygen -f /tmp/id_rsa -N ""
Set IPCTL var to the EXTERNAL-IP of "kubectl get svc -n twodut-alpine service-alpine-ctl"
ssh-copy-id -i /tmp/id_rsa.pub -oProxyCommand=none admin@$IPCTL
ssh -i /tmp/id_rsa -oProxyCommand=none admin@$IPCTL
- Useful commands
- Login to the host
kubectl exec -it -n twodut-alpine alpine-dut -- bash
- Dataplane logs
kubectl logs -n twodut-alpine alpine-dut -c dataplane