diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-08-24 01:18:30 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-08-24 01:18:30 -0700 |
| commit | e9ebe24f2e0f8b30284ea9334d5924f54e970c95 (patch) | |
| tree | c160f0e8d5bd74231fc7f81563f13bcd3a756128 /weed/shell/command_remote_configure.go | |
| parent | 7c39a18ba5985cfcd40fbccea0945874b297d9f2 (diff) | |
| download | seaweedfs-e9ebe24f2e0f8b30284ea9334d5924f54e970c95.tar.xz seaweedfs-e9ebe24f2e0f8b30284ea9334d5924f54e970c95.zip | |
cloud drive: add support for Azure
Diffstat (limited to 'weed/shell/command_remote_configure.go')
| -rw-r--r-- | weed/shell/command_remote_configure.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/shell/command_remote_configure.go b/weed/shell/command_remote_configure.go index ed8b2395d..33148d5b6 100644 --- a/weed/shell/command_remote_configure.go +++ b/weed/shell/command_remote_configure.go @@ -34,6 +34,7 @@ func (c *commandRemoteConfigure) Help() string { # set or update a configuration remote.configure -name=cloud1 -type=s3 -s3.access_key=xxx -s3.secret_key=yyy remote.configure -name=cloud2 -type=gcs -gcs.appCredentialsFile=~/service-account-file.json + remote.configure -name=cloud3 -type=azure -azure.account_name=xxx -azure.account_key=yyy # delete one configuration remote.configure -delete -name=cloud1 @@ -53,7 +54,7 @@ func (c *commandRemoteConfigure) Do(args []string, commandEnv *CommandEnv, write isDelete := remoteConfigureCommand.Bool("delete", false, "delete one remote storage by its name") remoteConfigureCommand.StringVar(&conf.Name, "name", "", "a short name to identify the remote storage") - remoteConfigureCommand.StringVar(&conf.Type, "type", "s3", "[s3|gcs] storage type") + remoteConfigureCommand.StringVar(&conf.Type, "type", "s3", "[s3|gcs|azure] storage type") remoteConfigureCommand.StringVar(&conf.S3AccessKey, "s3.access_key", "", "s3 access key") remoteConfigureCommand.StringVar(&conf.S3SecretKey, "s3.secret_key", "", "s3 secret key") @@ -62,7 +63,10 @@ func (c *commandRemoteConfigure) Do(args []string, commandEnv *CommandEnv, write remoteConfigureCommand.StringVar(&conf.S3StorageClass, "s3.storage_class", "", "s3 storage class") remoteConfigureCommand.BoolVar(&conf.S3ForcePathStyle, "s3.force_path_style", true, "s3 force path style") - remoteConfigureCommand.StringVar(&conf.GcsGoogleApplicationCredentials, "gcs.appCredentialsFile", "", "google cloud storage credentials file, or leave it empty to use env GOOGLE_APPLICATION_CREDENTIALS") + remoteConfigureCommand.StringVar(&conf.GcsGoogleApplicationCredentials, "gcs.appCredentialsFile", "", "google cloud storage credentials file, default to use env GOOGLE_APPLICATION_CREDENTIALS") + + remoteConfigureCommand.StringVar(&conf.AzureAccountName, "azure.account_name", "", "azure account name, default to use env AZURE_STORAGE_ACCOUNT") + remoteConfigureCommand.StringVar(&conf.AzureAccountKey, "azure.account_key", "", "azure account name, default to use env AZURE_STORAGE_ACCESS_KEY") if err = remoteConfigureCommand.Parse(args); err != nil { return nil |
