You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/12/06 09:59:30 UTC

[camel-kamelets] branch solr-query created (now eba2175)

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

acosentino pushed a change to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


      at eba2175  Added Solr Source kamelet

This branch includes the following new commits:

     new 80b076d  Added Solr Source Kamelet
     new 82f82c3  Added Solr Source Kamelet
     new 52fb0f4  Added Solr Source Kamelet
     new 84026ff  Added Solr Source Kamelet docs
     new bd905d4  Added Solr Source Kamelet templates
     new 5d927c2  Added Solr Source Kamelet
     new 7455815  Added Solr Source Kamelet
     new eba2175  Added Solr Source kamelet

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[camel-kamelets] 06/08: Added Solr Source Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 5d927c2887807067bd8c0788f6cf900f91815392
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:56:55 2021 +0100

    Added Solr Source Kamelet
---
 kamelets/solr-source.kamelet.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kamelets/solr-source.kamelet.yaml b/kamelets/solr-source.kamelet.yaml
index f1d595d..c9ce707 100644
--- a/kamelets/solr-source.kamelet.yaml
+++ b/kamelets/solr-source.kamelet.yaml
@@ -61,6 +61,7 @@ spec:
   dependencies:
   - "camel:solr"
   - "camel:core"
+  - "camel:timer"
   - "camel:jackson"
   - "camel:kamelet"
   flow:

[camel-kamelets] 07/08: Added Solr Source Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 745581523e98342d303faf04be0a9ec49ca0d096
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:57:24 2021 +0100

    Added Solr Source Kamelet
---
 .../camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml
index f1d595d..c9ce707 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml
@@ -61,6 +61,7 @@ spec:
   dependencies:
   - "camel:solr"
   - "camel:core"
+  - "camel:timer"
   - "camel:jackson"
   - "camel:kamelet"
   flow:

[camel-kamelets] 01/08: Added Solr Source Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 80b076d071428cb9149215e00ae6ee555e4607dc
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:54:20 2021 +0100

    Added Solr Source Kamelet
---
 kamelets/solr-source.kamelet.yaml | 85 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/kamelets/solr-source.kamelet.yaml b/kamelets/solr-source.kamelet.yaml
