From 57b8db2088d9abfebcbba0ef58d0f1e0b809a2c3 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 13 Apr 2018 11:57:05 -0700 Subject: [PATCH] Cleanup help to bring concise self-help message (#5788) --- cmd/gateway-main.go | 2 +- cmd/gateway/sia/gateway-sia.go | 8 +++++--- cmd/server-main.go | 17 +++-------------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/cmd/gateway-main.go b/cmd/gateway-main.go index 629362709..136124d39 100644 --- a/cmd/gateway-main.go +++ b/cmd/gateway-main.go @@ -209,7 +209,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) { // Print a warning message if gateway is not ready for production before the startup banner. if !gw.Production() { - logger.StartupMessage(colorYellow("\n *** Warning: Not Ready for Production ***")) + logger.StartupMessage(colorYellow(" *** Warning: Not Ready for Production ***")) } // Print gateway startup message. diff --git a/cmd/gateway/sia/gateway-sia.go b/cmd/gateway/sia/gateway-sia.go index e6f75bd6c..23b3d7aa9 100644 --- a/cmd/gateway/sia/gateway-sia.go +++ b/cmd/gateway/sia/gateway-sia.go @@ -163,9 +163,11 @@ func (g *Sia) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error) colorBlue := color.New(color.FgBlue).SprintfFunc() colorBold := color.New(color.Bold).SprintFunc() - logger.StartupMessage(colorBlue("\nSia Gateway Configuration:")) - logger.StartupMessage(colorBlue(" Sia Daemon API Address:") + colorBold(fmt.Sprintf(" %s\n", sia.Address))) - logger.StartupMessage(colorBlue(" Sia Temp Directory:") + colorBold(fmt.Sprintf(" %s\n", sia.TempDir))) + formatStr := "%" + fmt.Sprintf("%ds", len(sia.Address)+7) + logger.StartupMessage(colorBlue("\nSia Configuration:")) + logger.StartupMessage(colorBlue(" API Address:") + colorBold(fmt.Sprintf(formatStr, sia.Address))) + logger.StartupMessage(colorBlue(" Staging Directory:") + colorBold(fmt.Sprintf(" %s", sia.TempDir))) + return sia, nil } diff --git a/cmd/server-main.go b/cmd/server-main.go index fcff20edb..eca7ce284 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -96,26 +96,15 @@ EXAMPLES: $ export MINIO_DOMAIN=mydomain.com $ {{.HelpName}} --address mydomain.com:9000 /mnt/export - 3. Start minio server on a 12 disks server. - $ {{.HelpName}} /mnt/export1/ /mnt/export2/ /mnt/export3/ /mnt/export4/ \ - /mnt/export5/ /mnt/export6/ /mnt/export7/ /mnt/export8/ /mnt/export9/ \ - /mnt/export10/ /mnt/export11/ /mnt/export12/ - - 4. Start 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 - $ {{.HelpName}} http://192.168.1.11/mnt/export/ http://192.168.1.12/mnt/export/ \ - http://192.168.1.13/mnt/export/ http://192.168.1.14/mnt/export/ - - 5. Start minio server on 64 disks server. + 4. Start minio server on 64 disks server. $ {{.HelpName}} /mnt/export{1...64} - 6. Start distributed minio server on an 8 node setup with 8 drives each. Run following command on all the 8 nodes. + 5. Start distributed minio server on an 8 node setup with 8 drives each. Run following command on all the 8 nodes. $ export MINIO_ACCESS_KEY=minio $ export MINIO_SECRET_KEY=miniostorage $ {{.HelpName}} http://node{1...8}.example.com/mnt/export/{1...8} - 7. Start minio server with edge caching enabled. + 6. Start minio server with edge caching enabled. $ export MINIO_CACHE_DRIVES="/mnt/drive1;/mnt/drive2;/mnt/drive3;/mnt/drive4" $ export MINIO_CACHE_EXCLUDE="bucket1/*;*.png" $ export MINIO_CACHE_EXPIRY=40