Service Registry (Apicurio) Deployment
Since the Fight and Statistics microservices will be producing and consuming events or messages to/from Kafka broker as the architecture diagram below. To make sure that the message format is valid and consumable by the services, we need to define the message schema and keep it somewhere that services can access and use the schema to validate the messages.
Schema Registry
In the messaging and event streaming world, data that are published to topics and queues often must be serialized or validated using a Schema (e.g. Apache Avro, JSON Schema, or Google protocol buffers). Schemas can be packaged in each application, but it is often a better architectural pattern to instead register them in an external system and then referenced from each application.
So, we have to setup the schema registry for the microservices before we're going to deploy them.

Deploy Red Hat Integration - Service Registry
Red Hat Integration - Service Registry is based on Apicruio Registry open source project. Follow these steps to deploy it.
- Click on the book icon, to add application from Developer Catalog then type - registryin the search box. Select Apicurio Registry and click Create button. - Deploy Service Registry 
- Enter - apicurioto the Name field then click > to expand the configuration section. - Deploy Service Registry 
- Click > to expand the env and kafkasql sections.  - Deploy Service Registry 
- Enter - fights-kafka-bootstrap.userX-super-heroes.svc.cluster.local:9092to bootstrapServers field. ❗DO NOT FORGET to change the- userXto your user.- This is an internal DNS hostname and port of the Kafka broker you've deployed earlier. Basically, we're going to use Kafka as a datastore for Apicurio Registry to store schemas. However, the datastore can be SQL database i.g. PostgreSQL as well. - Then click Add env link.  - Deploy Service Registry 
- Enter following environment variable then click > to expand deployment section. - name: - REGISTRY_AUTH_ANONYMOUS_READ_ACCESS_ENABLED
- value: - true
  - Deploy Service Registry 
- Enter - 1to replicas field then click Create button. - Deploy Service Registry 
- Wait for a while until you see dark blue ring surrounds the apicurio-deployment entity. That means the pod is running! 🎉  - Deploy Service Registry 
What have you learnt?
How to set up Apicurio Registry (schema registry) instance using Red Hat Integration - Service Registry ( based on Apicruio Registry open source project).
Last updated
