minio 官方目前提供了一个console 方便的管理工具,以下是一个参考运行demo
环境准备
- docker-compose 文件
version: "3"
services:
minio1:
image: minio/minio
command: server http://minio{1...2}/data{1...4}
environment:
- "MINIO_ROOT_USER=minio"
- "MINIO_ROOT_PASSWORD=minio123"
ports:
- "9000:9000"
volumes:
- ./data1-1:/data1
- ./data1-2:/data2
- ./data1-3:/data3
- ./data1-4:/data4
minio2:
image: minio/minio
command: server http://minio{1...2}/data{1...4}
environment:
- "MINIO_ROOT_USER=minio"
- "MINIO_ROOT_PASSWORD=minio123"
ports:
- "9001:9000"
volumes:
- ./data2-1:/data1
- ./data2-2:/data2
- ./data2-3:/data3
- ./data2-4:/data4
sidekick:
image: minio/sidekick
command: --debug --health-path=/minio/health/ready --address :8000 http://minio{1...2}:9000
ports:
- "8000:8000"
console:
image: minio/console
command: server
environment:
- "CONSOLE_PBKDF_PASSPHRASE=demoapp"
- "CONSOLE_PBKDF_SALT=demoapp"
- "CONSOLE_MINIO_SERVER=http://minio1:9000"
ports:
- "9090:9090"
- 创建console 管理账户
使用mc 工具
mc config host add news3 http://127.0.0.1:9000 minio minio123
策略定义
{
"Version": "2012-10-17",
"Statement": [{
"Action": [
"admin:*"
],
"Effect": "Allow",
"Sid": ""
},
{
"Action": [
"s3:*"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::*"
],
"Sid": ""
}
]
}
创建策略&关联
mc admin policy add news3/ consoleAdmin admin.json
mc admin policy set news3 consoleAdmin user=console
参考界面
- sidekick 登录界面
- console
说明
sidekick 目前已经发布1.0 了说明实际生产使用问题不大了,很值得使用,以下是一个参考官方架构,利用sidekick 的cache 可以提供强大的数据cache处理(比如数据分析场景数据就近访问)
参考资料
https://github.com/minio/sidekick
https://github.com/minio/console
https://github.com/rongfengliang/minio-cluster-sidekick-console