2021-04-18 15:41:13 -04:00
|
|
|
// Copyright (c) 2015-2021 MinIO, Inc.
|
|
|
|
//
|
|
|
|
// This file is part of MinIO Object Storage stack
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2017-02-18 13:45:37 -05:00
|
|
|
|
2016-08-18 19:23:42 -04:00
|
|
|
package cmd
|
config/main: Re-write config files - add to new config v3
- New config format.
```
{
"version": "3",
"address": ":9000",
"backend": {
"type": "fs",
"disk": "/path"
},
"credential": {
"accessKey": "WLGDGYAQYIGI833EV05A",
"secretKey": "BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF"
},
"region": "us-east-1",
"logger": {
"file": {
"enable": false,
"fileName": "",
"level": "error"
},
"syslog": {
"enable": false,
"address": "",
"level": "debug"
},
"console": {
"enable": true,
"level": "fatal"
}
}
}
```
New command lines in lieu of supporting XL.
Minio initialize filesystem backend.
~~~
$ minio init fs <path>
~~~
Minio initialize XL backend.
~~~
$ minio init xl <url1>...<url16>
~~~
For 'fs' backend it starts the server.
~~~
$ minio server
~~~
For 'xl' backend it waits for servers to join.
~~~
$ minio server
... [PROGRESS BAR] of servers connecting
~~~
Now on other servers execute 'join' and they connect.
~~~
....
minio join <url1> -- from <url2> && minio server
minio join <url1> -- from <url3> && minio server
...
...
minio join <url1> -- from <url16> && minio server
~~~
2016-02-12 18:27:10 -05:00
|
|
|
|
2017-10-31 14:54:32 -04:00
|
|
|
import (
|
2021-06-01 17:59:40 -04:00
|
|
|
"github.com/minio/minio/internal/auth"
|
|
|
|
"github.com/minio/minio/internal/config"
|
|
|
|
"github.com/minio/minio/internal/config/compress"
|
|
|
|
xldap "github.com/minio/minio/internal/config/identity/ldap"
|
|
|
|
"github.com/minio/minio/internal/config/identity/openid"
|
|
|
|
"github.com/minio/minio/internal/config/notify"
|
|
|
|
"github.com/minio/minio/internal/config/policy/opa"
|
|
|
|
"github.com/minio/minio/internal/config/storageclass"
|
|
|
|
"github.com/minio/minio/internal/logger"
|
2023-09-04 15:57:37 -04:00
|
|
|
"github.com/minio/pkg/v2/quick"
|
2017-10-31 14:54:32 -04:00
|
|
|
)
|
2017-02-18 13:45:37 -05:00
|
|
|
|
2018-01-17 10:24:46 -05:00
|
|
|
// FileLogger is introduced to workaround the dependency about logrus
|
|
|
|
type FileLogger struct {
|
|
|
|
Enable bool `json:"enable"`
|
|
|
|
Filename string `json:"filename"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ConsoleLogger is introduced to workaround the dependency about logrus
|
|
|
|
type ConsoleLogger struct {
|
|
|
|
Enable bool `json:"enable"`
|
|
|
|
}
|
|
|
|
|
2019-07-11 22:53:20 -04:00
|
|
|
// serverConfigV33 is just like version '32', removes clientID from NATS and MQTT, and adds queueDir, queueLimit in all notification targets.
|
2018-11-30 00:16:17 -05:00
|
|
|
type serverConfigV33 struct {
|
|
|
|
quick.Config `json:"-"` // ignore interfaces
|
|
|
|
|
|
|
|
Version string `json:"version"`
|
|
|
|
|
|
|
|
// S3 API configuration.
|
|
|
|
Credential auth.Credentials `json:"credential"`
|
|
|
|
Region string `json:"region"`
|
2019-10-08 01:47:56 -04:00
|
|
|
Worm config.BoolFlag `json:"worm"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// Storage class configuration
|
2019-10-07 01:50:24 -04:00
|
|
|
StorageClass storageclass.Config `json:"storageclass"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// Notification queue configuration.
|
2019-10-09 02:11:15 -04:00
|
|
|
Notify notify.Config `json:"notify"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// Logger configuration
|
2019-10-08 01:47:56 -04:00
|
|
|
Logger logger.Config `json:"logger"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// Compression configuration
|
2019-10-04 13:35:33 -04:00
|
|
|
Compression compress.Config `json:"compress"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// OpenID configuration
|
2019-10-23 01:59:13 -04:00
|
|
|
OpenID openid.Config `json:"openid"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// External policy enforcements.
|
|
|
|
Policy struct {
|
|
|
|
// OPA configuration.
|
2019-10-23 01:59:13 -04:00
|
|
|
OPA opa.Args `json:"opa"`
|
2018-11-30 00:16:17 -05:00
|
|
|
|
|
|
|
// Add new external policy enforcements here.
|
|
|
|
} `json:"policy"`
|
2019-09-09 19:12:29 -04:00
|
|
|
|
2022-10-08 01:12:36 -04:00
|
|
|
LDAPServerConfig xldap.LegacyConfig `json:"ldapserverconfig"`
|
2018-11-30 00:16:17 -05:00
|
|
|
}
|