Add new site config sub-system intended to replace region (#13672)

- New sub-system has "region" and "name" fields.

- `region` subsystem is marked as deprecated, however still works, unless the
new region parameter under `site` is set - in this case, the region subsystem is
ignored. `region` subsystem is hidden from top-level help (i.e. from `mc admin
config set myminio`), but appears when specifically requested (i.e. with `mc
admin config set myminio region`).

- MINIO_REGION, MINIO_REGION_NAME are supported as legacy environment variables for server region.

- Adds MINIO_SITE_REGION as the current environment variable to configure the
server region and MINIO_SITE_NAME for the site name.
This commit is contained in:
Aditya Manthramurthy
2021-11-25 13:06:25 -08:00
committed by GitHub
parent 81bf0c66c6
commit 4ce6d35e30
27 changed files with 197 additions and 82 deletions

View File

@@ -40,30 +40,33 @@ export MINIO_ROOT_PASSWORD=minio13
minio server /data
```
#### Region
#### Site
```
KEY:
region label the location of the server
site label the server and its location
ARGS:
name (string) name of the location of the server e.g. "us-west-rack2"
name (string) name for the site e.g. "cal-rack0"
region (string) name of the location of the server e.g. "us-west-1"
comment (sentence) optionally add a comment to this setting
```
or environment variables
```
KEY:
region label the location of the server
site label the server and its location
ARGS:
MINIO_REGION_NAME (string) name of the location of the server e.g. "us-west-rack2"
MINIO_REGION_COMMENT (sentence) optionally add a comment to this setting
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
```
Example:
```sh
export MINIO_REGION_NAME="my_region"
export MINIO_SITE_REGION="us-west-0"
export MINIO_SITE_NAME="sfo-rack-1"
minio server /data
```