Implement S3 Gateway to third party cloud storage providers. (#3756)

Currently supported backend is Azure Blob Storage.

```
export MINIO_ACCESS_KEY=azureaccountname
export MINIO_SECRET_KEY=azureaccountkey
minio gateway azure
```
This commit is contained in:
Krishna Srinivas
2017-03-16 12:21:58 -07:00
committed by Harshavardhana
parent 8426cf9aec
commit cea4cfa3a8
41 changed files with 6983 additions and 65 deletions

View File

@@ -48,10 +48,10 @@ var serverCmd = cli.Command{
Flags: append(serverFlags, globalFlags...),
Action: serverMain,
CustomHelpTemplate: `NAME:
{{.HelpName}} - {{.Usage}}
{{.HelpName}} - {{.Usage}}
USAGE:
{{.HelpName}} {{if .VisibleFlags}}[FLAGS] {{end}}PATH [PATH...]
{{.HelpName}} {{if .VisibleFlags}}[FLAGS] {{end}}PATH [PATH...]
{{if .VisibleFlags}}
FLAGS:
{{range .VisibleFlags}}{{.}}
@@ -85,9 +85,9 @@ EXAMPLES:
}
// Check for updates and print a notification message
func checkUpdate() {
func checkUpdate(mode string) {
// Its OK to ignore any errors during getUpdateInfo() here.
if older, downloadURL, err := getUpdateInfo(1 * time.Second); err == nil {
if older, downloadURL, err := getUpdateInfo(1*time.Second, mode); err == nil {
if older > time.Duration(0) {
console.Println(colorizeUpdateMessage(downloadURL, older))
}
@@ -485,11 +485,6 @@ func serverMain(c *cli.Context) {
// Initializes server config, certs, logging and system settings.
initServerConfig(c)
// Check for new updates from dl.minio.io.
if !quietFlag {
checkUpdate()
}
// Server address.
serverAddr := c.String("address")
@@ -538,6 +533,18 @@ func serverMain(c *cli.Context) {
globalIsXL = true
}
if !quietFlag {
// Check for new updates from dl.minio.io.
mode := globalMinioModeFS
if globalIsXL {
mode = globalMinioModeXL
}
if globalIsDistXL {
mode = globalMinioModeDistXL
}
checkUpdate(mode)
}
// Initialize name space lock.
initNSLock(globalIsDistXL)