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/07 11:37:36 UTC

[camel-kamelets] branch ssh-sink created (now f8639ef)

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

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


      at f8639ef  Added SSH Sink Kamelet

This branch includes the following new commits:

     new bf0cd47  Added SSH Sink Kamelet
     new 8b41613  Added SSH Sink Kamelet
     new fb2c314  Added SSH Sink Kamelet
     new a8f2038  Added SSH Sink Kamelet - docs
     new d873d6c  Added SSH Sink Kamelet - templates
     new 0e8fc2b  Added SSH Sink Kamelet
     new f8639ef  Added SSH Sink Kamelet

The 7 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] 02/07: Added SSH Sink Kamelet

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

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

commit 8b41613c02bdcb5ad8a03798b0994aaa1d993e53
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 7 12:27:46 2021 +0100

    Added SSH Sink Kamelet
---
 .../main/resources/kamelets/ssh-sink.kamelet.yaml  | 76 ++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml
new file mode 100644
index 0000000..a66c195
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml
@@ -0,0 +1,76 @@
+# ---------------------------------------------------------------------------
+# 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: ssh-sink
+  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,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNjQgNjQiPgogICAgPHBhdGggZD0iTSA3IDggQyA1LjM0NiA4IDQgOS4zNDYgNCAxMSBMIDQgNTMgQyA0IDU0LjY1NCA1LjM0NiA1NiA3IDU2IEwgNTcgNTYgQyA1OC42NTQgNTYgNjAgNTQuNjU0IDYwIDUzIEwgNjAgMTEgQyA2MCA5LjM0NiA1OC42NTQgOCA1NyA4IEwgNyA4IHogTSA3IDEwIEwgNTcgMTAgQyA1Ny41NTIgMTAgNTggMTAuNDQ4IDU4IDExIEwgNTggNTMgQyA1OCA1My41NTIgNTcuNTUyIDU0IDU3IDU0IEwgNyA1NCBDID [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "SSH"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "SSH Sink"
+    description: |-
+      Send command through SSH session.
+    required:
+      - connectionHost
+      - connectionPort
+      - username
+      - password
+    type: object
+    properties:
+      connectionHost:
+        title: Connection Host
+        description: The SSH Host
+        type: string
+      connectionPort:
+        title: Connection Port
+        description: The SSH Port
+        type: string
+        default: 22
+      username:
+        title: Username
+        description: The SSH username to use
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The SSH password to use
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  dependencies:
+    - "camel:ssh"
+    - "camel:gson"
+    - "camel:kamelet"
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - to: 
+          uri: "ssh://{{connectionHost}}:{{connectionPort}}"
+          parameters:
+            username: "{{username}}"
+            password: "{{password}}"

[camel-kamelets] 03/07: Added SSH Sink Kamelet

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

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

commit fb2c314d9eba0e9cf96076c141386d741c3e3013
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 7 12:28:06 2021 +0100

    Added SSH Sink 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 abbe1d5..c47dc77 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -127,6 +127,7 @@
 * 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-sink.adoc[image:kamelets/ssh-sink.svg[] SSH Sink]
 * xref:ROOT:ssh-source.adoc[image:kamelets/ssh-source.svg[] SSH Source]
 * xref:ROOT:string-template-action.adoc[image:kamelets/string-template-action.svg[] String Template Action]
 * xref:ROOT:telegram-sink.adoc[image:kamelets/telegram-sink.svg[] Telegram Sink]

[camel-kamelets] 01/07: Added SSH Sink Kamelet

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

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

commit bf0cd47e84bc4414e5b28971962225c1b5825505
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 7 12:15:28 2021 +0100

    Added SSH Sink Kamelet
---
 kamelets/ssh-sink.kamelet.yaml | 76 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/kamelets/ssh-sink.kamelet.yaml b/kamelets/ssh-sink.kamelet.yaml
new file mode 100644
index 0000000..a66c195
--- /dev/null
+++ b/kamelets/ssh-sink.kamelet.yaml
@@ -0,0 +1,76 @@
+# ---------------------------------------------------------------------------
+# 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: ssh-sink
+  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,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNjQgNjQiPgogICAgPHBhdGggZD0iTSA3IDggQyA1LjM0NiA4IDQgOS4zNDYgNCAxMSBMIDQgNTMgQyA0IDU0LjY1NCA1LjM0NiA1NiA3IDU2IEwgNTcgNTYgQyA1OC42NTQgNTYgNjAgNTQuNjU0IDYwIDUzIEwgNjAgMTEgQyA2MCA5LjM0NiA1OC42NTQgOCA1NyA4IEwgNyA4IHogTSA3IDEwIEwgNTcgMTAgQyA1Ny41NTIgMTAgNTggMTAuNDQ4IDU4IDExIEwgNTggNTMgQyA1OCA1My41NTIgNTcuNTUyIDU0IDU3IDU0IEwgNyA1NCBDID [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "SSH"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "SSH Sink"
+    description: |-
+      Send command through SSH session.
+    required:
+      - connectionHost
+      - connectionPort
+      - username
+      - password
+    type: object
+    properties:
+      connectionHost:
+        title: Connection Host
+        description: The SSH Host
+        type: string
+      connectionPort:
+        title: Connection Port
+        description: The SSH Port
+        type: string
+        default: 22
+      username:
+        title: Username
+        description: The SSH username to use
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The SSH password to use
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  dependencies:
+    - "camel:ssh"
+    - "camel:gson"
+    - "camel:kamelet"
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - to: 
+          uri: "ssh://{{connectionHost}}:{{connectionPort}}"
+          parameters:
+            username: "{{username}}"
+            password: "{{password}}"

[camel-kamelets] 04/07: Added SSH Sink 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 ssh-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit a8f2038c5994adf1f729ddaccee391554ff8e8f6
Author: Andrea Cosentino <an...@gmail.com>
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

[camel-kamelets] 06/07: Added SSH Sink Kamelet

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

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

commit 0e8fc2b908823cf8d45c970b849244ba6635dd67
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 7 12:31:05 2021 +0100

    Added SSH Sink Kamelet
---
 kamelets/ssh-sink.kamelet.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kamelets/ssh-sink.kamelet.yaml b/kamelets/ssh-sink.kamelet.yaml
index a66c195..4875916 100644
--- a/kamelets/ssh-sink.kamelet.yaml
+++ b/kamelets/ssh-sink.kamelet.yaml
@@ -61,6 +61,11 @@ spec:
         x-descriptors:
         - urn:alm:descriptor:com.tectonic.ui:password
         - urn:camel:group:credentials
+  types:
+    in:
+      mediaType: text/plain
+    out:
+      mediaType: text/plain
   dependencies:
     - "camel:ssh"
     - "camel:gson"

[camel-kamelets] 05/07: Added SSH Sink 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 ssh-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit d873d6c307bcf02cca383cde618701f1bde96de8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 7 12:28:34 2021 +0100

    Added SSH Sink Kamelet - templates
---
 templates/bindings/camel-k/ssh-sink-binding.yaml | 20 ++++++++++++++++++++
 templates/bindings/core/ssh-sink-binding.yaml    | 14 ++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/templates/bindings/camel-k/ssh-sink-binding.yaml b/templates/bindings/camel-k/ssh-sink-binding.yaml
new file mode 100644
index 0000000..9ef9cb9
--- /dev/null
+++ b/templates/bindings/camel-k/ssh-sink-binding.yaml
@@ -0,0 +1,20 @@
+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"
+  
\ No newline at end of file
diff --git a/templates/bindings/core/ssh-sink-binding.yaml b/templates/bindings/core/ssh-sink-binding.yaml
new file mode 100644
index 0000000..2f43975
--- /dev/null
+++ b/templates/bindings/core/ssh-sink-binding.yaml
@@ -0,0 +1,14 @@
+- route:
+    from:
+      uri: "kamelet:timer-source"
+      parameters:
+        period: 1000
+        message: "Hello Camel JBang"
+    steps:
+      - to:
+          uri: "kamelet:ssh-sink"
+          parameters:
+            connectionHost: "The Connection Host"
+            password: "The Password"
+            username: "The Username"
+    
\ No newline at end of file

[camel-kamelets] 07/07: Added SSH Sink Kamelet

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

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

commit f8639efd67d9f9031ca91c43ca2b357d6946189a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 7 12:33:23 2021 +0100

    Added SSH Sink Kamelet
---
 .../camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml
index a66c195..4875916 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/ssh-sink.kamelet.yaml
@@ -61,6 +61,11 @@ spec:
         x-descriptors:
         - urn:alm:descriptor:com.tectonic.ui:password
         - urn:camel:group:credentials
+  types:
+    in:
+      mediaType: text/plain
+    out:
+      mediaType: text/plain
   dependencies:
     - "camel:ssh"
     - "camel:gson"