For the complete documentation index, see llms.txt. This page is also available as Markdown.

Object Storage Configuration

This page describes how to properly configure object storage for BYOC Agent deployments.

We highly recommend running the WarpStream Agent with a dedicated bucket for isolation; however, the WarpStream Agent will only write/read data under the warpstream prefix.

Bucket URL Construction

The bucketURL flag is the URL of the object storage bucket that the WarpStream Agent should write to. See the table below for how to configure it for different object store implementations.

Note that the WarpStream Agents will automatically write all of their data to a top-level warpstream prefix in the bucket. In addition, each cluster will write its data to a cluster-specific prefix (derived from the cluster ID) within the warpstream prefix so multiple WarpStream clusters and schema registries can share the same object storage bucket without issue.

An S3 bucket with 16 different cluster prefixes under the top-level warpstream prefix.

Format: s3://$BUCKET_NAME?region=$BUCKET_REGION

Example: s3://my_warpstream_bucket_123?region=us-east-1

The WarpStream Agent embeds the official AWS Golang SDK V2 so authentication/authorization with the specified S3 bucket can be handled in any of the expected ways, like using a shared credentials file, environment variables, or simply running the Agents in an environment with an appropriate IAM role with Write/Read/Delete/List permissions on the S3 bucket.

Assume Role

If you want to use an AssumeRole provider to authenticate, you can add the WARPSTREAM_BUCKET_ASSUME_ROLE_ARN_DEFAULT environment variable to your Agent. For example:

Manually Providing Credentials

In general, we recommend using IAM roles whenever possible. However, if you want to provide object storage credentials manually then you'll need to set the following environment variables:

Environment variables can be set in our K8s chart using the extraEnvs and extraEnvsFrom fields in the charts values.yaml.

Format: gs://$BUCKET_NAME

Example: gs://my_warpstream_bucket_123

The WarpStream Agent embeds the official GCP Golang SDK so authentication/authorization with the storage bucket can be handled in any of the expected ways.

Format: azblob://$CONTAINER_NAME?storage_account=$STORAGE_ACCOUNT

Example: azblob://my_warpstream_container_123?storage_account=my_storage_account_456

The WarpStream Agent embeds the official Azure Golang SDK which expects one of the two following environment variables to be set: AZURE_STORAGE_KEY or AZURE_STORAGE_SAS_TOKEN. Alternatively, you can use an Azure AD / managed identity / service principal.

Example: mem://my_memory_bucket

Format: file://$PATH_TO_DIRECTORY

Example: file:///tmp/warpstream_tmp_123

S3-compatible Object Stores (MinIO, Ceph, R2, Oracle Cloud, Tigris, etc)

If you're using an "S3 compatible" object storage service other than Amazon S3, such as MinIO, Ceph Object Gateway, Cloudflare R2, Oracle Cloud Object Storage, Linode Object Storage, or Alibaba Object Storage, you will need to manually provide credentials as environment variables. You must also configure the S3 client to construct the appropriate URL based on the API compatibility. Detailed instructions for each provider are listed below:

If you have a MinIO docker container running locally on your machine on port 9000, you can run the Agent like this after creating an Access Key in the MinIO UI:

The MinIO team has a more detailed integration guide on their website as well. Note that the region query argument is a no-op, but required to pass validation in the S3 SDK.

WarpStream connects to Ceph Object Gateway (RGW) through its S3-compatible API. Create a dedicated bucket and an RGW user with read, write, delete, and list access to that bucket, then provide the user's S3 access key and secret key to the Agent.

Use path-style addressing unless your RGW deployment is configured for virtual-hosted-style access. The bucket URL has the following format:

s3://<bucket-name>?region=us-east-1&s3ForcePathStyle=true&endpoint=<rgw-endpoint>

The endpoint must include the scheme and port, if applicable. The region is required by the AWS SDK but is not used by RGW. For example:

For an Agent deployment, configure the same values with environment variables:

Configure the Ceph bucket according to the requirements in Bucket Configuration: do not enable object versioning, object lock, or a retention policy. Configure an S3 lifecycle rule to abort incomplete multipart uploads after seven days, and ensure that RGW lifecycle processing is enabled on at least one RGW daemon in each zone.

Some Ceph versions do not support the checksum headers sent by recent AWS SDK releases. If the Agent reports an XAmzContentSHA256Mismatch error while checking bucket access, set the following environment variable:

  1. Create an account with Cloudflare.

  2. Create an R2 bucket.

  3. Create an R2 access token.

Note that if you run multiple WarpStream Agents this way in non-demo mode, then by default they need to be running on the same internal network. The reason for this is that if the Agents believe they're all running in the same "availability zone", they will attempt to form a distributed cache with each other to reduce R2 API GET requests.

However, if you wish to run multiple Agents in separate networks / regions, but still allow them to function as a single "Kafka Cluster", assign each one a dedicated availability zone.

For example, Agent 1:

Agent 2:

This signals to each Agent that they should not attempt to communicate with each other directly over the local network, and that each one should behave as if it were running in a different availability zone. However, data will still be able to be streamed from Chicago to Nashville (or vice versa) because the Agents will use R2 as "the network".

The net result of this is a "multi-region" Cluster that can read and write all topics/partitions from multiple regions at the same time.

  1. Create an account with Akamai Linode

  2. Create a Bucket in Object Storage in the region of your choice.

  3. Create a set of Object Storage Access Keys

To set up a WarpStream Agent with Linode Object Storage, you need your access key, secret key, and the bucket URL. The bucket URL for Akamai Linode's S3-compatible storage requires the following structure: s3://<your-bucket-name>?s3ForcePathStyle=true&endpoint=<cluster-id>.linodeobjects.com&region=<region-id>

Demo

Playground

Docker Configuration Example

Make sure to replace the following placeholders in the commands above:

  • XXX: Your Linode Object Storage access and secret keys.

  • <your-bucket-name>: The name of your bucket in Linode Object Storage.

  • <region-id>: The ID for your object storage cluster, such as us-ord-1. This value must be used for both the endpoint and region parameters.

To deploy agents in a Kubernetes cluster, use the official Helm chart and add the following configurations to the values.yaml file.

  1. Create an account with Alibaba Cloud.

  2. Create a set of AccessKeys by creating a RAM User.

  3. Create a Bucket in Object Storage Service (OSS) in the region of your choice.

To set up a WarpStream Agent with Alibaba Cloud OSS, you need your AccessKey ID, AccessKey Secret, and the bucket URL. The bucket URL for Alibaba Cloud's S3-compatible storage requires the following structure, explicitly setting it to use virtual-hosted-style URLs:

s3://<your-bucket-name>?endpoint=oss-<region-id>.aliyuncs.com&region=<region-id>&s3ForcePathStyle=false

Demo

Playground

Docker Configuration Example

Placeholders

Make sure to replace the following placeholders in the commands above:

  • XXX: Your Alibaba Cloud AccessKey ID and AccessKey Secret.

  • <your-bucket-name>: The name of your bucket in Alibaba Cloud OSS.

  • <region-id>: The ID for your object storage region.

To deploy agents in a Kubernetes cluster, use the official Helm chart and add the following configurations to the values.yaml file.

  1. Create an IBM Cloud Platform Account.

  2. Create an instance of IBM Cloud Object Storage.

  3. Create a bucket with the level of resiliency you want.

  4. Create a set of Object Storage API Keys.

To set up a WarpStream Agent with IBM Cloud Object Storage (COS), you need your access key, secret key, and the bucket URL. The bucket URL for IBM COS's S3-compatible storage requires the following structure: s3://<bucket-name>?endpoint=s3.<region-id>.cloud-object-storage.appdomain.cloud&region=<region-id>

Demo

Playground

Docker Configuration Example

Make sure to replace the following placeholders in the commands above:

  • XXX: Your IBM Service ID Object Storage API access and secret keys.

  • <bucket-name>: The name of your bucket in IBM Cloud Object Storage.

  • <region-id>: The ID for your object storage cluster, such as us-east. This value must be used for both the endpoint and region parameters.

To deploy agents in a Kubernetes cluster, use the official Helm chart and add the following configurations to the values.yaml file.

Using a Bucket Prefix

If you want the WarpStream Agents to store data in a specific prefix in the bucket, you can add the prefix as a query argument to the bucket URL. The prefix must terminate with a "/". For example:

Combining Multiple Buckets

The bucketURL can also point at several object storage buckets treated as one logical bucket, using a wrapper scheme:

  • Multi Buckets (warpstream_multi://) — replicate every write across the buckets for durability and availability (for example, to survive a full region's object storage outage).

  • Striped Buckets (warpstream_stripe://) — stripe writes so each object lives on exactly one bucket, to scale write throughput past a single bucket's request-rate ceiling.

Bucket Configuration

WarpStream will manage the lifecycle of the objects, including deleting objects that have been compacted or have expired due to retention. Do not configure a retention policy on your bucket, and make sure that object versioning and object soft deletion are disabled.

We do however recommend configuring a lifecycle policy for cleaning up aborted multi-part uploads. This will prevent failed file uploads from the WarpStream Agent from accumulating in the bucket forever and increasing your storage costs. Below is a sample Terraform configuration for various different cloud providers:

Bucket Permissions

In addition to configuring the WarpStream buckets, you'll also need to make sure the Agent containers have the appropriate permissions to interact with the bucket.

Agents periodically inspect lifecycle configurations for supported bucket types so they can report policies that could corrupt your cluster. This inspection requires the provider-specific bucket-level read permissions listed below.

Specifically, the Agents need permission to perform the following operations:

  • s3:PutObject

    • To create new files.

  • s3:GetObject

    • To read existing files.

  • s3:DeleteObject

    • So the Agents can enforce retention and cleanup of pre-compaction files.

  • s3:ListBucket

    • So the Agents can enforce retention and cleanup of pre-compaction files.

  • s3:GetLifecycleConfiguration

    • To inspect lifecycle policies and report policies that could corrupt your cluster.

S3 Express directory buckets require s3express:GetLifecycleConfiguration instead. See the S3 Express configuration guide for the complete policy.

Below is an example Terraform configuration for an AWS IAM policy document that provides WarpStream with the appropriate permissions to access a dedicated S3 bucket:

The easiest way to configure bucket access in GCP is with the roles/storage.objectUser and roles/storage.bucketViewer role like so:

However, if you need more granular permission sets, then WarpStream requires at least the following:

  • storage.objects.create

  • storage.objects.delete

  • storage.objects.get

  • storage.objects.list

  • storage.multipartUploads.*

  • storage.buckets.get

The storage.buckets.get permission allows the Agents to inspect each bucket's lifecycle configuration. The roles/storage.bucketViewer role in the example above includes this permission.

The easiest way to configure bucket access in Azure is with the Storage Blob Data Contributor role like so:

Migrating Between Object Storage Buckets

the -additionalBackgroundTasksBucketURLs flag and WARPSTREAM_ADDITIONAL_BACKGROUND_TASKS_BUCKET_URLS environment variable require Agent version v814 or above.

Older versions of the Agent can still migrate buckets by using the -additionalDeadscannerBucketURLs flag or WARPSTREAM_ADDITIONAL_DEADSCANNER_BUCKET_URLS environment variable instead.

If you need to migrate a WarpStream cluster from one object storage bucket to another, follow these steps:

  1. Make sure that the Agents have permission to perform operations on both the old bucket and the new bucket.

    1. Note if you're using the Agent Groups functionality, you need to do this step for all Agent Groups before proceeding to step 2. In other words, all Agents in all groups of the cluster must be able to access the old bucket and the new bucket before the new bucket can start being used.

  2. Deploy the Agents with the bucketURL flag set to the new bucket instead of the old one. This will cause the Agents to write all new files (both for ingestion and compaction) to the new bucket while still allowing them to read historical data from the old bucket.

    1. You'll also need to set the -additionalBackgroundTasksBucketURLs flag or WARPSTREAM_ADDITIONAL_BACKGROUND_TASKS_BUCKET_URLS environment variable in the Agents to point to the old bucket so that the Agents continue to scan the old bucket for dead files to delete and ripcord sequences to ingest.

  3. Wait until there are no more data files under the warpstream prefix in the old bucket.

For example, if you were migrating from AWS S3 bucket foo to AWS S3 bucket bar then you would redeploy the Agents from this configuration:

To this configuration:

Then wait until all the files in the foo bucket under the warpstream prefix had been deleted. Once all the files had been deleted, you would then deploy the Agents one final time with this configuration:

Kubernetes Workload Identity for Bucket Access

When running in Kubernetes in AWS, Azure, or GCP it is recommended to use Workload Identity to delegate access from the WarpStream Agent pods to the Object Storage bucket. This simplifies management of the object storage credentials and minimizes the risk of credential leaks.

Documentation: https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html Example Terraform

Example Configuration on our Helm Chart

Example Configuration on our Helm Chart

Documentation: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity Example Terraform

Example Configuration on our Helm Chart

Last updated

Was this helpful?