diff --git a/microprofile-reactive-messaging-kafka/README-source.adoc b/microprofile-reactive-messaging-kafka/README-source.adoc index af58276023..07e5161ca6 100644 --- a/microprofile-reactive-messaging-kafka/README-source.adoc +++ b/microprofile-reactive-messaging-kafka/README-source.adoc @@ -987,6 +987,9 @@ bin/kafka-topics.sh --create --topic testing --bootstrap-server localhost:9092 // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +---- +$ oc delete -f ./charts/kafka-on-openshift.yaml --wait --timeout=10m0s +---- == Conclusion diff --git a/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml b/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml new file mode 100644 index 0000000000..ceec823c50 --- /dev/null +++ b/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml @@ -0,0 +1,51 @@ + + +--- +# install the Red Hat Streams for Apache Kafka operator +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + generation: 1 + name: amq-streams + namespace: openshift-operators +spec: + channel: stable + installPlanApproval: Automatic + name: amq-streams + source: redhat-operators + sourceNamespace: openshift-marketplace + +--- +# create a Kafka Stream instance +apiVersion: kafka.strimzi.io/v1beta2 +kind: Kafka +metadata: + name: my-cluster +spec: + kafka: + replicas: 3 + listeners: + - name: plain + port: 9092 + type: internal + tls: false + storage: + type: ephemeral + zookeeper: + replicas: 3 + storage: + type: ephemeral + entityOperator: + topicOperator: {} + +--- +# create a topic in Kafka Stream instance +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: testing +labels: + strimzi.io/cluster: my-cluster +spec: + partitions: 3 + replicas: 3 diff --git a/microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc b/microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc index 2f4263bb3f..403ef04fba 100644 --- a/microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc +++ b/microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc @@ -4,56 +4,17 @@ The functionality of this quickstart depends on a running instance of the https://access.redhat.com/products/red-hat-amq#streams[AMQ Streams] Operator. AMQ Streams is a Red Hat project based on Apache Kafka. To deploy AMQ Streams in the Openshift environment: . Log in into the Openshift console as `kubeadmin` user (or any cluster administrator). -. Navigate to `Operators` -> `OperatorHub`. -. Search for `AMQ Streams` - click on the 'AMQ Streams' operator. -+ -Install it with the default values and wait for the message telling you it has been installed and is ready for use. -. In your terminal, run the following command to set up a Kafka cluster called `my-cluster` in your project: -+ -[options="nowrap",subs="+attributes"] ----- -$ oc apply -f - <