# Development Guide
# Pre-requisites
Access to Kubernetes cluster
First of all, you will need access to a Kubernetes cluster. The easiest way to start is minikube.
- Virtualbox (opens new window) - hypervisor to run a Kubernetes cluster
- Minikube (opens new window) - for Kubernetes cluster creation on local machine
- Kubectl (opens new window) - to interact with Kubernetes cluster
Tools to build an Operator
Apart from kubernetes cluster, there are some tools which are needed to build and test the redis operator.
- Git (opens new window)
- Go (opens new window)
- Docker (opens new window)
- Operator SDK (opens new window)
- Make (opens new window)
# Build
Build Locally
To achieve this, execute this command:-
$ make manager
...
/go/src/redis-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
go build -o bin/manager main.go
Build Image
Redis operator gets packaged as a container image for running on the Kubernetes cluster. These instructions will guide you to build an image.
$ make docker-build
# Testing
If you want to play it on Kubernetes. You can use a minikube.
$ minikube start --vm-driver virtualbox
...
๐ minikube v1.0.1 on linux (amd64)
๐คน Downloading Kubernetes v1.14.1 images in the background ...
๐ฅ Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ถ "minikube" IP address is 192.168.39.240
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.3-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐ Pulling images required by Kubernetes v1.14.1 ...
๐ Launching Kubernetes v1.14.1 using kubeadm ...
โ Waiting for pods: apiserver proxy etcd scheduler controller dns
๐ Configuring cluster permissions ...
๐ค Verifying component health .....
๐ kubectl is now configured to use "minikube"
๐ Done! Thank you for using minikube!
Running Test Cases
$ make test
โ Grafana Dashboard Release Management โ