이전 편에서는 mac에서 MinIO 객체 스토리지를 설치하는 방법에 대해서 알아봤습니다.
오늘은 Docker로 바로 올려서 MinIO을 쓸 수 있는 방법을 알아보도록 하겠습니다.
먼저 Docker가 설치되어 있어야 합니다.
혹시나 Docker가 설치되어 있지 않다면, 도커(Docker): 맥(Mac)으로 도커 설치하기 을 먼저 읽어보고 설치한 후에 다시 돌아오셔서 진행해주시면 됩니다.
1. 바탕화면에 우선 minio 폴더를 하나 생성해 줍니다.
kabby-MacBookPro:Desktop jeong$ pwd
/Users/jeong/Desktop
kabby-MacBookPro:Desktop jeong$ mkdir minio
2. 생성한 폴더 안에 docker-compose.yml을 받습니다.
version: '3.7'
# starts 4 docker containers running minio server instances. Each
# minio server's web interface will be accessible on the host at port
# 9001 through 9004.
services:
minio1:
image: minio/minio:RELEASE.2020-08-04T23-10-51Z
volumes:
- data1-1:/data1
- data1-2:/data2
ports:
- "9001:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio2:
image: minio/minio:RELEASE.2020-08-04T23-10-51Z
volumes:
- data2-1:/data1
- data2-2:/data2
ports:
- "9002:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio3:
image: minio/minio:RELEASE.2020-08-04T23-10-51Z
volumes:
- data3-1:/data1
- data3-2:/data2
ports:
- "9003:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio4:
image: minio/minio:RELEASE.2020-08-04T23-10-51Z
volumes:
- data4-1:/data1
- data4-2:/data2
ports:
- "9004:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
## By default this config uses default local driver,
## For custom volumes replace with volume driver configuration.
volumes:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2:
3. 해당 폴더에서 docker-compose pull 명령어를 실행시켜줍니다.
kabby-MacBookPro:minio jeong$ docker-compose pull
Pulling minio1 ... done
Pulling minio2 ... done
Pulling minio3 ... done
Pulling minio4 ... done
* 만약 docker-compose pull을 했을 때 아래와 같은 에러가 나온다면, Docker 로그인을 해준 다음에 다시 docker-compose pull을 해줍니다.
kabby-MacBookPro:minio jeong$ docker-compose pull
Pulling minio1 ... error
Pulling minio2 ... error
Pulling minio3 ... error
Pulling minio4 ... error
ERROR: for minio4 Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
ERROR: for minio2 Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
ERROR: for minio1 Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
ERROR: for minio3 Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
ERROR: Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
Get https://registry-1.docker.io/v2/minio/minio/manifests/RELEASE.2020-08-04T23-10-51Z: toomanyrequests: too many failed login attempts for username or IP address
4. 해당 폴더에서 docker-compose up 명령어를 실행시켜줍니다.
kabby-MacBookPro:minio jeong$ docker-compose up
Creating network "minio_default" with the default driver
Creating volume "minio_data1-1" with default driver
Creating volume "minio_data1-2" with default driver
Creating volume "minio_data2-1" with default driver
Creating volume "minio_data2-2" with default driver
Creating volume "minio_data3-1" with default driver
Creating volume "minio_data3-2" with default driver
Creating volume "minio_data4-1" with default driver
Creating volume "minio_data4-2" with default driver
Creating minio_minio4_1 ... done
Creating minio_minio1_1 ... done
Creating minio_minio2_1 ... done
Creating minio_minio3_1 ... done
Attaching to minio_minio4_1, minio_minio3_1, minio_minio1_1, minio_minio2_1
minio4_1 | Waiting for the first server to format the disks.
minio3_1 | Waiting for the first server to format the disks.
minio2_1 | Waiting for the first server to format the disks.
minio4_1 | Waiting for the first server to format the disks.
minio1_1 | Formatting 1st zone, 1 set(s), 8 drives per set.
minio3_1 | Waiting for the first server to format the disks.
minio2_1 | Waiting for the first server to format the disks.
minio1_1 | Waiting for all MinIO sub-systems to be initialized.. lock acquired
minio1_1 | Attempting encryption of all config, IAM users and policies on MinIO backend
minio1_1 | All MinIO sub-systems initialized successfully
minio1_1 | Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
minio1_1 | Status: 8 Online, 0 Offline.
minio1_1 | Endpoint: http://172.18.0.5:9000 http://127.0.0.1:9000
minio1_1 |
minio1_1 | Browser Access:
minio1_1 | http://172.18.0.5:9000 http://127.0.0.1:9000
minio1_1 |
minio1_1 | Object API (Amazon S3 compatible):
minio1_1 | Go: https://docs.min.io/docs/golang-client-quickstart-guide
minio1_1 | Java: https://docs.min.io/docs/java-client-quickstart-guide
minio1_1 | Python: https://docs.min.io/docs/python-client-quickstart-guide
minio1_1 | JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
minio1_1 | .NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
minio4_1 | Waiting for all MinIO sub-systems to be initialized.. lock acquired
minio4_1 | All MinIO sub-systems initialized successfully
minio4_1 | Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
minio4_1 | Status: 8 Online, 0 Offline.
minio4_1 | Endpoint: http://172.18.0.3:9000 http://127.0.0.1:9000
minio4_1 |
minio4_1 | Browser Access:
minio4_1 | http://172.18.0.3:9000 http://127.0.0.1:9000
minio4_1 |
minio4_1 | Object API (Amazon S3 compatible):
minio4_1 | Go: https://docs.min.io/docs/golang-client-quickstart-guide
minio4_1 | Java: https://docs.min.io/docs/java-client-quickstart-guide
minio4_1 | Python: https://docs.min.io/docs/python-client-quickstart-guide
minio4_1 | JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
minio4_1 | .NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
minio2_1 | Waiting for all MinIO sub-systems to be initialized.. lock acquired
minio2_1 | All MinIO sub-systems initialized successfully
minio2_1 | Status: 8 Online, 0 Offline.
minio2_1 | Endpoint: http://172.18.0.4:9000 http://127.0.0.1:9000
minio2_1 |
minio2_1 | Browser Access:
minio2_1 | http://172.18.0.4:9000 http://127.0.0.1:9000
minio2_1 |
minio2_1 | Object API (Amazon S3 compatible):
minio2_1 | Go: https://docs.min.io/docs/golang-client-quickstart-guide
minio2_1 | Java: https://docs.min.io/docs/java-client-quickstart-guide
minio2_1 | Python: https://docs.min.io/docs/python-client-quickstart-guide
minio2_1 | JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
minio2_1 | .NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
minio2_1 | Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
minio3_1 | Waiting for all MinIO sub-systems to be initialized.. lock acquired
minio3_1 | All MinIO sub-systems initialized successfully
minio3_1 | Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
minio3_1 | Status: 8 Online, 0 Offline.
minio3_1 | Endpoint: http://172.18.0.2:9000 http://127.0.0.1:9000
minio3_1 |
minio3_1 | Browser Access:
minio3_1 | http://172.18.0.2:9000 http://127.0.0.1:9000
minio3_1 |
minio3_1 | Object API (Amazon S3 compatible):
minio3_1 | Go: https://docs.min.io/docs/golang-client-quickstart-guide
minio3_1 | Java: https://docs.min.io/docs/java-client-quickstart-guide
minio3_1 | Python: https://docs.min.io/docs/python-client-quickstart-guide
minio3_1 | JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
minio3_1 | .NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
5. 브라우저 창에 http://127.0.0.1:9001/ 접속이 되는지 확인합니다.
5. Access Key : minio , Secret Key: minio123
'IT > Infra' 카테고리의 다른 글
[Docker] Consul 설치 하기 (Feat.Mac) (0) | 2020.10.24 |
---|---|
[Mac] Rabbit MQ 설치 (0) | 2020.10.11 |
[Mac] MinIO 객체 스토리지 (0) | 2020.08.01 |
[Centos7] redis 설치하기 (0) | 2020.02.10 |
[Centos7] maven 설치하기 (0) | 2020.01.08 |