Apicurio Studio

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:

Prerequisites
  • Docker

  • go v1.13+ (with export GO111MODULE='on', `$GOPATH, and $GOROOT).

  • Operator SDK v11+

Procedure
  1. 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
  2. Choose an image registry to store your builds of the operator, for example quay.io:

    export REGISTRY="quay.io/example"
  3. 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:

Prerequisites
  • You must build the Apicurio Registry Operator and push the resulting image to a registry of your choice.

  • You must install a Minikube cluster.

Procedure
  1. 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
  1. Make sure the ingress addon is enabled:

    minikube addons enable ingress
  2. Get the IP address of the cluster:

     $ minikube ip
     192.168.99.111
  3. (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.

  4. 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
  5. If you want to remove the operator and cleanup the resources, run:

    ./build.sh mkundeploy -r "$REGISTRY" -n default
  6. 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, try curl -H "Host: registry.example.com" http://$(minikube ip)/health