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/03/19 10:30:03 UTC

[camel-kamelets] 02/02: Added SSH Source Kamelet

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

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

commit a9b6be614c94b6b3e23d41333b33dd80c4262d42
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 19 11:29:32 2021 +0100

    Added SSH Source Kamelet
---
 .../ROOT/assets/images/kamelets/ssh-source.svg     |  4 ++
 docs/modules/ROOT/nav.adoc                         |  1 +
 docs/modules/ROOT/pages/ssh-source.adoc            | 68 ++++++++++++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/ssh-source.svg b/docs/modules/ROOT/assets/images/kamelets/ssh-source.svg
new file mode 100644
index 0000000..8aaa094
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/ssh-source.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/nav.adoc b/docs/modules/ROOT/nav.adoc
index c51a437..d5095cb 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -22,6 +22,7 @@
 * xref:ROOT:salesforce-source.adoc[image:kamelets/salesforce-source.svg[] Salesforce Source]
 * xref:ROOT:sftp-source.adoc[image:kamelets/sftp-source.svg[] SFTP Source]
 * xref:ROOT:slack-source.adoc[image:kamelets/slack-source.svg[] Slack Source]
+* xref:ROOT:ssh-source.adoc[image:kamelets/ssh-source.svg[] SSH Source]
 * xref:ROOT:telegram-sink.adoc[image:kamelets/telegram-sink.svg[] Telegram Sink]
 * xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram Source]
 * xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source]
diff --git a/docs/modules/ROOT/pages/ssh-source.adoc b/docs/modules/ROOT/pages/ssh-source.adoc
new file mode 100644
index 0000000..2424690
--- /dev/null
+++ b/docs/modules/ROOT/pages/ssh-source.adoc
@@ -0,0 +1,68 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/ssh-source.svg[] SSH Source
+
+*Provided by: "Apache Software Foundation"*
+
+Receive data from SSH session.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `ssh-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *host {empty}* *| SSH Host| The SSH Host| string| | 
+| *password {empty}* *| The SSH password| The SSH password to use| string| | 
+| *pollCommand {empty}* *| The Poll command| The command to run while polling the SSH session| string| | `"date"`
+| *port {empty}* *| SSH Port| The SSH Port| string| `22`| 
+| *username {empty}* *| The SSH username| The SSH username to use| string| | 
+| delay| Delay| Milliseconds before the next poll| integer| `500`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `ssh-source` can be used in various contexts.
+
+=== Knative Source
+
+The `ssh-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.ssh-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: ssh-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: ssh-source
+    properties:
+      host: "The SSH Host"
+      password: "The The SSH password"
+      pollCommand: "date"
+      username: "The The SSH username"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `ssh-source-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f ssh-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT