对象存储配置
AutoMQ 是基于云原生理念重新设计的 Kafka 发行版,充分利用了对象存储云服务。可以基于各主流云厂商对象存储或者存储软件构建存储层。
对象存储 URI 构建
URI 是 AutoMQ 用于表示写入对象存储的唯一标识,遵循一定规范来屏蔽不通对象存储服务商的差异。 URI 的组成分为: s3
代表具体的协议; xxx_bucket
代表具体的 bucket; region
、 endpoint
用于不同厂商定位 bucket的辅助参数。
最终替换 Linux 主机部署多节点集群▸ 配置模版中 global.config
、 global.envs
中的变量生成最终配置文件。
提供商 | 类型 | URI示例 |
---|---|---|
AWS | 云商 | s3://xxx_bucket?region=us-east-1 |
AWS-CN | 云商 | s3://xxx_bucket?region=cn-northwest-1&endpoint=https://s3.amazonaws.com.cn |
ALIYUN | 云商 | s3://xxx_bucket?region=oss-cn-shanghai&endpoint=https://oss-cn-shanghai.aliyuncs.com |
OCI | 云商 | s3://xxx_bucket?region=us-ashburn-1&endpoint=https://xxx_namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com&pathStyle=true |
CEPH | 存储软件 | s3://xxx_bucket?region=us-west-2&endpoint=http://127.0.0.1:80 |
CubeFS | 存储软件 | s3://xxx_bucket?region=us-west-2&endpoint=http://10.1.0.240:17410 |
MinIO | 存储软件 | s3://xxx_bucket?region=us-west-2&pathStyle=true&endpoint=http://10.1.0.240:9000 |
如果配置 s3.wal.path
还可在 URI 上按需增加 batchInterval
、 maxBytesInBatch
参数项,分别控制提交的间隔时间和一批最大字节数,默认 batchInterval=250
毫秒, maxBytesInBatch=8388608
字节。
云上对象存储配置
- AWS
- 阿里云
- GCP
- Azure
- OCI
- 其他云厂商
建议参考 Policy 和 Endpoint & Region 链接,查阅 AWS 文档,获取更多 IAM 和 S3 的详细配置说明。
生产环境中,建议 IAM Policy 授权范围精确到具体的 Bucket,以避免预期之外的授权。
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"*"
]
}
]
}
建议参考 Policy 和 Endpoint & Region 链接,查阅阿里云文档,获取更多 RAM 和 OSS 的详细配置说明。
生产环境中,建议 RAM Policy 授权范围精确到具体的 Bucket,以避免预期之外的授权。
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"oss:PutObject",
"oss:AbortMultipartUpload",
"oss:GetObject",
"oss:DeleteObject"
],
"Resource": [
"acs:oss:*:*:automq-data",
"acs:oss:*:*:automq-ops"
]
}
]
}
由于 AWS S3 SDK 并不能直接访问 GCP Cloud Storage ,因此 AutoMQ 开源版无法直接基于 Google Cloud Storage 运行。如果您需要在 GCP 上运行 AutoMQ,建议联系 AutoMQ 团队获取企业版支持,AutoMQ 企业版支持兼容 GCP Cloud Storage。
Azure Blob Storage 与 AWS S3 网络协议不兼容,因此 AutoMQ 开源版无法直接基于 Azure Blob Storage 运行。用户可通过如下方式处理:
-
自行搭建 S3 Proxy,实现访问 Blob Storage。
-
联系 AutoMQ 团队获取企业版支持,AutoMQ 企业版支持兼容 Azure Blob Storage。
建议查阅官方网站以获取更多详细信息。
建议参考 Policy 、Detailed Policy 和 Endpoint & Region 链接,查阅 OCI 文档,获取更多 IAM 和 Object Storage 的详细配置说明。
Allow group 'AutoMQ PoC' to manage objects in tenancy where any {target.bucket.name='automq-data', target.bucket.name='automq-ops'}
如需在其他公有云环境部署 AutoMQ,需要确认云厂商提供的对象存储服务是否兼容 S3 协议。您可以通过此处表单联系 AutoMQ 团队获取必要的协助和最佳实践。
存储软件配置
如果您期望在私有数据中心部署 AutoMQ,也可以通过 MinIO、Ceph、CubeFS 等支持 S3 协议的存储软件提供对象存储服务。