mountpoint-s3 就在最近ga 了,同时还提供了rpm 以及deb 包,可以方便安装使用
安装
直接下载对应的包,安装就可以了,比如下载rpm 的然后yum install 就可以了,但是因为默认没有systemd 管理,需要自己配置
参考使用
- 环境配置
version: "3"
services:
s3:
image: minio/minio
volumes:
- "./data:/data"
environment:
- "MINIO_ACCESS_KEY=minio"
- "MINIO_SECRET_KEY=minio123"
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
- systemd 配置
/usr/lib/systemd/system/mountpoints3.service
[Unit]
Description=mountpoint-s3 service
After=network.target
[Service]
EnvironmentFile=-/etc/mountpoint/config
ExecStart=/opt/aws/mountpoint-s3/bin/mount-s3 $OPTIONS
Type=forking
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=64000
# processes/threads
LimitNPROC=64000
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
[Install]
WantedBy=multi-user.target
- 配置
/etc/mountpoint/config
AWS_ACCESS_KEY_ID="minio"
AWS_SECRET_ACCESS_KEY="minio123"
OPTIONS=" --endpoint-url http://127.0.0.1:9000 --allow-delete -l /opt/s3/logs demoapp /opt/s3/demoapp"
说明
对于使用s3的人来说mountpoint-s3 是一个不错的工具,可以方便进行文件挂载使用
参考资料
https://github.com/awslabs/mountpoint-s3/releases
https://github.com/awslabs/mountpoint-s3/blob/main/doc/CONFIGURATION.md