Local Development
This guide helps the developer in setting and running a local env that can be used to deploy the various DPF components and run tests. The local env doesn't require a DPU.
GO >= 1.23
Go to your local dev project git repo
cd <path_to_local_repo/doca-platform-foundation
export minikube env vars (Linux):
export REGISTRY=<insert_your_registry>
export MINIKUBE_CNI=flannel
export MINIKUBE_DRIVER=docker
export MINIKUBE_DOCKER_MIRROR="https://registry-1.docker.io"
export DEPLOY_KSM=true
export DEPLOY_GRAFANA=true
export DEPLOY_PROMETHEUS=true
export IMAGE_PULL_KEY=<IMAGE_PULL_TOKEN>
export TAG=v0.1.0
-$(git rev-parse --short
HEAD)-$USER-test
Note: For MAC users add:
export MINIKUBE_EXTRA_ARGS="--network=socket_vmnet"
On Mac the development environment is designed to work with Docker Desktop running with Apple Virtualization.
Generate all
make generate
Build images required for the quick DPF e2e test.
make test-release-e2e-quick
Deploy Minikube
make clean-test-env test-env-e2e
Deploy DPF Operator
make test-deploy-operator-helm
Run e2e tests
make test-e2e
Note: If you want to keep the created resources (e.g., DPFOperatorConfig
, DPU
and such) you can use the environment variable E2E_SKIP_CLEANUP=true
E2E_SKIP_CLEANUP=true
make test-e2e
Clean Minikube env
make clean-test-env
the make target
clean-test-env
is stuck
try with:
minikube delete --all --alsologtostderr
Enable metrics API in minikube
minikube -p dpf-test addons enable metrics-server
Machine Doesn't Have Enough Resources To Run Minikube:
Reduce the Resource Demands of Minikube. e.g.,
export NODE_MEMORY=4g
export NODE_CPUS=2
export NODE_DISK=50g
make test-env-e2e