Apicurio Registry Operator development quickstart on Minikube
This chapter explains how to build Apicurio Registry Operator and deploy it to a Minikube cluster.
Apicurio Registry Operator Build
Follow this procedure to build the Apicurio Registry Operator for development and testing purposes:
-
Docker
-
go v1.13+ (with
export GO111MODULE='on', `$GOPATH
, and$GOROOT
). -
Operator SDK v11+
-
Clone the Apicurio Registry Operator repository under your
$GOPATH
path:mkdir $GOPATH/src/github.com/Apicurio cd $GOPATH/src/github.com/Apicurio git clone git@github.com:Apicurio/apicurio-registry-operator.git cd apicurio-registry-operator
-
Choose an image registry to store your builds of the operator, for example quay.io:
export REGISTRY="quay.io/example"
-
Use the build scripts to build and push the operator images to the registry:
./build.sh help ./build.sh build -r "$REGISTRY" ./build.sh push -r "$REGISTRY"
Deploy Apicurio Registry Operator to Minikube
Follow this procedure to deploy Apicurio Registry to Minikube using a development Apicurio Registry Operator build:
-
You must build the Apicurio Registry Operator and push the resulting image to a registry of your choice.
-
You must install a Minikube cluster.
-
Start your Minikube cluster:
minikube start
If you are using Kafka storage options and want to run Strimzi, provide extra memory to the cluster: --memory=6144
|
-
Make sure the ingress addon is enabled:
minikube addons enable ingress
-
Get the IP address of the cluster:
$ minikube ip 192.168.99.111
-
(Optional) Edit you
/etc/hosts
file to resolve registry host to the cluster IP address:$ cat /etc/hosts [...] 192.168.99.111 registry.example.com
Use the same host in the
ApicurioRegistry
CR later. -
In order to deploy the Apicurio Registry with the in-memory storage, no further prerequisites are needed. You can use the build scripts to deploy an example
ApicurioRegistry
CR:./build.sh mkdeploy -r "$REGISTRY" -n default --cr ./docs/modules/ROOT/examples/in-memory_cr.yaml
-
If you want to remove the operator and cleanup the resources, run:
./build.sh mkundeploy -r "$REGISTRY" -n default
-
Try the following HTTP requests to test the deployment:
curl -v http://registry.example.com/health curl -v http://registry.example.com/health/ready curl -v http://registry.example.com/health/live
or create a test artifact:
curl -X POST -H "Content-Type: application/json" \ -H "X-Registry-ArtifactType: JSON" \ -H "X-Registry-ArtifactId: test1" \ -d '{"type": "cat", "color": "black"}' \ http://registry.example.com/artifacts
If you did not configure your /etc/hosts
file, trycurl -H "Host: registry.example.com" http://$(minikube ip)/health