Skip to content

databius/contractbius

Repository files navigation

Schema Registry

Gradle

Open and import as gradle project

gradle generateSchema

Start the Schema Registry Server

docker-compose up -d

Waiting all ready

gitops

schema-registry-gitops

docker run --rm --name schema-registry-gitops -v ./src/main/avdl:/avdl \
  domnikl/schema-registry-gitops:1.9.0 plan --registry http://host.docker.internal:8081 \
  /avdl/com/databius/contractbius/.state.yml
docker run --rm --name schema-registry-gitops -v ./src/main/avdl:/avdl \
  domnikl/schema-registry-gitops:1.9.0 apply --registry http://host.docker.internal:8081 \
  /avdl/com/databius/contractbius/.state.yml

Extract the schema and subjects declarations from the contract and load into .state.yaml Requires: yq

yq e '.schema | .registry[].subjects.schema = (. | .specification) | select(.type == "avro").registry | .[].subjects as $item ireduce ([]; . += $item) | {"subjects": .}' \
  ./src/main/contract/com/databius/contractbius/datacontract.yaml > ./src/main/contract/com/databius/contractbius/.state.yaml

Register to schema registry

docker run --rm --name schema-registry-gitops -v ./src/main/contract:/contract \
  domnikl/schema-registry-gitops:1.9.0 apply --registry http://host.docker.internal:8081 \
  /contract/com/databius/contractbius/.state.yaml

Stop

docker-compose down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published