This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new f6abc8d  Move over jbang examples from camel-examples to here
f6abc8d is described below

commit f6abc8daf48806fed20c61f2744c54e40d711c14
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Mar 14 11:16:41 2022 +0100

    Move over jbang examples from camel-examples to here
---
 examples/jbang-kafka-health/README.adoc        | 92 ------------------------
 examples/jbang-kafka-health/consumer.yaml      |  9 ---
 examples/jbang-kafka-health/docker-compose.yml | 27 --------
 examples/jbang-kafka-health/producer.yaml      |  7 --
 examples/jbang/Hey.java                        | 16 -----
 examples/jbang/README.adoc                     | 96 --------------------------
 6 files changed, 247 deletions(-)

diff --git a/examples/jbang-kafka-health/README.adoc 
b/examples/jbang-kafka-health/README.adoc
deleted file mode 100644
index 015112a..0000000
--- a/examples/jbang-kafka-health/README.adoc
+++ /dev/null
@@ -1,92 +0,0 @@
-== Camel Example JBang with Kafka and Health Checks
-
-This example shows how to run Camel connecting to a local Apache Kafka broker
-and have Camel health-checks report status as either UP or DOWN depending
-on stopping and starting the Kafka broker.
-
-=== Running Kafka broker
-
-You need Docker to run the local Kafka broker which can run via docker compose.
-
-[source,sh]
-----
-$ docker-compose up -d
-----
-
-And then you can stop and start the broker to make Camel health check report
-as either UP or DOWN.
-
-[source,sh]
-----
-$ docker-compose stop
-----
-
-and to start it again
-
-[source,sh]
-----
-$ docker-compose start
-----
-
-And to shutdown when you no longer need the broker.
-
-[source,sh]
-----
-$ docker-compose down
-----
-
-
-=== Install JBang
-
-First install JBang according to https://www.jbang.dev
-
-When JBang is installed then you should be able to run from a shell:
-
-[source,sh]
-----
-$ jbang --version
-----
-
-This will output the version of JBang.
-
-To run this example you can either install Camel on JBang via:
-
-[source,sh]
-----
-$ jbang app install camel@apache/camel
-----
-
-Which allows to run CamelJBang with `camel` as shown below.
-
-=== How to run
-
-Then you can run this example using:
-
-[source,sh]
-----
-$ camel run consumer.yaml producer.yaml --health
-----
-
-Or run with JBang using the longer command line (without installing camel as 
app in JBang):
-
-[source,sh]
-----
-$ jbang camel@apache/camel run consumer.yaml producer.yaml --health
-----
-
-Then you can access `http://localhost:8080/health` from a web browser to see 
the health status.
-
-Notice how you can check either the readiness or liveness health by invoking: 
`http://localhost:8080/health/live` and
-`http://localhost:8080/ready`. When the kafka brokers are not running then the 
liveness check should still be UP but
-readiness should be DOWN.
-
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/jbang-kafka-health/consumer.yaml 
b/examples/jbang-kafka-health/consumer.yaml
deleted file mode 100644
index 83ad2e0..0000000
--- a/examples/jbang-kafka-health/consumer.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-# camel-k: language=yaml
-
-- from:
-    uri: "kamelet:kafka-not-secured-source"
-    parameters:
-      topic: "foobar"
-      bootstrapServers: 'localhost:9092'
-    steps:
-    - to: "log:info?showAll=true&multiline=true"
\ No newline at end of file
diff --git a/examples/jbang-kafka-health/docker-compose.yml 
b/examples/jbang-kafka-health/docker-compose.yml
deleted file mode 100644
index ed882bf..0000000
--- a/examples/jbang-kafka-health/docker-compose.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-version: '3'
-services:
-  zookeeper:
-    image: confluentinc/cp-zookeeper:7.0.1
-    container_name: zookeeper
-    environment:
-      ZOOKEEPER_CLIENT_PORT: 2181
-      ZOOKEEPER_TICK_TIME: 2000
-
-  broker:
-    image: confluentinc/cp-kafka:7.0.1
-    container_name: broker
-    ports:
-      # To learn about configuring Kafka for access across networks see
-      # 
https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/
-      - "9092:9092"
-    depends_on:
-      - zookeeper
-    environment:
-      KAFKA_BROKER_ID: 1
-      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
-      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 
PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
-      KAFKA_ADVERTISED_LISTENERS: 
PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
-      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
-      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
-      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
\ No newline at end of file
diff --git a/examples/jbang-kafka-health/producer.yaml 
b/examples/jbang-kafka-health/producer.yaml
deleted file mode 100644
index fac1aeb..0000000
--- a/examples/jbang-kafka-health/producer.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-# camel-k: language=yaml
-
-- from:
-    uri: "kamelet:chuck-norris-source"
-    steps:
-    - log: "${body}"
-    - to: 
"kamelet:kafka-not-secured-sink?topic=foobar&bootstrapServers=localhost:9092"
diff --git a/examples/jbang/Hey.java b/examples/jbang/Hey.java
deleted file mode 100755
index d8ab5b8..0000000
--- a/examples/jbang/Hey.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// use modeline to configure properties directly in the same source file
-// camel-k: language=java name=Cool property=period=1000
-
-public class Hey extends org.apache.camel.builder.RouteBuilder {
-
-  @Override
-  public void configure() throws Exception {
-      // Write your routes here, for example:
-      from("timer:java?period={{period}}")
-        .routeId("java")
-        .process(e -> {
-           e.getMessage().setBody("Hello from Camel");
-        })
-        .to("log:info");
-  }
-}
diff --git a/examples/jbang/README.adoc b/examples/jbang/README.adoc
deleted file mode 100644
index a2a21f7..0000000
--- a/examples/jbang/README.adoc
+++ /dev/null
@@ -1,96 +0,0 @@
-== Camel Example JBang
-
-This example shows how to run Camel using JBang.
-
-=== Install JBang
-
-First install JBang according to https://www.jbang.dev
-
-When JBang is installed then you should be able to run from a shell:
-
-[source,sh]
-----
-$ jbang --version
-----
-
-This will output the version of JBang.
-
-To run this example you can either install Camel on JBang via:
-
-[source,sh]
-----
-$ jbang app install camel@apache/camel
-----
-
-Which allows to run CamelJBang with `camel` as shown below.
-
-=== How to run
-
-Then you can run this example using:
-
-[source,sh]
-----
-$ camel run Hey.java
-----
-
-Or run with JBang using the longer command line (without installing camel as 
app in JBang):
-
-[source,sh]
-----
-$ jbang camel@apache/camel run Hey.java
-----
-
-=== Run directly from github
-
-The example can also be run directly by referring to the github URL as shown:
-
-[source,sh]
-----
-$ jbang camel@apache/camel run 
https://github.com/apache/camel-examples/tree/main/examples/jbang
-----
-
-You can even try other examples such as the polyglot example from Camel K:
-
-[source,sh]
-----
-$ jbang camel@apache/camel run 
https://github.com/apache/camel-k/tree/main/examples/polyglot
-----
-
-Or the Kotlin route(s) (you can use wildcards):
-
-[source,sh]
-----
-$ jbang camel@apache/camel run 
https://github.com/apache/camel-k/tree/main/examples/languages/*.kts
-----
-
-=== Live reload
-
-You can run the example with reload enabled which allows you to edit the 
example,
-and hot-reload when the file is saved.
-
-[source,sh]
-----
-$ camel run Hey.java --reload
-----
-
-=== Developer Web Console
-
-You can enable the developer console via `--console` flag as show:
-
-[source,sh]
-----
-$ camel run Hey.java --console
-----
-
-Then you can browse: http://localhost:8080/dev to introspect the running Camel 
applicaton.
-
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!

Reply via email to