You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/07/09 14:28:48 UTC

[GitHub] [camel-quarkus-examples] ppalaga commented on a change in pull request #47: fix oAuth bearer and set openshift container for openshift deployment

ppalaga commented on a change in pull request #47:
URL: https://github.com/apache/camel-quarkus-examples/pull/47#discussion_r666983140



##########
File path: kafka/README.adoc
##########
@@ -9,27 +9,16 @@ and other general information.
 
 == Prerequisites
 
-The example application requires a running Kafka instance. For simplicity, you can launch the Kafka instance using the docker-compose.yaml.
+The example application requires a running Kafka instance.
 
-----
-$ cd conf && docker-compose up
-----
-
-Next : uncomment the The section Kafka instance without Authentication in `src/main/resources/application.properties` and set :
-----
-camel.component.kafka.brokers=localhost:9092
-----
-
-If you prefer to use a different Kafka instance uncomment and adjust the corresponding commented section in `src/main/resources/application.properties`.
-
-- The section Kafka instance without Authentication if no Authentication required.
-- The section Kafka instance with SASL Plain is using SASL.
-- The section Kafka instance with SASL Oauth Bearer if using Oauth Bearer.
+For simplicity, this example uses Quarkus DevServices in dev mode. It will automatically start Strimzi container for your tests, and you don’t even need to configure anything: the container will be automatically wired to the Quarkus dev mode configuration.
 
 == Start in Development mode
 
 Run the application in development mode.
 
+TIP: If you want to use another running instance, in dev mode. Uncomment the corresponding Kafka configuration section in `src/main/resources/application.properties` and change `%prod` profile by `%dev`.

Review comment:
       ```suggestion
   TIP: If you want to use another running instance, in dev mode. Uncomment the corresponding Kafka configuration section in `src/main/resources/application.properties` and change `%prod` profile to `%dev`.
   ```

##########
File path: kafka/README.adoc
##########
@@ -64,13 +53,48 @@ $ curl -X GET http://0.0.0.0:8080/example
 ----
 
 
-=== Package and run the application
+=== Configure Kafka client, Package and run the application

Review comment:
       ```suggestion
   === Configure Kafka client, package and run the application
   ```

##########
File path: kafka/pom.xml
##########
@@ -46,6 +46,7 @@
         <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
         <mycila-license.version>3.0</mycila-license.version>
         <strimzi.testcontainers.version>0.20.1</strimzi.testcontainers.version>
+        <kafka-oauth-client.version>0.7.2</kafka-oauth-client.version>

Review comment:
       I still wonder whether we should ask Quarkus to manage `io.strimzi:kafka-oauth-client`

##########
File path: kafka/README.adoc
##########
@@ -96,16 +120,36 @@ $ ./target/*-runner
 
 You can build a container image for the application like this. Refer to the https://quarkus.io/guides/deploying-to-kubernetes[Quarkus Kubernetes guide] for options around customizing image names, registries etc.
 
-Uncomment the container build section. Set the proper image group.
+This example uses Jib to create the container image for Kubernetes deployment.
+
+Uncomment the creating container with jib, in the Kubernetes specific section in  `src/main/resources/application.properties`. Set image group and image registry.
+
+Build the application using the `kubernetes` profile.
 
 [source,shell]
 ----
-$ mvn clean package -DskipTests
+$ mvn clean package -DskipTests -Dkubernetes
+----
+
+The `kubernetes` profile uses quarkus kubernetes and jib container extensions, as described in the `pom.xml`.
+
+[source,shell]
+----
+<dependencies>
+    <dependency>
+        <groupId>io.quarkus</groupId>
+        <artifactId>quarkus-kubernetes</artifactId>
+    </dependency>
+    <dependency>
+        <groupId>io.quarkus</groupId>
+        <artifactId>quarkus-container-image-jib</artifactId>
+    </dependency>
+</dependencies>
 ----
 
 If you are using a local development cluster like Kind or k3s, you can use host the container image on your local host. Or, with minikube, use the Docker daemon from the cluster virtual machine `eval $(minikube docker-env)`. Otherwise, you'll need to push the image to a registry of your choosing.
 
-TIP: You can build & deploy in one single step by doing `mvn clean package -DskipTests -Dquarkus.kubernetes.deploy=true`
+TIP: You can build & deploy in one single step by doing `mvn clean package -DskipTests -Dkubernetes -Dquarkus.kubernetes.deploy=true`
 
 Check pods are running.

Review comment:
       ```suggestion
   Check that the pods are running.
   ```

##########
File path: kafka/README.adoc
##########
@@ -64,13 +53,48 @@ $ curl -X GET http://0.0.0.0:8080/example
 ----
 
 
-=== Package and run the application
+=== Configure Kafka client, Package and run the application
 
-Once you are done with developing you may want to package and run the application.
+Once you are done with developing you may want to configure your kafka client, package and run the application.
 
 TIP: Find more details about the JVM mode and Native mode in the Package and run section of
 https://camel.apache.org/camel-quarkus/latest/first-steps.html#_package_and_run_the_application[Camel Quarkus User guide]
 
+==== Configure kafka client
+Uncomment the corresponding commented section in `src/main/resources/application.properties`.
+
+- The section Kafka instance without Authentication if no Authentication required.
+- The section Kafka instance with SASL Plain is using SASL.

Review comment:
       ```suggestion
   - The section Kafka instance with SASL Plain if using SASL.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org