Skip to content

Commit

Permalink
Commit from GitHub Actions (WildFly Quickstarts Update 'README.adoc's)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabir committed Jun 17, 2024
1 parent 4fd822f commit 688db71
Showing 1 changed file with 26 additions and 45 deletions.
71 changes: 26 additions & 45 deletions microprofile-reactive-messaging-kafka/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1929,56 +1929,32 @@ 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 the `Red Hat Streams for Apache Kafka` operator
. Create an instance of `Red Hat Streams for Apache Kafka`
. Create a topic in the `Red Hat Streams for Apache Kafka`
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:
+
In your terminal, run the following command to subscribe the `Red Hat Streams for Apache Kafka` operator.
[options="nowrap",subs="+attributes"]
----
$ oc apply -f - <<EOF
apiVersion: kafka.strimzi.io/{strimzi-version}
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: {}
EOF
----
NOTE: If you see errors along the lines of _no matches for kind "Kafka" in version "kafka.strimzi.io/{strimzi-version}"_, execute the command `oc get crd kafkas.kafka.strimzi.io -o jsonpath="{.spec.versions[*].name}"` and update `apiVersion` to the returned version.
. Next set up a topic called `testing` in the `my-cluster` cluster we created:
+
$ oc apply -f ./charts/amq-operator-on-openshift.yaml --wait --timeout=10m0s
----
To verify the operator is ready to use, you can run the following command. You should see the following output.
The `PHASE` needs to be `Succeeded`
[options="nowrap",subs="+attributes"]
----
oc apply -f - <<EOF
apiVersion: kafka.strimzi.io/{strimzi-version}
kind: KafkaTopic
metadata:
name: testing
labels:
strimzi.io/cluster: my-cluster
spec:
partitions: 3
replicas: 3
EOF
$ oc get ClusterServiceVersion
NAME DISPLAY VERSION REPLACES PHASE
amqstreams.v2.7.0-1 Red Hat Streams for Apache Kafka 2.7.0-1 amqstreams.v2.7.0-0 Succeeded
----
Then you can set up a Kafka cluster called `my-cluster` with topic `testing` in your project:
[options="nowrap",subs="+attributes"]
----
$ oc apply -f ./charts/kafka-on-openshift.yaml --wait --timeout=10m0s
----
Although the above commands will return pretty immediately, your AMQ Streams instance will not be available until its entity operator is up and running. The name of the pod will be of the format `my-cluster-entity-operator-xxxxxxxxx-yyyyy`.
Expand All @@ -1987,6 +1963,7 @@ To be on the safe side, wait until this pod is ready, as shown in this example:
[options="nowrap",subs="+attributes"]
----
oc get pods -w
NAME READY STATUS RESTARTS AGE
my-cluster-zookeeper-0 0/1 Running 0 29s
...
Expand Down Expand Up @@ -2157,6 +2134,10 @@ $ helm uninstall {helm-app-name}
:leveloffset: 1
:leveloffset!:
----
$ oc delete -f ./charts/kafka-on-openshift.yaml --wait --timeout=10m0s
$ oc delete -f ./charts/amq-operator-on-openshift.yaml --wait --timeout=10m0s
----
== Conclusion
Expand Down

0 comments on commit 688db71

Please sign in to comment.