Last active
November 17, 2022 10:15
-
-
Save Nurlan199206/512f28ef6035a7cf9a9ddab2f5aba926 to your computer and use it in GitHub Desktop.
minio-cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. файловая система ext4 не поддерживается, необходимо использовать например xfs | |
2. корневой раздел не поддерживается, необходимо использовать например раздел /mnt | |
======================================================================================== | |
192.168.0.155 minio1.nurlan.kz | |
192.168.0.156 minio2.nurlan.kz | |
192.168.0.157 minio3.nurlan.kz | |
192.168.0.158 minio4.nurlan.kz | |
mkdir -p /mnt/disk{1..4}/minio | |
rm -rf /mnt/disk{1..4}/minio/.minio.sys - если ошибки Waiting for all other servers to be online to format the drives (elapses 11s) то удаляем папку .minio_sys | |
groupadd -r minio-user | |
useradd -M -r -g minio-user minio-user | |
chown minio-user:minio-user /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4/ | |
chown minio-user:minio-user /mnt/disk1/minio /mnt/disk2/minio /mnt/disk3/minio /mnt/disk4/minio | |
chmod 774 /mnt/disk{1..4} | |
=========================================/etc/default/minio================================================= | |
MINIO_VOLUMES="http://minio-prod{1...4}.nurlan.kz:9000/minio-disk01/disk{1...4}/minio" | |
MINIO_OPTS="--console-address :9001" | |
MINIO_ROOT_USER=minioadmin | |
MINIO_ROOT_PASSWORD=minioadmin | |
=========================================systemd service==================================================== | |
[Unit] | |
Description=MinIO | |
Wants=network-online.target | |
After=network-online.target | |
AssertFileIsExecutable=/usr/local/bin/minio | |
[Service] | |
WorkingDirectory=/usr/local | |
User=minio-user | |
Group=minio-user | |
ProtectProc=invisible | |
EnvironmentFile=-/etc/default/minio | |
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi" | |
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES | |
# Let systemd restart this service always | |
Restart=always | |
# Specifies the maximum file descriptor number that can be opened by this process | |
LimitNOFILE=65536 | |
# Specifies the maximum number of threads this process can create | |
TasksMax=infinity | |
# Disable timeout logic and wait until process is stopped | |
TimeoutStopSec=infinity | |
SendSIGKILL=no | |
[Install] | |
WantedBy=multi-user.target | |
==================================================NGINX REVERSE proxy============================================== | |
upstream backend { | |
server 172.22.24.2:9001; | |
server 172.22.24.3:9001; | |
server 172.22.24.4:9001; | |
server 172.22.29.2:9001; | |
server 172.22.29.3:9001; | |
} | |
server { | |
listen 9000 ssl; | |
ssl_certificate /etc/ssl/2023/wildcard.crt; | |
ssl_certificate_key /etc/ssl/2023/private.key; | |
server_name minio.kacd.kz; | |
access_log /var/log/nginx/minio.log; | |
error_log /var/log/nginx/minio_error.log; | |
location / { | |
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_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://backend; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment