This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 32e514a3e05c6fc034c85d2b91f2ee7903cdd287 Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Dec 7 12:28:18 2021 +0100 Added SSH Sink Kamelet - docs --- .../ROOT/assets/images/kamelets/ssh-sink.svg | 4 + docs/modules/ROOT/pages/ssh-sink.adoc | 154 +++++++++++++++++++++ 2 files changed, 158 insertions(+) diff --git a/docs/modules/ROOT/assets/images/kamelets/ssh-sink.svg b/docs/modules/ROOT/assets/images/kamelets/ssh-sink.svg new file mode 100644 index 0000000..8aaa094 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/ssh-sink.svg @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"> + <path d="M 7 8 C 5.346 8 4 9.346 4 11 L 4 53 C 4 54.654 5.346 56 7 56 L 57 56 C 58.654 56 60 54.654 60 53 L 60 11 C 60 9.346 58.654 8 57 8 L 7 8 z M 7 10 L 57 10 C 57.552 10 58 10.448 58 11 L 58 53 C 58 53.552 57.552 54 57 54 L 7 54 C 6.448 54 6 53.552 6 53 L 6 20 L 47 20 C 47.553 20 48 19.553 48 19 C 48 18.447 47.553 18 47 18 L 6 18 L 6 11 C 6 10.448 6.448 10 7 10 z M 10 12 C 9.447 12 9 12.447 9 13 L 9 15 C 9 15.553 9.447 16 10 16 C 10.553 16 11 15.553 11 15 L 11 13 C 11 12.447 10.5 [...] +</svg> diff --git a/docs/modules/ROOT/pages/ssh-sink.adoc b/docs/modules/ROOT/pages/ssh-sink.adoc new file mode 100644 index 0000000..7c58767 --- /dev/null +++ b/docs/modules/ROOT/pages/ssh-sink.adoc @@ -0,0 +1,154 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT + += image:kamelets/ssh-sink.svg[] SSH Sink + +*Provided by: "Apache Software Foundation"* + +*Support Level for this Kamelet is: "Preview"* + +Send command through SSH session. + +== Configuration Options + +The following table summarizes the configuration options available for the `ssh-sink` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *connectionHost {empty}* *| Connection Host| The SSH Host| string| | +| *connectionPort {empty}* *| Connection Port| The SSH Port| string| `22`| +| *password {empty}* *| Password| The SSH password to use| string| | +| *username {empty}* *| Username| The SSH username to use| string| | +|=== + +NOTE: Fields marked with an asterisk ({empty}*) are mandatory. + + +== Dependencies + +At runtime, the `ssh-sink` Kamelet relies upon the presence of the following dependencies: + +- camel:ssh +- camel:gson +- camel:kamelet + +== Usage + +This section describes how you can use the `ssh-sink`. + +=== Knative Sink + +You can use the `ssh-sink` Kamelet as a Knative sink by binding it to a Knative object. + +.ssh-sink-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: ssh-sink-binding +spec: + source: + ref: + kind: Channel + apiVersion: messaging.knative.dev/v1 + name: mychannel + sink: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: ssh-sink + properties: + connectionHost: "The Connection Host" + password: "The Password" + username: "The Username" + +---- + +==== *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 `ssh-sink-binding.yaml` file to your local drive, and then edit it as needed for your configuration. + +. Run the sink by using the following command: ++ +[source,shell] +---- +kubectl apply -f ssh-sink-binding.yaml +---- + +==== *Procedure for using the Kamel CLI* + +Configure and run the sink by using the following command: + +[source,shell] +---- +kamel bind channel:mychannel ssh-sink -p "sink.connectionHost=The Connection Host" -p "sink.password=The Password" -p "sink.username=The Username" +---- + +This command creates the KameletBinding in the current namespace on the cluster. + +=== Kafka Sink + +You can use the `ssh-sink` Kamelet as a Kafka sink by binding it to a Kafka topic. + +.ssh-sink-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: ssh-sink-binding +spec: + source: + ref: + kind: KafkaTopic + apiVersion: kafka.strimzi.io/v1beta1 + name: my-topic + sink: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: ssh-sink + properties: + connectionHost: "The Connection Host" + password: "The Password" + username: "The Username" + +---- + +==== *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 `ssh-sink-binding.yaml` file to your local drive, and then edit it as needed for your configuration. + +. Run the sink by using the following command: ++ +[source,shell] +---- +kubectl apply -f ssh-sink-binding.yaml +---- + +==== *Procedure for using the Kamel CLI* + +Configure and run the sink by using the following command: + +[source,shell] +---- +kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic ssh-sink -p "sink.connectionHost=The Connection Host" -p "sink.password=The Password" -p "sink.username=The Username" +---- + +This command creates the KameletBinding in the current namespace on the cluster. + +== Kamelet source file + +https://github.com/apache/camel-kamelets/blob/main/kamelets/ssh-sink.kamelet.yaml + +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