new file mode 100644
index 0000000..f1d595d
--- /dev/null
+++ b/kamelets/solr-source.kamelet.yaml
@@ -0,0 +1,85 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: solr-source
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iODAwIiB3aWR0aD0iMTIwMCIgdmlld0JveD0iLTQwLjYwMDk1IC0zNC4yMTc3NSAzNTEuODc0OSAyMDUuMzA2NSI+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIiBjbGlwUGF0aFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTAyLjY1NGgyMDMuMDA1VjBIMHoiLz48L2NsaXBQYXRoPjwvZGVmcz48ZyBjbGlwLXBhdGg9InVybCgjYSkiIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMzMgMCAwIC0xLjMzMzMzIDAgMTM2Ljg3MSkiPjxwYXRoIGQ9Ik00MC43NiAzMS43NjNjLTIuMz [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Solr"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Solr Source"
+    description: |-
+      Query for documents to Solr Collection.
+    required:
+      - period
+      - servers
+      - collection
+      - query
+    type: object
+    properties:
+      period:
+        title: Period between Polls
+        description: The interval between fetches to the Solr collection
+        type: integer
+        default: 10000
+      collection:
+        title: Collection
+        description: Solr Collection name
+        type: string
+      servers:
+        title: Servers
+        description: Comma separated list of Solr Servers and ports
+        type: string
+      query:
+        title: Query
+        description: The query to submit to Solr
+        type: string
+  types:
+    in:
+      mediaType: application/json
+  dependencies:
+  - "camel:solr"
+  - "camel:core"
+  - "camel:jackson"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "timer:solr-stream"
+      parameters:
+        period: "{{period}}"
+      steps:
+      - set-header:
+          name: "SolrOperation"
+          constant: "QUERY"
+      - set-header:
+          name: "CamelSolrQueryString"
+          constant: "{{query}}"
+      - remove-header:
+          name: "content-type"
+      - to:
+          uri: "solr:{{servers}}/solr/{{collection}}"
+      - marshal:
+          json:
+            library: Jackson
+      - to: "kamelet:sink"

[camel-kamelets] 05/08: Added Solr Source Kamelet templates

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit bd905d4e7141948132e50e90a6c340b9576308fd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:55:33 2021 +0100

    Added Solr Source Kamelet templates
---
 templates/bindings/camel-k/solr-source-binding.yaml | 20 ++++++++++++++++++++
 templates/bindings/core/solr-source-binding.yaml    | 11 +++++++++++
 2 files changed, 31 insertions(+)

diff --git a/templates/bindings/camel-k/solr-source-binding.yaml b/templates/bindings/camel-k/solr-source-binding.yaml
new file mode 100644
index 0000000..74c42fc
--- /dev/null
+++ b/templates/bindings/camel-k/solr-source-binding.yaml
@@ -0,0 +1,20 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: solr-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: solr-source
+    properties:
+      collection: "The Collection"
+      query: "The Query"
+      servers: "The Servers"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
\ No newline at end of file
diff --git a/templates/bindings/core/solr-source-binding.yaml b/templates/bindings/core/solr-source-binding.yaml
new file mode 100644
index 0000000..e1c3b4a
--- /dev/null
+++ b/templates/bindings/core/solr-source-binding.yaml
@@ -0,0 +1,11 @@
+- route:
+    from:
+      uri: "kamelet:solr-source"
+      parameters:
+        collection: "The Collection"
+        query: "The Query"
+        servers: "The Servers"
+    steps:
+      - to:
+          uri: "log:info"
+    
\ No newline at end of file

[camel-kamelets] 08/08: Added Solr Source kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit eba2175bd129fea079f32fd5a4ebc7c4d704ab5c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:57:55 2021 +0100

    Added Solr Source kamelet
---
 docs/modules/ROOT/pages/solr-source.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/pages/solr-source.adoc b/docs/modules/ROOT/pages/solr-source.adoc
index 7ea418e..85e2252 100644
--- a/docs/modules/ROOT/pages/solr-source.adoc
+++ b/docs/modules/ROOT/pages/solr-source.adoc
@@ -29,6 +29,7 @@ At runtime, the `solr-source` Kamelet relies upon the presence of the following
 
 - camel:solr
 - camel:core
+- camel:timer
 - camel:jackson
 - camel:kamelet 
 

[camel-kamelets] 03/08: Added Solr Source Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 52fb0f48a5644c620385a4c9fb5fc308f037cf83
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:55:08 2021 +0100

    Added Solr Source Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 5cc5b6a..c7200a6 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -124,6 +124,7 @@
 * xref:ROOT:slack-sink.adoc[image:kamelets/slack-sink.svg[] Slack Sink]
 * xref:ROOT:slack-source.adoc[image:kamelets/slack-source.svg[] Slack Source]
 * xref:ROOT:solr-sink.adoc[image:kamelets/solr-sink.svg[] Solr Sink]
+* xref:ROOT:solr-source.adoc[image:kamelets/solr-source.svg[] Solr Source]
 * xref:ROOT:sqlserver-sink.adoc[image:kamelets/sqlserver-sink.svg[] Microsoft SQL Server Sink]
 * xref:ROOT:sqlserver-source.adoc[image:kamelets/sqlserver-source.svg[] Microsoft SQL Server Source]
 * xref:ROOT:ssh-source.adoc[image:kamelets/ssh-source.svg[] SSH Source]

[camel-kamelets] 04/08: Added Solr Source Kamelet docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 84026ffb42b6db74c0b77bcc31274acdc985306d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:55:20 2021 +0100

    Added Solr Source Kamelet docs
---
 .../ROOT/assets/images/kamelets/solr-source.svg    |   1 +
 docs/modules/ROOT/pages/solr-source.adoc           | 155 +++++++++++++++++++++
 2 files changed, 156 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/solr-source.svg b/docs/modules/ROOT/assets/images/kamelets/solr-source.svg
new file mode 100644
index 0000000..9e77dad
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/solr-source.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="800" width="1200" viewBox="-40.60095 -34.21775 351.8749 205.3065"><defs><clipPath id="a" clipPathUnits="userSpaceOnUse"><path d="M0 102.654h203.005V0H0z"/></clipPath></defs><g clip-path="url(#a)" transform="matrix(1.33333 0 0 -1.33333 0 136.871)"><path d="M40.76 31.763c-2.344 1.248-4.994 2.127-7.874 2.613a51.707 51.707 0 01-8.554.717c-2.327 0-4.681.201-6.998.597-2.256.384-4.3 1.092-6.076 2.104-1.73.984-3.16 2.361-4.252 4.095-1.078 1.706-1.6 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/solr-source.adoc b/docs/modules/ROOT/pages/solr-source.adoc
new file mode 100644
index 0000000..7ea418e
--- /dev/null
+++ b/docs/modules/ROOT/pages/solr-source.adoc
@@ -0,0 +1,155 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/solr-source.svg[] Solr Source
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Query for documents to Solr Collection.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `solr-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *collection {empty}* *| Collection| Solr Collection name| string| | 
+| *period {empty}* *| Period between Polls| The interval between fetches to the Solr collection| integer| `10000`| 
+| *query {empty}* *| Query| The query to submit to Solr| string| | 
+| *servers {empty}* *| Servers| Comma separated list of Solr Servers and ports| string| | 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `solr-source` Kamelet relies upon the presence of the following dependencies:
+
+- camel:solr
+- camel:core
+- camel:jackson
+- camel:kamelet 
+
+== Usage
+
+This section describes how you can use the `solr-source`.
+
+=== Knative Source
+
+You can use the `solr-source` Kamelet as a Knative source by binding it to a Knative object.
+
+.solr-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: solr-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: solr-source
+    properties:
+      collection: "The Collection"
+      query: "The Query"
+      servers: "The Servers"
+  sink:
+    ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  
+----
+
+==== *Prerequisite*
+
+You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `solr-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f solr-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind solr-source -p "source.collection=The Collection" -p "source.query=The Query" -p "source.servers=The Servers" channel:mychannel
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+=== Kafka Source
+
+You can use the `solr-source` Kamelet as a Kafka source by binding it to a Kafka topic.
+
+.solr-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: solr-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: solr-source
+    properties:
+      collection: "The Collection"
+      query: "The Query"
+      servers: "The Servers"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
+----
+
+==== *Prerequisites*
+
+* You've installed https://strimzi.io/[Strimzi].
+* You've created a topic named `my-topic` in the current namespace.
+* You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `solr-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f solr-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind solr-source -p "source.collection=The Collection" -p "source.query=The Query" -p "source.servers=The Servers" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/kamelets/solr-source.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 02/08: Added Solr Source Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch solr-query
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 82f82c3c05ecf9466f219e1ec5828a264a3fb438
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 6 10:54:51 2021 +0100

    Added Solr Source Kamelet
---
 .../resources/kamelets/solr-source.kamelet.yaml    | 85 ++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml
new file mode 100644
index 0000000..f1d595d
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/solr-source.kamelet.yaml
@@ -0,0 +1,85 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: solr-source
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iODAwIiB3aWR0aD0iMTIwMCIgdmlld0JveD0iLTQwLjYwMDk1IC0zNC4yMTc3NSAzNTEuODc0OSAyMDUuMzA2NSI+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIiBjbGlwUGF0aFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTAyLjY1NGgyMDMuMDA1VjBIMHoiLz48L2NsaXBQYXRoPjwvZGVmcz48ZyBjbGlwLXBhdGg9InVybCgjYSkiIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMzMgMCAwIC0xLjMzMzMzIDAgMTM2Ljg3MSkiPjxwYXRoIGQ9Ik00MC43NiAzMS43NjNjLTIuMz [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Solr"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Solr Source"
+    description: |-
+      Query for documents to Solr Collection.
+    required:
+      - period
+      - servers
+      - collection
+      - query
+    type: object
+    properties:
+      period:
+        title: Period between Polls
+        description: The interval between fetches to the Solr collection
+        type: integer
+        default: 10000
+      collection:
+        title: Collection
+        description: Solr Collection name
+        type: string
+      servers:
+        title: Servers
+        description: Comma separated list of Solr Servers and ports
+        type: string
+      query:
+        title: Query
+        description: The query to submit to Solr
+        type: string
+  types:
+    in:
+      mediaType: application/json
+  dependencies:
+  - "camel:solr"
+  - "camel:core"
+  - "camel:jackson"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "timer:solr-stream"
+      parameters:
+        period: "{{period}}"
+      steps:
+      - set-header:
+          name: "SolrOperation"
+          constant: "QUERY"
+      - set-header:
+          name: "CamelSolrQueryString"
+          constant: "{{query}}"
+      - remove-header:
+          name: "content-type"
+      - to:
+          uri: "solr:{{servers}}/solr/{{collection}}"
+      - marshal:
+          json:
+            library: Jackson
+      - to: "kamelet:sink"