Ceph Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Receive data from an Ceph Bucket, managed by a Object Storage Gateway.
Configuration Options
The following table summarizes the configuration options available for the ceph-source
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Access Key | Required The access key. | string | |||
Bucket Name | Required The Ceph Bucket name. | string | |||
Ceph Url Address | Required Set the Ceph Object Storage Address Url. | string | http://ceph-storage-address.com | ||
Secret Key | Required The secret key. | string | |||
Bucket Zone Group | Required The bucket zone group. | string | |||
Autocreate Bucket | Specifies to automatically create the bucket. | boolean | false | ||
Delay | The number of milliseconds before the next poll of the selected bucket. | integer | 500 | ||
Auto-delete Objects | Specifies to delete objects after consuming them. | boolean | true | ||
Ignore Body | If true, the Object body is ignored. Setting this to true overrides any behavior defined by the | boolean | false | ||
Include Body | If true, the exchange is consumed and put into the body and closed. If false, the Object stream is put raw into the body and the headers are set with the object metadata. | boolean | true | ||
Prefix | The bucket prefix to consider while searching. | string | folder/ |
Dependencies
At runtime, the ceph-source
Kamelet relies upon the presence of the following dependencies:
-
camel:aws2-s3
-
camel:kamelet
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel
Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:log-sink"
You can now run it directly through the following command
camel run route.yaml
Camel K Environment Usage
This section describes how you can use the ceph-source
.
Knative source
You can use the ceph-source
Kamelet as a Knative source by binding it to a Knative object.
apiVersion: camel.apache.org/v1
kind: KameletBinding
metadata:
name: ceph-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: ceph-source
properties:
accessKey: The Access Key
bucketName: The Bucket Name
cephUrl: http://ceph-storage-address.com
secretKey: The Secret Key
zoneGroup: The Bucket Zone Group
sink:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
Prerequisite
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
ceph-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:
kubectl apply -f ceph-source-binding.yaml
Procedure for using the Kamel CLI
Configure and run the source by using the following command:
kamel bind channel:mychannel -p "source.accessKey=The Access Key" -p "source.bucketName=The Bucket Name" -p "source.cephUrl=\http://ceph-storage-address.com" -p "source.secretKey=The Secret Key" -p "source.zoneGroup=The Bucket Zone Group" ceph-source
This command creates the KameletBinding in the current namespace on the cluster.
Kafka source
You can use the ceph-source
Kamelet as a Kafka source by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1
kind: KameletBinding
metadata:
name: ceph-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: ceph-source
properties:
accessKey: The Access Key
bucketName: The Bucket Name
cephUrl: http://ceph-storage-address.com
secretKey: The Secret Key
zoneGroup: The Bucket Zone Group
sink:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
Prerequisites
-
You’ve installed Strimzi.
-
You’ve created a topic named
my-topic
in the current namespace. -
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
ceph-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:
kubectl apply -f ceph-source-binding.yaml
Procedure for using the Kamel CLI
Configure and run the source by using the following command:
kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic -p "source.accessKey=The Access Key" -p "source.bucketName=The Bucket Name" -p "source.cephUrl=\http://ceph-storage-address.com" -p "source.secretKey=The Secret Key" -p "source.zoneGroup=The Bucket Zone Group" ceph-source
This command creates the KameletBinding in the current namespace on the cluster.