Ceph Sink
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Uploads each message as a file (object) to a bucket of a Ceph Object Gateway, the S3-compatible storage of Ceph.
Use it to store data in Ceph, such as reports, exports, images or received messages to keep as an archive. For Amazon S3, or another S3-compatible storage such as MinIO, use aws-s3-sink (with overrideEndpoint, uriEndpointOverride and forcePathStyle for a storage other than AWS).
Input: the body is the content of the file, as text, bytes or a stream. Text is turned into bytes before the upload, and the Content-Type header is set to application/octet-stream. A file is passed on as it is, and so is a stream, unless stream caching is turned off. The key (the name of the file in the bucket) comes from the optional file header, or the ce-file header; when neither is set it is keyName, or a generated unique name when keyName is not set either.
Output: the body is the content of the file, as bytes when it was text, and the Content-Type header is application/octet-stream. The CamelAwsS3ETag header gives the ETag of the uploaded file.
Good to know: a file with the same key is overwritten, so with keyName set and no file header each message replaces the previous one. The bucket is addressed as part of the host name (such as my-bucket.ceph.example.com) unless cephUrl uses an IP address; set forcePathStyle to true when the DNS of the gateway has no wildcard name for its buckets. Headers that start with CamelAwsS3 are removed from the message first, so they cannot change what the Kamelet does.
Configuration Options
The following table summarizes the configuration options available for the ceph-sink Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
Access Key | Required The S3 access key of a Ceph Object Gateway user, as shown by | string | |||
Bucket Name | Required The name of the bucket to store the files in. | string | my-bucket | ||
Ceph Url Address | Required The address of the Ceph Object Gateway (RGW), as a URL with the scheme and the port. | string | http://ceph-rgw.example.com:7480 | ||
Secret Key | Required The S3 secret key that goes with | string | |||
Bucket Zone Group | Required The name of the zone group of the Ceph Object Gateway, used as the region of the requests. A Ceph cluster that was not set up with several zone groups uses | string | default | ||
Autocreate Bucket | If true, the bucket is created when it does not exist yet. If false, the bucket must already exist. | boolean | false | ||
Force Path Style | If true, the bucket name is put in the path of the address ( | boolean | false | ||
Key Name | The key to store the files under, with its folder if any, used when a message has no | string | reports/latest.csv |
Dependencies
At runtime, the ceph-sink 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:ceph-sink" You can now run it directly through the following command
camel run route.yaml