Browse Source

init minio

master
xrazis 5 years ago
parent
commit
d1b9938e88
  1. 166
      minio-config/docker-compose.yml
  2. 53
      minio-config/minio.conf
  3. 18
      minio-config/openssl.conf

166
minio-config/docker-compose.yml

@ -0,0 +1,166 @@
version: "3.4"
services:
minio1:
image: minio/minio:RELEASE.2020-04-10T03-34-42Z
hostname: minio1
volumes:
- minio1b-data:/export
ports:
- "9001:9000"
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio1==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio2:
image: minio/minio:RELEASE.2020-04-10T03-34-42Z
hostname: minio2
volumes:
- minio2b-data:/export
ports:
- "9002:9000"
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio2==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio3:
image: minio/minio:RELEASE.2020-04-10T03-34-42Z
hostname: minio3
volumes:
- minio3b-data:/export
ports:
- "9003:9000"
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio3==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio4:
image: minio/minio:RELEASE.2020-04-10T03-34-42Z
hostname: minio4
volumes:
- minio4b-data:/export
ports:
- "9004:9000"
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio4==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
web:
image: nginx:1.17.9-alpine
depends_on:
- minio1
deploy:
mode: replicated
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
replicas: 2
placement:
# max_replicas_per_node: 1
constraints:
- node.labels.group==minio
ports:
- "8080:80"
- "9443:443"
volumes:
- /home/user/minio/minio.conf:/etc/nginx/conf.d/default.conf
- /home/user/minio/public.crt:/etc/nginx/public.crt
- /home/user/minio/private.key:/etc/nginx/private.key
networks:
- minio_distributed
environment:
- MINIO_MIRROR_PARAMETERS= --delete
- MINIO_SERVER_URL=83.212.77.30:9443
- MINIO_PROT=https
- MINIO_SERVER_DOCUMENTROOT=/home/user/docker_node_image/localdir
- MINIO_ACCESS_KEY=d4bb2d45395befe5f29f54a9c219a2559ee1bfaab64fce897001c209a52516f4
- MINIO_SECRET_KEY=e5ed1e5812522fcfe0624c75e20ebe9f72435855e4ef26c1f3b018918744e1a1
- MINIO_WEB_BUCKET=nodebucket
- MINIO_WEB_PASS=d4bb2d45395befe5f29f54a9c219a2559ee1bfaab64fce897001c209a52516f4
- AWS_CONFIG_FILE=/home/user/aws/config
- AWS_ACCESS_KEY_ID=d4bb2d45395befe5f29f54a9c219a2559ee1bfaab64fce897001c209a52516f4
- AWS_SECRET_ACCESS_KEY=e5ed1e5812522fcfe0624c75e20ebe9f72435855e4ef26c1f3b018918744e1a1
volumes:
minio1b-data:
minio2b-data:
minio3b-data:
minio4b-data:
networks:
minio_distributed:
driver: overlay
secrets:
secret_key:
external: true
access_key:
external: true

53
minio-config/minio.conf

@ -0,0 +1,53 @@
upstream minio_servers {
server minio1:9000;
server minio2:9000;
server minio3:9000;
server minio4:9000;
}
proxy_cache_path /var/tmp levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m use_temp_path=off;
server {
listen 80;
server_name 83.212.77.30;
return 301 https://83.212.77.30$request_uri;
}
server {
listen 443 ssl;
server_name 83.212.77.30;
# To allow special characters in headers
ignore_invalid_headers off;
# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# To disable buffering
proxy_buffering off;
ssl_certificate /etc/nginx/public.crt;
ssl_certificate_key /etc/nginx/private.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_cache my_cache;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_redirect off;
proxy_connect_timeout 300;
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;
#proxy_pass http://minio1:9000; # If you are using docker-compose this would be the hostname i.e. minio
proxy_pass http://minio_servers;
# Health Check endpoint might go here. See https://www.nginx.com/resources/wiki/modules/healthcheck/
# /minio/health/live;
}
}

18
minio-config/openssl.conf

@ -0,0 +1,18 @@
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = GR
ST = AT
L = Aigalew
O = GrNet
OU = Pada
CN = Computing
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP.1 = 83.212.77.30
Loading…
Cancel
Save