From 5f4fae4f3bc34a47f37cbc82d85ed06fb4f22482 Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Tue, 3 Oct 2023 11:53:29 +0200 Subject: [PATCH] docs: improving minikube setup documentation Adding some detailed instructions on how to use the local built Rook image on minikube cluster Signed-off-by: Redouane Kachach --- .../Contributing/development-environment.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Documentation/Contributing/development-environment.md b/Documentation/Contributing/development-environment.md index f0f4a0458..2bf69e7e0 100644 --- a/Documentation/Contributing/development-environment.md +++ b/Documentation/Contributing/development-environment.md @@ -58,3 +58,32 @@ Use [helm.sh](https://github.com/rook/rook/blob/master/tests/scripts/helm.sh) to !!! note If Helm is not available in your `PATH`, Helm will be downloaded to a temporary directory (`/tmp/rook-tests-scripts-helm`) and used from that directory. + + +## Using local Rook image on minikube cluster + +Developers can test quickly their changes by building and using the local Rook image +on their minikube cluster. + +1) Set the local Docker environment to use minikube: + +```console +eval $(minikube docker-env -p minikube) +``` + +2) Build your local Rook image. The following command will generate a Rook image +labeled in the format `local/ceph-`. + +```console +cd +make BUILD_REGISTRY=local +``` + +3) Tag the generated image as `rook/ceph:master` so operator will pick it. + +```console +docker tag "local/ceph-$(go env GOARCH)" 'rook/ceph:master' +``` + +5) Create a Rook cluster in minikube, or if the Rook cluster is already configured, apply the new +operator image by restarting the operator.