miniofs 配置使用
1. rpm
// RPM 包下载
https://github.com/minio/minfs/releases/tag/RELEASE.2017-02-26T20-20-56Z
// 安装
yum install minfs-0.0.20170226202056-1.x86_64.rpm
2. 配置
创建 config.json 在目录 /etc/minfs 内容如下:
{"version":"1","accessKey":"Q3AM3UQ867SPQQA43P2F","secretKey":"zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"}
进行磁盘挂载/etc/fstab,类似如下:
https://play.minio.io:9000/mybucket /mnt/mounted/mybucket minfs defaults,cache=/tmp/mybucket 0 0
mount /mnt/mounted/mybucket
3. 使用
具体实际的使用就是类似普通的文件系统
4. docker 部署参考
version: '2'
services:
my-test-server:
image: nginx
ports:
- "80:80"
volumes:
- my-test-store:/usr/share/nginx/html:ro
volumes:
my-test-store:
driver: minio/minfs
driver_opts:
endpoint: https://play.minio.io:9000
access-key: Q3AM3UQ867SPQQA43P2F
secret-key: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
bucket: testbucket
opts: cache=/tmp/my-test-store
docker plugin install minio/minfs
docker volume create -d minio/minfs \
--name my-test-store \
-o endpoint=https://play.minio.io:9000 \
-o access-key=Q3AM3UQ867SPQQA43P2F \
-o secret-key=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG \
-o bucket=testbucket
-o opts=cache=/tmp/my-test-store
docker run -d --name my-test-server -p 80:80 -v my-test-store:/usr/share/nginx/html:ro nginx
5. 参考文档
https://docs.minio.io/docs/minfs-quickstart-guide