Skip to content
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.

scholzj/strimzi-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Demo files for Strimzi project

Preparation

  • Start OpenShift and login as admin
oc cluster up
oc login -u system:admin

Cluster Controller

  • Deploy cluster controller
oc apply -f cluster-controller/openshift-template.yaml
  • Create Kafka / Zookeeper cluster
    • In OpenShift console
  • Create Kafka Config
    • In OpenShift console

Topic Controller

  • Deploy Topic Controller
oc apply -f topic-controller/openshift-template.yaml
  • Create topic through Kafka
oc exec kafka-1 -i -t -- bin/kafka-topics.sh --zookeeper kafka-zookeeper:2181 --create --topic created-in-kafka --partitions 3 --replication-factor 1 --config cleanup.policy=compact
  • Create topic through Config Map
oc apply -f topic-controller/topic.yaml
  • Show how they are reconciled
oc exec kafka-1 -i -t -- bin/kafka-topics.sh --zookeeper kafka-zookeeper:2181 --describe --topic created-as-configmap
oc get configmap created-in-kafka -o yaml

Conflict solving and merging

  • Shutdown topic controller
oc delete -f topic-controller/openshift-template.yaml
  • Create conflicting topics
oc apply -f topic-controller/conflict/topic.yaml
oc exec kafka-1 -i -t -- bin/kafka-topics.sh --zookeeper kafka-zookeeper:2181 --create --topic example-conflict-topic --partitions 3 --replication-factor 1 --config cleanup.policy=compact

oc apply -f topic-webhook/example-rejected-consumer.yaml

  • Recreate controller and let it deal with it
oc apply -f topic-controller/openshift-template.yaml
  • Show how conflict resolved (Kafka wins)
oc exec kafka-1 -i -t -- bin/kafka-topics.sh --zookeeper kafka-zookeeper:2181 --describe --topic example-conflict-topic
oc get configmap example-conflict-topic -o yaml
  • Shutdown topic controller
oc delete -f topic-controller/openshift-template.yaml
  • Re-apply topic
oc apply -f topic-controller/conflict/topic.yaml
  • Recreate controller and let it deal with it
oc apply -f topic-controller/openshift-template.yaml
  • Show how the changes merged and explain how the third source of truth was used
oc exec kafka-1 -i -t -- bin/kafka-topics.sh --zookeeper kafka-zookeeper:2181 --describe --topic example-conflict-topic
oc get configmap example-conflict-topic -o yaml

Topic Webhook

  • Deploy Topic Webhook
oc apply -f topic-webhook/openshift.yaml
  • Create producer and consumer which create topic
oc apply -f topic-webhook/example-consumer.yaml
oc apply -f topic-webhook/example-producer.yaml
oc exec kafka-1 -i -t -- bin/kafka-topics.sh --zookeeper kafka-zookeeper:2181 --describe --topic my-webhooked-topic
  • Show how it collaborates with the topic controller
oc get configmap my-webhooked-topic -o yaml
  • Show invalid consumer and show in console how it is rejected
oc apply -f topic-webhook/example-rejected-consumer.yaml

About

Demo files for Strimzi project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages