Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-654 Instructions for Strimzi 0.2.0 #145

Merged
merged 3 commits into from Apr 19, 2018

Conversation

jpechane
Copy link
Contributor

Copy link
Member

@gunnarmorling gunnarmorling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpechane Thanks a lot! A few comments inline, minor things really.

@@ -19,30 +19,36 @@ It starts an OpenShift cluster just for you, allowing you to take your first ste
For setting up Kafka and Kafka Connect on OpenShift, a set of images provided by the http://strimzi.io/[Strimzi] project can be used, which offers "Kafka as a Service".
It consists of enterprise grade configuration files and images that bring Kafka to OpenShift.

First we install the Kafka broker and Kafka Connect templates into our OpenShift project:
First we install the controlloers and templates for the Kafka broker and Kafka Connect into our OpenShift project:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/controlloers/controllers/

oc create -f https://raw.githubusercontent.com/strimzi/strimzi/0.1.0/kafka-statefulsets/resources/openshift-template.yaml
oc create -f https://raw.githubusercontent.com/strimzi/strimzi/0.1.0/kafka-connect/s2i/resources/openshift-template.yaml
export STRIMZI_VERSION={strimzi-version}
git clone -b $STRIMZI_VERSION https://github.com/strimzi/strimzi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually liked the fact that it pulled the files via HTTP instead of cloning the repo. Is that not possible any more? Or what did make you change it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What not downloading the release from the "releases" and unpacking the tar.gz and then using it for Strimzi ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WRT the complexity I have no preference for any of those methods - @gunnarmorling you can choose

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong preference either. Usually I'd prefer getting the distro, but here it doesn't really make a difference as we "just" get some text files, no binaries.

# Deploy an ephemeral single instance Kafka broker
oc new-app strimzi-ephemeral -p ZOOKEEPER_NODE_COUNT=1 -p KAFKA_NODE_COUNT=1 -p KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 -p KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1

# Deploy a single instance of Kafka Connect instance with no plug-in installed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Kafka Connect instance/Kafka Connect/

mkdir -p plugins && cd plugins && \
for PLUGIN in {mongodb,mysql,postgres}; do \
curl http://central.maven.org/maven2/io/debezium/debezium-connector-$PLUGIN/$DEBEZIUM_VERSION/debezium-connector-$PLUGIN-$DEBEZIUM_VERSION-plugin.tar.gz | tar xz; \
done && \
oc start-build debezium --from-dir=. --follow && \
oc start-build my-connect-cluster-connect --from-dir=. --follow && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/my-connect-cluster-connect/my-connect-cluster/? Or perhaps "debezium-kafka-connect"?

-H "Accept:application/json" \
-H "Content-Type:application/json" \
http://kafka-connect:8083/connectors -d @- <<'EOF'
http://my-connect-cluster-connect:8083/connectors -d @- <<'EOF'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did make you change the name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default name is changed in the new template

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, but "my-connect-cluster-connect" really seems odd. Can we make it "my-connect-cluster" at least (ignoring the fact that it isn't really a cluster but just a single node).

@jpechane
Copy link
Contributor Author

@gunnarmorling I tried to use cluster name parameters. The names can't be customized in another way.

@gunnarmorling
Copy link
Member

That might be interesting feedback for @ppatierno actually. Paolo, we're looking for a way to customize the name of the Kafka Connect cluster set up via Strimzi. Any ideas?

@ppatierno
Copy link
Contributor

@gunnarmorling isn't it what you are searching for ?

oc new-app strimzi-connect-s2i -p CLUSTER_NAME=debezium .....

@jpechane
Copy link
Contributor Author

@ppatierno Still the suffix -connect is forced even if you provide your own cluster name

@ppatierno
Copy link
Contributor

@jpechane out of curiosity do you have any specific reason and/or use case so that you don't like to have a well defined suffix (the -connect one) after your customizable cluster name ?

@jpechane
Copy link
Contributor Author

@ppatierno connect is too generic - check for product templates namings https://github.com/jboss-openshift/application-templates/blob/master/amq/amq62-basic.json
Also consider chaning CLUSTER_NAME to APPLICATION_NAME to keep things consistent accross products

@gunnarmorling
Copy link
Member

gunnarmorling commented Apr 12, 2018

@jpechane, one more thing: could you try and register the connector with this routing config:

"transforms": "route",
"transforms.route.type": "org.apache.kafka.connect.transforms.RegexRouter",
"transforms.route.regex": "([^.]+)\\.([^.]+)\\.([^.]+)",
"transforms.route.replacement": "$1_$2_$3"

I see the Connect logs being flooded with lots of messages about the resulting topic name being illegal. Do you observe the same? If so, I'm wondering where this is coming from, as that config worked fine for me when using plain Docker.

@gunnarmorling
Copy link
Member

@jpechane Did you have a chance to look into that last comment of mine?

@jpechane
Copy link
Contributor Author

@gunnarmorling Sorry, I've commented yesterday in Gitter
I've just tried it and I do not see any problem
Topics were duly created
And records are stored in them
I've used registration request

 {
        "name": "inventory-connector3",
        "config": {
                "connector.class": "io.debezium.connector.mysql.MySqlConnector",
                "tasks.max": "1",
                "database.hostname": "mysql",
                "database.port": "3306",
                "database.user": "debezium",
                "database.password": "dbz",
                "database.server.id": "184054",
                "database.server.name": "dbserver3",
                "database.whitelist": "inventory",
                "database.history.kafka.bootstrap.servers": "broker-kafka:9092",
                "database.history.kafka.topic": "schema-changes.inventory",
                "transforms": "route",
                "transforms.route.type": "org.apache.kafka.connect.transforms.RegexRouter",
                "transforms.route.regex": "([^.]+)\\.([^.]+)\\.([^.]+)",
                "transforms.route.replacement": "$1_$2_$3"
        }
}

@gunnarmorling
Copy link
Member

Weird, ok then. Thanks for checking, no idea what was wrong here then.

Now there's Strimzi 0.3.0 out in between, so could you update the PR accordingly? Thx!

@jpechane
Copy link
Contributor Author

@gunnarmorling Updated and tested

@gunnarmorling
Copy link
Member

Excellent, thanks, @jpechane! Merging.

@gunnarmorling gunnarmorling merged commit dd072fc into debezium:develop Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants