This project use cp-demo to create the testing cluster. Spin up the cluster prior to running any of the examples in this repo
You can run it using the CLI or docker
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/config"
docker run -t -i \
-v ${DIR}:/config \
--network="julie-playground_default"\
purbon/kafka-topology-builder:latest \
/bin/bash -c 'julie-ops-cli.sh --brokers broker:29092 --clientConfig /config/topology-builder.properties --topology /config/'$1
-v
is used to mount${DIR}
(from your local computer) into the container directory/config
- uses
json
oryml
files. Definitions might be composed by multiple files but all of them need to use the same format context:
=> Groups projects and there may be many. Usually define a team or a line of business or the origin DC-
#top of the file context: "DC1" projects: # [...]
-
projects:
=> Belongs to acontext
. Groups cluster entity definitions such as: topic, Schemas, permissions (ACLs or RBAC)-
#top of the file context: "DC1" projects: - name: "project1" - name: "project2"
-
- By default the format for entity names is
context.project.entity-name
- In between
context:
andprojects
, arbitrary key-value pairs can be defined to compose the name of the desired entity. By default the KV pairs are taken in order.-
context: "DC1" domain: "foo" team: "bar" projects: - name: "project1"
- Will define an **entity which name's prefix** is going to be `DC1.foo.bar.project1`
-
- managing topics with Julie is done using the key
topics:
which is nested under a project
name:
topic namedataType:
defines the data format the topic uses between avro, protobuf or json schemaschemas:
schema definition dictionaryvalue.schema.file:
schema for the subject valuekey.schema.file:
schema for the subject keyvalue.record.type:
the name of the specific record if using[Topic]RecordNameStrategy
for subjectskey.record.type:
the name of the specific record if using[Topic]RecordNameStrategy
for subjectskey.format:
defines the data format used. Required if the key and the value use a different formatvalue.compatibility:
sets the compatibility mode for the subject.
subject.name.strategy:
defines the strategy for naming Schema Registry subjectsconsumers:
gives access to one or many consumers to the specific topicprincipal:
consumer principal
producers:
gives access to one or many producers to the specific topicprincipal:
producer principal
config:
controls topic configuration. Each configuration property uses the same name and values as if you configure a topic elsewhere
- Uses the key
connectors:
nested under a project
artifacts:
Set of connector artifacts to managepath:
path to the connector json configuration. Path is relative to the descriptorserver:
name of the connect nodename
name of the connector. Needs to match with the name in the connector json config
access-control:
set of permissions gave to the specific connector principal you want to useprincipal:
name of the connector principaltopics:
target topic for permissionsread:
gives read permissions. Contains a list of topicswrite:
gives write permissions. Contains a list of topics
principal:
principal connector uses target for permission. If used at this level,artifacts:
can't be definedconnectors:
used when defining principals (the attribute just above). Lists connectors thatprincipal:
will have access to
- Uses the key
ksql:
nested under a project
artifacts:
Set of ksql artifacts to manage (tables, streams..)tables:
deploys a table querypath:
path to thesql
file with the query. The path is relative to the descriptorname:
name of the query
stream:
deploys a stream querypath:
path to thesql
file with the query. The path is relative to the descriptorname:
name of the query