diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 059d9c3da..e357b9ad8 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -18,7 +18,7 @@ $ - Run `go get foo/bar` - Edit your code to import foo/bar - - Run `govendor add foo/bar` from top-level folder + - Run `govendor add foo/bar` from top-level directory #### Remove dependencies diff --git a/cmd/bucket-policy-handlers_test.go b/cmd/bucket-policy-handlers_test.go index 60717309c..25c9fbe98 100644 --- a/cmd/bucket-policy-handlers_test.go +++ b/cmd/bucket-policy-handlers_test.go @@ -61,7 +61,7 @@ func TestBucketPolicyResourceMatch(t *testing.T) { // Policy with resource ending with bucket/oo* should allow access to bucket/ootput.txt. {generateResource("minio-bucket", "ootput.txt"), generateStatement(fmt.Sprintf("%s%s", AWSResourcePrefix, "minio-bucket"+"/oo*")), true}, // Test case - 7. - // Policy with resource ending with bucket/oo* allows access to all subfolders starting with "oo" inside given bucket. + // Policy with resource ending with bucket/oo* allows access to all sub-dirs starting with "oo" inside given bucket. {generateResource("minio-bucket", "oop-bucket/my-file"), generateStatement(fmt.Sprintf("%s%s", AWSResourcePrefix, "minio-bucket"+"/oo*")), true}, // Test case - 8. {generateResource("minio-bucket", "Asia/India/1.pjg"), generateStatement(fmt.Sprintf("%s%s", AWSResourcePrefix, "minio-bucket"+"/Asia/Japan/*")), false}, diff --git a/cmd/config-migrate_test.go b/cmd/config-migrate_test.go index 4da55ac73..db980c119 100644 --- a/cmd/config-migrate_test.go +++ b/cmd/config-migrate_test.go @@ -31,7 +31,7 @@ func TestServerConfigMigrateV1(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) setGlobalConfigPath(rootPath) @@ -65,7 +65,7 @@ func TestServerConfigMigrateInexistentConfig(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) setGlobalConfigPath(rootPath) @@ -105,7 +105,7 @@ func TestServerConfigMigrateV2toV9(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) setGlobalConfigPath(rootPath) @@ -164,7 +164,7 @@ func TestServerConfigMigrateFaultyConfig(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) setGlobalConfigPath(rootPath) diff --git a/cmd/config-v9_test.go b/cmd/config-v9_test.go index 651529f5d..e58c1c15f 100644 --- a/cmd/config-v9_test.go +++ b/cmd/config-v9_test.go @@ -26,7 +26,7 @@ func TestServerConfig(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) if serverConfig.GetRegion() != "us-east-1" { diff --git a/cmd/event-notifier_test.go b/cmd/event-notifier_test.go index 97062b27f..0a65e105c 100644 --- a/cmd/event-notifier_test.go +++ b/cmd/event-notifier_test.go @@ -31,7 +31,7 @@ func TestInitEventNotifierFaultyDisks(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) disks, err := getRandomDisks(1) @@ -85,7 +85,7 @@ func TestInitEventNotifierWithAMQP(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) disks, err := getRandomDisks(1) @@ -116,7 +116,7 @@ func TestInitEventNotifierWithElasticSearch(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) disks, err := getRandomDisks(1) @@ -147,7 +147,7 @@ func TestInitEventNotifierWithRedis(t *testing.T) { if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) disks, err := getRandomDisks(1) diff --git a/cmd/fs-v1.go b/cmd/fs-v1.go index fce574d9b..9b1fba85d 100644 --- a/cmd/fs-v1.go +++ b/cmd/fs-v1.go @@ -164,7 +164,7 @@ func (fs fsObjects) ListBuckets() ([]BucketInfo, error) { Created: vol.Created, }) } - // Print a user friendly message if we indeed skipped certain folders which are + // Print a user friendly message if we indeed skipped certain directories which are // incompatible with S3's bucket name restrictions. if len(invalidBucketNames) > 0 { errorIf(errors.New("One or more invalid bucket names found"), "Skipping %s", invalidBucketNames) diff --git a/cmd/main.go b/cmd/main.go index 3e5c50ac0..b832363ad 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -38,7 +38,7 @@ var ( cli.StringFlag{ Name: "config-dir, C", Value: mustGetConfigPath(), - Usage: "Path to configuration folder.", + Usage: "Path to configuration directory.", }, cli.BoolFlag{ Name: "quiet", @@ -146,7 +146,7 @@ func checkMainSyntax(c *cli.Context) { console.Fatalf("Unable to obtain user's home directory. \nError: %s\n", err) } if configPath == "" { - console.Fatalln("Config folder cannot be empty, please specify --config-dir .") + console.Fatalln("Config directory cannot be empty, please specify --config-dir .") } } @@ -158,7 +158,7 @@ func Main() { if configDir == "" { fatalIf(errors.New("Config directory is empty"), "Unable to get config file.") } - // Sets new config folder. + // Sets new config directory. setGlobalConfigPath(configDir) // Valid input arguments to main. diff --git a/cmd/posix_test.go b/cmd/posix_test.go index 82abc98b3..e8a4b0f72 100644 --- a/cmd/posix_test.go +++ b/cmd/posix_test.go @@ -1341,7 +1341,7 @@ func TestRenameFile(t *testing.T) { expectedErr: errFaultyDisk, }, // Test case - 10. - // Test case with source being a file and destination being a folder. + // Test case with source being a file and destination being a directory. // Either both have to be files or directories. // Expecting to fail with `errFileAccessDenied`. { diff --git a/cmd/post-policy_test.go b/cmd/post-policy_test.go index 6f1bc04eb..e7b8c8717 100644 --- a/cmd/post-policy_test.go +++ b/cmd/post-policy_test.go @@ -109,7 +109,7 @@ func testPostPolicyHandler(obj ObjectLayer, instanceType string, t TestErrHandle if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() diff --git a/cmd/server-main.go b/cmd/server-main.go index 25e42a961..453eae681 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -36,11 +36,11 @@ var serverFlags = []cli.Flag{ cli.StringFlag{ Name: "address", Value: ":9000", - Usage: "Specify custom server \"ADDRESS:PORT\", defaults to \":9000\".", + Usage: `Bind to a specific IP:PORT. Defaults to ":9000".`, }, cli.StringFlag{ Name: "ignore-disks", - Usage: "Specify comma separated list of disks that are offline.", + Usage: `Comma separated list of faulty drives to ignore at startup.`, }, } @@ -60,37 +60,29 @@ FLAGS: {{end}} ENVIRONMENT VARIABLES: ACCESS: - MINIO_ACCESS_KEY: Access key string of 5 to 20 characters in length. - MINIO_SECRET_KEY: Secret key string of 8 to 40 characters in length. + MINIO_ACCESS_KEY: Username or access key of 5 to 20 characters in length. + MINIO_SECRET_KEY: Password or secret key of 8 to 40 characters in length. CACHING: - MINIO_CACHE_SIZE: Set total cache size in NN[GB|MB|KB]. Defaults to 8GB. - MINIO_CACHE_EXPIRY: Set cache expiration duration in NN[h|m|s]. Defaults to 72 hours. + MINIO_CACHE_SIZE: Limit maximum cache size. Allowed units are [GB|MB|KB]. Defaults to 8GB. + MINIO_CACHE_EXPIRY: Automatically expire cached objects. Allowed units are [h|m|s]. Defaults to 72h. SECURITY: - MINIO_SECURE_CONSOLE: Set secure console to '0' to disable printing secret key. Defaults to '1'. + MINIO_SECURE_CONSOLE: Set secure console to 'no' to disable printing secret key. Defaults to 'yes'. EXAMPLES: - 1. Start minio server. + 1. Start minio server on "/home/shared" directory. $ minio {{.Name}} /home/shared - 2. Start minio server bound to a specific IP:PORT, when you have multiple network interfaces. + 2. Start minio server bound to a specific IP:PORT. $ minio {{.Name}} --address 192.168.1.101:9000 /home/shared - 3. Start minio server on Windows. - $ minio {{.Name}} C:\MyShare - - 4. Start minio server on 12 disks to enable erasure coded layer with 6 data and 6 parity. + 3. Start erasure coded minio server on a 12 disks server. $ minio {{.Name}} /mnt/export1/ /mnt/export2/ /mnt/export3/ /mnt/export4/ \ /mnt/export5/ /mnt/export6/ /mnt/export7/ /mnt/export8/ /mnt/export9/ \ /mnt/export10/ /mnt/export11/ /mnt/export12/ - 5. Start minio server on 12 disks while ignoring two disks for initialization. - $ minio {{.Name}} --ignore-disks=/mnt/export1/ /mnt/export1/ /mnt/export2/ \ - /mnt/export3/ /mnt/export4/ /mnt/export5/ /mnt/export6/ /mnt/export7/ \ - /mnt/export8/ /mnt/export9/ /mnt/export10/ /mnt/export11/ /mnt/export12/ - - 6. Start minio server for a 4 node distributed setup. Type the following command on all the 4 nodes exactly. + 4. Start erasure coded distributed minio server on a 4 node setup with 1 drive each. Run following commands on all the 4 nodes. $ export MINIO_ACCESS_KEY=minio $ export MINIO_SECRET_KEY=miniostorage $ minio {{.Name}} http://192.168.1.11/mnt/export/ http://192.168.1.12/mnt/export/ \ diff --git a/cmd/server-startup-msg.go b/cmd/server-startup-msg.go index 82cc57c9f..ccb3b9180 100644 --- a/cmd/server-startup-msg.go +++ b/cmd/server-startup-msg.go @@ -74,7 +74,7 @@ func printServerCommonMsg(endPoints []string) { console.Println(colorBlue("\nEndpoint: ") + colorBold(fmt.Sprintf(getFormatStr(len(endPointStr), 1), endPointStr))) console.Println(colorBlue("AccessKey: ") + colorBold(fmt.Sprintf("%s ", cred.AccessKeyID))) secretKey := cred.SecretAccessKey - if os.Getenv("MINIO_SECURE_CONSOLE") == "0" { + if strings.EqualFold(os.Getenv("MINIO_SECURE_CONSOLE"), "no") { secretKey = "*REDACTED*" } console.Println(colorBlue("SecretKey: ") + colorBold(fmt.Sprintf("%s ", secretKey))) diff --git a/cmd/web-handlers_test.go b/cmd/web-handlers_test.go index 11074313b..fcc1747ee 100644 --- a/cmd/web-handlers_test.go +++ b/cmd/web-handlers_test.go @@ -132,7 +132,7 @@ func testLoginWebHandler(obj ObjectLayer, instanceType string, t TestErrHandler) if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -180,7 +180,7 @@ func testStorageInfoWebHandler(obj ObjectLayer, instanceType string, t TestErrHa if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -226,7 +226,7 @@ func testServerInfoWebHandler(obj ObjectLayer, instanceType string, t TestErrHan if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -272,7 +272,7 @@ func testMakeBucketWebHandler(obj ObjectLayer, instanceType string, t TestErrHan if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -332,7 +332,7 @@ func testListBucketsWebHandler(obj ObjectLayer, instanceType string, t TestErrHa if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -389,7 +389,7 @@ func testListObjectsWebHandler(obj ObjectLayer, instanceType string, t TestErrHa if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -461,7 +461,7 @@ func testRemoveObjectWebHandler(obj ObjectLayer, instanceType string, t TestErrH if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -522,7 +522,7 @@ func testGenerateAuthWebHandler(obj ObjectLayer, instanceType string, t TestErrH if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -568,7 +568,7 @@ func testSetAuthWebHandler(obj ObjectLayer, instanceType string, t TestErrHandle if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -628,7 +628,7 @@ func testGetAuthWebHandler(obj ObjectLayer, instanceType string, t TestErrHandle if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -673,7 +673,7 @@ func testUploadWebHandler(obj ObjectLayer, instanceType string, t TestErrHandler if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -737,7 +737,7 @@ func testDownloadWebHandler(obj ObjectLayer, instanceType string, t TestErrHandl if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -793,7 +793,7 @@ func testWebPresignedGetHandler(obj ObjectLayer, instanceType string, t TestErrH if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -905,7 +905,7 @@ func testWebGetBucketPolicyHandler(obj ObjectLayer, instanceType string, t TestE if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -988,7 +988,7 @@ func testWebListAllBucketPoliciesHandler(obj ObjectLayer, instanceType string, t if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -1094,7 +1094,7 @@ func testWebSetBucketPolicyHandler(obj ObjectLayer, instanceType string, t TestE if err != nil { t.Fatalf("Init Test config failed") } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) credentials := serverConfig.GetCredential() @@ -1174,7 +1174,7 @@ func TestWebCheckAuthorization(t *testing.T) { if err != nil { t.Fatal("Init Test config failed", err) } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) rec := httptest.NewRecorder() @@ -1256,7 +1256,7 @@ func TestWebObjectLayerNotReady(t *testing.T) { if err != nil { t.Fatal("Init Test config failed", err) } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) rec := httptest.NewRecorder() @@ -1354,7 +1354,7 @@ func TestWebObjectLayerFaultyDisks(t *testing.T) { if err != nil { t.Fatal("Init Test config failed", err) } - // remove the root folder after the test ends. + // remove the root directory after the test ends. defer removeAll(rootPath) rec := httptest.NewRecorder() diff --git a/docs/FreeBSD.md b/docs/FreeBSD.md index 79aec5d87..33b01f6a5 100644 --- a/docs/FreeBSD.md +++ b/docs/FreeBSD.md @@ -110,24 +110,6 @@ $ curl https://dl.minio.io/server/minio/release/freebsd-amd64/minio > minio $ chmod 755 minio $ ./minio server /minio-example/compressed-objects - -Endpoint: http://10.0.0.10:9000 http://127.0.0.1:9000 http://172.17.0.1:9000 -AccessKey: USWUXHGYZQYFYFFIT3RE -SecretKey: MOJRH0mkL1IPauahWITSVvyDrQbEEIwljvmxdq03 -Region: us-east-1 - -Browser Access: - http://10.0.0.10:9000 http://127.0.0.1:9000 http://172.17.0.1:9000 - -Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide - $ mc config host add myminio http://localhost:9000 USWUXHGYZQYFYFFIT3RE MOJRH0mkL1IPauahWITSVvyDrQbEEIwljvmxdq03 - -Object API (Amazon S3 compatible): - Go: https://docs.minio.io/docs/golang-client-quickstart-guide - Java: https://docs.minio.io/docs/java-client-quickstart-guide - Python: https://docs.minio.io/docs/python-client-quickstart-guide - JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide - ``` Point your browser to http://localhost:9000 and login with the credentials displayed on the command line. diff --git a/docs/setup-replication-between-two-sites-running-minio.md b/docs/setup-replication-between-two-sites-running-minio.md index 2da2e1af1..311c6bb01 100644 --- a/docs/setup-replication-between-two-sites-running-minio.md +++ b/docs/setup-replication-between-two-sites-running-minio.md @@ -3,7 +3,6 @@ ![minio_MIRROR](https://github.com/minio/minio/blob/master/docs/screenshots/miniomirror.jpeg?raw=true) - In this document we will illustrate how to set up replication between two Minio servers, `minio1` and `minio2` running on ``192.168.1.11`` and ``192.168.1.12`` respectively. We will mirror the data directory on `minio1` to the bucket on `minio2`. @@ -24,6 +23,7 @@ Endpoint: http://127.0.0.1:9000 http://192.168.1.11:9000 AccessKey: MURIVYBYNPTYE7O8I779 SecretKey: lVbZmz4CvGkBl7JKw5icuL7RCcSvpBJTkAJTFQwz Region: us-east-1 +... ``` **mc alias** @@ -55,6 +55,7 @@ Endpoint: http://127.0.0.1:9000 http://192.168.1.12:9000 AccessKey: YRDRWWQLEWS9OBJ31GZ2 SecretKey: y2sSWzx5ytwvkELcxOuSaQ8n3doNqoIilRpb5Kjj Region: us-east-1 +... ``` ```sh diff --git a/pkg/quick/quick_test.go b/pkg/quick/quick_test.go index f21a05693..d14a505e7 100644 --- a/pkg/quick/quick_test.go +++ b/pkg/quick/quick_test.go @@ -53,9 +53,9 @@ func (s *MySuite) TestCheckData(c *C) { c.Assert(err, Not(IsNil)) type myStructBadNoVersion struct { - User string - Password string - Folders []string + User string + Password string + Directories []string } saveMeBadNoVersion := myStructBadNoVersion{"guest", "nopassword", []string{"Work", "Documents", "Music"}} err = quick.CheckData(&saveMeBadNoVersion) @@ -71,10 +71,10 @@ func (s *MySuite) TestCheckData(c *C) { c.Assert(err, Not(IsNil)) type myStructGood struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMeGood := myStructGood{"1", "guest", "nopassword", []string{"Work", "Documents", "Music"}} @@ -84,10 +84,10 @@ func (s *MySuite) TestCheckData(c *C) { func (s *MySuite) TestLoadFile(c *C) { type myStruct struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMe := myStruct{} _, err := quick.Load("test.json", &saveMe) @@ -125,10 +125,10 @@ func (s *MySuite) TestLoadFile(c *C) { func (s *MySuite) TestVersion(c *C) { defer os.RemoveAll("test.json") type myStruct struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMe := myStruct{"1", "guest", "nopassword", []string{"Work", "Documents", "Music"}} config, err := quick.New(&saveMe) @@ -158,10 +158,10 @@ func (s *MySuite) TestVersion(c *C) { func (s *MySuite) TestSaveLoad(c *C) { defer os.RemoveAll("test.json") type myStruct struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMe := myStruct{"1", "guest", "nopassword", []string{"Work", "Documents", "Music"}} config, err := quick.New(&saveMe) @@ -188,10 +188,10 @@ func (s *MySuite) TestSaveBackup(c *C) { defer os.RemoveAll("test.json") defer os.RemoveAll("test.json.old") type myStruct struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMe := myStruct{"1", "guest", "nopassword", []string{"Work", "Documents", "Music"}} config, err := quick.New(&saveMe) @@ -221,10 +221,10 @@ func (s *MySuite) TestSaveBackup(c *C) { func (s *MySuite) TestDiff(c *C) { type myStruct struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMe := myStruct{"1", "guest", "nopassword", []string{"Work", "Documents", "Music"}} config, err := quick.New(&saveMe) @@ -234,8 +234,8 @@ func (s *MySuite) TestDiff(c *C) { type myNewStruct struct { Version string // User string - Password string - Folders []string + Password string + Directories []string } mismatch := myNewStruct{"1", "nopassword", []string{"Work", "documents", "Music"}} @@ -255,10 +255,10 @@ func (s *MySuite) TestDiff(c *C) { func (s *MySuite) TestDeepDiff(c *C) { type myStruct struct { - Version string - User string - Password string - Folders []string + Version string + User string + Password string + Directories []string } saveMe := myStruct{"1", "guest", "nopassword", []string{"Work", "Documents", "Music"}} config, err := quick.New(&saveMe)