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:34 UTC

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

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