docker-compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1
docker-compose -f docker/docker-compose.yml ps
-docker-compose -f docker/docker-compose.yml up -t0 -d cli
-sleep 1
-docker-compose -f docker/docker-compose.yml logs setup
-
-echo
-echo "Hilfe-Ausgabe von kafkacat"
-echo
-docker-compose -f docker/docker-compose.yml exec -T cli kafkacat -h
-echo
-echo "Nachrichten schreiben mit kafkacat"
-echo
-docker-compose -f docker/docker-compose.yml exec -T cli kafkacat -P -b kafka:9092 -t test << EOF
-Hallo Welt!
-Nachricht #1
-Nachricht #2
-Nachricht #3
-EOF
-echo
-echo "Nachrichten lesen mit kafkacat"
-echo
-docker-compose -f docker/docker-compose.yml exec cli kafkacat -C -b kafka:9092 -t test -o beginning -e
+# Nicht nötig, da `super.users=User:ANONYMOUS` gesetzt wurde
+# Ohne diesen Eintrag wären diverse ACLs nötig, bevor BROKER funktioniert!
+# docker-compose exec cli kafka-acls --authorizer-properties zookeeper.connect=zookeeper zookeeper:2181 --add --allow-principal User:ANONYMOUS --operation ALL --topic __CruiseControlMetrics --group=*
+
+# schema-registry
+docker-compose -f docker/docker-compose.yml exec cli kafka-acls \
+ --authorizer-properties zookeeper.connect=zookeeper \
+ --add \
+ --allow-principal User:schemaregistry \
+ --topic _schemas \
+ --consumer --group=schema-registry \
+ --producer
+docker-compose -f docker/docker-compose.yml exec cli kafka-acls \
+ --authorizer-properties zookeeper.connect=zookeeper \
+ --add \
+ --allow-principal User:schemaregistry \
+ --topic _schemas \
+ --operation=DescribeConfigs
kafkacat -L -b :9092 -Xsecurity.protocol=sasl_plaintext -Xsasl.mechanisms=PLAIN -Xsasl.username=client -Xsasl.password=client-secret
+docker-compose -f docker/docker-compose.yml up -d schema-registry
+while [[ ! $(http :8085/subjects 2> /dev/null) ]]; do echo Waiting for schema-registry; sleep 1; done
cat user-v1.schema|http POST http://localhost:8085/subjects/user/versions "Content-Type:application/vnd.schemaregistry.v1+json"
http GET http://0:8085/subjects/user/versions/1/schema
+
+# kafka-connect
+docker-compose -f docker/docker-compose.yml exec cli kafka-acls \
+ --authorizer-properties zookeeper.connect=zookeeper \
+ --add \
+ --allow-principal User:connect \
+ --topic __connect \
+ --resource-pattern-type prefixed \
+ --consumer --group=kafka-connect \
+ --producer
+while [[ ! $(http :8083/connectors 2> /dev/null) ]]; do echo Waiting for schema-registry; sleep 1; done
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
- KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "false"
+ KAFKA_SUPER_USERS: User:ANONYMOUS
+ KAFKA_LOG4J_LOGGERS: kafka.authorizer.logger=INFO
KAFKA_OPTS:
-javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
-Dcom.sun.management.jmxremote=true
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
- KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "false"
+ KAFKA_SUPER_USERS: User:ANONYMOUS
+ KAFKA_LOG4J_LOGGERS: kafka.authorizer.logger=INFO
KAFKA_OPTS:
-javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
-Dcom.sun.management.jmxremote=true
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
- KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "false"
+ KAFKA_SUPER_USERS: User:ANONYMOUS
+ KAFKA_LOG4J_LOGGERS: kafka.authorizer.logger=INFO
KAFKA_OPTS:
-javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
-Dcom.sun.management.jmxremote=true
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
- KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "false"
+ KAFKA_SUPER_USERS: User:ANONYMOUS
+ KAFKA_LOG4J_LOGGERS: kafka.authorizer.logger=INFO
KAFKA_OPTS:
-javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml
-Dcom.sun.management.jmxremote=true