rename MINIO_* env vars to S3_* — no backward compat
Complete rename of all environment variable references from MINIO_ prefix to S3_ prefix across the entire codebase: - internal/config/constants.go: EnvPrefix and all Env* constants - All Go source files: string literals, error messages, comments - Prometheus metrics: minio_* → s3_* metric name prefix - Dockerfiles: ENV declarations - Build scripts, CI workflows, helm charts, docs - Grafana dashboards: metric queries updated Go import paths and package names unchanged. Build verified: go build ./cmd/... passes clean.
This commit is contained in:
@@ -33,8 +33,8 @@ jobs:
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
MINIO_KMS_SECRET_KEY: "my-minio-key:oyArl7zlPECEduNbB1KXgdzDn2Bdpvvw0l8VO51HQnY="
|
||||
MINIO_KMS_AUTO_ENCRYPTION: on
|
||||
S3_KMS_SECRET_KEY: "my-minio-key:oyArl7zlPECEduNbB1KXgdzDn2Bdpvvw0l8VO51HQnY="
|
||||
S3_KMS_AUTO_ENCRYPTION: on
|
||||
run: |
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
||||
|
||||
@@ -33,8 +33,8 @@ jobs:
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
MINIO_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
MINIO_KMS_AUTO_ENCRYPTION: on
|
||||
S3_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
S3_KMS_AUTO_ENCRYPTION: on
|
||||
run: |
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
||||
|
||||
@@ -82,9 +82,9 @@ jobs:
|
||||
check-latest: true
|
||||
- name: Test LDAP/OpenID/Etcd combo
|
||||
env:
|
||||
_MINIO_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_MINIO_ETCD_TEST_SERVER: ${{ matrix.etcd }}
|
||||
_MINIO_OPENID_TEST_SERVER: ${{ matrix.openid }}
|
||||
_S3_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_S3_ETCD_TEST_SERVER: ${{ matrix.etcd }}
|
||||
_S3_OPENID_TEST_SERVER: ${{ matrix.openid }}
|
||||
run: |
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
||||
@@ -92,20 +92,20 @@ jobs:
|
||||
- name: Test with multiple OpenID providers
|
||||
if: matrix.openid == 'http://127.0.0.1:5556/dex'
|
||||
env:
|
||||
_MINIO_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_MINIO_ETCD_TEST_SERVER: ${{ matrix.etcd }}
|
||||
_MINIO_OPENID_TEST_SERVER: ${{ matrix.openid }}
|
||||
_MINIO_OPENID_TEST_SERVER_2: "http://127.0.0.1:5557/dex"
|
||||
_S3_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_S3_ETCD_TEST_SERVER: ${{ matrix.etcd }}
|
||||
_S3_OPENID_TEST_SERVER: ${{ matrix.openid }}
|
||||
_S3_OPENID_TEST_SERVER_2: "http://127.0.0.1:5557/dex"
|
||||
run: |
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
||||
make test-iam
|
||||
- name: Test with Access Management Plugin enabled
|
||||
env:
|
||||
_MINIO_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_MINIO_ETCD_TEST_SERVER: ${{ matrix.etcd }}
|
||||
_MINIO_OPENID_TEST_SERVER: ${{ matrix.openid }}
|
||||
_MINIO_POLICY_PLUGIN_TEST_ENDPOINT: "http://127.0.0.1:8080"
|
||||
_S3_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_S3_ETCD_TEST_SERVER: ${{ matrix.etcd }}
|
||||
_S3_OPENID_TEST_SERVER: ${{ matrix.openid }}
|
||||
_S3_POLICY_PLUGIN_TEST_ENDPOINT: "http://127.0.0.1:8080"
|
||||
run: |
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
- name: Test MinIO Old Version data to IAM import current version
|
||||
if: matrix.ldap == 'ldaphost:389'
|
||||
env:
|
||||
_MINIO_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
_S3_LDAP_TEST_SERVER: ${{ matrix.ldap }}
|
||||
run: |
|
||||
make test-iam-ldap-upgrade-import
|
||||
- name: Test LDAP for automatic site replication
|
||||
|
||||
@@ -8,13 +8,13 @@ x-minio-common: &minio-common
|
||||
- "9000"
|
||||
- "9001"
|
||||
environment:
|
||||
MINIO_CI_CD: "on"
|
||||
MINIO_ROOT_USER: "minio"
|
||||
MINIO_ROOT_PASSWORD: "minio123"
|
||||
MINIO_COMPRESSION_ENABLE: "on"
|
||||
MINIO_COMPRESSION_MIME_TYPES: "*"
|
||||
MINIO_COMPRESSION_ALLOW_ENCRYPTION: "on"
|
||||
MINIO_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
S3_CI_CD: "on"
|
||||
S3_ROOT_USER: "minio"
|
||||
S3_ROOT_PASSWORD: "minio123"
|
||||
S3_COMPRESSION_ENABLE: "on"
|
||||
S3_COMPRESSION_MIME_TYPES: "*"
|
||||
S3_COMPRESSION_ALLOW_ENCRYPTION: "on"
|
||||
S3_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
healthcheck:
|
||||
test: ["CMD", "mc", "ready", "local"]
|
||||
interval: 5s
|
||||
|
||||
@@ -8,10 +8,10 @@ x-minio-common: &minio-common
|
||||
- "9000"
|
||||
- "9001"
|
||||
environment:
|
||||
MINIO_CI_CD: "on"
|
||||
MINIO_ROOT_USER: "minio"
|
||||
MINIO_ROOT_PASSWORD: "minio123"
|
||||
MINIO_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
S3_CI_CD: "on"
|
||||
S3_ROOT_USER: "minio"
|
||||
S3_ROOT_PASSWORD: "minio123"
|
||||
S3_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
healthcheck:
|
||||
test: ["CMD", "mc", "ready", "local"]
|
||||
interval: 5s
|
||||
|
||||
@@ -8,10 +8,10 @@ x-minio-common: &minio-common
|
||||
- "9000"
|
||||
- "9001"
|
||||
environment:
|
||||
MINIO_CI_CD: "on"
|
||||
MINIO_ROOT_USER: "minio"
|
||||
MINIO_ROOT_PASSWORD: "minio123"
|
||||
MINIO_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
S3_CI_CD: "on"
|
||||
S3_ROOT_USER: "minio"
|
||||
S3_ROOT_PASSWORD: "minio123"
|
||||
S3_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
healthcheck:
|
||||
test: ["CMD", "mc", "ready", "local"]
|
||||
interval: 5s
|
||||
|
||||
@@ -8,11 +8,11 @@ x-minio-common: &minio-common
|
||||
- "9000"
|
||||
- "9001"
|
||||
environment:
|
||||
MINIO_CI_CD: "on"
|
||||
MINIO_ROOT_USER: "minio"
|
||||
MINIO_ROOT_PASSWORD: "minio123"
|
||||
MINIO_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
MINIO_DRIVE_MAX_TIMEOUT: "5s"
|
||||
S3_CI_CD: "on"
|
||||
S3_ROOT_USER: "minio"
|
||||
S3_ROOT_PASSWORD: "minio123"
|
||||
S3_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
S3_DRIVE_MAX_TIMEOUT: "5s"
|
||||
healthcheck:
|
||||
test: ["CMD", "mc", "ready", "local"]
|
||||
interval: 5s
|
||||
|
||||
@@ -5,7 +5,7 @@ x-minio-common: &minio-common
|
||||
image: quay.io/minio/minio:${RELEASE}
|
||||
command: server http://site1-minio{1...4}/data{1...2}
|
||||
environment:
|
||||
- MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
- S3_PROMETHEUS_AUTH_TYPE=public
|
||||
- CI=true
|
||||
|
||||
# starts 4 docker containers running minio server instances.
|
||||
|
||||
@@ -5,7 +5,7 @@ x-minio-common: &minio-common
|
||||
image: quay.io/minio/minio:${RELEASE}
|
||||
command: server http://site2-minio{1...4}/data{1...2}
|
||||
environment:
|
||||
- MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
- S3_PROMETHEUS_AUTH_TYPE=public
|
||||
- CI=true
|
||||
|
||||
# starts 4 docker containers running minio server instances.
|
||||
|
||||
+6
-6
@@ -36,12 +36,12 @@ LABEL org.opencontainers.image.source="https://github.com/hanzoai/storage"
|
||||
LABEL org.opencontainers.image.description="Hanzo Space — S3-compatible object storage"
|
||||
LABEL org.opencontainers.image.licenses="AGPL-3.0"
|
||||
|
||||
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
||||
MINIO_SECRET_KEY_FILE=secret_key \
|
||||
MINIO_ROOT_USER_FILE=access_key \
|
||||
MINIO_ROOT_PASSWORD_FILE=secret_key \
|
||||
MINIO_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
MINIO_CONFIG_ENV_FILE=config.env \
|
||||
ENV S3_ACCESS_KEY_FILE=access_key \
|
||||
S3_SECRET_KEY_FILE=secret_key \
|
||||
S3_ROOT_USER_FILE=access_key \
|
||||
S3_ROOT_PASSWORD_FILE=secret_key \
|
||||
S3_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
S3_CONFIG_ENV_FILE=config.env \
|
||||
MC_CONFIG_DIR=/tmp/.mc
|
||||
|
||||
RUN apk add --no-cache ca-certificates curl && \
|
||||
|
||||
+7
-7
@@ -44,13 +44,13 @@ LABEL name="MinIO" \
|
||||
summary="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service." \
|
||||
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
|
||||
|
||||
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
||||
MINIO_SECRET_KEY_FILE=secret_key \
|
||||
MINIO_ROOT_USER_FILE=access_key \
|
||||
MINIO_ROOT_PASSWORD_FILE=secret_key \
|
||||
MINIO_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav" \
|
||||
MINIO_CONFIG_ENV_FILE=config.env \
|
||||
ENV S3_ACCESS_KEY_FILE=access_key \
|
||||
S3_SECRET_KEY_FILE=secret_key \
|
||||
S3_ROOT_USER_FILE=access_key \
|
||||
S3_ROOT_PASSWORD_FILE=secret_key \
|
||||
S3_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
S3_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav" \
|
||||
S3_CONFIG_ENV_FILE=config.env \
|
||||
MC_CONFIG_DIR=/tmp/.mc
|
||||
|
||||
RUN chmod -R 777 /usr/bin
|
||||
|
||||
+7
-7
@@ -46,13 +46,13 @@ LABEL name="MinIO" \
|
||||
summary="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service." \
|
||||
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
|
||||
|
||||
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
||||
MINIO_SECRET_KEY_FILE=secret_key \
|
||||
MINIO_ROOT_USER_FILE=access_key \
|
||||
MINIO_ROOT_PASSWORD_FILE=secret_key \
|
||||
MINIO_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav" \
|
||||
MINIO_CONFIG_ENV_FILE=config.env \
|
||||
ENV S3_ACCESS_KEY_FILE=access_key \
|
||||
S3_SECRET_KEY_FILE=secret_key \
|
||||
S3_ROOT_USER_FILE=access_key \
|
||||
S3_ROOT_PASSWORD_FILE=secret_key \
|
||||
S3_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
S3_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav" \
|
||||
S3_CONFIG_ENV_FILE=config.env \
|
||||
MC_CONFIG_DIR=/tmp/.mc
|
||||
|
||||
RUN chmod -R 777 /usr/bin
|
||||
|
||||
@@ -44,13 +44,13 @@ LABEL name="MinIO" \
|
||||
summary="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service." \
|
||||
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
|
||||
|
||||
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
||||
MINIO_SECRET_KEY_FILE=secret_key \
|
||||
MINIO_ROOT_USER_FILE=access_key \
|
||||
MINIO_ROOT_PASSWORD_FILE=secret_key \
|
||||
MINIO_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav" \
|
||||
MINIO_CONFIG_ENV_FILE=config.env \
|
||||
ENV S3_ACCESS_KEY_FILE=access_key \
|
||||
S3_SECRET_KEY_FILE=secret_key \
|
||||
S3_ROOT_USER_FILE=access_key \
|
||||
S3_ROOT_PASSWORD_FILE=secret_key \
|
||||
S3_KMS_SECRET_KEY_FILE=kms_master_key \
|
||||
S3_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav" \
|
||||
S3_CONFIG_ENV_FILE=config.env \
|
||||
MC_CONFIG_DIR=/tmp/.mc
|
||||
|
||||
RUN chmod -R 777 /usr/bin
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -x
|
||||
|
||||
export MINIO_CI_CD=1
|
||||
export S3_CI_CD=1
|
||||
killall -9 minio
|
||||
|
||||
rm -rf ${HOME}/tmp/dist
|
||||
@@ -50,7 +50,7 @@ set -e
|
||||
|
||||
killall -9 minio
|
||||
|
||||
export MINIO_API_ROOT_ACCESS=on
|
||||
export S3_API_ROOT_ACCESS=on
|
||||
for ((i = 0; i < $((nr_servers)); i++)); do
|
||||
(minio server --address ":$((9100 + i))" $args 2>&1 >/tmp/log$i.txt) &
|
||||
done
|
||||
@@ -99,7 +99,7 @@ export MC_HOST_siteb=http://minioadmin:minioadmin@127.0.0.1:9004
|
||||
killall -9 minio
|
||||
|
||||
echo "turning off root access, however site replication must continue"
|
||||
export MINIO_API_ROOT_ACCESS=off
|
||||
export S3_API_ROOT_ACCESS=off
|
||||
|
||||
minio server --address 127.0.0.1:9001 "http://127.0.0.1:9001/tmp/multisitea/data/disterasure/xl{1...4}" \
|
||||
"http://127.0.0.1:9002/tmp/multisitea/data/disterasure/xl{5...8}" >/tmp/sitea_1.log 2>&1 &
|
||||
|
||||
@@ -46,12 +46,12 @@ func genLDFlags(version string) string {
|
||||
// genReleaseTag prints release tag to the console for easy git tagging.
|
||||
func releaseTag(version string) (string, time.Time) {
|
||||
relPrefix := "DEVELOPMENT"
|
||||
if prefix := os.Getenv("MINIO_RELEASE"); prefix != "" {
|
||||
if prefix := os.Getenv("S3_RELEASE"); prefix != "" {
|
||||
relPrefix = prefix
|
||||
}
|
||||
|
||||
relSuffix := ""
|
||||
if hotfix := os.Getenv("MINIO_HOTFIX"); hotfix != "" {
|
||||
if hotfix := os.Getenv("S3_HOTFIX"); hotfix != "" {
|
||||
relSuffix = hotfix
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ set -o pipefail
|
||||
set -x
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
if [ ! -x "$PWD/minio" ]; then
|
||||
echo "minio executable binary not found in current directory"
|
||||
@@ -18,14 +18,14 @@ if [ ! -x "$PWD/minio" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function start_minio_4drive() {
|
||||
function start_s3_4drive() {
|
||||
start_port=$1
|
||||
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export MC_HOST_minio="http://minio:minio123@127.0.0.1:${start_port}/"
|
||||
unset MINIO_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export MINIO_CI_CD=1
|
||||
unset S3_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export S3_CI_CD=1
|
||||
|
||||
mkdir ${WORK_DIR}
|
||||
C_PWD=${PWD}
|
||||
@@ -79,7 +79,7 @@ function start_minio_4drive() {
|
||||
function main() {
|
||||
start_port=$(shuf -i 10000-65000 -n 1)
|
||||
|
||||
start_minio_4drive ${start_port}
|
||||
start_s3_4drive ${start_port}
|
||||
}
|
||||
|
||||
function purge() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# `localhost:389`
|
||||
#
|
||||
# if this is not the case, set the environment variable
|
||||
# `_MINIO_LDAP_TEST_SERVER`.
|
||||
# `_S3_LDAP_TEST_SERVER`.
|
||||
|
||||
OLD_VERSION=RELEASE.2024-03-26T22-10-45Z
|
||||
OLD_BINARY_LINK=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.${OLD_VERSION}
|
||||
@@ -40,9 +40,9 @@ __init__() {
|
||||
chmod +x minio.${OLD_VERSION}
|
||||
fi
|
||||
|
||||
if [ -z "$_MINIO_LDAP_TEST_SERVER" ]; then
|
||||
export _MINIO_LDAP_TEST_SERVER=localhost:389
|
||||
echo "Using default LDAP endpoint: $_MINIO_LDAP_TEST_SERVER"
|
||||
if [ -z "$_S3_LDAP_TEST_SERVER" ]; then
|
||||
export _S3_LDAP_TEST_SERVER=localhost:389
|
||||
echo "Using default LDAP endpoint: $_S3_LDAP_TEST_SERVER"
|
||||
fi
|
||||
|
||||
rm -rf /tmp/data
|
||||
@@ -51,7 +51,7 @@ __init__() {
|
||||
create_iam_content_in_old_minio() {
|
||||
echo "Creating IAM content in old minio instance."
|
||||
|
||||
MINIO_CI_CD=1 ./minio.${OLD_VERSION} server /tmp/data/{1...4} &
|
||||
S3_CI_CD=1 ./minio.${OLD_VERSION} server /tmp/data/{1...4} &
|
||||
sleep 5
|
||||
|
||||
set -x
|
||||
@@ -82,7 +82,7 @@ create_iam_content_in_old_minio() {
|
||||
import_iam_content_in_new_minio() {
|
||||
echo "Importing IAM content in new minio instance."
|
||||
# Assume current minio binary exists.
|
||||
MINIO_CI_CD=1 ./minio server /tmp/data/{1...4} &
|
||||
S3_CI_CD=1 ./minio server /tmp/data/{1...4} &
|
||||
sleep 5
|
||||
|
||||
set -x
|
||||
|
||||
@@ -4,11 +4,11 @@ trap 'cleanup $LINENO' ERR
|
||||
|
||||
# shellcheck disable=SC2120
|
||||
cleanup() {
|
||||
MINIO_VERSION=dev /tmp/gopath/bin/docker-compose \
|
||||
S3_VERSION=dev /tmp/gopath/bin/docker-compose \
|
||||
-f "buildscripts/upgrade-tests/compose.yml" \
|
||||
down || true
|
||||
|
||||
MINIO_VERSION=dev /tmp/gopath/bin/docker-compose \
|
||||
S3_VERSION=dev /tmp/gopath/bin/docker-compose \
|
||||
-f "buildscripts/upgrade-tests/compose.yml" \
|
||||
rm || true
|
||||
|
||||
@@ -78,7 +78,7 @@ __init__() {
|
||||
|
||||
TAG=minio/minio:dev make docker
|
||||
|
||||
MINIO_VERSION=RELEASE.2019-12-19T22-52-26Z docker-compose \
|
||||
S3_VERSION=RELEASE.2019-12-19T22-52-26Z docker-compose \
|
||||
-f "buildscripts/upgrade-tests/compose.yml" \
|
||||
up -d --build
|
||||
|
||||
@@ -93,11 +93,11 @@ __init__() {
|
||||
|
||||
curl -s http://127.0.0.1:9000/minio-test/to-read/hosts | sha256sum
|
||||
|
||||
MINIO_VERSION=dev /tmp/gopath/bin/docker-compose -f "buildscripts/upgrade-tests/compose.yml" stop
|
||||
S3_VERSION=dev /tmp/gopath/bin/docker-compose -f "buildscripts/upgrade-tests/compose.yml" stop
|
||||
}
|
||||
|
||||
main() {
|
||||
MINIO_VERSION=dev /tmp/gopath/bin/docker-compose -f "buildscripts/upgrade-tests/compose.yml" up -d --build
|
||||
S3_VERSION=dev /tmp/gopath/bin/docker-compose -f "buildscripts/upgrade-tests/compose.yml" up -d --build
|
||||
|
||||
add_alias
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ if [ -n "$TEST_DEBUG" ]; then
|
||||
fi
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
if [ ! -x "$PWD/minio" ]; then
|
||||
echo "minio executable binary not found in current directory"
|
||||
@@ -41,14 +41,14 @@ catch() {
|
||||
|
||||
catch
|
||||
|
||||
function start_minio_10drive() {
|
||||
function start_s3_10drive() {
|
||||
start_port=$1
|
||||
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export MC_HOST_minio="http://minio:minio123@127.0.0.1:${start_port}/"
|
||||
unset MINIO_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export MINIO_CI_CD=1
|
||||
unset S3_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export S3_CI_CD=1
|
||||
|
||||
mkdir ${WORK_DIR}
|
||||
C_PWD=${PWD}
|
||||
@@ -120,7 +120,7 @@ EOF
|
||||
|
||||
function main() {
|
||||
start_port=$(shuf -i 10000-65000 -n 1)
|
||||
start_minio_10drive ${start_port}
|
||||
start_s3_10drive ${start_port}
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
export GORACE="history_size=7"
|
||||
export MINIO_API_REQUESTS_MAX=10000
|
||||
export S3_API_REQUESTS_MAX=10000
|
||||
|
||||
for d in $(go list ./...); do
|
||||
CGO_ENABLED=1 go test -v -race --timeout 100m "$d"
|
||||
|
||||
@@ -6,22 +6,22 @@ set -x
|
||||
set -e
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
if [ ! -x "$PWD/minio" ]; then
|
||||
echo "minio executable binary not found in current directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function start_minio_5drive() {
|
||||
function start_s3_5drive() {
|
||||
start_port=$1
|
||||
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export MC_HOST_minio="http://minio:minio123@127.0.0.1:${start_port}/"
|
||||
unset MINIO_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export MINIO_CI_CD=1
|
||||
unset S3_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export S3_CI_CD=1
|
||||
|
||||
MC_BUILD_DIR="mc-$RANDOM"
|
||||
if ! git clone --quiet https://github.com/minio/mc "$MC_BUILD_DIR"; then
|
||||
@@ -59,7 +59,7 @@ function start_minio_5drive() {
|
||||
function main() {
|
||||
start_port=$(shuf -i 10000-65000 -n 1)
|
||||
|
||||
start_minio_5drive ${start_port}
|
||||
start_s3_5drive ${start_port}
|
||||
}
|
||||
|
||||
function purge() {
|
||||
|
||||
@@ -5,9 +5,9 @@ set -o pipefail
|
||||
set -x
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO_OLD=("$PWD/minio.RELEASE.2020-10-28T08-16-50Z" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
S3_OLD=("$PWD/minio.RELEASE.2020-10-28T08-16-50Z" --config-dir "$S3_CONFIG_DIR" server)
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
if [ ! -x "$PWD/minio" ]; then
|
||||
echo "minio executable binary not found in current directory"
|
||||
@@ -24,11 +24,11 @@ function download_old_release() {
|
||||
function verify_rewrite() {
|
||||
start_port=$1
|
||||
|
||||
export MINIO_ACCESS_KEY=minio
|
||||
export MINIO_SECRET_KEY=minio123
|
||||
export S3_ACCESS_KEY=minio
|
||||
export S3_SECRET_KEY=minio123
|
||||
export MC_HOST_minio="http://minio:minio123@127.0.0.1:${start_port}/"
|
||||
unset MINIO_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export MINIO_CI_CD=1
|
||||
unset S3_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
export S3_CI_CD=1
|
||||
|
||||
MC_BUILD_DIR="mc-$RANDOM"
|
||||
if ! git clone --quiet https://github.com/minio/mc "$MC_BUILD_DIR"; then
|
||||
@@ -42,7 +42,7 @@ function verify_rewrite() {
|
||||
# remove mc source.
|
||||
purge "${MC_BUILD_DIR}"
|
||||
|
||||
"${MINIO_OLD[@]}" --address ":$start_port" "${WORK_DIR}/xl{1...16}" >"${WORK_DIR}/server1.log" 2>&1 &
|
||||
"${S3_OLD[@]}" --address ":$start_port" "${WORK_DIR}/xl{1...16}" >"${WORK_DIR}/server1.log" 2>&1 &
|
||||
pid=$!
|
||||
disown $pid
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ if [ -n "$TEST_DEBUG" ]; then
|
||||
fi
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
if [ ! -x "$PWD/minio" ]; then
|
||||
echo "minio executable binary not found in current directory"
|
||||
@@ -70,13 +70,13 @@ function send_put_object_request() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function test_minio_with_timeout() {
|
||||
function test_s3_with_timeout() {
|
||||
start_port=$1
|
||||
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export MC_HOST_minio="http://minio:minio123@127.0.0.1:${start_port}/"
|
||||
export MINIO_CI_CD=1
|
||||
export S3_CI_CD=1
|
||||
|
||||
mkdir ${WORK_DIR}
|
||||
C_PWD=${PWD}
|
||||
@@ -131,7 +131,7 @@ function main() {
|
||||
export srv_idle_timeout=5
|
||||
export -f gen_put_request
|
||||
|
||||
test_minio_with_timeout ${start_port}
|
||||
test_s3_with_timeout ${start_port}
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Settings and configurations that are common for all containers
|
||||
x-minio-common: &minio-common
|
||||
image: minio/minio:${MINIO_VERSION}
|
||||
image: minio/minio:${S3_VERSION}
|
||||
command: server http://minio{1...4}/data{1...3}
|
||||
env_file:
|
||||
- ./minio.env
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
MINIO_ACCESS_KEY=minioadmin
|
||||
MINIO_SECRET_KEY=minioadmin
|
||||
MINIO_BROWSER=off
|
||||
S3_ACCESS_KEY=minioadmin
|
||||
S3_SECRET_KEY=minioadmin
|
||||
S3_BROWSER=off
|
||||
|
||||
@@ -23,61 +23,61 @@ export ENABLE_HTTPS=0
|
||||
export GO111MODULE=on
|
||||
export GOGC=25
|
||||
export ENABLE_ADMIN=1
|
||||
export MINIO_CI_CD=1
|
||||
export S3_CI_CD=1
|
||||
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR")
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR")
|
||||
|
||||
FILE_1_MB="$MINT_DATA_DIR/datafile-1-MB"
|
||||
FILE_65_MB="$MINT_DATA_DIR/datafile-65-MB"
|
||||
|
||||
FUNCTIONAL_TESTS="$WORK_DIR/functional-tests.sh"
|
||||
|
||||
function start_minio_fs() {
|
||||
export MINIO_ROOT_USER=$ACCESS_KEY
|
||||
export MINIO_ROOT_PASSWORD=$SECRET_KEY
|
||||
function start_s3_fs() {
|
||||
export S3_ROOT_USER=$ACCESS_KEY
|
||||
export S3_ROOT_PASSWORD=$SECRET_KEY
|
||||
"${MINIO[@]}" server "${WORK_DIR}/fs-disk" >"$WORK_DIR/fs-minio.log" 2>&1 &
|
||||
|
||||
"${WORK_DIR}/mc" ready verify
|
||||
}
|
||||
|
||||
function start_minio_erasure() {
|
||||
function start_s3_erasure() {
|
||||
"${MINIO[@]}" server "${WORK_DIR}/erasure-disk1" "${WORK_DIR}/erasure-disk2" "${WORK_DIR}/erasure-disk3" "${WORK_DIR}/erasure-disk4" >"$WORK_DIR/erasure-minio.log" 2>&1 &
|
||||
|
||||
"${WORK_DIR}/mc" ready verify
|
||||
}
|
||||
|
||||
function start_minio_erasure_sets() {
|
||||
export MINIO_ENDPOINTS="${WORK_DIR}/erasure-disk-sets{1...32}"
|
||||
function start_s3_erasure_sets() {
|
||||
export S3_ENDPOINTS="${WORK_DIR}/erasure-disk-sets{1...32}"
|
||||
"${MINIO[@]}" server >"$WORK_DIR/erasure-minio-sets.log" 2>&1 &
|
||||
|
||||
"${WORK_DIR}/mc" ready verify
|
||||
}
|
||||
|
||||
function start_minio_pool_erasure_sets() {
|
||||
export MINIO_ROOT_USER=$ACCESS_KEY
|
||||
export MINIO_ROOT_PASSWORD=$SECRET_KEY
|
||||
export MINIO_ENDPOINTS="http://127.0.0.1:9000${WORK_DIR}/pool-disk-sets{1...4} http://127.0.0.1:9001${WORK_DIR}/pool-disk-sets{5...8}"
|
||||
function start_s3_pool_erasure_sets() {
|
||||
export S3_ROOT_USER=$ACCESS_KEY
|
||||
export S3_ROOT_PASSWORD=$SECRET_KEY
|
||||
export S3_ENDPOINTS="http://127.0.0.1:9000${WORK_DIR}/pool-disk-sets{1...4} http://127.0.0.1:9001${WORK_DIR}/pool-disk-sets{5...8}"
|
||||
"${MINIO[@]}" server --address ":9000" >"$WORK_DIR/pool-minio-9000.log" 2>&1 &
|
||||
"${MINIO[@]}" server --address ":9001" >"$WORK_DIR/pool-minio-9001.log" 2>&1 &
|
||||
|
||||
"${WORK_DIR}/mc" ready verify
|
||||
}
|
||||
|
||||
function start_minio_pool_erasure_sets_ipv6() {
|
||||
export MINIO_ROOT_USER=$ACCESS_KEY
|
||||
export MINIO_ROOT_PASSWORD=$SECRET_KEY
|
||||
export MINIO_ENDPOINTS="http://[::1]:9000${WORK_DIR}/pool-disk-sets-ipv6{1...4} http://[::1]:9001${WORK_DIR}/pool-disk-sets-ipv6{5...8}"
|
||||
function start_s3_pool_erasure_sets_ipv6() {
|
||||
export S3_ROOT_USER=$ACCESS_KEY
|
||||
export S3_ROOT_PASSWORD=$SECRET_KEY
|
||||
export S3_ENDPOINTS="http://[::1]:9000${WORK_DIR}/pool-disk-sets-ipv6{1...4} http://[::1]:9001${WORK_DIR}/pool-disk-sets-ipv6{5...8}"
|
||||
"${MINIO[@]}" server --address="[::1]:9000" >"$WORK_DIR/pool-minio-ipv6-9000.log" 2>&1 &
|
||||
"${MINIO[@]}" server --address="[::1]:9001" >"$WORK_DIR/pool-minio-ipv6-9001.log" 2>&1 &
|
||||
|
||||
"${WORK_DIR}/mc" ready verify_ipv6
|
||||
}
|
||||
|
||||
function start_minio_dist_erasure() {
|
||||
export MINIO_ROOT_USER=$ACCESS_KEY
|
||||
export MINIO_ROOT_PASSWORD=$SECRET_KEY
|
||||
export MINIO_ENDPOINTS="http://127.0.0.1:9000${WORK_DIR}/dist-disk1 http://127.0.0.1:9001${WORK_DIR}/dist-disk2 http://127.0.0.1:9002${WORK_DIR}/dist-disk3 http://127.0.0.1:9003${WORK_DIR}/dist-disk4"
|
||||
function start_s3_dist_erasure() {
|
||||
export S3_ROOT_USER=$ACCESS_KEY
|
||||
export S3_ROOT_PASSWORD=$SECRET_KEY
|
||||
export S3_ENDPOINTS="http://127.0.0.1:9000${WORK_DIR}/dist-disk1 http://127.0.0.1:9001${WORK_DIR}/dist-disk2 http://127.0.0.1:9002${WORK_DIR}/dist-disk3 http://127.0.0.1:9003${WORK_DIR}/dist-disk4"
|
||||
for i in $(seq 0 3); do
|
||||
"${MINIO[@]}" server --address ":900${i}" >"$WORK_DIR/dist-minio-900${i}.log" 2>&1 &
|
||||
done
|
||||
@@ -86,7 +86,7 @@ function start_minio_dist_erasure() {
|
||||
}
|
||||
|
||||
function run_test_fs() {
|
||||
start_minio_fs
|
||||
start_s3_fs
|
||||
|
||||
(cd "$WORK_DIR" && "$FUNCTIONAL_TESTS")
|
||||
rv=$?
|
||||
@@ -103,7 +103,7 @@ function run_test_fs() {
|
||||
}
|
||||
|
||||
function run_test_erasure_sets() {
|
||||
start_minio_erasure_sets
|
||||
start_s3_erasure_sets
|
||||
|
||||
(cd "$WORK_DIR" && "$FUNCTIONAL_TESTS")
|
||||
rv=$?
|
||||
@@ -120,7 +120,7 @@ function run_test_erasure_sets() {
|
||||
}
|
||||
|
||||
function run_test_pool_erasure_sets() {
|
||||
start_minio_pool_erasure_sets
|
||||
start_s3_pool_erasure_sets
|
||||
|
||||
(cd "$WORK_DIR" && "$FUNCTIONAL_TESTS")
|
||||
rv=$?
|
||||
@@ -143,7 +143,7 @@ function run_test_pool_erasure_sets() {
|
||||
}
|
||||
|
||||
function run_test_pool_erasure_sets_ipv6() {
|
||||
start_minio_pool_erasure_sets_ipv6
|
||||
start_s3_pool_erasure_sets_ipv6
|
||||
|
||||
export SERVER_ENDPOINT="[::1]:9000"
|
||||
|
||||
@@ -168,7 +168,7 @@ function run_test_pool_erasure_sets_ipv6() {
|
||||
}
|
||||
|
||||
function run_test_erasure() {
|
||||
start_minio_erasure
|
||||
start_s3_erasure
|
||||
|
||||
(cd "$WORK_DIR" && "$FUNCTIONAL_TESTS")
|
||||
rv=$?
|
||||
@@ -185,7 +185,7 @@ function run_test_erasure() {
|
||||
}
|
||||
|
||||
function run_test_dist_erasure() {
|
||||
start_minio_dist_erasure
|
||||
start_s3_dist_erasure
|
||||
|
||||
(cd "$WORK_DIR" && "$FUNCTIONAL_TESTS")
|
||||
rv=$?
|
||||
@@ -216,7 +216,7 @@ function purge() {
|
||||
function __init__() {
|
||||
echo "Initializing environment"
|
||||
mkdir -p "$WORK_DIR"
|
||||
mkdir -p "$MINIO_CONFIG_DIR"
|
||||
mkdir -p "$S3_CONFIG_DIR"
|
||||
mkdir -p "$MINT_DATA_DIR"
|
||||
|
||||
MC_BUILD_DIR="mc-$RANDOM"
|
||||
@@ -235,7 +235,7 @@ function __init__() {
|
||||
shred -n 1 -s 65M - 1>"$FILE_65_MB" 2>/dev/null
|
||||
|
||||
## version is purposefully set to '3' for minio to migrate configuration file
|
||||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$MINIO_CONFIG_DIR/config.json"
|
||||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$S3_CONFIG_DIR/config.json"
|
||||
|
||||
if ! wget -q -O "$FUNCTIONAL_TESTS" https://raw.githubusercontent.com/minio/mc/master/functional-tests.sh; then
|
||||
echo "failed to download https://raw.githubusercontent.com/minio/mc/master/functional-tests.sh"
|
||||
|
||||
@@ -10,14 +10,14 @@ if [ ! -x "$PWD/minio" ]; then
|
||||
fi
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
function start_minio_3_node() {
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export MINIO_ERASURE_SET_DRIVE_COUNT=6
|
||||
export MINIO_CI_CD=1
|
||||
function start_s3_3_node() {
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export S3_ERASURE_SET_DRIVE_COUNT=6
|
||||
export S3_CI_CD=1
|
||||
|
||||
start_port=$1
|
||||
args=""
|
||||
@@ -113,10 +113,10 @@ function purge() {
|
||||
function __init__() {
|
||||
echo "Initializing environment"
|
||||
mkdir -p "$WORK_DIR"
|
||||
mkdir -p "$MINIO_CONFIG_DIR"
|
||||
mkdir -p "$S3_CONFIG_DIR"
|
||||
|
||||
## version is purposefully set to '3' for minio to migrate configuration file
|
||||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$MINIO_CONFIG_DIR/config.json"
|
||||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$S3_CONFIG_DIR/config.json"
|
||||
|
||||
if [ ! -f /tmp/mc ]; then
|
||||
wget --quiet -O /tmp/mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
@@ -125,7 +125,7 @@ function __init__() {
|
||||
}
|
||||
|
||||
function perform_test() {
|
||||
start_minio_3_node $2
|
||||
start_s3_3_node $2
|
||||
|
||||
echo "Testing Distributed Erasure setup healing of drives"
|
||||
echo "Remove the contents of the disks belonging to '${1}' erasure set"
|
||||
@@ -133,7 +133,7 @@ function perform_test() {
|
||||
rm -rf ${WORK_DIR}/${1}/*/
|
||||
|
||||
set -x
|
||||
start_minio_3_node $2
|
||||
start_s3_3_node $2
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
@@ -10,16 +10,16 @@ if [ ! -x "$PWD/minio" ]; then
|
||||
fi
|
||||
|
||||
WORK_DIR="$(mktemp -d)"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
|
||||
function start_minio() {
|
||||
start_port=$1
|
||||
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
unset MINIO_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
unset MINIO_CI_CD
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
unset S3_KMS_AUTO_ENCRYPTION # do not auto-encrypt objects
|
||||
unset S3_CI_CD
|
||||
unset CI
|
||||
|
||||
args=()
|
||||
|
||||
@@ -10,19 +10,19 @@ if [ ! -x "$PWD/minio" ]; then
|
||||
fi
|
||||
|
||||
WORK_DIR="$PWD/.verify-$RANDOM"
|
||||
MINIO_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server)
|
||||
S3_CONFIG_DIR="$WORK_DIR/.minio"
|
||||
MINIO=("$PWD/minio" --config-dir "$S3_CONFIG_DIR" server)
|
||||
GOPATH=/tmp/gopath
|
||||
|
||||
function start_minio_3_node() {
|
||||
function start_s3_3_node() {
|
||||
for i in $(seq 1 3); do
|
||||
rm "${WORK_DIR}/dist-minio-server$i.log"
|
||||
done
|
||||
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export MINIO_ERASURE_SET_DRIVE_COUNT=6
|
||||
export MINIO_CI_CD=1
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export S3_ERASURE_SET_DRIVE_COUNT=6
|
||||
export S3_CI_CD=1
|
||||
|
||||
first_time=$(find ${WORK_DIR}/ | grep format.json | wc -l)
|
||||
|
||||
@@ -114,10 +114,10 @@ function fail() {
|
||||
function __init__() {
|
||||
echo "Initializing environment"
|
||||
mkdir -p "$WORK_DIR"
|
||||
mkdir -p "$MINIO_CONFIG_DIR"
|
||||
mkdir -p "$S3_CONFIG_DIR"
|
||||
|
||||
## version is purposefully set to '3' for minio to migrate configuration file
|
||||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$MINIO_CONFIG_DIR/config.json"
|
||||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$S3_CONFIG_DIR/config.json"
|
||||
|
||||
if [ ! -f /tmp/mc ]; then
|
||||
wget --quiet -O /tmp/mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
@@ -135,7 +135,7 @@ function upload_objects() {
|
||||
function perform_test() {
|
||||
start_port=$2
|
||||
|
||||
start_minio_3_node $start_port
|
||||
start_s3_3_node $start_port
|
||||
|
||||
echo "Testing Distributed Erasure setup healing of drives"
|
||||
echo "Remove the contents of the disks belonging to '${1}' node"
|
||||
@@ -143,7 +143,7 @@ function perform_test() {
|
||||
rm -rf ${WORK_DIR}/${1}/*/
|
||||
|
||||
set -x
|
||||
start_minio_3_node $start_port
|
||||
start_s3_3_node $start_port
|
||||
|
||||
check_heal ${1}
|
||||
rv=$?
|
||||
|
||||
@@ -378,7 +378,7 @@ func (a adminAPIHandlers) RebalanceStop(w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
func proxyDecommissionRequest(ctx context.Context, defaultEndPoint Endpoint, w http.ResponseWriter, r *http.Request) (proxy bool) {
|
||||
host := env.Get("_MINIO_DECOM_ENDPOINT_HOST", defaultEndPoint.Host)
|
||||
host := env.Get("_S3_DECOM_ENDPOINT_HOST", defaultEndPoint.Host)
|
||||
if host == "" {
|
||||
return proxy
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ var iamTestSuites = func() []*TestSuiteIAM {
|
||||
}()
|
||||
|
||||
const (
|
||||
EnvTestEtcdBackend = "_MINIO_ETCD_TEST_SERVER"
|
||||
EnvTestEtcdBackend = "_S3_ETCD_TEST_SERVER"
|
||||
)
|
||||
|
||||
func (s *TestSuiteIAM) setUpEtcd(c *check, etcdServer string) {
|
||||
@@ -1357,9 +1357,9 @@ func (s *TestSuiteIAM) SetUpAccMgmtPlugin(c *check) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), testDefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
pluginEndpoint := env.Get("_MINIO_POLICY_PLUGIN_ENDPOINT", "")
|
||||
pluginEndpoint := env.Get("_S3_POLICY_PLUGIN_ENDPOINT", "")
|
||||
if pluginEndpoint == "" {
|
||||
c.Skip("_MINIO_POLICY_PLUGIN_ENDPOINT not given - skipping.")
|
||||
c.Skip("_S3_POLICY_PLUGIN_ENDPOINT not given - skipping.")
|
||||
}
|
||||
|
||||
configCmds := []string{
|
||||
|
||||
@@ -330,7 +330,7 @@ func (a adminAPIHandlers) ServerUpdateHandler(w http.ResponseWriter, r *http.Req
|
||||
}
|
||||
|
||||
if globalInplaceUpdateDisabled || currentReleaseTime.IsZero() {
|
||||
// if MINIO_UPDATE=off - inplace update is disabled, mostly in containers.
|
||||
// if S3_UPDATE=off - inplace update is disabled, mostly in containers.
|
||||
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrMethodNotAllowed), r.URL)
|
||||
return
|
||||
}
|
||||
@@ -3443,16 +3443,16 @@ function main() {
|
||||
done
|
||||
|
||||
# Read content of inspect-input.txt
|
||||
MINIO_OPTS=$(grep "Server command line args" <./inspect-input.txt | sed "s/Server command line args: //g" | sed -r "s#%s:\/\/#\.\/#g")
|
||||
S3_OPTS=$(grep "Server command line args" <./inspect-input.txt | sed "s/Server command line args: //g" | sed -r "s#%s:\/\/#\.\/#g")
|
||||
|
||||
# Start MinIO instance using the options
|
||||
START_CMD="CI=on _MINIO_AUTO_DRIVE_HEALING=off minio server ${MINIO_OPTS} &"
|
||||
START_CMD="CI=on _S3_AUTO_DRIVE_HEALING=off minio server ${S3_OPTS} &"
|
||||
echo
|
||||
echo "Starting MinIO instance: ${START_CMD}"
|
||||
echo
|
||||
eval "$START_CMD"
|
||||
MINIO_SRVR_PID="$!"
|
||||
echo "MinIO Server PID: ${MINIO_SRVR_PID}"
|
||||
S3_SRVR_PID="$!"
|
||||
echo "MinIO Server PID: ${S3_SRVR_PID}"
|
||||
echo
|
||||
echo "Waiting for MinIO instance to get ready!"
|
||||
sleep 10
|
||||
|
||||
@@ -156,9 +156,9 @@ func (h *healRoutine) AddWorker(ctx context.Context, objAPI ObjectLayer, bgSeq *
|
||||
func newHealRoutine() *healRoutine {
|
||||
workers := runtime.GOMAXPROCS(0) / 2
|
||||
|
||||
if envHealWorkers := env.Get("_MINIO_HEAL_WORKERS", ""); envHealWorkers != "" {
|
||||
if envHealWorkers := env.Get("_S3_HEAL_WORKERS", ""); envHealWorkers != "" {
|
||||
if numHealers, err := strconv.Atoi(envHealWorkers); err != nil {
|
||||
bugLogIf(context.Background(), fmt.Errorf("invalid _MINIO_HEAL_WORKERS value: %w", err))
|
||||
bugLogIf(context.Background(), fmt.Errorf("invalid _S3_HEAL_WORKERS value: %w", err))
|
||||
} else {
|
||||
workers = numHealers
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ func initAutoHeal(ctx context.Context, objAPI ObjectLayer) {
|
||||
}
|
||||
|
||||
initBackgroundHealing(ctx, objAPI) // start quick background healing
|
||||
if env.Get("_MINIO_AUTO_DRIVE_HEALING", config.EnableOn) == config.EnableOn {
|
||||
if env.Get("_S3_AUTO_DRIVE_HEALING", config.EnableOn) == config.EnableOn {
|
||||
globalBackgroundHealState.pushHealLocalDisks(getLocalDisksToHeal()...)
|
||||
go monitorLocalDisksAndHeal(ctx, z)
|
||||
}
|
||||
|
||||
+1
-1
@@ -547,7 +547,7 @@ func (r *BatchJobExpire) Start(ctx context.Context, api ObjectLayer, job BatchJo
|
||||
|
||||
now := time.Now().UTC()
|
||||
|
||||
workerSize, err := strconv.Atoi(env.Get("_MINIO_BATCH_EXPIRATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
workerSize, err := strconv.Atoi(env.Get("_S3_BATCH_EXPIRATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ func (r *BatchJobReplicateV1) StartFromSource(ctx context.Context, api ObjectLay
|
||||
c.SetAppInfo("minio-"+batchJobPrefix, r.APIVersion+" "+job.ID)
|
||||
core := &minio.Core{Client: c}
|
||||
|
||||
workerSize, err := strconv.Atoi(env.Get("_MINIO_BATCH_REPLICATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
workerSize, err := strconv.Atoi(env.Get("_S3_BATCH_REPLICATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -1219,7 +1219,7 @@ func (r *BatchJobReplicateV1) Start(ctx context.Context, api ObjectLayer, job Ba
|
||||
slowCh = walkCh
|
||||
}
|
||||
|
||||
workerSize, err := strconv.Atoi(env.Get("_MINIO_BATCH_REPLICATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
workerSize, err := strconv.Atoi(env.Get("_S3_BATCH_REPLICATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -1230,7 +1230,7 @@ func (r *BatchJobReplicateV1) Start(ctx context.Context, api ObjectLayer, job Ba
|
||||
return err
|
||||
}
|
||||
|
||||
walkQuorum := env.Get("_MINIO_BATCH_REPLICATION_WALK_QUORUM", "strict")
|
||||
walkQuorum := env.Get("_S3_BATCH_REPLICATION_WALK_QUORUM", "strict")
|
||||
if walkQuorum == "" {
|
||||
walkQuorum = "strict"
|
||||
}
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ func (r *BatchJobKeyRotateV1) Start(ctx context.Context, api ObjectLayer, job Ba
|
||||
return true
|
||||
}
|
||||
|
||||
workerSize, err := strconv.Atoi(env.Get("_MINIO_BATCH_KEYROTATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
workerSize, err := strconv.Atoi(env.Get("_S3_BATCH_KEYROTATION_WORKERS", strconv.Itoa(runtime.GOMAXPROCS(0)/2)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ func (s1 *ServerSystemConfig) Diff(s2 *ServerSystemConfig) error {
|
||||
extra = append(extra, k)
|
||||
}
|
||||
}
|
||||
msg := "Expected MINIO_* environment name and values across all servers to be same: "
|
||||
msg := "Expected S3_* environment name and values across all servers to be same: "
|
||||
if len(missing) > 0 {
|
||||
msg += fmt.Sprintf(`Missing environment values: %v. `, missing)
|
||||
}
|
||||
@@ -106,21 +106,21 @@ func (s1 *ServerSystemConfig) Diff(s2 *ServerSystemConfig) error {
|
||||
}
|
||||
|
||||
var skipEnvs = map[string]struct{}{
|
||||
"MINIO_OPTS": {},
|
||||
"MINIO_CERT_PASSWD": {},
|
||||
"MINIO_SERVER_DEBUG": {},
|
||||
"MINIO_DSYNC_TRACE": {},
|
||||
"MINIO_ROOT_USER": {},
|
||||
"MINIO_ROOT_PASSWORD": {},
|
||||
"MINIO_ACCESS_KEY": {},
|
||||
"MINIO_SECRET_KEY": {},
|
||||
"MINIO_OPERATOR_VERSION": {},
|
||||
"MINIO_VSPHERE_PLUGIN_VERSION": {},
|
||||
"MINIO_CI_CD": {},
|
||||
"S3_OPTS": {},
|
||||
"S3_CERT_PASSWD": {},
|
||||
"S3_SERVER_DEBUG": {},
|
||||
"S3_DSYNC_TRACE": {},
|
||||
"S3_ROOT_USER": {},
|
||||
"S3_ROOT_PASSWORD": {},
|
||||
"S3_ACCESS_KEY": {},
|
||||
"S3_SECRET_KEY": {},
|
||||
"S3_OPERATOR_VERSION": {},
|
||||
"S3_VSPHERE_PLUGIN_VERSION": {},
|
||||
"S3_CI_CD": {},
|
||||
}
|
||||
|
||||
func getServerSystemCfg() *ServerSystemConfig {
|
||||
envs := env.List("MINIO_")
|
||||
envs := env.List("S3_")
|
||||
envValues := make(map[string]string, len(envs))
|
||||
for _, envK := range envs {
|
||||
// skip certain environment variables as part
|
||||
|
||||
+22
-22
@@ -65,7 +65,7 @@ import (
|
||||
|
||||
// serverDebugLog will enable debug printing
|
||||
var (
|
||||
serverDebugLog = env.Get("_MINIO_SERVER_DEBUG", config.EnableOff) == config.EnableOn
|
||||
serverDebugLog = env.Get("_S3_SERVER_DEBUG", config.EnableOff) == config.EnableOn
|
||||
currentReleaseTime time.Time
|
||||
orchestrated = IsKubernetes() || IsDocker()
|
||||
)
|
||||
@@ -97,7 +97,7 @@ func init() {
|
||||
globalVersionUnix = uint64(t.Unix())
|
||||
}
|
||||
|
||||
globalIsCICD = env.Get("MINIO_CI_CD", "") != "" || env.Get("CI", "") != ""
|
||||
globalIsCICD = env.Get("S3_CI_CD", "") != "" || env.Get("CI", "") != ""
|
||||
|
||||
console.SetColor("Debug", fcolor.New())
|
||||
|
||||
@@ -121,11 +121,11 @@ func minioConfigToConsoleFeatures() {
|
||||
os.Setenv("CONSOLE_PBKDF_SALT", globalDeploymentID())
|
||||
os.Setenv("CONSOLE_PBKDF_PASSPHRASE", globalDeploymentID())
|
||||
if globalMinioEndpoint != "" {
|
||||
os.Setenv("CONSOLE_MINIO_SERVER", globalMinioEndpoint)
|
||||
os.Setenv("CONSOLE_S3_SERVER", globalMinioEndpoint)
|
||||
} else {
|
||||
// Explicitly set 127.0.0.1 so Console will automatically bypass TLS verification to the local S3 API.
|
||||
// This will save users from providing a certificate with IP or FQDN SAN that points to the local host.
|
||||
os.Setenv("CONSOLE_MINIO_SERVER", fmt.Sprintf("%s://127.0.0.1:%s", getURLScheme(globalIsTLS), globalMinioPort))
|
||||
os.Setenv("CONSOLE_S3_SERVER", fmt.Sprintf("%s://127.0.0.1:%s", getURLScheme(globalIsTLS), globalMinioPort))
|
||||
}
|
||||
if value := env.Get(config.EnvMinIOLogQueryURL, ""); value != "" {
|
||||
os.Setenv("CONSOLE_LOG_QUERY_URL", value)
|
||||
@@ -177,11 +177,11 @@ func minioConfigToConsoleFeatures() {
|
||||
os.Setenv("CONSOLE_STS_DURATION", valueSession)
|
||||
}
|
||||
|
||||
os.Setenv("CONSOLE_MINIO_SITE_NAME", globalSite.Name())
|
||||
os.Setenv("CONSOLE_MINIO_SITE_REGION", globalSite.Region())
|
||||
os.Setenv("CONSOLE_MINIO_REGION", globalSite.Region())
|
||||
os.Setenv("CONSOLE_S3_SITE_NAME", globalSite.Name())
|
||||
os.Setenv("CONSOLE_S3_SITE_REGION", globalSite.Region())
|
||||
os.Setenv("CONSOLE_S3_REGION", globalSite.Region())
|
||||
|
||||
os.Setenv("CONSOLE_CERT_PASSWD", env.Get("MINIO_CERT_PASSWD", ""))
|
||||
os.Setenv("CONSOLE_CERT_PASSWD", env.Get("S3_CERT_PASSWD", ""))
|
||||
|
||||
// This section sets Browser (console) stored config
|
||||
if valueSCP := globalBrowserConfig.GetCSPolicy(); valueSCP != "" {
|
||||
@@ -705,7 +705,7 @@ func serverHandleEarlyEnvVars() {
|
||||
var err error
|
||||
globalBrowserEnabled, err = config.ParseBool(env.Get(config.EnvBrowser, config.EnableOn))
|
||||
if err != nil {
|
||||
logger.Fatal(config.ErrInvalidBrowserValue(err), "Invalid MINIO_BROWSER value in environment variable")
|
||||
logger.Fatal(config.ErrInvalidBrowserValue(err), "Invalid S3_BROWSER value in environment variable")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -715,12 +715,12 @@ func serverHandleEnvVars() {
|
||||
if redirectURL := env.Get(config.EnvBrowserRedirectURL, ""); redirectURL != "" {
|
||||
u, err := xnet.ParseHTTPURL(redirectURL)
|
||||
if err != nil {
|
||||
logger.Fatal(err, "Invalid MINIO_BROWSER_REDIRECT_URL value in environment variable")
|
||||
logger.Fatal(err, "Invalid S3_BROWSER_REDIRECT_URL value in environment variable")
|
||||
}
|
||||
// Look for if URL has invalid values and return error.
|
||||
if !isValidURLEndpoint((*url.URL)(u)) {
|
||||
err := fmt.Errorf("URL contains unexpected resources, expected URL to be one of http(s)://console.example.com or as a subpath via API endpoint http(s)://minio.example.com/minio format: %v", u)
|
||||
logger.Fatal(err, "Invalid MINIO_BROWSER_REDIRECT_URL value is environment variable")
|
||||
logger.Fatal(err, "Invalid S3_BROWSER_REDIRECT_URL value is environment variable")
|
||||
}
|
||||
globalBrowserRedirectURL = u
|
||||
}
|
||||
@@ -730,12 +730,12 @@ func serverHandleEnvVars() {
|
||||
if serverURL := env.Get(config.EnvMinIOServerURL, ""); serverURL != "" {
|
||||
u, err := xnet.ParseHTTPURL(serverURL)
|
||||
if err != nil {
|
||||
logger.Fatal(err, "Invalid MINIO_SERVER_URL value in environment variable")
|
||||
logger.Fatal(err, "Invalid S3_SERVER_URL value in environment variable")
|
||||
}
|
||||
// Look for if URL has invalid values and return error.
|
||||
if !isValidURLEndpoint((*url.URL)(u)) {
|
||||
err := fmt.Errorf("URL contains unexpected resources, expected URL to be of http(s)://minio.example.com format: %v", u)
|
||||
logger.Fatal(err, "Invalid MINIO_SERVER_URL value is environment variable")
|
||||
logger.Fatal(err, "Invalid S3_SERVER_URL value is environment variable")
|
||||
}
|
||||
u.Path = "" // remove any path component such as `/`
|
||||
globalMinioEndpoint = u.String()
|
||||
@@ -744,7 +744,7 @@ func serverHandleEnvVars() {
|
||||
|
||||
globalFSOSync, err = config.ParseBool(env.Get(config.EnvFSOSync, config.EnableOff))
|
||||
if err != nil {
|
||||
logger.Fatal(config.ErrInvalidFSOSyncValue(err), "Invalid MINIO_FS_OSYNC value in environment variable")
|
||||
logger.Fatal(config.ErrInvalidFSOSyncValue(err), "Invalid S3_FS_OSYNC value in environment variable")
|
||||
}
|
||||
|
||||
rootDiskSize := env.Get(config.EnvRootDriveThresholdSize, "")
|
||||
@@ -764,7 +764,7 @@ func serverHandleEnvVars() {
|
||||
for domainName := range strings.SplitSeq(domains, config.ValueSeparator) {
|
||||
if _, ok := dns2.IsDomainName(domainName); !ok {
|
||||
logger.Fatal(config.ErrInvalidDomainValue(nil).Msgf("Unknown value `%s`", domainName),
|
||||
"Invalid MINIO_DOMAIN value in environment variable")
|
||||
"Invalid S3_DOMAIN value in environment variable")
|
||||
}
|
||||
globalDomainNames = append(globalDomainNames, domainName)
|
||||
}
|
||||
@@ -773,7 +773,7 @@ func serverHandleEnvVars() {
|
||||
for _, domainName := range globalDomainNames {
|
||||
if domainName == lcpSuf && len(globalDomainNames) > 1 {
|
||||
logger.Fatal(config.ErrOverlappingDomainValue(nil).Msgf("Overlapping domains `%s` not allowed", globalDomainNames),
|
||||
"Invalid MINIO_DOMAIN value in environment variable")
|
||||
"Invalid S3_DOMAIN value in environment variable")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -787,7 +787,7 @@ func serverHandleEnvVars() {
|
||||
// Checking if the IP is a DNS entry.
|
||||
addrs, err := globalDNSCache.LookupHost(GlobalContext, endpoint)
|
||||
if err != nil {
|
||||
logger.FatalIf(err, "Unable to initialize MinIO server with [%s] invalid entry found in MINIO_PUBLIC_IPS", endpoint)
|
||||
logger.FatalIf(err, "Unable to initialize MinIO server with [%s] invalid entry found in S3_PUBLIC_IPS", endpoint)
|
||||
}
|
||||
for _, addr := range addrs {
|
||||
domainIPs.Add(addr)
|
||||
@@ -806,15 +806,15 @@ func serverHandleEnvVars() {
|
||||
updateDomainIPs(domainIPs)
|
||||
}
|
||||
|
||||
// In place update is true by default if the MINIO_UPDATE is not set
|
||||
// or is not set to 'off', if MINIO_UPDATE is set to 'off' then
|
||||
// In place update is true by default if the S3_UPDATE is not set
|
||||
// or is not set to 'off', if S3_UPDATE is set to 'off' then
|
||||
// in-place update is off.
|
||||
globalInplaceUpdateDisabled = strings.EqualFold(env.Get(config.EnvUpdate, config.EnableOn), config.EnableOff)
|
||||
|
||||
// Check if the supported credential env vars,
|
||||
// "MINIO_ROOT_USER" and "MINIO_ROOT_PASSWORD" are provided
|
||||
// "S3_ROOT_USER" and "S3_ROOT_PASSWORD" are provided
|
||||
// Warn user if deprecated environment variables,
|
||||
// "MINIO_ACCESS_KEY" and "MINIO_SECRET_KEY", are defined
|
||||
// "S3_ACCESS_KEY" and "S3_SECRET_KEY", are defined
|
||||
// Check all error conditions first
|
||||
//nolint:gocritic
|
||||
if !env.IsSet(config.EnvRootUser) && env.IsSet(config.EnvRootPassword) {
|
||||
@@ -829,7 +829,7 @@ func serverHandleEnvVars() {
|
||||
}
|
||||
}
|
||||
|
||||
globalEnableSyncBoot = env.Get("MINIO_SYNC_BOOT", config.EnableOff) == config.EnableOn
|
||||
globalEnableSyncBoot = env.Get("S3_SYNC_BOOT", config.EnableOff) == config.EnableOn
|
||||
}
|
||||
|
||||
func loadRootCredentials() auth.Credentials {
|
||||
|
||||
+20
-20
@@ -74,80 +74,80 @@ func Test_minioEnvironFromFile(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
`
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123`,
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123`,
|
||||
false,
|
||||
[]envKV{
|
||||
{
|
||||
Key: "MINIO_ROOT_USER",
|
||||
Key: "S3_ROOT_USER",
|
||||
Value: "minio",
|
||||
},
|
||||
{
|
||||
Key: "MINIO_ROOT_PASSWORD",
|
||||
Key: "S3_ROOT_PASSWORD",
|
||||
Value: "minio123",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Value with double quotes
|
||||
{
|
||||
`export MINIO_ROOT_USER="minio"`,
|
||||
`export S3_ROOT_USER="minio"`,
|
||||
false,
|
||||
[]envKV{
|
||||
{
|
||||
Key: "MINIO_ROOT_USER",
|
||||
Key: "S3_ROOT_USER",
|
||||
Value: "minio",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Value with single quotes
|
||||
{
|
||||
`export MINIO_ROOT_USER='minio'`,
|
||||
`export S3_ROOT_USER='minio'`,
|
||||
false,
|
||||
[]envKV{
|
||||
{
|
||||
Key: "MINIO_ROOT_USER",
|
||||
Key: "S3_ROOT_USER",
|
||||
Value: "minio",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
`
|
||||
MINIO_ROOT_USER=minio
|
||||
MINIO_ROOT_PASSWORD=minio123`,
|
||||
S3_ROOT_USER=minio
|
||||
S3_ROOT_PASSWORD=minio123`,
|
||||
false,
|
||||
[]envKV{
|
||||
{
|
||||
Key: "MINIO_ROOT_USER",
|
||||
Key: "S3_ROOT_USER",
|
||||
Value: "minio",
|
||||
},
|
||||
{
|
||||
Key: "MINIO_ROOT_PASSWORD",
|
||||
Key: "S3_ROOT_PASSWORD",
|
||||
Value: "minio123",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
`
|
||||
export MINIO_ROOT_USERminio
|
||||
export MINIO_ROOT_PASSWORD=minio123`,
|
||||
export S3_ROOT_USERminio
|
||||
export S3_ROOT_PASSWORD=minio123`,
|
||||
true,
|
||||
nil,
|
||||
},
|
||||
{
|
||||
`
|
||||
# simple comment
|
||||
# MINIO_ROOT_USER=minioadmin
|
||||
# MINIO_ROOT_PASSWORD=minioadmin
|
||||
MINIO_ROOT_USER=minio
|
||||
MINIO_ROOT_PASSWORD=minio123`,
|
||||
# S3_ROOT_USER=minioadmin
|
||||
# S3_ROOT_PASSWORD=minioadmin
|
||||
S3_ROOT_USER=minio
|
||||
S3_ROOT_PASSWORD=minio123`,
|
||||
false,
|
||||
[]envKV{
|
||||
{
|
||||
Key: "MINIO_ROOT_USER",
|
||||
Key: "S3_ROOT_USER",
|
||||
Value: "minio",
|
||||
},
|
||||
{
|
||||
Key: "MINIO_ROOT_PASSWORD",
|
||||
Key: "S3_ROOT_PASSWORD",
|
||||
Value: "minio123",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -526,7 +526,7 @@ func lookupConfigs(s config.Config, objAPI ObjectLayer) {
|
||||
|
||||
globalAutoEncryption = crypto.LookupAutoEncryption() // Enable auto-encryption if enabled
|
||||
if globalAutoEncryption && GlobalKMS == nil {
|
||||
logger.Fatal(errors.New("no KMS configured"), "MINIO_KMS_AUTO_ENCRYPTION requires a valid KMS configuration")
|
||||
logger.Fatal(errors.New("no KMS configured"), "S3_KMS_AUTO_ENCRYPTION requires a valid KMS configuration")
|
||||
}
|
||||
|
||||
transport := NewHTTPTransport()
|
||||
|
||||
@@ -523,7 +523,7 @@ func (d *dataUsageCache) reduceChildrenOf(path dataUsageHash, limit int, compact
|
||||
return
|
||||
}
|
||||
|
||||
// Appears to be printed with _MINIO_SERVER_DEBUG=off
|
||||
// Appears to be printed with _S3_SERVER_DEBUG=off
|
||||
// console.Debugf(" %d children found, compacting %v\n", total, path)
|
||||
|
||||
leaves := make([]struct {
|
||||
@@ -572,7 +572,7 @@ func (d *dataUsageCache) reduceChildrenOf(path dataUsageHash, limit int, compact
|
||||
leaves = leaves[1:]
|
||||
continue
|
||||
}
|
||||
// Appears to be printed with _MINIO_SERVER_DEBUG=off
|
||||
// Appears to be printed with _S3_SERVER_DEBUG=off
|
||||
// console.Debugf("compacting %v, removing %d children\n", candidate, removing)
|
||||
|
||||
flat.Compacted = true
|
||||
|
||||
@@ -144,9 +144,9 @@ func (dui DataUsageInfo) tierMetrics() (metrics []MetricV2) {
|
||||
if dui.TierStats == nil {
|
||||
return nil
|
||||
}
|
||||
// e.g minio_cluster_ilm_transitioned_bytes{tier="S3TIER-1"}=136314880
|
||||
// minio_cluster_ilm_transitioned_objects{tier="S3TIER-1"}=1
|
||||
// minio_cluster_ilm_transitioned_versions{tier="S3TIER-1"}=3
|
||||
// e.g s3_cluster_ilm_transitioned_bytes{tier="S3TIER-1"}=136314880
|
||||
// s3_cluster_ilm_transitioned_objects{tier="S3TIER-1"}=1
|
||||
// s3_cluster_ilm_transitioned_versions{tier="S3TIER-1"}=3
|
||||
for tier, st := range dui.TierStats.Tiers {
|
||||
metrics = append(metrics, MetricV2{
|
||||
Description: getClusterTransitionedBytesMD(),
|
||||
|
||||
@@ -320,7 +320,7 @@ func GetAllSets(setDriveCount uint64, args ...string) ([][]string, error) {
|
||||
|
||||
// Override set drive count for manual distribution.
|
||||
const (
|
||||
EnvErasureSetDriveCount = "MINIO_ERASURE_SET_DRIVE_COUNT"
|
||||
EnvErasureSetDriveCount = "S3_ERASURE_SET_DRIVE_COUNT"
|
||||
)
|
||||
|
||||
type node struct {
|
||||
|
||||
+2
-2
@@ -818,7 +818,7 @@ func (p PoolEndpointList) UpdateIsLocal() error {
|
||||
continue
|
||||
}
|
||||
|
||||
if endpoint.Host == "" || (orchestrated && env.Get("_MINIO_SERVER_LOCAL", "") == endpoint.Host) {
|
||||
if endpoint.Host == "" || (orchestrated && env.Get("_S3_SERVER_LOCAL", "") == endpoint.Host) {
|
||||
if !foundLocal {
|
||||
foundLocal = true
|
||||
}
|
||||
@@ -1041,7 +1041,7 @@ func CreatePoolEndpoints(serverAddr string, poolsLayout ...poolDisksLayout) ([]E
|
||||
}
|
||||
}
|
||||
|
||||
reverseProxy := (env.Get("_MINIO_REVERSE_PROXY", "") != "") && ((env.Get("MINIO_CI_CD", "") != "") || (env.Get("CI", "") != ""))
|
||||
reverseProxy := (env.Get("_S3_REVERSE_PROXY", "") != "") && ((env.Get("S3_CI_CD", "") != "") || (env.Get("CI", "") != ""))
|
||||
// If not orchestrated
|
||||
// and not setup in reverse proxy
|
||||
if !orchestrated && !reverseProxy {
|
||||
|
||||
@@ -744,7 +744,7 @@ func (set *erasureObjects) listObjectsToDecommission(ctx context.Context, bi dec
|
||||
func (z *erasureServerPools) decommissionPool(ctx context.Context, idx int, pool *erasureSets, bi decomBucketInfo) error {
|
||||
ctx = logger.SetReqInfo(ctx, &logger.ReqInfo{})
|
||||
|
||||
const envDecomWorkers = "_MINIO_DECOMMISSION_WORKERS"
|
||||
const envDecomWorkers = "_S3_DECOMMISSION_WORKERS"
|
||||
workerSize, err := env.GetInt(envDecomWorkers, len(pool.sets))
|
||||
if err != nil {
|
||||
decomLogIf(ctx, fmt.Errorf("invalid workers value err: %v, defaulting to %d", err, len(pool.sets)))
|
||||
|
||||
@@ -566,7 +566,7 @@ func (z *erasureServerPools) rebalanceBucket(ctx context.Context, bucket string,
|
||||
|
||||
pool := z.serverPools[poolIdx]
|
||||
|
||||
const envRebalanceWorkers = "_MINIO_REBALANCE_WORKERS"
|
||||
const envRebalanceWorkers = "_S3_REBALANCE_WORKERS"
|
||||
workerSize, err := env.GetInt(envRebalanceWorkers, len(pool.sets))
|
||||
if err != nil {
|
||||
rebalanceLogIf(ctx, fmt.Errorf("invalid workers value err: %v, defaulting to %d", err, len(pool.sets)))
|
||||
|
||||
@@ -147,7 +147,7 @@ func (evnot *EventNotifier) Send(args eventArgs) {
|
||||
return
|
||||
}
|
||||
|
||||
// If MINIO_API_SYNC_EVENTS is set, send events synchronously.
|
||||
// If S3_API_SYNC_EVENTS is set, send events synchronously.
|
||||
evnot.targetList.Send(args.ToEvent(true), targetIDSet, globalAPIConfig.isSyncEventsEnabled())
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ var fmtGenFlags = []cli.Flag{
|
||||
Name: "address",
|
||||
Value: ":" + GlobalMinioDefaultPort,
|
||||
Usage: "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname",
|
||||
EnvVar: "MINIO_ADDRESS",
|
||||
EnvVar: "S3_ADDRESS",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -201,7 +201,7 @@ var (
|
||||
// globalBrowserConfig Browser user configurable settings
|
||||
globalBrowserConfig browser.Config
|
||||
|
||||
// This flag is set to 'true' when MINIO_UPDATE env is set to 'off'. Default is false.
|
||||
// This flag is set to 'true' when S3_UPDATE env is set to 'off'. Default is false.
|
||||
globalInplaceUpdateDisabled = false
|
||||
|
||||
// Captures site name and region
|
||||
@@ -413,9 +413,9 @@ var (
|
||||
globalLocalDrivesMap map[string]StorageAPI
|
||||
globalLocalDrivesMu sync.RWMutex
|
||||
|
||||
globalDriveMonitoring = env.Get("_MINIO_DRIVE_ACTIVE_MONITORING", config.EnableOn) == config.EnableOn
|
||||
globalDriveMonitoring = env.Get("_S3_DRIVE_ACTIVE_MONITORING", config.EnableOn) == config.EnableOn
|
||||
|
||||
// Is MINIO_CI_CD set?
|
||||
// Is S3_CI_CD set?
|
||||
globalIsCICD bool
|
||||
|
||||
globalRootDiskThreshold uint64
|
||||
@@ -443,7 +443,7 @@ var (
|
||||
// dynamic sleeper for multipart expiration routine
|
||||
deleteMultipartCleanupSleeper = newDynamicSleeper(5, 25*time.Millisecond, false)
|
||||
|
||||
// Is MINIO_SYNC_BOOT set?
|
||||
// Is S3_SYNC_BOOT set?
|
||||
globalEnableSyncBoot bool
|
||||
|
||||
// Contains NIC interface name used for internode communication
|
||||
|
||||
+1
-1
@@ -2905,7 +2905,7 @@ func (store *IAMStoreSys) UpdateUserIdentity(ctx context.Context, cred auth.Cred
|
||||
|
||||
// LoadUser - attempts to load user info from storage and updates cache.
|
||||
func (store *IAMStoreSys) LoadUser(ctx context.Context, accessKey string) error {
|
||||
groupLoad := env.Get("_MINIO_IAM_GROUP_REFRESH", config.EnableOff) == config.EnableOn
|
||||
groupLoad := env.Get("_S3_IAM_GROUP_REFRESH", config.EnableOff) == config.EnableOn
|
||||
|
||||
newCachePopulate := func() (val any, err error) {
|
||||
newCache := newIamCache()
|
||||
|
||||
+1
-1
@@ -182,7 +182,7 @@ func (sys *IAMSys) initStore(objAPI ObjectLayer, etcdClient *etcd.Client) {
|
||||
group *singleflight.Group
|
||||
policy *singleflight.Group
|
||||
)
|
||||
if env.Get("_MINIO_IAM_SINGLE_FLIGHT", config.EnableOn) == config.EnableOn {
|
||||
if env.Get("_S3_IAM_SINGLE_FLIGHT", config.EnableOn) == config.EnableOn {
|
||||
group = &singleflight.Group{}
|
||||
policy = &singleflight.Group{}
|
||||
}
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ func (a kmsAPIHandlers) KMSVersionHandler(w http.ResponseWriter, r *http.Request
|
||||
|
||||
// KMSCreateKeyHandler - POST /minio/kms/v1/key/create?key-id=<master-key-id>
|
||||
func (a kmsAPIHandlers) KMSCreateKeyHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// If env variable MINIO_KMS_SECRET_KEY is populated, prevent creation of new keys
|
||||
// If env variable S3_KMS_SECRET_KEY is populated, prevent creation of new keys
|
||||
ctx := newContext(r, w, "KMSCreateKey")
|
||||
defer logger.AuditLog(ctx, w, r, mustGetClaimsFromToken(r))
|
||||
|
||||
|
||||
+1
-1
@@ -195,7 +195,7 @@ func printMinIOVersion(c *cli.Context) {
|
||||
io.Copy(c.App.Writer, versionBanner(c))
|
||||
}
|
||||
|
||||
var debugNoExit = env.Get("_MINIO_DEBUG_NO_EXIT", "") != ""
|
||||
var debugNoExit = env.Get("_S3_DEBUG_NO_EXIT", "") != ""
|
||||
|
||||
// Main main for minio server.
|
||||
func Main(args []string) {
|
||||
|
||||
@@ -31,7 +31,7 @@ const markerTagVersion = "v2"
|
||||
// parseMarker will parse a marker possibly encoded with encodeMarker
|
||||
func (o *listPathOptions) parseMarker() {
|
||||
s := o.Marker
|
||||
if !strings.Contains(s, "[minio_cache:"+markerTagVersion) {
|
||||
if !strings.Contains(s, "[s3_cache:"+markerTagVersion) {
|
||||
return
|
||||
}
|
||||
start := strings.LastIndex(s, "[")
|
||||
@@ -45,7 +45,7 @@ func (o *listPathOptions) parseMarker() {
|
||||
continue
|
||||
}
|
||||
switch kv[0] {
|
||||
case "minio_cache":
|
||||
case "s3_cache":
|
||||
if kv[1] != markerTagVersion {
|
||||
continue
|
||||
}
|
||||
@@ -81,10 +81,10 @@ func (o *listPathOptions) parseMarker() {
|
||||
func (o listPathOptions) encodeMarker(marker string) string {
|
||||
if o.ID == "" {
|
||||
// Mark as returning listing...
|
||||
return fmt.Sprintf("%s[minio_cache:%s,return:]", marker, markerTagVersion)
|
||||
return fmt.Sprintf("%s[s3_cache:%s,return:]", marker, markerTagVersion)
|
||||
}
|
||||
if strings.ContainsAny(o.ID, "[:,") {
|
||||
internalLogIf(context.Background(), fmt.Errorf("encodeMarker: uuid %s contained invalid characters", o.ID))
|
||||
}
|
||||
return fmt.Sprintf("%s[minio_cache:%s,id:%s,p:%d,s:%d]", marker, markerTagVersion, o.ID, o.pool, o.set)
|
||||
return fmt.Sprintf("%s[s3_cache:%s,id:%s,p:%d,s:%d]", marker, markerTagVersion, o.ID, o.pool, o.set)
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ func (c *minioResourceCollector) Collect(out chan<- prometheus.Metric) {
|
||||
func newMinioResourceCollector(metricsGroups []*MetricsGroupV2) *minioResourceCollector {
|
||||
return &minioResourceCollector{
|
||||
metricsGroups: metricsGroups,
|
||||
desc: prometheus.NewDesc("minio_resource_stats", "Resource statistics exposed by MinIO server", nil, nil),
|
||||
desc: prometheus.NewDesc("s3_resource_stats", "Resource statistics exposed by MinIO server", nil, nil),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ const (
|
||||
|
||||
// Standard env prometheus auth type
|
||||
const (
|
||||
EnvPrometheusAuthType = "MINIO_PROMETHEUS_AUTH_TYPE"
|
||||
EnvPrometheusOpenMetrics = "MINIO_PROMETHEUS_OPEN_METRICS"
|
||||
EnvPrometheusAuthType = "S3_PROMETHEUS_AUTH_TYPE"
|
||||
EnvPrometheusOpenMetrics = "S3_PROMETHEUS_OPEN_METRICS"
|
||||
)
|
||||
|
||||
type prometheusAuthType string
|
||||
|
||||
+12
-12
@@ -131,13 +131,13 @@ type MetricNamespace string
|
||||
type MetricSubsystem string
|
||||
|
||||
const (
|
||||
bucketMetricNamespace MetricNamespace = "minio_bucket"
|
||||
clusterMetricNamespace MetricNamespace = "minio_cluster"
|
||||
healMetricNamespace MetricNamespace = "minio_heal"
|
||||
interNodeMetricNamespace MetricNamespace = "minio_inter_node"
|
||||
nodeMetricNamespace MetricNamespace = "minio_node"
|
||||
bucketMetricNamespace MetricNamespace = "s3_bucket"
|
||||
clusterMetricNamespace MetricNamespace = "s3_cluster"
|
||||
healMetricNamespace MetricNamespace = "s3_heal"
|
||||
interNodeMetricNamespace MetricNamespace = "s3_inter_node"
|
||||
nodeMetricNamespace MetricNamespace = "s3_node"
|
||||
minioMetricNamespace MetricNamespace = "minio"
|
||||
s3MetricNamespace MetricNamespace = "minio_s3"
|
||||
s3MetricNamespace MetricNamespace = "s3_s3"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -2788,7 +2788,7 @@ func getNotificationMetrics(opts MetricsGroupOpts) *MetricsGroupV2 {
|
||||
Namespace: minioNamespace,
|
||||
Subsystem: notifySubsystem,
|
||||
Name: "current_send_in_progress",
|
||||
Help: "Number of concurrent async Send calls active to all targets (deprecated, please use 'minio_notify_target_current_send_in_progress' instead)",
|
||||
Help: "Number of concurrent async Send calls active to all targets (deprecated, please use 's3_notify_target_current_send_in_progress' instead)",
|
||||
Type: gaugeMetric,
|
||||
},
|
||||
Value: float64(nstats.CurrentSendCalls),
|
||||
@@ -2808,7 +2808,7 @@ func getNotificationMetrics(opts MetricsGroupOpts) *MetricsGroupV2 {
|
||||
Namespace: minioNamespace,
|
||||
Subsystem: notifySubsystem,
|
||||
Name: "events_errors_total",
|
||||
Help: "Events that were failed to be sent to the targets (deprecated, please use 'minio_notify_target_failed_events' instead)",
|
||||
Help: "Events that were failed to be sent to the targets (deprecated, please use 's3_notify_target_failed_events' instead)",
|
||||
Type: counterMetric,
|
||||
},
|
||||
Value: float64(nstats.EventsErrorsTotal),
|
||||
@@ -2818,7 +2818,7 @@ func getNotificationMetrics(opts MetricsGroupOpts) *MetricsGroupV2 {
|
||||
Namespace: minioNamespace,
|
||||
Subsystem: notifySubsystem,
|
||||
Name: "events_sent_total",
|
||||
Help: "Total number of events sent to the targets (deprecated, please use 'minio_notify_target_total_events' instead)",
|
||||
Help: "Total number of events sent to the targets (deprecated, please use 's3_notify_target_total_events' instead)",
|
||||
Type: counterMetric,
|
||||
},
|
||||
Value: float64(nstats.TotalEvents),
|
||||
@@ -4091,7 +4091,7 @@ type minioBucketCollector struct {
|
||||
func newMinioBucketCollector(metricsGroups []*MetricsGroupV2) *minioBucketCollector {
|
||||
return &minioBucketCollector{
|
||||
metricsGroups: metricsGroups,
|
||||
desc: prometheus.NewDesc("minio_bucket_stats", "Statistics exposed by MinIO server cluster wide per bucket", nil, nil),
|
||||
desc: prometheus.NewDesc("s3_bucket_stats", "Statistics exposed by MinIO server cluster wide per bucket", nil, nil),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4127,7 +4127,7 @@ type minioClusterCollector struct {
|
||||
func newMinioClusterCollector(metricsGroups []*MetricsGroupV2) *minioClusterCollector {
|
||||
return &minioClusterCollector{
|
||||
metricsGroups: metricsGroups,
|
||||
desc: prometheus.NewDesc("minio_stats", "Statistics exposed by MinIO server per cluster", nil, nil),
|
||||
desc: prometheus.NewDesc("s3_stats", "Statistics exposed by MinIO server per cluster", nil, nil),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4274,7 +4274,7 @@ func getOrderedLabelValueArrays(labelsWithValue map[string]string) (labels, valu
|
||||
func newMinioCollectorNode(metricsGroups []*MetricsGroupV2) *minioNodeCollector {
|
||||
return &minioNodeCollector{
|
||||
metricsGroups: metricsGroups,
|
||||
desc: prometheus.NewDesc("minio_stats", "Statistics exposed by MinIO server per node", nil, nil),
|
||||
desc: prometheus.NewDesc("s3_stats", "Statistics exposed by MinIO server per node", nil, nil),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ func (md metricDisplay) TableRow() string {
|
||||
// listMetrics - returns a handler that lists all the metrics that could be
|
||||
// returned for the requested path.
|
||||
//
|
||||
// FIXME: It currently only lists `minio_` prefixed metrics.
|
||||
// FIXME: It currently only lists `s3_` prefixed metrics.
|
||||
func (h *metricsV3Server) listMetrics(path string) http.Handler {
|
||||
// First collect all matching MetricsGroup's
|
||||
matchingMG := make(map[collectorPath]*MetricsGroup)
|
||||
|
||||
@@ -34,12 +34,12 @@ type collectorPath string
|
||||
|
||||
// metricPrefix converts a collector path to a metric name prefix. The path is
|
||||
// converted to snake-case (by replaced '/' and '-' with '_') and prefixed with
|
||||
// `minio_`.
|
||||
// `s3_`.
|
||||
func (cp collectorPath) metricPrefix() string {
|
||||
s := strings.TrimPrefix(string(cp), SlashSeparator)
|
||||
s = strings.ReplaceAll(s, SlashSeparator, "_")
|
||||
s = strings.ReplaceAll(s, "-", "_")
|
||||
return "minio_" + s
|
||||
return "s3_" + s
|
||||
}
|
||||
|
||||
// isDescendantOf returns true if it is a descendant of (or the same as)
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ func init() {
|
||||
// to define metric and help string
|
||||
func newMinioCollector() *minioCollector {
|
||||
return &minioCollector{
|
||||
desc: prometheus.NewDesc("minio_stats", "Statistics exposed by MinIO server", nil, nil),
|
||||
desc: prometheus.NewDesc("s3_stats", "Statistics exposed by MinIO server", nil, nil),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -63,31 +63,31 @@ var ServerFlags = []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "config",
|
||||
Usage: "specify server configuration via YAML configuration",
|
||||
EnvVar: "MINIO_CONFIG",
|
||||
EnvVar: "S3_CONFIG",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "address",
|
||||
Value: ":" + GlobalMinioDefaultPort,
|
||||
Usage: "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname",
|
||||
EnvVar: "MINIO_ADDRESS",
|
||||
EnvVar: "S3_ADDRESS",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "listeners", // Deprecated Oct 2022
|
||||
Value: 1,
|
||||
Usage: "bind N number of listeners per ADDRESS:PORT",
|
||||
EnvVar: "MINIO_LISTENERS",
|
||||
EnvVar: "S3_LISTENERS",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "console-address",
|
||||
Usage: "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
|
||||
EnvVar: "MINIO_CONSOLE_ADDRESS",
|
||||
EnvVar: "S3_CONSOLE_ADDRESS",
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "shutdown-timeout",
|
||||
Value: time.Second * 30,
|
||||
Usage: "shutdown timeout to gracefully shutdown server (DEPRECATED)",
|
||||
EnvVar: "MINIO_SHUTDOWN_TIMEOUT",
|
||||
EnvVar: "S3_SHUTDOWN_TIMEOUT",
|
||||
Hidden: true,
|
||||
},
|
||||
|
||||
@@ -95,14 +95,14 @@ var ServerFlags = []cli.Flag{
|
||||
Name: "idle-timeout",
|
||||
Value: xhttp.DefaultIdleTimeout,
|
||||
Usage: "idle timeout is the maximum amount of time to wait for the next request when keep-alive are enabled",
|
||||
EnvVar: "MINIO_IDLE_TIMEOUT",
|
||||
EnvVar: "S3_IDLE_TIMEOUT",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "read-header-timeout",
|
||||
Value: xhttp.DefaultReadHeaderTimeout,
|
||||
Usage: "read header timeout is the amount of time allowed to read request headers",
|
||||
EnvVar: "MINIO_READ_HEADER_TIMEOUT",
|
||||
EnvVar: "S3_READ_HEADER_TIMEOUT",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.DurationFlag{
|
||||
@@ -110,13 +110,13 @@ var ServerFlags = []cli.Flag{
|
||||
Usage: "custom TCP_USER_TIMEOUT for socket buffers",
|
||||
Hidden: true,
|
||||
Value: 10 * time.Minute,
|
||||
EnvVar: "MINIO_CONN_USER_TIMEOUT",
|
||||
EnvVar: "S3_CONN_USER_TIMEOUT",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "interface",
|
||||
Usage: "bind to right VRF device for MinIO services",
|
||||
Hidden: true,
|
||||
EnvVar: "MINIO_INTERFACE",
|
||||
EnvVar: "S3_INTERFACE",
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "dns-cache-ttl",
|
||||
@@ -128,14 +128,14 @@ var ServerFlags = []cli.Flag{
|
||||
}
|
||||
return 10 * time.Minute
|
||||
}(),
|
||||
EnvVar: "MINIO_DNS_CACHE_TTL",
|
||||
EnvVar: "S3_DNS_CACHE_TTL",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "max-idle-conns-per-host",
|
||||
Usage: "set a custom max idle connections per host value",
|
||||
Hidden: true,
|
||||
Value: 2048,
|
||||
EnvVar: "MINIO_MAX_IDLE_CONNS_PER_HOST",
|
||||
EnvVar: "S3_MAX_IDLE_CONNS_PER_HOST",
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "ftp",
|
||||
@@ -149,49 +149,49 @@ var ServerFlags = []cli.Flag{
|
||||
Name: "crossdomain-xml",
|
||||
Usage: "provide a custom crossdomain-xml configuration to report at http://endpoint/crossdomain.xml",
|
||||
Hidden: true,
|
||||
EnvVar: "MINIO_CROSSDOMAIN_XML",
|
||||
EnvVar: "S3_CROSSDOMAIN_XML",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "memlimit",
|
||||
Usage: "set global memory limit per server via GOMEMLIMIT",
|
||||
Hidden: true,
|
||||
EnvVar: "MINIO_MEMLIMIT",
|
||||
EnvVar: "S3_MEMLIMIT",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "send-buf-size",
|
||||
Value: 4 * humanize.MiByte,
|
||||
EnvVar: "MINIO_SEND_BUF_SIZE",
|
||||
EnvVar: "S3_SEND_BUF_SIZE",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "recv-buf-size",
|
||||
Value: 4 * humanize.MiByte,
|
||||
EnvVar: "MINIO_RECV_BUF_SIZE",
|
||||
EnvVar: "S3_RECV_BUF_SIZE",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "log-dir",
|
||||
Usage: "specify the directory to save the server log",
|
||||
EnvVar: "MINIO_LOG_DIR",
|
||||
EnvVar: "S3_LOG_DIR",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "log-size",
|
||||
Usage: "specify the maximum server log file size in bytes before its rotated",
|
||||
Value: 10 * humanize.MiByte,
|
||||
EnvVar: "MINIO_LOG_SIZE",
|
||||
EnvVar: "S3_LOG_SIZE",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "log-compress",
|
||||
Usage: "specify if we want the rotated logs to be gzip compressed or not",
|
||||
EnvVar: "MINIO_LOG_COMPRESS",
|
||||
EnvVar: "S3_LOG_COMPRESS",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "log-prefix",
|
||||
Usage: "specify the log prefix name for the server log",
|
||||
EnvVar: "MINIO_LOG_PREFIX",
|
||||
EnvVar: "S3_LOG_PREFIX",
|
||||
Hidden: true,
|
||||
},
|
||||
}
|
||||
@@ -254,7 +254,7 @@ func serverCmdArgs(ctx *cli.Context) []string {
|
||||
}
|
||||
}
|
||||
if v == "" {
|
||||
// Fall back to older environment value MINIO_ENDPOINTS
|
||||
// Fall back to older environment value S3_ENDPOINTS
|
||||
v, _, _, err = env.LookupEnv(config.EnvEndpoints)
|
||||
if err != nil {
|
||||
logger.FatalIf(err, "Unable to validate passed arguments in %s:%s",
|
||||
@@ -995,7 +995,7 @@ func serverMain(ctx *cli.Context) {
|
||||
}
|
||||
})
|
||||
if globalActiveCred.Equal(auth.DefaultCredentials) {
|
||||
msg := fmt.Sprintf("Detected default credentials '%s', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables",
|
||||
msg := fmt.Sprintf("Detected default credentials '%s', we recommend that you change these values with 'S3_ROOT_USER' and 'S3_ROOT_PASSWORD' environment variables",
|
||||
globalActiveCred)
|
||||
warnings = append(warnings, color.YellowBold(msg))
|
||||
}
|
||||
@@ -1042,14 +1042,14 @@ func serverMain(ctx *cli.Context) {
|
||||
defer bootstrapTrace("unfreezeServices", unfreezeServices)
|
||||
t := time.AfterFunc(5*time.Minute, func() {
|
||||
warnings = append(warnings,
|
||||
color.YellowBold("- Initializing the config subsystem is taking longer than 5 minutes. Please remove 'MINIO_SYNC_BOOT=on' to not freeze the APIs"))
|
||||
color.YellowBold("- Initializing the config subsystem is taking longer than 5 minutes. Please remove 'S3_SYNC_BOOT=on' to not freeze the APIs"))
|
||||
})
|
||||
defer t.Stop()
|
||||
}
|
||||
|
||||
// Initialize data scanner.
|
||||
bootstrapTrace("initDataScanner", func() {
|
||||
if v := env.Get("_MINIO_SCANNER", config.EnableOn); v == config.EnableOn {
|
||||
if v := env.Get("_S3_SCANNER", config.EnableOn); v == config.EnableOn {
|
||||
initDataScanner(GlobalContext, newObject)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -944,7 +944,7 @@ func (s *TestSuiteIAM) SetUpLDAPWithNonNormalizedBaseDN(c *check, serverAddr str
|
||||
}
|
||||
|
||||
const (
|
||||
EnvTestLDAPServer = "_MINIO_LDAP_TEST_SERVER"
|
||||
EnvTestLDAPServer = "_S3_LDAP_TEST_SERVER"
|
||||
)
|
||||
|
||||
func TestIAMWithLDAPServerSuite(t *testing.T) {
|
||||
@@ -2845,8 +2845,8 @@ var testAppParams = OpenIDClientAppParams{
|
||||
}
|
||||
|
||||
const (
|
||||
EnvTestOpenIDServer = "_MINIO_OPENID_TEST_SERVER"
|
||||
EnvTestOpenIDServer2 = "_MINIO_OPENID_TEST_SERVER_2"
|
||||
EnvTestOpenIDServer = "_S3_OPENID_TEST_SERVER"
|
||||
EnvTestOpenIDServer2 = "_S3_OPENID_TEST_SERVER_2"
|
||||
)
|
||||
|
||||
// SetUpOpenIDs - sets up one or more OpenID test servers using the test OpenID
|
||||
|
||||
+3
-3
@@ -138,7 +138,7 @@ func (t *tierMetrics) logFailure(tier string) {
|
||||
}
|
||||
|
||||
var (
|
||||
// {minio_node}_{tier}_{ttlb_seconds_distribution}
|
||||
// {s3_node}_{tier}_{ttlb_seconds_distribution}
|
||||
tierTTLBMD = MetricDescription{
|
||||
Namespace: nodeMetricNamespace,
|
||||
Subsystem: tierSubsystem,
|
||||
@@ -147,7 +147,7 @@ var (
|
||||
Type: gaugeMetric,
|
||||
}
|
||||
|
||||
// {minio_node}_{tier}_{requests_success}
|
||||
// {s3_node}_{tier}_{requests_success}
|
||||
tierRequestsSuccessMD = MetricDescription{
|
||||
Namespace: nodeMetricNamespace,
|
||||
Subsystem: tierSubsystem,
|
||||
@@ -155,7 +155,7 @@ var (
|
||||
Help: "Number of requests to download object from warm tier that were successful",
|
||||
Type: counterMetric,
|
||||
}
|
||||
// {minio_node}_{tier}_{requests_failure}
|
||||
// {s3_node}_{tier}_{requests_failure}
|
||||
tierRequestsFailureMD = MetricDescription{
|
||||
Namespace: nodeMetricNamespace,
|
||||
Subsystem: tierSubsystem,
|
||||
|
||||
+6
-6
@@ -46,7 +46,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
envMinisignPubKey = "MINIO_UPDATE_MINISIGN_PUBKEY"
|
||||
envMinisignPubKey = "S3_UPDATE_MINISIGN_PUBKEY"
|
||||
updateTimeout = 10 * time.Second
|
||||
)
|
||||
|
||||
@@ -143,7 +143,7 @@ func IsDocker() bool {
|
||||
// if none of the files are present we may be running inside
|
||||
// CRI-O, Containerd etc..
|
||||
// Fallback to our container specific ENVs if they are set.
|
||||
return env.IsSet("MINIO_ACCESS_KEY_FILE")
|
||||
return env.IsSet("S3_ACCESS_KEY_FILE")
|
||||
}
|
||||
|
||||
// Log error, as we will not propagate it to caller
|
||||
@@ -220,7 +220,7 @@ func IsSourceBuild() bool {
|
||||
|
||||
// IsPCFTile returns if server is running in PCF
|
||||
func IsPCFTile() bool {
|
||||
return env.Get("MINIO_PCF_TILE_VERSION", "") != ""
|
||||
return env.Get("S3_PCF_TILE_VERSION", "") != ""
|
||||
}
|
||||
|
||||
// DO NOT CHANGE USER AGENT STYLE.
|
||||
@@ -277,18 +277,18 @@ func getUserAgent(mode string) string {
|
||||
uaAppend(" helm-", helmChartVersion)
|
||||
}
|
||||
// In Kubernetes environment, try to fetch the Operator, VSPHERE plugin version
|
||||
opVersion := env.Get("MINIO_OPERATOR_VERSION", "")
|
||||
opVersion := env.Get("S3_OPERATOR_VERSION", "")
|
||||
if opVersion != "" {
|
||||
uaAppend(" operator-", opVersion)
|
||||
}
|
||||
vsphereVersion := env.Get("MINIO_VSPHERE_PLUGIN_VERSION", "")
|
||||
vsphereVersion := env.Get("S3_VSPHERE_PLUGIN_VERSION", "")
|
||||
if vsphereVersion != "" {
|
||||
uaAppend(" vsphere-plugin-", vsphereVersion)
|
||||
}
|
||||
}
|
||||
|
||||
if IsPCFTile() {
|
||||
pcfTileVersion := env.Get("MINIO_PCF_TILE_VERSION", "")
|
||||
pcfTileVersion := env.Get("S3_PCF_TILE_VERSION", "")
|
||||
if pcfTileVersion != "" {
|
||||
uaAppend(" pcf-tile-", pcfTileVersion)
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@ type apiEndpoints struct {
|
||||
STSEndpoint string `xml:"STSEndpoint"`
|
||||
}
|
||||
|
||||
// globalVeeamForceSC is set by the environment variable _MINIO_VEEAM_FORCE_SC
|
||||
// globalVeeamForceSC is set by the environment variable _S3_VEEAM_FORCE_SC
|
||||
// This will override the storage class returned by the storage backend if it is non-standard
|
||||
// and we detect a Veeam client by checking the User Agent.
|
||||
var globalVeeamForceSC = os.Getenv("_MINIO_VEEAM_FORCE_SC")
|
||||
var globalVeeamForceSC = os.Getenv("_S3_VEEAM_FORCE_SC")
|
||||
|
||||
type systemInfo struct {
|
||||
XMLName xml.Name `xml:"SystemInfo" json:"-"`
|
||||
|
||||
+1
-1
@@ -371,7 +371,7 @@ func getDiskInfo(drivePath string) (di disk.Info, rootDrive bool, err error) {
|
||||
|
||||
if !globalIsCICD && !globalIsErasureSD {
|
||||
if globalRootDiskThreshold > 0 {
|
||||
// Use MINIO_ROOTDISK_THRESHOLD_SIZE to figure out if
|
||||
// Use S3_ROOTDISK_THRESHOLD_SIZE to figure out if
|
||||
// this disk is a root disk. treat those disks with
|
||||
// size less than or equal to the threshold as rootDrives.
|
||||
rootDrive = di.Total <= globalRootDiskThreshold
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ function _build() {
|
||||
# go build -trimpath to build the binary.
|
||||
export GOOS=$os
|
||||
export GOARCH=$arch
|
||||
export MINIO_RELEASE=RELEASE
|
||||
export S3_RELEASE=RELEASE
|
||||
LDFLAGS=$(go run buildscripts/gen-ldflags.go)
|
||||
go build -tags kqueue -trimpath --ldflags "${LDFLAGS}" -o ./minio-${arch}.${release}
|
||||
minisign -qQSm ./minio-${arch}.${release} -s "$CRED_DIR/minisign.key" <"$CRED_DIR/minisign-passphrase"
|
||||
|
||||
@@ -9,13 +9,13 @@ if [ "${1}" != "minio" ]; then
|
||||
fi
|
||||
|
||||
docker_switch_user() {
|
||||
if [ -n "${MINIO_USERNAME}" ] && [ -n "${MINIO_GROUPNAME}" ]; then
|
||||
if [ -n "${MINIO_UID}" ] && [ -n "${MINIO_GID}" ]; then
|
||||
chroot --userspec=${MINIO_UID}:${MINIO_GID} / "$@"
|
||||
if [ -n "${S3_USERNAME}" ] && [ -n "${S3_GROUPNAME}" ]; then
|
||||
if [ -n "${S3_UID}" ] && [ -n "${S3_GID}" ]; then
|
||||
chroot --userspec=${S3_UID}:${S3_GID} / "$@"
|
||||
else
|
||||
echo "${MINIO_USERNAME}:x:1000:1000:${MINIO_USERNAME}:/:/sbin/nologin" >>/etc/passwd
|
||||
echo "${MINIO_GROUPNAME}:x:1000" >>/etc/group
|
||||
chroot --userspec=${MINIO_USERNAME}:${MINIO_GROUPNAME} / "$@"
|
||||
echo "${S3_USERNAME}:x:1000:1000:${S3_USERNAME}:/:/sbin/nologin" >>/etc/passwd
|
||||
echo "${S3_GROUPNAME}:x:1000" >>/etc/group
|
||||
chroot --userspec=${S3_USERNAME}:${S3_GROUPNAME} / "$@"
|
||||
fi
|
||||
else
|
||||
exec "$@"
|
||||
|
||||
@@ -28,15 +28,15 @@ catch() {
|
||||
|
||||
catch
|
||||
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=off
|
||||
export MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
export S3_KMS_AUTO_ENCRYPTION=off
|
||||
export S3_PROMETHEUS_AUTH_TYPE=public
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
if [ ! -f ./mc ]; then
|
||||
wget --quiet -O mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
|
||||
+128
-128
@@ -64,7 +64,7 @@ notify_redis publish bucket notifications to Redis datastores
|
||||
>
|
||||
> - '\*' at the end of arg means its mandatory.
|
||||
> - '\*' at the end of the values, means its the default value for the arg.
|
||||
> - When configured using environment variables, the `:name` can be specified using this format `MINIO_NOTIFY_WEBHOOK_ENABLE_<name>`.
|
||||
> - When configured using environment variables, the `:name` can be specified using this format `S3_NOTIFY_WEBHOOK_ENABLE_<name>`.
|
||||
|
||||
## Publish MinIO events via AMQP
|
||||
|
||||
@@ -101,20 +101,20 @@ KEY:
|
||||
notify_amqp[:name] publish bucket notifications to AMQP endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_AMQP_ENABLE* (on|off) enable notify_amqp target, default is 'off'
|
||||
MINIO_NOTIFY_AMQP_URL* (url) AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`
|
||||
MINIO_NOTIFY_AMQP_EXCHANGE (string) name of the AMQP exchange
|
||||
MINIO_NOTIFY_AMQP_EXCHANGE_TYPE (string) AMQP exchange type
|
||||
MINIO_NOTIFY_AMQP_ROUTING_KEY (string) routing key for publishing
|
||||
MINIO_NOTIFY_AMQP_MANDATORY (on|off) quietly ignore undelivered messages when set to 'off', default is 'on'
|
||||
MINIO_NOTIFY_AMQP_DURABLE (on|off) persist queue across broker restarts when set to 'on', default is 'off'
|
||||
MINIO_NOTIFY_AMQP_NO_WAIT (on|off) non-blocking message delivery when set to 'on', default is 'off'
|
||||
MINIO_NOTIFY_AMQP_INTERNAL (on|off) set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges
|
||||
MINIO_NOTIFY_AMQP_AUTO_DELETED (on|off) auto delete queue when set to 'on', when there are no consumers
|
||||
MINIO_NOTIFY_AMQP_DELIVERY_MODE (number) set to '1' for non-persistent or '2' for persistent queue
|
||||
MINIO_NOTIFY_AMQP_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_AMQP_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_AMQP_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_AMQP_ENABLE* (on|off) enable notify_amqp target, default is 'off'
|
||||
S3_NOTIFY_AMQP_URL* (url) AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`
|
||||
S3_NOTIFY_AMQP_EXCHANGE (string) name of the AMQP exchange
|
||||
S3_NOTIFY_AMQP_EXCHANGE_TYPE (string) AMQP exchange type
|
||||
S3_NOTIFY_AMQP_ROUTING_KEY (string) routing key for publishing
|
||||
S3_NOTIFY_AMQP_MANDATORY (on|off) quietly ignore undelivered messages when set to 'off', default is 'on'
|
||||
S3_NOTIFY_AMQP_DURABLE (on|off) persist queue across broker restarts when set to 'on', default is 'off'
|
||||
S3_NOTIFY_AMQP_NO_WAIT (on|off) non-blocking message delivery when set to 'on', default is 'off'
|
||||
S3_NOTIFY_AMQP_INTERNAL (on|off) set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges
|
||||
S3_NOTIFY_AMQP_AUTO_DELETED (on|off) auto delete queue when set to 'on', when there are no consumers
|
||||
S3_NOTIFY_AMQP_DELIVERY_MODE (number) set to '1' for non-persistent or '2' for persistent queue
|
||||
S3_NOTIFY_AMQP_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_AMQP_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_AMQP_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
MinIO supports persistent event store. The persistent store will backup events when the AMQP broker goes offline and replays it when the broker comes back online. The event store can be configured by setting the directory path in `queue_dir` field and the maximum limit of events in the queue_dir in `queue_limit` field. For eg, the `queue_dir` can be `/home/events` and `queue_limit` can be `1000`. By default, the `queue_limit` is set to 100000.
|
||||
@@ -235,17 +235,17 @@ KEY:
|
||||
notify_mqtt[:name] publish bucket notifications to MQTT endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_MQTT_ENABLE* (on|off) enable notify_mqtt target, default is 'off'
|
||||
MINIO_NOTIFY_MQTT_BROKER* (uri) MQTT server endpoint e.g. `tcp://localhost:1883`
|
||||
MINIO_NOTIFY_MQTT_TOPIC* (string) name of the MQTT topic to publish
|
||||
MINIO_NOTIFY_MQTT_USERNAME (string) MQTT username
|
||||
MINIO_NOTIFY_MQTT_PASSWORD (string) MQTT password
|
||||
MINIO_NOTIFY_MQTT_QOS (number) set the quality of service priority, defaults to '0'
|
||||
MINIO_NOTIFY_MQTT_KEEP_ALIVE_INTERVAL (duration) keep-alive interval for MQTT connections in s,m,h,d
|
||||
MINIO_NOTIFY_MQTT_RECONNECT_INTERVAL (duration) reconnect interval for MQTT connections in s,m,h,d
|
||||
MINIO_NOTIFY_MQTT_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_MQTT_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_MQTT_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_MQTT_ENABLE* (on|off) enable notify_mqtt target, default is 'off'
|
||||
S3_NOTIFY_MQTT_BROKER* (uri) MQTT server endpoint e.g. `tcp://localhost:1883`
|
||||
S3_NOTIFY_MQTT_TOPIC* (string) name of the MQTT topic to publish
|
||||
S3_NOTIFY_MQTT_USERNAME (string) MQTT username
|
||||
S3_NOTIFY_MQTT_PASSWORD (string) MQTT password
|
||||
S3_NOTIFY_MQTT_QOS (number) set the quality of service priority, defaults to '0'
|
||||
S3_NOTIFY_MQTT_KEEP_ALIVE_INTERVAL (duration) keep-alive interval for MQTT connections in s,m,h,d
|
||||
S3_NOTIFY_MQTT_RECONNECT_INTERVAL (duration) reconnect interval for MQTT connections in s,m,h,d
|
||||
S3_NOTIFY_MQTT_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_MQTT_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_MQTT_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
MinIO supports persistent event store. The persistent store will backup events when the MQTT broker goes offline and replays it when the broker comes back online. The event store can be configured by setting the directory path in `queue_dir` field and the maximum limit of events in the queue_dir in `queue_limit` field. For eg, the `queue_dir` can be `/home/events` and `queue_limit` can be `1000`. By default, the `queue_limit` is set to 100000.
|
||||
@@ -368,15 +368,15 @@ KEY:
|
||||
notify_elasticsearch[:name] publish bucket notifications to Elasticsearch endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_ELASTICSEARCH_ENABLE* (on|off) enable notify_elasticsearch target, default is 'off'
|
||||
MINIO_NOTIFY_ELASTICSEARCH_URL* (url) Elasticsearch server's address, with optional authentication info
|
||||
MINIO_NOTIFY_ELASTICSEARCH_INDEX* (string) Elasticsearch index to store/update events, index is auto-created
|
||||
MINIO_NOTIFY_ELASTICSEARCH_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_ELASTICSEARCH_USERNAME (string) username for Elasticsearch basic-auth
|
||||
MINIO_NOTIFY_ELASTICSEARCH_PASSWORD (string) password for Elasticsearch basic-auth
|
||||
MINIO_NOTIFY_ELASTICSEARCH_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_ELASTICSEARCH_ENABLE* (on|off) enable notify_elasticsearch target, default is 'off'
|
||||
S3_NOTIFY_ELASTICSEARCH_URL* (url) Elasticsearch server's address, with optional authentication info
|
||||
S3_NOTIFY_ELASTICSEARCH_INDEX* (string) Elasticsearch index to store/update events, index is auto-created
|
||||
S3_NOTIFY_ELASTICSEARCH_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
S3_NOTIFY_ELASTICSEARCH_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_ELASTICSEARCH_USERNAME (string) username for Elasticsearch basic-auth
|
||||
S3_NOTIFY_ELASTICSEARCH_PASSWORD (string) password for Elasticsearch basic-auth
|
||||
S3_NOTIFY_ELASTICSEARCH_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
For example: `http://localhost:9200` or with authentication info `http://elastic:MagicWord@127.0.0.1:9200`.
|
||||
@@ -395,7 +395,7 @@ notify_elasticsearch:1 queue_limit="0" url="" format="namespace" index="" queue
|
||||
Use `mc admin config set` command to update the configuration for the deployment. Restart the MinIO server to put the changes into effect. The server will print a line like `SQS ARNs: arn:minio:sqs::1:elasticsearch` at start-up if there were no errors.
|
||||
|
||||
```sh
|
||||
mc admin config set myminio notify_elasticsearch:1 queue_limit="0" url="http://127.0.0.1:9200" format="namespace" index="minio_events" queue_dir="" username="" password=""
|
||||
mc admin config set myminio notify_elasticsearch:1 queue_limit="0" url="http://127.0.0.1:9200" format="namespace" index="s3_events" queue_dir="" username="" password=""
|
||||
```
|
||||
|
||||
Note that, you can add as many Elasticsearch server endpoint configurations as needed by providing an identifier (like "1" in the example above) for the Elasticsearch instance and an object of per-server configuration parameters.
|
||||
@@ -423,10 +423,10 @@ Upload a JPEG image into `images` bucket.
|
||||
mc cp myphoto.jpg myminio/images
|
||||
```
|
||||
|
||||
Use curl to view contents of `minio_events` index.
|
||||
Use curl to view contents of `s3_events` index.
|
||||
|
||||
```
|
||||
$ curl "http://localhost:9200/minio_events/_search?pretty=true"
|
||||
$ curl "http://localhost:9200/s3_events/_search?pretty=true"
|
||||
{
|
||||
"took" : 40,
|
||||
"timed_out" : false,
|
||||
@@ -440,7 +440,7 @@ $ curl "http://localhost:9200/minio_events/_search?pretty=true"
|
||||
"max_score" : 1.0,
|
||||
"hits" : [
|
||||
{
|
||||
"_index" : "minio_events",
|
||||
"_index" : "s3_events",
|
||||
"_type" : "event",
|
||||
"_id" : "images/myphoto.jpg",
|
||||
"_score" : 1.0,
|
||||
@@ -534,13 +534,13 @@ KEY:
|
||||
notify_redis[:name] publish bucket notifications to Redis datastores
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_REDIS_ENABLE* (on|off) enable notify_redis target, default is 'off'
|
||||
MINIO_NOTIFY_REDIS_KEY* (string) Redis key to store/update events, key is auto-created
|
||||
MINIO_NOTIFY_REDIS_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
MINIO_NOTIFY_REDIS_PASSWORD (string) Redis server password
|
||||
MINIO_NOTIFY_REDIS_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_REDIS_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_REDIS_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_REDIS_ENABLE* (on|off) enable notify_redis target, default is 'off'
|
||||
S3_NOTIFY_REDIS_KEY* (string) Redis key to store/update events, key is auto-created
|
||||
S3_NOTIFY_REDIS_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
S3_NOTIFY_REDIS_PASSWORD (string) Redis server password
|
||||
S3_NOTIFY_REDIS_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_REDIS_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_REDIS_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
MinIO supports persistent event store. The persistent store will backup events when the Redis broker goes offline and replays it when the broker comes back online. The event store can be configured by setting the directory path in `queue_dir` field and the maximum limit of events in the queue_dir in `queue_limit` field. For eg, the `queue_dir` can be `/home/events` and `queue_limit` can be `1000`. By default, the `queue_limit` is set to 100000.
|
||||
@@ -597,12 +597,12 @@ In the previous terminal, you will now see the operation that MinIO performs on
|
||||
127.0.0.1:6379> monitor
|
||||
OK
|
||||
1490686879.650649 [0 172.17.0.1:44710] "PING"
|
||||
1490686879.651061 [0 172.17.0.1:44710] "HSET" "minio_events" "images/myphoto.jpg" "{\"Records\":[{\"eventVersion\":\"2.0\",\"eventSource\":\"minio:s3\",\"awsRegion\":\"\",\"eventTime\":\"2017-03-28T07:41:19Z\",\"eventName\":\"s3:ObjectCreated:Put\",\"userIdentity\":{\"principalId\":\"minio\"},\"requestParameters\":{\"sourceIPAddress\":\"127.0.0.1:52234\"},\"responseElements\":{\"x-amz-request-id\":\"14AFFBD1ACE5F632\",\"x-minio-origin-endpoint\":\"http://192.168.86.115:9000\"},\"s3\":{\"s3SchemaVersion\":\"1.0\",\"configurationId\":\"Config\",\"bucket\":{\"name\":\"images\",\"ownerIdentity\":{\"principalId\":\"minio\"},\"arn\":\"arn:aws:s3:::images\"},\"object\":{\"key\":\"myphoto.jpg\",\"size\":2586,\"eTag\":\"5d284463f9da279f060f0ea4d11af098\",\"sequencer\":\"14AFFBD1ACE5F632\"}},\"source\":{\"host\":\"127.0.0.1\",\"port\":\"52234\",\"userAgent\":\"MinIO (linux; amd64) minio-go/2.0.3 mc/2017-02-15T17:57:25Z\"}}]}"
|
||||
1490686879.651061 [0 172.17.0.1:44710] "HSET" "s3_events" "images/myphoto.jpg" "{\"Records\":[{\"eventVersion\":\"2.0\",\"eventSource\":\"minio:s3\",\"awsRegion\":\"\",\"eventTime\":\"2017-03-28T07:41:19Z\",\"eventName\":\"s3:ObjectCreated:Put\",\"userIdentity\":{\"principalId\":\"minio\"},\"requestParameters\":{\"sourceIPAddress\":\"127.0.0.1:52234\"},\"responseElements\":{\"x-amz-request-id\":\"14AFFBD1ACE5F632\",\"x-minio-origin-endpoint\":\"http://192.168.86.115:9000\"},\"s3\":{\"s3SchemaVersion\":\"1.0\",\"configurationId\":\"Config\",\"bucket\":{\"name\":\"images\",\"ownerIdentity\":{\"principalId\":\"minio\"},\"arn\":\"arn:aws:s3:::images\"},\"object\":{\"key\":\"myphoto.jpg\",\"size\":2586,\"eTag\":\"5d284463f9da279f060f0ea4d11af098\",\"sequencer\":\"14AFFBD1ACE5F632\"}},\"source\":{\"host\":\"127.0.0.1\",\"port\":\"52234\",\"userAgent\":\"MinIO (linux; amd64) minio-go/2.0.3 mc/2017-02-15T17:57:25Z\"}}]}"
|
||||
```
|
||||
|
||||
Here we see that MinIO performed `HSET` on `minio_events` key.
|
||||
Here we see that MinIO performed `HSET` on `s3_events` key.
|
||||
|
||||
In case, `access` format was used, then `minio_events` would be a list, and the MinIO server would have performed an `RPUSH` to append to the list. A consumer of this list would ideally use `BLPOP` to remove list items from the left-end of the list.
|
||||
In case, `access` format was used, then `s3_events` would be a list, and the MinIO server would have performed an `RPUSH` to append to the list. A consumer of this list would ideally use `BLPOP` to remove list items from the left-end of the list.
|
||||
|
||||
## Publish MinIO events via NATS
|
||||
|
||||
@@ -644,25 +644,25 @@ KEY:
|
||||
notify_nats[:name] publish bucket notifications to NATS endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_NATS_ENABLE* (on|off) enable notify_nats target, default is 'off'
|
||||
MINIO_NOTIFY_NATS_ADDRESS* (address) NATS server address e.g. '0.0.0.0:4222'
|
||||
MINIO_NOTIFY_NATS_SUBJECT* (string) NATS subscription subject
|
||||
MINIO_NOTIFY_NATS_USERNAME (string) NATS username
|
||||
MINIO_NOTIFY_NATS_PASSWORD (string) NATS password
|
||||
MINIO_NOTIFY_NATS_TOKEN (string) NATS token
|
||||
MINIO_NOTIFY_NATS_TLS (on|off) set to 'on' to enable TLS
|
||||
MINIO_NOTIFY_NATS_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
MINIO_NOTIFY_NATS_PING_INTERVAL (duration) client ping commands interval in s,m,h,d. Disabled by default
|
||||
MINIO_NOTIFY_NATS_STREAMING (on|off) set to 'on', to use streaming NATS server
|
||||
MINIO_NOTIFY_NATS_STREAMING_ASYNC (on|off) set to 'on', to enable asynchronous publish
|
||||
MINIO_NOTIFY_NATS_STREAMING_MAX_PUB_ACKS_IN_FLIGHT (number) number of messages to publish without waiting for ACKs
|
||||
MINIO_NOTIFY_NATS_STREAMING_CLUSTER_ID (string) unique ID for NATS streaming cluster
|
||||
MINIO_NOTIFY_NATS_CERT_AUTHORITY (string) path to certificate chain of the target NATS server
|
||||
MINIO_NOTIFY_NATS_CLIENT_CERT (string) client cert for NATS mTLS auth
|
||||
MINIO_NOTIFY_NATS_CLIENT_KEY (string) client cert key for NATS mTLS auth
|
||||
MINIO_NOTIFY_NATS_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_NATS_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_NATS_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_NATS_ENABLE* (on|off) enable notify_nats target, default is 'off'
|
||||
S3_NOTIFY_NATS_ADDRESS* (address) NATS server address e.g. '0.0.0.0:4222'
|
||||
S3_NOTIFY_NATS_SUBJECT* (string) NATS subscription subject
|
||||
S3_NOTIFY_NATS_USERNAME (string) NATS username
|
||||
S3_NOTIFY_NATS_PASSWORD (string) NATS password
|
||||
S3_NOTIFY_NATS_TOKEN (string) NATS token
|
||||
S3_NOTIFY_NATS_TLS (on|off) set to 'on' to enable TLS
|
||||
S3_NOTIFY_NATS_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
S3_NOTIFY_NATS_PING_INTERVAL (duration) client ping commands interval in s,m,h,d. Disabled by default
|
||||
S3_NOTIFY_NATS_STREAMING (on|off) set to 'on', to use streaming NATS server
|
||||
S3_NOTIFY_NATS_STREAMING_ASYNC (on|off) set to 'on', to enable asynchronous publish
|
||||
S3_NOTIFY_NATS_STREAMING_MAX_PUB_ACKS_IN_FLIGHT (number) number of messages to publish without waiting for ACKs
|
||||
S3_NOTIFY_NATS_STREAMING_CLUSTER_ID (string) unique ID for NATS streaming cluster
|
||||
S3_NOTIFY_NATS_CERT_AUTHORITY (string) path to certificate chain of the target NATS server
|
||||
S3_NOTIFY_NATS_CLIENT_CERT (string) client cert for NATS mTLS auth
|
||||
S3_NOTIFY_NATS_CLIENT_KEY (string) client cert key for NATS mTLS auth
|
||||
S3_NOTIFY_NATS_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_NATS_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_NATS_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
To update the configuration, use `mc admin config get` command to get the current configuration file for the minio deployment.
|
||||
@@ -847,7 +847,7 @@ Received a message: {"EventType":"s3:ObjectCreated:Put","Key":"images/myphoto.jp
|
||||
> an error message will be shown on the console upon server upgrade/restart, make sure to follow the above
|
||||
> instructions appropriately. For further questions please join our <https://slack.min.io>
|
||||
|
||||
Install [PostgreSQL](https://www.postgresql.org/) database server. For illustrative purposes, we have set the "postgres" user password as `password` and created a database called `minio_events` to store the events.
|
||||
Install [PostgreSQL](https://www.postgresql.org/) database server. For illustrative purposes, we have set the "postgres" user password as `password` and created a database called `s3_events` to store the events.
|
||||
|
||||
This notification target supports two formats: _namespace_ and _access_.
|
||||
|
||||
@@ -870,7 +870,7 @@ KEY:
|
||||
notify_postgres[:name] publish bucket notifications to Postgres databases
|
||||
|
||||
ARGS:
|
||||
connection_string* (string) Postgres server connection-string e.g. "host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable"
|
||||
connection_string* (string) Postgres server connection-string e.g. "host=localhost port=5432 dbname=s3_events user=postgres password=password sslmode=disable"
|
||||
table* (string) DB table name to store/update events, table is auto-created
|
||||
format* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
queue_dir (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
@@ -886,17 +886,17 @@ KEY:
|
||||
notify_postgres[:name] publish bucket notifications to Postgres databases
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_POSTGRES_ENABLE* (on|off) enable notify_postgres target, default is 'off'
|
||||
MINIO_NOTIFY_POSTGRES_CONNECTION_STRING* (string) Postgres server connection-string e.g. "host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable"
|
||||
MINIO_NOTIFY_POSTGRES_TABLE* (string) DB table name to store/update events, table is auto-created
|
||||
MINIO_NOTIFY_POSTGRES_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
MINIO_NOTIFY_POSTGRES_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_POSTGRES_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_POSTGRES_COMMENT (sentence) optionally add a comment to this setting
|
||||
MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS (number) maximum number of open connections to the database, defaults to '2'
|
||||
S3_NOTIFY_POSTGRES_ENABLE* (on|off) enable notify_postgres target, default is 'off'
|
||||
S3_NOTIFY_POSTGRES_CONNECTION_STRING* (string) Postgres server connection-string e.g. "host=localhost port=5432 dbname=s3_events user=postgres password=password sslmode=disable"
|
||||
S3_NOTIFY_POSTGRES_TABLE* (string) DB table name to store/update events, table is auto-created
|
||||
S3_NOTIFY_POSTGRES_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
S3_NOTIFY_POSTGRES_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_POSTGRES_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_POSTGRES_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS (number) maximum number of open connections to the database, defaults to '2'
|
||||
```
|
||||
|
||||
> NOTE: If the `max_open_connections` key or the environment variable `MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS` is set to `0`, There will be no limit set on the number of
|
||||
> NOTE: If the `max_open_connections` key or the environment variable `S3_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS` is set to `0`, There will be no limit set on the number of
|
||||
> open connections to the database. This setting is generally NOT recommended as the behavior may be inconsistent during recursive deletes in `namespace` format.
|
||||
|
||||
MinIO supports persistent event store. The persistent store will backup events when the PostgreSQL connection goes offline and replays it when the broker comes back online. The event store can be configured by setting the directory path in `queue_dir` field and the maximum limit of events in the queue_dir in `queue_limit` field. For eg, the `queue_dir` can be `/home/events` and `queue_limit` can be `1000`. By default, the `queue_limit` is set to 100000.
|
||||
@@ -912,7 +912,7 @@ notify_postgres:1 queue_dir="" connection_string="" queue_limit="0" table="" fo
|
||||
Use `mc admin config set` command to update the configuration for the deployment. Restart the MinIO server to put the changes into effect. The server will print a line like `SQS ARNs: arn:minio:sqs::1:postgresql` at start-up if there were no errors.
|
||||
|
||||
```sh
|
||||
mc admin config set myminio notify_postgres:1 connection_string="host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable" table="bucketevents" format="namespace"
|
||||
mc admin config set myminio notify_postgres:1 connection_string="host=localhost port=5432 dbname=s3_events user=postgres password=password sslmode=disable" table="bucketevents" format="namespace"
|
||||
```
|
||||
|
||||
Note that, you can add as many PostgreSQL server endpoint configurations as needed by providing an identifier (like "1" in the example above) for the PostgreSQL instance and an object of per-server configuration parameters.
|
||||
@@ -947,8 +947,8 @@ mc cp myphoto.jpg myminio/images
|
||||
Open PostgreSQL terminal to list the rows in the `bucketevents` table.
|
||||
|
||||
```
|
||||
$ psql -h 127.0.0.1 -U postgres -d minio_events
|
||||
minio_events=# select * from bucketevents;
|
||||
$ psql -h 127.0.0.1 -U postgres -d s3_events
|
||||
s3_events=# select * from bucketevents;
|
||||
|
||||
key | value
|
||||
--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -1019,17 +1019,17 @@ KEY:
|
||||
notify_mysql[:name] publish bucket notifications to MySQL databases
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_MYSQL_ENABLE* (on|off) enable notify_mysql target, default is 'off'
|
||||
MINIO_NOTIFY_MYSQL_DSN_STRING* (string) MySQL data-source-name connection string e.g. "<user>:<password>@tcp(<host>:<port>)/<database>"
|
||||
MINIO_NOTIFY_MYSQL_TABLE* (string) DB table name to store/update events, table is auto-created
|
||||
MINIO_NOTIFY_MYSQL_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
MINIO_NOTIFY_MYSQL_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_MYSQL_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS (number) maximum number of open connections to the database, defaults to '2'
|
||||
MINIO_NOTIFY_MYSQL_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_MYSQL_ENABLE* (on|off) enable notify_mysql target, default is 'off'
|
||||
S3_NOTIFY_MYSQL_DSN_STRING* (string) MySQL data-source-name connection string e.g. "<user>:<password>@tcp(<host>:<port>)/<database>"
|
||||
S3_NOTIFY_MYSQL_TABLE* (string) DB table name to store/update events, table is auto-created
|
||||
S3_NOTIFY_MYSQL_FORMAT* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'
|
||||
S3_NOTIFY_MYSQL_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_MYSQL_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS (number) maximum number of open connections to the database, defaults to '2'
|
||||
S3_NOTIFY_MYSQL_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
> NOTE: If the `max_open_connections` key or the environment variable `MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS` is set to `0`, There will be no limit set on the number of
|
||||
> NOTE: If the `max_open_connections` key or the environment variable `S3_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS` is set to `0`, There will be no limit set on the number of
|
||||
> open connections to the database. This setting is generally NOT recommended as the behavior may be inconsistent during recursive deletes in `namespace` format.
|
||||
|
||||
`dsn_string` is required and is of form `"<user>:<password>@tcp(<host>:<port>)/<database>"`
|
||||
@@ -1046,7 +1046,7 @@ notify_mysql:myinstance enable=off format=namespace host= port= username= passwo
|
||||
Use `mc admin config set` command to update MySQL notification configuration for the deployment with `dsn_string` parameter:
|
||||
|
||||
```sh
|
||||
mc admin config set myminio notify_mysql:myinstance table="minio_images" dsn_string="root:xxxx@tcp(172.17.0.1:3306)/miniodb"
|
||||
mc admin config set myminio notify_mysql:myinstance table="s3_images" dsn_string="root:xxxx@tcp(172.17.0.1:3306)/miniodb"
|
||||
```
|
||||
|
||||
Note that, you can add as many MySQL server endpoint configurations as needed by providing an identifier (like "myinstance" in the example above) for each MySQL instance desired.
|
||||
@@ -1079,11 +1079,11 @@ Open another terminal and upload a JPEG image into `images` bucket:
|
||||
mc cp myphoto.jpg myminio/images
|
||||
```
|
||||
|
||||
Open MySQL terminal and list the rows in the `minio_images` table.
|
||||
Open MySQL terminal and list the rows in the `s3_images` table.
|
||||
|
||||
```
|
||||
$ mysql -h 172.17.0.1 -P 3306 -u root -p miniodb
|
||||
mysql> select * from minio_images;
|
||||
mysql> select * from s3_images;
|
||||
+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| key_name | value |
|
||||
+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -1134,24 +1134,24 @@ KEY:
|
||||
notify_kafka[:name] publish bucket notifications to Kafka endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_KAFKA_ENABLE* (on|off) enable notify_kafka target, default is 'off'
|
||||
MINIO_NOTIFY_KAFKA_BROKERS* (csv) comma separated list of Kafka broker addresses
|
||||
MINIO_NOTIFY_KAFKA_TOPIC (string) Kafka topic used for bucket notifications
|
||||
MINIO_NOTIFY_KAFKA_SASL_USERNAME (string) username for SASL/PLAIN or SASL/SCRAM authentication
|
||||
MINIO_NOTIFY_KAFKA_SASL_PASSWORD (string) password for SASL/PLAIN or SASL/SCRAM authentication
|
||||
MINIO_NOTIFY_KAFKA_SASL_MECHANISM (plain*|sha256|sha512) sasl authentication mechanism, default 'plain'
|
||||
MINIO_NOTIFY_KAFKA_TLS_CLIENT_AUTH (string) clientAuth determines the Kafka server's policy for TLS client auth
|
||||
MINIO_NOTIFY_KAFKA_SASL (on|off) set to 'on' to enable SASL authentication
|
||||
MINIO_NOTIFY_KAFKA_TLS (on|off) set to 'on' to enable TLS
|
||||
MINIO_NOTIFY_KAFKA_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
MINIO_NOTIFY_KAFKA_CLIENT_TLS_CERT (path) path to client certificate for mTLS auth
|
||||
MINIO_NOTIFY_KAFKA_CLIENT_TLS_KEY (path) path to client key for mTLS auth
|
||||
MINIO_NOTIFY_KAFKA_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_KAFKA_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_KAFKA_COMMENT (sentence) optionally add a comment to this setting
|
||||
MINIO_NOTIFY_KAFKA_VERSION (string) specify the version of the Kafka cluster e.g. '2.2.0'
|
||||
MINIO_NOTIFY_KAFKA_PRODUCER_COMPRESSION_CODEC (none|snappy|gzip|lz4|zstd) compression codec for producer messages
|
||||
MINIO_NOTIFY_KAFKA_PRODUCER_COMPRESSION_LEVEL (number) compression level for producer messages, defaults to '0'
|
||||
S3_NOTIFY_KAFKA_ENABLE* (on|off) enable notify_kafka target, default is 'off'
|
||||
S3_NOTIFY_KAFKA_BROKERS* (csv) comma separated list of Kafka broker addresses
|
||||
S3_NOTIFY_KAFKA_TOPIC (string) Kafka topic used for bucket notifications
|
||||
S3_NOTIFY_KAFKA_SASL_USERNAME (string) username for SASL/PLAIN or SASL/SCRAM authentication
|
||||
S3_NOTIFY_KAFKA_SASL_PASSWORD (string) password for SASL/PLAIN or SASL/SCRAM authentication
|
||||
S3_NOTIFY_KAFKA_SASL_MECHANISM (plain*|sha256|sha512) sasl authentication mechanism, default 'plain'
|
||||
S3_NOTIFY_KAFKA_TLS_CLIENT_AUTH (string) clientAuth determines the Kafka server's policy for TLS client auth
|
||||
S3_NOTIFY_KAFKA_SASL (on|off) set to 'on' to enable SASL authentication
|
||||
S3_NOTIFY_KAFKA_TLS (on|off) set to 'on' to enable TLS
|
||||
S3_NOTIFY_KAFKA_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
S3_NOTIFY_KAFKA_CLIENT_TLS_CERT (path) path to client certificate for mTLS auth
|
||||
S3_NOTIFY_KAFKA_CLIENT_TLS_KEY (path) path to client key for mTLS auth
|
||||
S3_NOTIFY_KAFKA_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_KAFKA_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_KAFKA_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_KAFKA_VERSION (string) specify the version of the Kafka cluster e.g. '2.2.0'
|
||||
S3_NOTIFY_KAFKA_PRODUCER_COMPRESSION_CODEC (none|snappy|gzip|lz4|zstd) compression codec for producer messages
|
||||
S3_NOTIFY_KAFKA_PRODUCER_COMPRESSION_LEVEL (number) compression level for producer messages, defaults to '0'
|
||||
```
|
||||
|
||||
To update the configuration, use `mc admin config get` command to get the current configuration.
|
||||
@@ -1280,14 +1280,14 @@ KEY:
|
||||
notify_webhook[:name] publish bucket notifications to webhook endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_WEBHOOK_ENABLE* (on|off) enable notify_webhook target, default is 'off'
|
||||
MINIO_NOTIFY_WEBHOOK_ENDPOINT* (url) webhook server endpoint e.g. http://localhost:8080/minio/events
|
||||
MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN (string) opaque string or JWT authorization token
|
||||
MINIO_NOTIFY_WEBHOOK_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_WEBHOOK_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_WEBHOOK_COMMENT (sentence) optionally add a comment to this setting
|
||||
MINIO_NOTIFY_WEBHOOK_CLIENT_CERT (string) client cert for Webhook mTLS auth
|
||||
MINIO_NOTIFY_WEBHOOK_CLIENT_KEY (string) client cert key for Webhook mTLS auth
|
||||
S3_NOTIFY_WEBHOOK_ENABLE* (on|off) enable notify_webhook target, default is 'off'
|
||||
S3_NOTIFY_WEBHOOK_ENDPOINT* (url) webhook server endpoint e.g. http://localhost:8080/minio/events
|
||||
S3_NOTIFY_WEBHOOK_AUTH_TOKEN (string) opaque string or JWT authorization token
|
||||
S3_NOTIFY_WEBHOOK_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_WEBHOOK_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_WEBHOOK_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_WEBHOOK_CLIENT_CERT (string) client cert for Webhook mTLS auth
|
||||
S3_NOTIFY_WEBHOOK_CLIENT_KEY (string) client cert key for Webhook mTLS auth
|
||||
```
|
||||
|
||||
```sh
|
||||
@@ -1388,14 +1388,14 @@ KEY:
|
||||
notify_nsq[:name] publish bucket notifications to NSQ endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_NOTIFY_NSQ_ENABLE* (on|off) enable notify_nsq target, default is 'off'
|
||||
MINIO_NOTIFY_NSQ_NSQD_ADDRESS* (address) NSQ server address e.g. '127.0.0.1:4150'
|
||||
MINIO_NOTIFY_NSQ_TOPIC* (string) NSQ topic
|
||||
MINIO_NOTIFY_NSQ_TLS (on|off) set to 'on' to enable TLS
|
||||
MINIO_NOTIFY_NSQ_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
MINIO_NOTIFY_NSQ_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
MINIO_NOTIFY_NSQ_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
MINIO_NOTIFY_NSQ_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_NOTIFY_NSQ_ENABLE* (on|off) enable notify_nsq target, default is 'off'
|
||||
S3_NOTIFY_NSQ_NSQD_ADDRESS* (address) NSQ server address e.g. '127.0.0.1:4150'
|
||||
S3_NOTIFY_NSQ_TOPIC* (string) NSQ topic
|
||||
S3_NOTIFY_NSQ_TLS (on|off) set to 'on' to enable TLS
|
||||
S3_NOTIFY_NSQ_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
S3_NOTIFY_NSQ_QUEUE_DIR (path) staging dir for undelivered messages e.g. '/home/events'
|
||||
S3_NOTIFY_NSQ_QUEUE_LIMIT (number) maximum limit for undelivered messages, defaults to '100000'
|
||||
S3_NOTIFY_NSQ_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
```sh
|
||||
|
||||
@@ -31,17 +31,17 @@ catch() {
|
||||
catch
|
||||
|
||||
set -e
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export MINIO_ROOT_USER="minio"
|
||||
export MINIO_ROOT_PASSWORD="minio123"
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=off
|
||||
export MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
export S3_ROOT_USER="minio"
|
||||
export S3_ROOT_PASSWORD="minio123"
|
||||
export S3_KMS_AUTO_ENCRYPTION=off
|
||||
export S3_PROMETHEUS_AUTH_TYPE=public
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
if [ ! -f ./mc ]; then
|
||||
wget --quiet -O mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
@@ -50,9 +50,9 @@ fi
|
||||
|
||||
mkdir -p /tmp/xl/1/ /tmp/xl/2/
|
||||
|
||||
export MINIO_KMS_SECRET_KEY="my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
export MINIO_ROOT_USER="minioadmin"
|
||||
export MINIO_ROOT_PASSWORD="minioadmin"
|
||||
export S3_KMS_SECRET_KEY="my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
export S3_ROOT_USER="minioadmin"
|
||||
export S3_ROOT_PASSWORD="minioadmin"
|
||||
|
||||
./minio server --address ":9001" /tmp/xl/1/{1...4}/ 2>&1 >/tmp/dc1.log &
|
||||
pid1=$!
|
||||
|
||||
@@ -32,17 +32,17 @@ catch() {
|
||||
catch
|
||||
|
||||
set -e
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export MINIO_ROOT_USER="minio"
|
||||
export MINIO_ROOT_PASSWORD="minio123"
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=off
|
||||
export MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
export S3_ROOT_USER="minio"
|
||||
export S3_ROOT_PASSWORD="minio123"
|
||||
export S3_KMS_AUTO_ENCRYPTION=off
|
||||
export S3_PROMETHEUS_AUTH_TYPE=public
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
if [ ! -f ./mc ]; then
|
||||
wget --quiet -O mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
|
||||
@@ -34,17 +34,17 @@ catch() {
|
||||
catch
|
||||
|
||||
set -e
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export MINIO_ROOT_USER="minio"
|
||||
export MINIO_ROOT_PASSWORD="minio123"
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=off
|
||||
export MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
export S3_ROOT_USER="minio"
|
||||
export S3_ROOT_PASSWORD="minio123"
|
||||
export S3_KMS_AUTO_ENCRYPTION=off
|
||||
export S3_PROMETHEUS_AUTH_TYPE=public
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
go install -v github.com/minio/mc@master
|
||||
cp -a $(go env GOPATH)/bin/mc ./mc
|
||||
|
||||
@@ -32,17 +32,17 @@ catch() {
|
||||
catch
|
||||
|
||||
set -e
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export MINIO_ROOT_USER="minio"
|
||||
export MINIO_ROOT_PASSWORD="minio123"
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=off
|
||||
export MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
export S3_ROOT_USER="minio"
|
||||
export S3_ROOT_PASSWORD="minio123"
|
||||
export S3_KMS_AUTO_ENCRYPTION=off
|
||||
export S3_PROMETHEUS_AUTH_TYPE=public
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
if [ ! -f ./mc ]; then
|
||||
wget --quiet -O mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
|
||||
@@ -14,7 +14,7 @@ killall -9 minio || true
|
||||
rm -rf /tmp/xl/
|
||||
mkdir -p /tmp/xl/1/ /tmp/xl/2/
|
||||
|
||||
export MINIO_KMS_SECRET_KEY="my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
export S3_KMS_SECRET_KEY="my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw="
|
||||
|
||||
NODES=4
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ cleanup() {
|
||||
|
||||
cleanup
|
||||
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
|
||||
make install-race
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ See <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html>
|
||||
- New objects inherit the retention settings of the bucket object lock configuration automatically
|
||||
- Retention headers can be optionally set while uploading objects
|
||||
- Once objects are uploaded PutObjectRetention API can be called to change retention settings
|
||||
- *MINIO_NTP_SERVER* environment variable can be set to remote NTP server endpoint if system time is not desired for setting retention dates.
|
||||
- *S3_NTP_SERVER* environment variable can be set to remote NTP server endpoint if system time is not desired for setting retention dates.
|
||||
|
||||
## Explore Further
|
||||
|
||||
|
||||
@@ -28,15 +28,15 @@ catch() {
|
||||
catch
|
||||
|
||||
set -e
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_BROWSER=off
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=off
|
||||
export MINIO_PROMETHEUS_AUTH_TYPE=public
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
export S3_CI_CD=1
|
||||
export S3_BROWSER=off
|
||||
export S3_KMS_AUTO_ENCRYPTION=off
|
||||
export S3_PROMETHEUS_AUTH_TYPE=public
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
if [ ! -f ./mc ]; then
|
||||
wget -O mc https://dl.minio.io/client/mc/release/linux-amd64/mc &&
|
||||
|
||||
@@ -54,17 +54,17 @@ The compression settings may also be set through environment variables.
|
||||
When set, environment variables override the defined `compress` config settings in the server config.
|
||||
|
||||
```bash
|
||||
export MINIO_COMPRESSION_ENABLE="on"
|
||||
export MINIO_COMPRESSION_EXTENSIONS=".txt,.log,.csv,.json,.tar,.xml,.bin"
|
||||
export MINIO_COMPRESSION_MIME_TYPES="text/*,application/json,application/xml"
|
||||
export S3_COMPRESSION_ENABLE="on"
|
||||
export S3_COMPRESSION_EXTENSIONS=".txt,.log,.csv,.json,.tar,.xml,.bin"
|
||||
export S3_COMPRESSION_MIME_TYPES="text/*,application/json,application/xml"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> To enable compression for all content when using environment variables, set either or both of the extensions and MIME types to `*` instead of an empty string:
|
||||
> ```bash
|
||||
> export MINIO_COMPRESSION_ENABLE="on"
|
||||
> export MINIO_COMPRESSION_EXTENSIONS="*"
|
||||
> export MINIO_COMPRESSION_MIME_TYPES="*"
|
||||
> export S3_COMPRESSION_ENABLE="on"
|
||||
> export S3_COMPRESSION_EXTENSIONS="*"
|
||||
> export S3_COMPRESSION_MIME_TYPES="*"
|
||||
> ```
|
||||
|
||||
### 3. Compression + Encryption
|
||||
@@ -84,7 +84,7 @@ To enable compression+encryption use:
|
||||
~ mc admin config set myminio compression allow_encryption=on
|
||||
```
|
||||
|
||||
Or alternatively through the environment variable `MINIO_COMPRESSION_ALLOW_ENCRYPTION=on`.
|
||||
Or alternatively through the environment variable `S3_COMPRESSION_ALLOW_ENCRYPTION=on`.
|
||||
|
||||
### 4. Excluded Types
|
||||
|
||||
|
||||
+44
-44
@@ -23,11 +23,11 @@ You can provide a custom certs directory using `--certs-dir` command line option
|
||||
|
||||
#### Credentials
|
||||
|
||||
On MinIO admin credentials or root credentials are only allowed to be changed using ENVs namely `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD`.
|
||||
On MinIO admin credentials or root credentials are only allowed to be changed using ENVs namely `S3_ROOT_USER` and `S3_ROOT_PASSWORD`.
|
||||
|
||||
```sh
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio13
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio13
|
||||
minio server /data
|
||||
```
|
||||
|
||||
@@ -50,16 +50,16 @@ KEY:
|
||||
site label the server and its location
|
||||
|
||||
ARGS:
|
||||
MINIO_SITE_NAME (string) name for the site e.g. "cal-rack0"
|
||||
MINIO_SITE_REGION (string) name of the location of the server e.g. "us-west-1"
|
||||
MINIO_SITE_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_SITE_NAME (string) name for the site e.g. "cal-rack0"
|
||||
S3_SITE_REGION (string) name of the location of the server e.g. "us-west-1"
|
||||
S3_SITE_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
export MINIO_SITE_REGION="us-west-0"
|
||||
export MINIO_SITE_NAME="sfo-rack-1"
|
||||
export S3_SITE_REGION="us-west-0"
|
||||
export S3_SITE_NAME="sfo-rack-1"
|
||||
minio server /data
|
||||
```
|
||||
|
||||
@@ -84,9 +84,9 @@ KEY:
|
||||
storage_class define object level redundancy
|
||||
|
||||
ARGS:
|
||||
MINIO_STORAGE_CLASS_STANDARD (string) set the parity count for default standard storage class e.g. "EC:4"
|
||||
MINIO_STORAGE_CLASS_RRS (string) set the parity count for reduced redundancy storage class e.g. "EC:2"
|
||||
MINIO_STORAGE_CLASS_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_STORAGE_CLASS_STANDARD (string) set the parity count for default standard storage class e.g. "EC:4"
|
||||
S3_STORAGE_CLASS_RRS (string) set the parity count for reduced redundancy storage class e.g. "EC:2"
|
||||
S3_STORAGE_CLASS_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
#### Etcd
|
||||
@@ -115,12 +115,12 @@ KEY:
|
||||
etcd federate multiple clusters for IAM and Bucket DNS
|
||||
|
||||
ARGS:
|
||||
MINIO_ETCD_ENDPOINTS* (csv) comma separated list of etcd endpoints e.g. "http://localhost:2379"
|
||||
MINIO_ETCD_PATH_PREFIX (path) namespace prefix to isolate tenants e.g. "customer1/"
|
||||
MINIO_ETCD_COREDNS_PATH (path) shared bucket DNS records, default is "/skydns"
|
||||
MINIO_ETCD_CLIENT_CERT (path) client cert for mTLS authentication
|
||||
MINIO_ETCD_CLIENT_CERT_KEY (path) client cert key for mTLS authentication
|
||||
MINIO_ETCD_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_ETCD_ENDPOINTS* (csv) comma separated list of etcd endpoints e.g. "http://localhost:2379"
|
||||
S3_ETCD_PATH_PREFIX (path) namespace prefix to isolate tenants e.g. "customer1/"
|
||||
S3_ETCD_COREDNS_PATH (path) shared bucket DNS records, default is "/skydns"
|
||||
S3_ETCD_CLIENT_CERT (path) client cert for mTLS authentication
|
||||
S3_ETCD_CLIENT_CERT_KEY (path) client cert key for mTLS authentication
|
||||
S3_ETCD_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
### API
|
||||
@@ -153,21 +153,21 @@ object_max_versions (number) set max allowed number of versions p
|
||||
or environment variables
|
||||
|
||||
```
|
||||
MINIO_API_REQUESTS_MAX (number) set the maximum number of concurrent requests (default: 'auto')
|
||||
MINIO_API_CLUSTER_DEADLINE (duration) set the deadline for cluster readiness check (default: '10s')
|
||||
MINIO_API_CORS_ALLOW_ORIGIN (csv) set comma separated list of origins allowed for CORS requests (default: '*')
|
||||
MINIO_API_REMOTE_TRANSPORT_DEADLINE (duration) set the deadline for API requests on remote transports while proxying between federated instances e.g. "2h" (default: '2h')
|
||||
MINIO_API_LIST_QUORUM (string) set the acceptable quorum expected for list operations e.g. "optimal", "reduced", "disk", "strict", "auto" (default: 'strict')
|
||||
MINIO_API_REPLICATION_PRIORITY (string) set replication priority (default: 'auto')
|
||||
MINIO_API_REPLICATION_MAX_WORKERS (number) set the maximum number of replication workers (default: '500')
|
||||
MINIO_API_TRANSITION_WORKERS (number) set the number of transition workers (default: '100')
|
||||
MINIO_API_STALE_UPLOADS_EXPIRY (duration) set to expire stale multipart uploads older than this values (default: '24h')
|
||||
MINIO_API_STALE_UPLOADS_CLEANUP_INTERVAL (duration) set to change intervals when stale multipart uploads are expired (default: '6h')
|
||||
MINIO_API_DELETE_CLEANUP_INTERVAL (duration) set to change intervals when deleted objects are permanently deleted from ".trash" folder (default: '5m')
|
||||
MINIO_API_ODIRECT (boolean) set to enable or disable O_DIRECT for writes under special conditions. NOTE: do not disable O_DIRECT without prior testing (default: 'on')
|
||||
MINIO_API_ROOT_ACCESS (boolean) turn 'off' root credential access for all API calls including s3, admin operations (default: 'on')
|
||||
MINIO_API_SYNC_EVENTS (boolean) set to enable synchronous bucket notifications (default: 'off')
|
||||
MINIO_API_OBJECT_MAX_VERSIONS (number) set max allowed number of versions per object (default: '9223372036854775807')
|
||||
S3_API_REQUESTS_MAX (number) set the maximum number of concurrent requests (default: 'auto')
|
||||
S3_API_CLUSTER_DEADLINE (duration) set the deadline for cluster readiness check (default: '10s')
|
||||
S3_API_CORS_ALLOW_ORIGIN (csv) set comma separated list of origins allowed for CORS requests (default: '*')
|
||||
S3_API_REMOTE_TRANSPORT_DEADLINE (duration) set the deadline for API requests on remote transports while proxying between federated instances e.g. "2h" (default: '2h')
|
||||
S3_API_LIST_QUORUM (string) set the acceptable quorum expected for list operations e.g. "optimal", "reduced", "disk", "strict", "auto" (default: 'strict')
|
||||
S3_API_REPLICATION_PRIORITY (string) set replication priority (default: 'auto')
|
||||
S3_API_REPLICATION_MAX_WORKERS (number) set the maximum number of replication workers (default: '500')
|
||||
S3_API_TRANSITION_WORKERS (number) set the number of transition workers (default: '100')
|
||||
S3_API_STALE_UPLOADS_EXPIRY (duration) set to expire stale multipart uploads older than this values (default: '24h')
|
||||
S3_API_STALE_UPLOADS_CLEANUP_INTERVAL (duration) set to change intervals when stale multipart uploads are expired (default: '6h')
|
||||
S3_API_DELETE_CLEANUP_INTERVAL (duration) set to change intervals when deleted objects are permanently deleted from ".trash" folder (default: '5m')
|
||||
S3_API_ODIRECT (boolean) set to enable or disable O_DIRECT for writes under special conditions. NOTE: do not disable O_DIRECT without prior testing (default: 'on')
|
||||
S3_API_ROOT_ACCESS (boolean) turn 'off' root credential access for all API calls including s3, admin operations (default: 'on')
|
||||
S3_API_SYNC_EVENTS (boolean) set to enable synchronous bucket notifications (default: 'off')
|
||||
S3_API_OBJECT_MAX_VERSIONS (number) set max allowed number of versions per object (default: '9223372036854775807')
|
||||
```
|
||||
|
||||
#### Notifications
|
||||
@@ -227,12 +227,12 @@ KEY:
|
||||
etcd federate multiple clusters for IAM and Bucket DNS
|
||||
|
||||
ARGS:
|
||||
MINIO_ETCD_ENDPOINTS* (csv) comma separated list of etcd endpoints e.g. "http://localhost:2379"
|
||||
MINIO_ETCD_PATH_PREFIX (path) namespace prefix to isolate tenants e.g. "customer1/"
|
||||
MINIO_ETCD_COREDNS_PATH (path) shared bucket DNS records, default is "/skydns"
|
||||
MINIO_ETCD_CLIENT_CERT (path) client cert for mTLS authentication
|
||||
MINIO_ETCD_CLIENT_CERT_KEY (path) client cert key for mTLS authentication
|
||||
MINIO_ETCD_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_ETCD_ENDPOINTS* (csv) comma separated list of etcd endpoints e.g. "http://localhost:2379"
|
||||
S3_ETCD_PATH_PREFIX (path) namespace prefix to isolate tenants e.g. "customer1/"
|
||||
S3_ETCD_COREDNS_PATH (path) shared bucket DNS records, default is "/skydns"
|
||||
S3_ETCD_CLIENT_CERT (path) client cert for mTLS authentication
|
||||
S3_ETCD_CLIENT_CERT_KEY (path) client cert key for mTLS authentication
|
||||
S3_ETCD_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
This behavior is consistent across all keys; each key self-documents itself with valid examples.
|
||||
@@ -307,30 +307,30 @@ Once set the healer settings are automatically applied without the need for serv
|
||||
|
||||
### Browser
|
||||
|
||||
Enable or disable access to console web UI. By default it is set to `on`. You may override this field with `MINIO_BROWSER` environment variable.
|
||||
Enable or disable access to console web UI. By default it is set to `on`. You may override this field with `S3_BROWSER` environment variable.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
export MINIO_BROWSER=off
|
||||
export S3_BROWSER=off
|
||||
minio server /data
|
||||
```
|
||||
|
||||
### Domain
|
||||
|
||||
By default, MinIO supports path-style requests that are of the format <http://mydomain.com/bucket/object>. `MINIO_DOMAIN` environment variable is used to enable virtual-host-style requests. If the request `Host` header matches with `(.+).mydomain.com` then the matched pattern `$1` is used as bucket and the path is used as object. Read more about path-style and virtual-host-style [here](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAPI.html).
|
||||
By default, MinIO supports path-style requests that are of the format <http://mydomain.com/bucket/object>. `S3_DOMAIN` environment variable is used to enable virtual-host-style requests. If the request `Host` header matches with `(.+).mydomain.com` then the matched pattern `$1` is used as bucket and the path is used as object. Read more about path-style and virtual-host-style [here](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAPI.html).
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
export MINIO_DOMAIN=mydomain.com
|
||||
export S3_DOMAIN=mydomain.com
|
||||
minio server /data
|
||||
```
|
||||
|
||||
For advanced use cases `MINIO_DOMAIN` environment variable supports multiple-domains with comma separated values.
|
||||
For advanced use cases `S3_DOMAIN` environment variable supports multiple-domains with comma separated values.
|
||||
|
||||
```sh
|
||||
export MINIO_DOMAIN=sub1.mydomain.com,sub2.mydomain.com
|
||||
export S3_DOMAIN=sub1.mydomain.com,sub2.mydomain.com
|
||||
minio server /data
|
||||
```
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ Once decommission is complete, it will be indicated with *Complete* status. *Co
|
||||
└─────┴─────────────────────────────────┴──────────────────────────────────┴──────────┘
|
||||
```
|
||||
|
||||
- On baremetal setups, if you have `MINIO_VOLUMES="http://minio{1...2}/data{1...4} http://minio{3...4}/data{1...4}"`, you can remove the first argument `http://minio{1...2}/data{1...4}` to update your `MINIO_VOLUMES` setting, then restart all the servers in the setup in parallel using `systemctl restart minio`.
|
||||
- On baremetal setups, if you have `S3_VOLUMES="http://minio{1...2}/data{1...4} http://minio{3...4}/data{1...4}"`, you can remove the first argument `http://minio{1...2}/data{1...4}` to update your `S3_VOLUMES` setting, then restart all the servers in the setup in parallel using `systemctl restart minio`.
|
||||
|
||||
- On Kubernetes setups, the statefulset specification needs to be modified by changing the command line input for the MinIO container. Once the relevant changes are done, proceed to execute `kubectl apply -f statefulset.yaml`.
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ To start a distributed MinIO instance, you just need to pass drive locations as
|
||||
|
||||
**NOTE:**
|
||||
|
||||
- All the nodes running distributed MinIO should share a common root credentials, for the nodes to connect and trust each other. To achieve this, it is **recommended** to export root user and root password as environment variables, `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD`, on all the nodes before executing MinIO server command. If not exported, default `minioadmin/minioadmin` credentials shall be used.
|
||||
- All the nodes running distributed MinIO should share a common root credentials, for the nodes to connect and trust each other. To achieve this, it is **recommended** to export root user and root password as environment variables, `S3_ROOT_USER` and `S3_ROOT_PASSWORD`, on all the nodes before executing MinIO server command. If not exported, default `minioadmin/minioadmin` credentials shall be used.
|
||||
- **MinIO creates erasure-coding sets of _2_ to _16_ drives per set. The number of drives you provide in total must be a multiple of one of those numbers.**
|
||||
- **MinIO chooses the largest EC set size which divides into the total number of drives or total number of nodes given - making sure to keep the uniform distribution i.e each node participates equal number of drives per set**.
|
||||
- **Each object is written to a single EC set, and therefore is spread over no more than 16 drives.**
|
||||
@@ -58,7 +58,7 @@ To start a distributed MinIO instance, you just need to pass drive locations as
|
||||
- MinIO distributed mode requires **fresh directories**. If required, the drives can be shared with other applications. You can do this by using a sub-directory exclusive to MinIO. For example, if you have mounted your volume under `/export`, pass `/export/data` as arguments to MinIO server.
|
||||
- The IP addresses and drive paths below are for demonstration purposes only, you need to replace these with the actual IP addresses and drive paths/folders.
|
||||
- Servers running distributed MinIO instances should be less than 15 minutes apart. You can enable [NTP](http://www.ntp.org/) service as a best practice to ensure same times across servers.
|
||||
- `MINIO_DOMAIN` environment variable should be defined and exported for bucket DNS style support.
|
||||
- `S3_DOMAIN` environment variable should be defined and exported for bucket DNS style support.
|
||||
- Running Distributed MinIO on **Windows** operating system is considered **experimental**. Please proceed with caution.
|
||||
|
||||
Example 1: Start distributed MinIO instance on n nodes with m drives each mounted at `/export1` to `/exportm` (pictured below), by running this command on all the n nodes:
|
||||
@@ -68,8 +68,8 @@ Example 1: Start distributed MinIO instance on n nodes with m drives each mounte
|
||||
### GNU/Linux and macOS
|
||||
|
||||
```sh
|
||||
export MINIO_ROOT_USER=<ACCESS_KEY>
|
||||
export MINIO_ROOT_PASSWORD=<SECRET_KEY>
|
||||
export S3_ROOT_USER=<ACCESS_KEY>
|
||||
export S3_ROOT_PASSWORD=<SECRET_KEY>
|
||||
minio server http://host{1...n}/export{1...m}
|
||||
```
|
||||
|
||||
@@ -81,8 +81,8 @@ minio server http://host{1...n}/export{1...m}
|
||||
MinIO supports expanding distributed erasure coded clusters by specifying new set of clusters on the command-line as shown below:
|
||||
|
||||
```sh
|
||||
export MINIO_ROOT_USER=<ACCESS_KEY>
|
||||
export MINIO_ROOT_PASSWORD=<SECRET_KEY>
|
||||
export S3_ROOT_USER=<ACCESS_KEY>
|
||||
export S3_ROOT_PASSWORD=<SECRET_KEY>
|
||||
minio server http://host{1...n}/export{1...m} http://host{o...z}/export{1...m}
|
||||
```
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ if [ ! -f ./mc ]; then
|
||||
fi
|
||||
|
||||
export CI=true
|
||||
export MINIO_COMPRESSION_ENABLE="on"
|
||||
export MINIO_COMPRESSION_EXTENSIONS=".go"
|
||||
export MINIO_COMPRESSION_MIME_TYPES="application/*"
|
||||
export MINIO_COMPRESSION_ALLOW_ENCRYPTION="on"
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=on
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
export S3_COMPRESSION_ENABLE="on"
|
||||
export S3_COMPRESSION_EXTENSIONS=".go"
|
||||
export S3_COMPRESSION_MIME_TYPES="application/*"
|
||||
export S3_COMPRESSION_ALLOW_ENCRYPTION="on"
|
||||
export S3_KMS_AUTO_ENCRYPTION=on
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
||||
|
||||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
|
||||
@@ -30,10 +30,10 @@ API_KEY=$(grep "API Key" <kes-server.log | awk -F" " '{print $3}')
|
||||
(openssl s_client -connect 127.0.0.1:7373 2>/dev/null 1>public.crt)
|
||||
|
||||
export CI=true
|
||||
export MINIO_KMS_KES_ENDPOINT=https://127.0.0.1:7373
|
||||
export MINIO_KMS_KES_API_KEY="${API_KEY}"
|
||||
export MINIO_KMS_KES_KEY_NAME=minio-default-key
|
||||
export MINIO_KMS_KES_CAPATH=public.crt
|
||||
export S3_KMS_KES_ENDPOINT=https://127.0.0.1:7373
|
||||
export S3_KMS_KES_API_KEY="${API_KEY}"
|
||||
export S3_KMS_KES_KEY_NAME=minio-default-key
|
||||
export S3_KMS_KES_CAPATH=public.crt
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
||||
|
||||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
|
||||
@@ -13,7 +13,7 @@ if [ ! -f ./mc ]; then
|
||||
fi
|
||||
|
||||
export CI=true
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
||||
|
||||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
|
||||
@@ -13,8 +13,8 @@ if [ ! -f ./mc ]; then
|
||||
fi
|
||||
|
||||
export CI=true
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=on
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
export S3_KMS_AUTO_ENCRYPTION=on
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
|
||||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
pid=$!
|
||||
|
||||
@@ -14,7 +14,7 @@ if [ ! -f ./mc ]; then
|
||||
fi
|
||||
|
||||
export CI=true
|
||||
export MINIO_SCANNER_SPEED=fastest
|
||||
export S3_SCANNER_SPEED=fastest
|
||||
|
||||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/tmp/decom.log) &
|
||||
pid=$!
|
||||
|
||||
@@ -12,12 +12,12 @@ cleanup() {
|
||||
|
||||
cleanup
|
||||
|
||||
unset MINIO_KMS_KES_CERT_FILE
|
||||
unset MINIO_KMS_KES_KEY_FILE
|
||||
unset MINIO_KMS_KES_ENDPOINT
|
||||
unset MINIO_KMS_KES_KEY_NAME
|
||||
unset S3_KMS_KES_CERT_FILE
|
||||
unset S3_KMS_KES_KEY_FILE
|
||||
unset S3_KMS_KES_ENDPOINT
|
||||
unset S3_KMS_KES_KEY_NAME
|
||||
|
||||
export MINIO_CI_CD=1
|
||||
export S3_CI_CD=1
|
||||
|
||||
if [ ! -f ./mc ]; then
|
||||
os="$(uname -s)"
|
||||
|
||||
+19
-19
@@ -16,8 +16,8 @@ MinIO needs a persistent volume to store configuration and application data. For
|
||||
docker run \
|
||||
-p 9000:9000 \
|
||||
-p 9001:9001 \
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
|
||||
@@ -33,8 +33,8 @@ docker run \
|
||||
-p 9001:9001 \
|
||||
--name minio1 \
|
||||
-v ~/minio/data:/data \
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
|
||||
@@ -48,8 +48,8 @@ docker run \
|
||||
-p 9001:9001 \
|
||||
--name minio1 \
|
||||
-v D:\data:/data \
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
|
||||
@@ -72,8 +72,8 @@ docker run \
|
||||
-p 9000:9000 \
|
||||
-p 9001:9001 \
|
||||
--name minio1 \
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-v /mnt/data:/data \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
@@ -85,8 +85,8 @@ docker run \
|
||||
-p 9000:9000 \
|
||||
-p 9001:9001 \
|
||||
--name minio1 \
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
|
||||
-v D:\data:/data \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
@@ -108,8 +108,8 @@ docker run \
|
||||
-p 9001:9001 \
|
||||
--user $(id -u):$(id -g) \
|
||||
--name minio1 \
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMIK7MDENGbPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMIK7MDENGbPxRfiCYEXAMPLEKEY" \
|
||||
-v ${HOME}/data:/data \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
@@ -126,8 +126,8 @@ docker run \
|
||||
-p 9001:9001 \
|
||||
--name minio1 \
|
||||
--security-opt "credentialspec=file://myuser.json"
|
||||
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMIK7MDENGbPxRfiCYEXAMPLEKEY" \
|
||||
-e "S3_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
|
||||
-e "S3_ROOT_PASSWORD=wJalrXUtnFEMIK7MDENGbPxRfiCYEXAMPLEKEY" \
|
||||
-v D:\data:/data \
|
||||
quay.io/minio/minio server /data --console-address ":9001"
|
||||
```
|
||||
@@ -157,16 +157,16 @@ To use other secret names follow the instructions above and replace `access_key`
|
||||
docker service create --name="minio-service" \
|
||||
--secret="my_access_key" \
|
||||
--secret="my_secret_key" \
|
||||
--env="MINIO_ROOT_USER_FILE=my_access_key" \
|
||||
--env="MINIO_ROOT_PASSWORD_FILE=my_secret_key" \
|
||||
--env="S3_ROOT_USER_FILE=my_access_key" \
|
||||
--env="S3_ROOT_PASSWORD_FILE=my_secret_key" \
|
||||
quay.io/minio/minio server /data
|
||||
```
|
||||
|
||||
`MINIO_ROOT_USER_FILE` and `MINIO_ROOT_PASSWORD_FILE` also support custom absolute paths, in case Docker secrets are mounted to custom locations or other tools are used to mount secrets into the container. For example, HashiCorp Vault injects secrets to `/vault/secrets`. With the custom names above, set the environment variables to
|
||||
`S3_ROOT_USER_FILE` and `S3_ROOT_PASSWORD_FILE` also support custom absolute paths, in case Docker secrets are mounted to custom locations or other tools are used to mount secrets into the container. For example, HashiCorp Vault injects secrets to `/vault/secrets`. With the custom names above, set the environment variables to
|
||||
|
||||
```
|
||||
MINIO_ROOT_USER_FILE=/vault/secrets/my_access_key
|
||||
MINIO_ROOT_PASSWORD_FILE=/vault/secrets/my_secret_key
|
||||
S3_ROOT_USER_FILE=/vault/secrets/my_access_key
|
||||
S3_ROOT_PASSWORD_FILE=/vault/secrets/my_secret_key
|
||||
```
|
||||
|
||||
### Retrieving Container ID
|
||||
|
||||
@@ -70,14 +70,14 @@ Default value for `REDUCED_REDUNDANCY` storage class is `1`.
|
||||
|
||||
The format to set storage class environment variables is as follows
|
||||
|
||||
`MINIO_STORAGE_CLASS_STANDARD=EC:parity`
|
||||
`MINIO_STORAGE_CLASS_RRS=EC:parity`
|
||||
`S3_STORAGE_CLASS_STANDARD=EC:parity`
|
||||
`S3_STORAGE_CLASS_RRS=EC:parity`
|
||||
|
||||
For example, set `MINIO_STORAGE_CLASS_RRS` parity 2 and `MINIO_STORAGE_CLASS_STANDARD` parity 3
|
||||
For example, set `S3_STORAGE_CLASS_RRS` parity 2 and `S3_STORAGE_CLASS_STANDARD` parity 3
|
||||
|
||||
```sh
|
||||
export MINIO_STORAGE_CLASS_STANDARD=EC:3
|
||||
export MINIO_STORAGE_CLASS_RRS=EC:2
|
||||
export S3_STORAGE_CLASS_STANDARD=EC:3
|
||||
export S3_STORAGE_CLASS_RRS=EC:2
|
||||
```
|
||||
|
||||
Storage class can also be set via `mc admin config` get/set commands to update the configuration. Refer [storage class](https://github.com/minio/minio/tree/master/docs/config#storage-class) for
|
||||
|
||||
@@ -21,24 +21,24 @@ Bucket lookup from DNS federation requires two dependencies
|
||||
|
||||
### Environment variables
|
||||
|
||||
#### MINIO_ETCD_ENDPOINTS
|
||||
#### S3_ETCD_ENDPOINTS
|
||||
|
||||
This is comma separated list of etcd servers that you want to use as the MinIO federation back-end. This should
|
||||
be same across the federated deployment, i.e. all the MinIO instances within a federated deployment should use same
|
||||
etcd back-end.
|
||||
|
||||
#### MINIO_DOMAIN
|
||||
#### S3_DOMAIN
|
||||
|
||||
This is the top level domain name used for the federated setup. This domain name should ideally resolve to a load-balancer
|
||||
running in front of all the federated MinIO instances. The domain name is used to create sub domain entries to etcd. For
|
||||
example, if the domain is set to `domain.com`, the buckets `bucket1`, `bucket2` will be accessible as `bucket1.domain.com`
|
||||
and `bucket2.domain.com`.
|
||||
|
||||
#### MINIO_PUBLIC_IPS
|
||||
#### S3_PUBLIC_IPS
|
||||
|
||||
This is comma separated list of IP addresses to which buckets created on this MinIO instance will resolve to. For example,
|
||||
a bucket `bucket1` created on current MinIO instance will be accessible as `bucket1.domain.com`, and the DNS entry for
|
||||
`bucket1.domain.com` will point to IP address set in `MINIO_PUBLIC_IPS`.
|
||||
`bucket1.domain.com` will point to IP address set in `S3_PUBLIC_IPS`.
|
||||
|
||||
- This field is mandatory for standalone and erasure code MinIO server deployments, to enable federated mode.
|
||||
- This field is optional for distributed deployments. If you don't set this field in a federated setup, we use the IP addresses of
|
||||
@@ -49,25 +49,25 @@ hosts passed to the MinIO server startup and use them for DNS entries.
|
||||
> cluster1
|
||||
|
||||
```sh
|
||||
export MINIO_ETCD_ENDPOINTS="http://remote-etcd1:2379,http://remote-etcd2:4001"
|
||||
export MINIO_DOMAIN=domain.com
|
||||
export MINIO_PUBLIC_IPS=44.35.2.1,44.35.2.2,44.35.2.3,44.35.2.4
|
||||
export S3_ETCD_ENDPOINTS="http://remote-etcd1:2379,http://remote-etcd2:4001"
|
||||
export S3_DOMAIN=domain.com
|
||||
export S3_PUBLIC_IPS=44.35.2.1,44.35.2.2,44.35.2.3,44.35.2.4
|
||||
minio server http://rack{1...4}.host{1...4}.domain.com/mnt/export{1...32}
|
||||
```
|
||||
|
||||
> cluster2
|
||||
|
||||
```sh
|
||||
export MINIO_ETCD_ENDPOINTS="http://remote-etcd1:2379,http://remote-etcd2:4001"
|
||||
export MINIO_DOMAIN=domain.com
|
||||
export MINIO_PUBLIC_IPS=44.35.1.1,44.35.1.2,44.35.1.3,44.35.1.4
|
||||
export S3_ETCD_ENDPOINTS="http://remote-etcd1:2379,http://remote-etcd2:4001"
|
||||
export S3_DOMAIN=domain.com
|
||||
export S3_PUBLIC_IPS=44.35.1.1,44.35.1.2,44.35.1.3,44.35.1.4
|
||||
minio server http://rack{5...8}.host{5...8}.domain.com/mnt/export{1...32}
|
||||
```
|
||||
|
||||
In this configuration you can see `MINIO_ETCD_ENDPOINTS` points to the etcd backend which manages MinIO's
|
||||
`config.json` and bucket DNS SRV records. `MINIO_DOMAIN` indicates the domain suffix for the bucket which
|
||||
In this configuration you can see `S3_ETCD_ENDPOINTS` points to the etcd backend which manages MinIO's
|
||||
`config.json` and bucket DNS SRV records. `S3_DOMAIN` indicates the domain suffix for the bucket which
|
||||
will be used to resolve bucket through DNS. For example if you have a bucket such as `mybucket`, the
|
||||
client can use now `mybucket.domain.com` to directly resolve itself to the right cluster. `MINIO_PUBLIC_IPS`
|
||||
client can use now `mybucket.domain.com` to directly resolve itself to the right cluster. `S3_PUBLIC_IPS`
|
||||
points to the public IP address where each cluster might be accessible, this is unique for each cluster.
|
||||
|
||||
NOTE: `mybucket` only exists on one cluster either `cluster1` or `cluster2` this is random and
|
||||
|
||||
@@ -19,10 +19,10 @@ This program, lets the admin user perform any action and prevents all other user
|
||||
In another terminal start MinIO:
|
||||
|
||||
```sh
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export MINIO_POLICY_PLUGIN_URL=http://localhost:8080/
|
||||
export S3_CI_CD=1
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
export S3_POLICY_PLUGIN_URL=http://localhost:8080/
|
||||
minio server /tmp/disk{1...4}
|
||||
```
|
||||
|
||||
@@ -51,13 +51,13 @@ KEY:
|
||||
policy_plugin enable Access Management Plugin for policy enforcement
|
||||
|
||||
ARGS:
|
||||
MINIO_POLICY_PLUGIN_URL* (url) plugin hook endpoint (HTTP(S)) e.g. "http://localhost:8181/v1/data/httpapi/authz/allow"
|
||||
MINIO_POLICY_PLUGIN_AUTH_TOKEN (string) authorization header for plugin hook endpoint
|
||||
MINIO_POLICY_PLUGIN_ENABLE_HTTP2 (bool) Enable experimental HTTP2 support to connect to plugin service (default: 'off')
|
||||
MINIO_POLICY_PLUGIN_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_POLICY_PLUGIN_URL* (url) plugin hook endpoint (HTTP(S)) e.g. "http://localhost:8181/v1/data/httpapi/authz/allow"
|
||||
S3_POLICY_PLUGIN_AUTH_TOKEN (string) authorization header for plugin hook endpoint
|
||||
S3_POLICY_PLUGIN_ENABLE_HTTP2 (bool) Enable experimental HTTP2 support to connect to plugin service (default: 'off')
|
||||
S3_POLICY_PLUGIN_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
By default this plugin uses HTTP 1.x. To enable HTTP2 use the `MINIO_POLICY_PLUGIN_ENABLE_HTTP2` environment variable.
|
||||
By default this plugin uses HTTP 1.x. To enable HTTP2 use the `S3_POLICY_PLUGIN_ENABLE_HTTP2` environment variable.
|
||||
|
||||
## Request and Response
|
||||
|
||||
|
||||
@@ -14,18 +14,18 @@ KEY:
|
||||
identity_plugin enable Identity Plugin via external hook
|
||||
|
||||
ARGS:
|
||||
MINIO_IDENTITY_PLUGIN_URL* (url) plugin hook endpoint (HTTP(S)) e.g. "http://localhost:8181/path/to/endpoint"
|
||||
MINIO_IDENTITY_PLUGIN_AUTH_TOKEN (string) authorization token for plugin hook endpoint
|
||||
MINIO_IDENTITY_PLUGIN_ROLE_POLICY* (string) policies to apply for plugin authorized users
|
||||
MINIO_IDENTITY_PLUGIN_ROLE_ID (string) unique ID to generate the ARN
|
||||
MINIO_IDENTITY_PLUGIN_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_IDENTITY_PLUGIN_URL* (url) plugin hook endpoint (HTTP(S)) e.g. "http://localhost:8181/path/to/endpoint"
|
||||
S3_IDENTITY_PLUGIN_AUTH_TOKEN (string) authorization token for plugin hook endpoint
|
||||
S3_IDENTITY_PLUGIN_ROLE_POLICY* (string) policies to apply for plugin authorized users
|
||||
S3_IDENTITY_PLUGIN_ROLE_ID (string) unique ID to generate the ARN
|
||||
S3_IDENTITY_PLUGIN_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
If provided, the auth token parameter is sent as an authorization header.
|
||||
|
||||
`MINIO_IDENTITY_PLUGIN_ROLE_POLICY` is a required parameter and can be list of comma separated policy names.
|
||||
`S3_IDENTITY_PLUGIN_ROLE_POLICY` is a required parameter and can be list of comma separated policy names.
|
||||
|
||||
On setting up the plugin, the MinIO server prints the Role ARN to its log. The Role ARN is generated by default based on the given plugin URL. To avoid this and use a configurable value set a unique role ID via `MINIO_IDENTITY_PLUGIN_ROLE_ID`.
|
||||
On setting up the plugin, the MinIO server prints the Role ARN to its log. The Role ARN is generated by default based on the given plugin URL. To avoid this and use a configurable value set a unique role ID via `S3_IDENTITY_PLUGIN_ROLE_ID`.
|
||||
|
||||
## REST API call to plugin
|
||||
|
||||
|
||||
+5
-5
@@ -53,13 +53,13 @@ curl -X PUT --data-binary @example.rego \
|
||||
|
||||
### 4. Setup MinIO with OPA
|
||||
|
||||
Set the `MINIO_POLICY_PLUGIN_URL` as the endpoint that MinIO should send authorization requests to. Then start the server.
|
||||
Set the `S3_POLICY_PLUGIN_URL` as the endpoint that MinIO should send authorization requests to. Then start the server.
|
||||
|
||||
```sh
|
||||
export MINIO_POLICY_PLUGIN_URL=http://localhost:8181/v1/data/httpapi/authz/allow
|
||||
export MINIO_CI_CD=1
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export S3_POLICY_PLUGIN_URL=http://localhost:8181/v1/data/httpapi/authz/allow
|
||||
export S3_CI_CD=1
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
minio server /mnt/data
|
||||
```
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ API_KEY=$(grep "API Key" <kes-server.log | awk -F" " '{print $3}')
|
||||
(openssl s_client -connect 127.0.0.1:7373 2>/dev/null 1>public.crt)
|
||||
|
||||
export CI=true
|
||||
export MINIO_KMS_KES_ENDPOINT=https://127.0.0.1:7373
|
||||
export MINIO_KMS_KES_API_KEY="${API_KEY}"
|
||||
export MINIO_KMS_KES_KEY_NAME=minio-default-key
|
||||
export MINIO_KMS_KES_CAPATH=public.crt
|
||||
export S3_KMS_KES_ENDPOINT=https://127.0.0.1:7373
|
||||
export S3_KMS_KES_API_KEY="${API_KEY}"
|
||||
export S3_KMS_KES_KEY_NAME=minio-default-key
|
||||
export S3_KMS_KES_CAPATH=public.crt
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
||||
|
||||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
|
||||
+8
-8
@@ -6,15 +6,15 @@ MinIO supports encrypting config, IAM assets with KMS provided keys. If the KMS
|
||||
|
||||
MinIO supports two ways of encrypting IAM and configuration data.
|
||||
You can either use KES - together with an external KMS - or, much simpler,
|
||||
set the env. variable `MINIO_KMS_SECRET_KEY` and start/restart the MinIO server. For more details about KES and how
|
||||
set the env. variable `S3_KMS_SECRET_KEY` and start/restart the MinIO server. For more details about KES and how
|
||||
to set it up refer to our [KMS Guide](https://github.com/minio/minio/blob/master/docs/kms/README.md).
|
||||
|
||||
Instead of configuring an external KMS you can start with a single key by
|
||||
setting the env. variable `MINIO_KMS_SECRET_KEY`. It expects the following
|
||||
setting the env. variable `S3_KMS_SECRET_KEY`. It expects the following
|
||||
format:
|
||||
|
||||
```sh
|
||||
MINIO_KMS_SECRET_KEY=<key-name>:<base64-value>
|
||||
S3_KMS_SECRET_KEY=<key-name>:<base64-value>
|
||||
```
|
||||
|
||||
First generate a 256 bit random key via:
|
||||
@@ -24,18 +24,18 @@ $ cat /dev/urandom | head -c 32 | base64 -
|
||||
OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
```
|
||||
|
||||
Now, you can set `MINIO_KMS_SECRET_KEY` like this:
|
||||
Now, you can set `S3_KMS_SECRET_KEY` like this:
|
||||
|
||||
```sh
|
||||
export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
export S3_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||
```
|
||||
|
||||
> You can choose an arbitrary name for the key - instead of `my-minio-key`.
|
||||
> Please note that losing the `MINIO_KMS_SECRET_KEY` will cause data loss
|
||||
> Please note that losing the `S3_KMS_SECRET_KEY` will cause data loss
|
||||
> since you will not be able to decrypt the IAM/configuration data anymore.
|
||||
For distributed MinIO deployments, specify the *same* `MINIO_KMS_SECRET_KEY` for each MinIO server process.
|
||||
For distributed MinIO deployments, specify the *same* `S3_KMS_SECRET_KEY` for each MinIO server process.
|
||||
|
||||
At any point in time you can switch from `MINIO_KMS_SECRET_KEY` to a full KMS
|
||||
At any point in time you can switch from `S3_KMS_SECRET_KEY` to a full KMS
|
||||
deployment. You just need to import the generated key into KES - for example via
|
||||
the KES CLI once you have successfully setup KES:
|
||||
|
||||
|
||||
+9
-9
@@ -19,17 +19,17 @@ curl -sSL --tlsv1.2 \
|
||||
### 2. Set the MinIO-KES configuration
|
||||
|
||||
```sh
|
||||
export MINIO_KMS_KES_ENDPOINT=https://play.min.io:7373
|
||||
export MINIO_KMS_KES_KEY_FILE=root.key
|
||||
export MINIO_KMS_KES_CERT_FILE=root.cert
|
||||
export MINIO_KMS_KES_KEY_NAME=my-minio-key
|
||||
export S3_KMS_KES_ENDPOINT=https://play.min.io:7373
|
||||
export S3_KMS_KES_KEY_FILE=root.key
|
||||
export S3_KMS_KES_CERT_FILE=root.cert
|
||||
export S3_KMS_KES_KEY_NAME=my-minio-key
|
||||
```
|
||||
|
||||
### 3. Start the MinIO Server
|
||||
|
||||
```sh
|
||||
export MINIO_ROOT_USER=minio
|
||||
export MINIO_ROOT_PASSWORD=minio123
|
||||
export S3_ROOT_USER=minio
|
||||
export S3_ROOT_PASSWORD=minio123
|
||||
minio server ~/export
|
||||
```
|
||||
|
||||
@@ -96,7 +96,7 @@ Auto encryption 'sse-s3' is enabled
|
||||
MinIO automatically encrypts all objects on buckets if KMS is successfully configured and following ENV is enabled:
|
||||
|
||||
```
|
||||
export MINIO_KMS_AUTO_ENCRYPTION=on
|
||||
export S3_KMS_AUTO_ENCRYPTION=on
|
||||
```
|
||||
|
||||
### Verify auto-encryption
|
||||
@@ -123,13 +123,13 @@ Encrypted :
|
||||
## Encrypted Private Key
|
||||
|
||||
MinIO supports encrypted KES client private keys. Therefore, you can use
|
||||
an password-protected private keys for `MINIO_KMS_KES_KEY_FILE`.
|
||||
an password-protected private keys for `S3_KMS_KES_KEY_FILE`.
|
||||
|
||||
When using password-protected private keys for accessing KES you need to
|
||||
provide the password via:
|
||||
|
||||
```
|
||||
export MINIO_KMS_KES_KEY_PASSWORD=<your-password>
|
||||
export S3_KMS_KES_KEY_PASSWORD=<your-password>
|
||||
```
|
||||
|
||||
Note that MinIO only supports encrypted private keys - not encrypted certificates.
|
||||
|
||||
@@ -83,7 +83,7 @@ Press CTRL+C to quit
|
||||
|
||||
Register MinIO with a Lambda function, we are calling our target name as `function`, but you may call it any other friendly name of your choice.
|
||||
```
|
||||
MINIO_LAMBDA_WEBHOOK_ENABLE_function=on MINIO_LAMBDA_WEBHOOK_ENDPOINT_function=http://localhost:5000 minio server /data &
|
||||
S3_LAMBDA_WEBHOOK_ENABLE_function=on S3_LAMBDA_WEBHOOK_ENDPOINT_function=http://localhost:5000 minio server /data &
|
||||
...
|
||||
...
|
||||
MinIO Object Storage Server
|
||||
@@ -102,14 +102,14 @@ Object Lambda ARNs: arn:minio:s3-object-lambda::function:webhook
|
||||
If your lambda target expects an authorization token then you can enable it per function target as follows
|
||||
|
||||
```
|
||||
MINIO_LAMBDA_WEBHOOK_ENABLE_function=on MINIO_LAMBDA_WEBHOOK_ENDPOINT_function=http://localhost:5000 MINIO_LAMBDA_WEBHOOK_AUTH_TOKEN="mytoken" minio server /data &
|
||||
S3_LAMBDA_WEBHOOK_ENABLE_function=on S3_LAMBDA_WEBHOOK_ENDPOINT_function=http://localhost:5000 S3_LAMBDA_WEBHOOK_AUTH_TOKEN="mytoken" minio server /data &
|
||||
```
|
||||
|
||||
### Lambda Target with mTLS authentication
|
||||
|
||||
If your lambda target expects mTLS client you can enable it per function target as follows
|
||||
```
|
||||
MINIO_LAMBDA_WEBHOOK_ENABLE_function=on MINIO_LAMBDA_WEBHOOK_ENDPOINT_function=http://localhost:5000 MINIO_LAMBDA_WEBHOOK_CLIENT_CERT=client.crt MINIO_LAMBDA_WEBHOOK_CLIENT_KEY=client.key minio server /data &
|
||||
S3_LAMBDA_WEBHOOK_ENABLE_function=on S3_LAMBDA_WEBHOOK_ENDPOINT_function=http://localhost:5000 S3_LAMBDA_WEBHOOK_CLIENT_CERT=client.crt S3_LAMBDA_WEBHOOK_CLIENT_KEY=client.key minio server /data &
|
||||
```
|
||||
|
||||
## Create a bucket and upload some data
|
||||
|
||||
+25
-25
@@ -34,9 +34,9 @@ NOTE: `http://endpoint:port/path` is a placeholder value to indicate the URL for
|
||||
MinIO also honors environment variable for HTTP target logging as shown below, this setting will override the endpoint settings in the MinIO server config.
|
||||
|
||||
```
|
||||
export MINIO_LOGGER_WEBHOOK_ENABLE_target1="on"
|
||||
export MINIO_LOGGER_WEBHOOK_AUTH_TOKEN_target1="token"
|
||||
export MINIO_LOGGER_WEBHOOK_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
export S3_LOGGER_WEBHOOK_ENABLE_target1="on"
|
||||
export S3_LOGGER_WEBHOOK_AUTH_TOKEN_target1="token"
|
||||
export S3_LOGGER_WEBHOOK_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
minio server /mnt/data
|
||||
```
|
||||
|
||||
@@ -61,11 +61,11 @@ NOTE: `http://endpoint:port/path` is a placeholder value to indicate the URL for
|
||||
MinIO also honors environment variable for HTTP target Audit logging as shown below, this setting will override the endpoint settings in the MinIO server config.
|
||||
|
||||
```
|
||||
export MINIO_AUDIT_WEBHOOK_ENABLE_target1="on"
|
||||
export MINIO_AUDIT_WEBHOOK_AUTH_TOKEN_target1="token"
|
||||
export MINIO_AUDIT_WEBHOOK_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
export MINIO_AUDIT_WEBHOOK_CLIENT_CERT="/tmp/cert.pem"
|
||||
export MINIO_AUDIT_WEBHOOK_CLIENT_KEY=="/tmp/key.pem"
|
||||
export S3_AUDIT_WEBHOOK_ENABLE_target1="on"
|
||||
export S3_AUDIT_WEBHOOK_AUTH_TOKEN_target1="token"
|
||||
export S3_AUDIT_WEBHOOK_ENDPOINT_target1=http://localhost:8080/minio/logs
|
||||
export S3_AUDIT_WEBHOOK_CLIENT_CERT="/tmp/cert.pem"
|
||||
export S3_AUDIT_WEBHOOK_CLIENT_KEY=="/tmp/key.pem"
|
||||
minio server /mnt/data
|
||||
```
|
||||
|
||||
@@ -189,26 +189,26 @@ KEY:
|
||||
audit_kafka[:name] send audit logs to kafka endpoints
|
||||
|
||||
ARGS:
|
||||
MINIO_AUDIT_KAFKA_ENABLE* (on|off) enable audit_kafka target, default is 'off'
|
||||
MINIO_AUDIT_KAFKA_BROKERS* (csv) comma separated list of Kafka broker addresses
|
||||
MINIO_AUDIT_KAFKA_TOPIC (string) Kafka topic used for bucket notifications
|
||||
MINIO_AUDIT_KAFKA_SASL_USERNAME (string) username for SASL/PLAIN or SASL/SCRAM authentication
|
||||
MINIO_AUDIT_KAFKA_SASL_PASSWORD (string) password for SASL/PLAIN or SASL/SCRAM authentication
|
||||
MINIO_AUDIT_KAFKA_SASL_MECHANISM (string) sasl authentication mechanism, default 'plain'
|
||||
MINIO_AUDIT_KAFKA_TLS_CLIENT_AUTH (string) clientAuth determines the Kafka server's policy for TLS client auth
|
||||
MINIO_AUDIT_KAFKA_SASL (on|off) set to 'on' to enable SASL authentication
|
||||
MINIO_AUDIT_KAFKA_TLS (on|off) set to 'on' to enable TLS
|
||||
MINIO_AUDIT_KAFKA_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
MINIO_AUDIT_KAFKA_CLIENT_TLS_CERT (path) path to client certificate for mTLS auth
|
||||
MINIO_AUDIT_KAFKA_CLIENT_TLS_KEY (path) path to client key for mTLS auth
|
||||
MINIO_AUDIT_KAFKA_VERSION (string) specify the version of the Kafka cluster
|
||||
MINIO_AUDIT_KAFKA_COMMENT (sentence) optionally add a comment to this setting
|
||||
S3_AUDIT_KAFKA_ENABLE* (on|off) enable audit_kafka target, default is 'off'
|
||||
S3_AUDIT_KAFKA_BROKERS* (csv) comma separated list of Kafka broker addresses
|
||||
S3_AUDIT_KAFKA_TOPIC (string) Kafka topic used for bucket notifications
|
||||
S3_AUDIT_KAFKA_SASL_USERNAME (string) username for SASL/PLAIN or SASL/SCRAM authentication
|
||||
S3_AUDIT_KAFKA_SASL_PASSWORD (string) password for SASL/PLAIN or SASL/SCRAM authentication
|
||||
S3_AUDIT_KAFKA_SASL_MECHANISM (string) sasl authentication mechanism, default 'plain'
|
||||
S3_AUDIT_KAFKA_TLS_CLIENT_AUTH (string) clientAuth determines the Kafka server's policy for TLS client auth
|
||||
S3_AUDIT_KAFKA_SASL (on|off) set to 'on' to enable SASL authentication
|
||||
S3_AUDIT_KAFKA_TLS (on|off) set to 'on' to enable TLS
|
||||
S3_AUDIT_KAFKA_TLS_SKIP_VERIFY (on|off) trust server TLS without verification, defaults to "on" (verify)
|
||||
S3_AUDIT_KAFKA_CLIENT_TLS_CERT (path) path to client certificate for mTLS auth
|
||||
S3_AUDIT_KAFKA_CLIENT_TLS_KEY (path) path to client key for mTLS auth
|
||||
S3_AUDIT_KAFKA_VERSION (string) specify the version of the Kafka cluster
|
||||
S3_AUDIT_KAFKA_COMMENT (sentence) optionally add a comment to this setting
|
||||
```
|
||||
|
||||
```
|
||||
export MINIO_AUDIT_KAFKA_ENABLE_target1="on"
|
||||
export MINIO_AUDIT_KAFKA_BROKERS_target1="localhost:29092"
|
||||
export MINIO_AUDIT_KAFKA_TOPIC_target1="auditlog"
|
||||
export S3_AUDIT_KAFKA_ENABLE_target1="on"
|
||||
export S3_AUDIT_KAFKA_BROKERS_target1="localhost:29092"
|
||||
export S3_AUDIT_KAFKA_TOPIC_target1="auditlog"
|
||||
minio server /mnt/data
|
||||
```
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user