Skip to content

Commit

Permalink
documented how to override the topic names for kafka storage (#968)
Browse files Browse the repository at this point in the history
* documented how to override the topic names for kafka storage

* changes based on review feedback
  • Loading branch information
EricWittmann authored Oct 30, 2020
1 parent 35b2dd1 commit 3df067b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ ifdef::rh-service-registry[]
.. Click *Installed Operators* > *Red Hat Integration - {kafka-streams}*.
endif::[]
.. Under *Provided APIs* > *Kafka*, click *Create Instance* to create a new Kafka cluster.
.. Edit the custom resource definition as appropriate, and click *Create*.
.. Edit the custom resource definition as appropriate, and click *Create*.
+
WARNING: The default example creates a cluster with 3 Zookeeper nodes and 3 Kafka nodes with `ephemeral` storage. This temporary storage is suitable for development and testing only, and not for production. For more details, see link:https://access.redhat.com/documentation/en-us/red_hat_amq/{amq-version}/html/using_amq_streams_on_openshift/index?[Using AMQ Streams on OpenShift].

. After the cluster is ready, click *Provided APIs* > *Kafka* > *my-cluster* > *YAML*.
. After the cluster is ready, click *Provided APIs* > *Kafka* > *my-cluster* > *YAML*.

. In the `status` block, make a copy of the `bootstrapServers` value, which you will use later to deploy {registry}. For example:
+
Expand All @@ -49,19 +49,19 @@ status:

. Create a Kafka topic to store the {registry} artifacts:
+
.. Under *Provided APIs* > *Kafka Topic*, click *Create topic*.
.. Under *Provided APIs* > *Kafka Topic*, click *Create topic*.
.. Change the default topic name from `my-topic` to the required `storage-topic`.

. Create a Kafka topic to store the {registry} global IDs:
.. Under *Provided APIs* > *Kafka Topic*, click *Create topic*.
.. Change the default topic name from `my-topic` to the required `global-id-topic`.
ifdef::apicurio-registry[]
. Click *Installed Operators* > *{registry}* > *ApicurioRegistry* > *Create ApicurioRegistry*.
. Click *Installed Operators* > *{registry}* > *ApicurioRegistry* > *Create ApicurioRegistry*.
endif::[]
ifdef::rh-service-registry[]
. Click *Installed Operators* > *Red Hat Integration - {registry}* > *ApicurioRegistry* > *Create ApicurioRegistry*.
. Click *Installed Operators* > *Red Hat Integration - {registry}* > *ApicurioRegistry* > *Create ApicurioRegistry*.
endif::[]
. Paste in the following custom resource definition, but use your `bootstrapServers` value that you copied earlier:
. Paste in the following custom resource definition, but use your `bootstrapServers` value that you copied earlier:
+
[source,yaml]
----
Expand All @@ -75,16 +75,38 @@ spec:
streams:
bootstrapServers: "my-cluster-kafka-bootstrap.my-project.svc:9092"
----

. Click *Create* and wait for the {registry} route to be created on OpenShift.

. Click *Networking* > *Route* to access the new route for the {registry} web console. For example:
+
[source]
----
http://example-apicurioregistry.my-project.my-domain-name.com/
http://example-apicurioregistry.my-project.my-domain-name.com/
----

.Overriding default Kafka topic names
You can change the default names of the Kafka topics that {registry} will use to store data in Kafka. It is sometimes
necessary to do this when sharing the Kafka cluster with other applications that may already be using topics named
`storage-topic` or `global-id-topic`.

Change the default topic names by overriding them either by setting appropriate environment variables or by
setting appropriate Java system properties:

[%header,cols=3*]
|===
|Topic Default
|Environment Variable
|System Property
|`storage-topic`
a| `REGISTRY_STREAMS_TOPOLOGY_STORAGE_TOPIC`
a| `registry.streams.topology.storage.topic`
|`global-id-topic`
a| `REGISTRY_STREAMS_TOPOLOGY_GLOBAL_ID_TOPIC`
a| `registry.streams.topology.global.id.topic`
|===


.Additional resources

ifdef::apicurio-registry[]
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/partials/shared/attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
:apicurio-registry:
:registry: Apicurio Registry
:kafka-streams: Strimzi
:registry-version: 1.2
:registry-version: 1.3

// downstream
// downstream
//:rh-service-registry:
//:registry: Service Registry
//:ServiceRegistryName: Apicurio Registry
Expand All @@ -40,7 +40,7 @@
:copy: ©
:infin: ∞
:mdash: —
:nbsp:
:nbsp:
:ndash: –
:reg: ®
:trade: ™
Expand All @@ -51,7 +51,7 @@ include::attributes-links.adoc[]
// Download URLs
:download-url-registry-container-catalog: https://catalog.redhat.com/software/containers/search
:download-url-registry-maven: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?downloadType=distributions&product=red.hat.integration&version=2020-Q2
:download-url-registry-source-code: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?downloadType=distributions&product=red.hat.integration&version=2020-Q2
:download-url-registry-source-code: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?downloadType=distributions&product=red.hat.integration&version=2020-Q2
:download-url-registry-kafka-connect: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?downloadType=distributions&product=red.hat.integration&version=2020-Q2
:download-url-registry-custom-resources: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?downloadType=distributions&product=red.hat.integration&version=2020-Q2

Expand Down

0 comments on commit 3df067b

Please sign in to comment.